.cart-container{ 
    max-width: 92rem; 
    margin: 0 auto; 
    padding: 0 1.75rem; 
}

.cart-hero{
  position: relative;
  padding: 6rem 1.5rem 6rem;
  overflow: hidden;

  background:
    radial-gradient(1200px 600px at 50% -20%, rgba(99,102,241,0.45), transparent 65%),
    radial-gradient(900px 520px at 10% 30%, rgba(139,92,246,0.35), transparent 60%),
    radial-gradient(900px 520px at 90% 40%, rgba(147,51,234,0.30), transparent 60%),
    linear-gradient(180deg, #e0e7ff 0%, #f1f5ff 100%);
}
.cart-hero::before{
  content:"";
  position:absolute;
  width:42rem;
  height:42rem;
  top:-14rem;
  right:-14rem;
  z-index:0;
  background: radial-gradient(circle, rgba(124,58,237,0.22), transparent 65%);
  filter: blur(2px);
}
.cart-hero::after{
  content:"";
  position:absolute;
  width:44rem;
  height:44rem;
  bottom:-18rem;
  left:-18rem;
  z-index:0;
  background: radial-gradient(circle, rgba(79,70,229,0.18), transparent 65%);
  filter: blur(2px);
}

.cart-main{ background:#fff; padding: 2.25rem 0 4rem; }

.cart-layout{
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  max-width: 1300px;
  margin: 0 auto;
  gap: 3rem;
}

.cart-hero::after,
.cart-hero::before{
  pointer-events:none;
}
.cart-hero__inner{
  position: relative;
  z-index: 1;

  display: flex;
  align-items: center;
  justify-content: center;   /* 👈 центрує всю групу */
  gap: 1.8rem;

  text-align: left;          /* текст вирівнюється нормально */
}
.cart-hero__inner > div{
  text-align: center;        /* 👈 ось це центрує текст */
}

.cart-hero__title{
  font-size: 3.25rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 0 0 .6rem;
  color: #0f172a;
}
.cart-hero__sub{
  font-size: 1.15rem;
  color: #64748b;
  margin: 0;
}
.cart-hero__icon{
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 1.4rem;

  background: rgba(99,102,241,.1);

  display:flex;
  align-items:center;
  justify-content:center;

  margin-bottom: .5rem;
}

.cart-hero__icon svg{
  width:2.2rem;
  height:2.2rem;
  stroke:#6366f1;
  fill:none;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

#cartItemsCount{
  font-weight: 800;
  color: #6366f1;
}

.back-link{
  display:inline-flex; align-items:center; gap:.6rem;
  color:#0f172a; text-decoration:none;
  font-weight:600;
  margin-bottom: 1.1rem;
  transition: color .25s ease;
}
.back-link__icon{
  width: 2.1rem; height: 2.1rem;
  display:inline-flex; align-items:center; justify-content:center;
  border-radius: .9rem;
  background:#f1f5f9;
  transition: all .25s ease;
}
.back-link__icon svg{ 
  width:1.2rem; 
  height:1.2rem; 
  stroke:#0f172a; 
  fill:none; 
  stroke-width:2; 
  stroke-linecap:round; 
  stroke-linejoin:round; 
  transition: stroke .25s ease;
}

.back-link:hover{
  color: #6366f1; /* фіолетовий текст */
  letter-spacing: .01em;
}

.back-link:hover .back-link__icon{
  background: #6366f1;         /* фон іконки стає фіолетовим */
  transform: translateX(-4px); /* рух як у continue-btn */
  box-shadow: 0 8px 20px rgba(99,102,241,.35);
}

.back-link:hover .back-link__icon svg{
  stroke: #fff; /* стрілка біла */
}

.free-ship{
  display:flex; align-items:flex-start; gap: .9rem;
  background: #ecfdf3;
  border: 1px solid rgba(34,197,94,.25);
  border-radius: 1.2rem;
  padding: 1rem 1.15rem;
  margin-bottom: 1.2rem;
}
.free-ship__icon{
  width: 2.4rem; height: 2.4rem;
  border-radius: 1rem;
  background: rgba(34,197,94,.12);
  display:inline-flex; align-items:center; justify-content:center;
  color:#16a34a;
}
.free-ship__icon svg{ width:1.35rem; height:1.35rem; stroke:currentColor; fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.free-ship__title{ font-weight:750; color:#0f172a; margin-bottom:.2rem; }
.free-ship__text{ color:#334155; font-weight:500; }

.cart-card{
  background:#fff;
  border-radius: 1.5rem;
  box-shadow: 0 .875rem 2.25rem rgba(2,6,23,.08);
  overflow:hidden;
}
.cart-card__head{
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(2,6,23,.08);
}
.cart-card__head h2{
  font-size: 1.35rem;
  font-weight: 700;
}

.cart-list{ display:flex; flex-direction:column; }

.cart-item{
  display:grid;
  grid-template-columns: 6.5rem 1fr 9rem;
  gap: 1.1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(2,6,23,.06);
  align-items:center;
}
.cart-item:last-child{ border-bottom: none; }

.cart-thumb{
  width: 6.5rem; height: 6.5rem;
  border-radius: 1.25rem;
  overflow:hidden;
  background:#f1f5f9;
}
.cart-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }

.cart-info{ min-width: 0; }
.cart-title{
  margin:0 0 .35rem;
  font-size: 1rem;
  font-weight: 600;
  color:#0f172a;
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
}
.cart-meta{
  display:flex; gap:.6rem; align-items:center;
  color:#64748b;
  font-weight:600;
  font-size: .95rem;
  margin-bottom: .7rem;
}
.cart-meta .pill{
  display:inline-flex; padding:.25rem .6rem;
  border-radius: 999rem;
  background:#f1f5f9;
  color:#334155;
  font-weight:650;
  font-size:.85rem;
}

.qty{
  display:flex; align-items:center; gap:.75rem;
}
.qty-btn{
  width: 2.45rem; height: 2.45rem;
  border-radius: .85rem;
  border: 1px solid rgba(2,6,23,.14);
  background:#fff;
  cursor:pointer;
  font-weight:800;
  font-size: 1.2rem;
  color:#0f172a;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.qty-btn:hover{ background:#f8fafc; transform: translateY(-1px); box-shadow: 0 .5rem 1.25rem rgba(2,6,23,.08); }
.qty-num{ width: 2rem; text-align:center; font-weight:800; color:#0f172a; }

.cart-rightCol{
  display:flex; align-items:center; justify-content:flex-end;
  gap: .9rem;
}
.cart-price{
  text-align:right;
}
.cart-price strong{
  display:block;
  font-size: 1.35rem;
  font-weight: 700;
  color:#0f172a;
}
.cart-price span{
  display:block;
  margin-top:.15rem;
  color:#64748b;
  font-weight:600;
  font-size:.95rem;
}

.trash{
  width: 2.6rem;
  height: 2.6rem;

  border-radius: .95rem;
  border: 1px solid rgba(2,6,23,.12);
  background:#fff;

  cursor:pointer;

  display:inline-flex;
  align-items:center;
  justify-content:center;

  transition: all .2s ease;
}
.trash:hover{
  background:#fee2e2;               /* light red */
  border-color:#fca5a5;              /* soft red border */
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(239,68,68,.15);
}
.trash svg{
  width: 1.2rem; 
  height: 1.2rem; 
  stroke:#dc2626; 
  fill:none; 
  stroke-width:2; 
  stroke-linecap:round; 
  stroke-linejoin:round; }

.continue-btn{
  margin-top: 1.25rem;

  width: fit-content;              /* 👈 більше не 100% */
  display: inline-flex;            /* 👈 замість flex */
  align-items: center;
  justify-content: center;
  gap: .7rem;

  padding: .9rem 1.4rem;
  border-radius: 1rem;

  border: 1.5px solid rgba(2,6,23,.14);
  background: #fff;

  text-decoration: none;
  color: #0f172a;
  font-weight: 650;
  font-size: .95rem;

  cursor: pointer;
  transition: all .25s ease;
}

.continue-btn:hover{
  background: #6366f1;   /* indigo */
  color: #fff;
  border-color: #6366f1;

  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(99,102,241,.35);
}
.continue-btn__icon{
  width: 2rem;
  height: 2rem;
  border-radius: .8rem;

  background: #f1f5f9;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  transition: all .25s ease;
}

.continue-btn:hover .continue-btn__icon{
  background: rgba(255,255,255,.18);
  transform: translateX(-3px);
}

.continue-btn__icon svg{
  width: 1.1rem;
  height: 1.1rem;
  stroke: currentColor;          /* 👈 автоматично міняє колір */
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}


.summary{
  position: sticky;
  top: 1.5rem;

  background:#fff;
  border-radius: 1.5rem;
  box-shadow: 0 .875rem 2.25rem rgba(2,6,23,.08);
  padding: 1.5rem;
}
.summary__title{
  margin:0 0 1.1rem;
  font-size: 1.45rem;
  font-weight: 850;
}

.promo{ margin-bottom: 1rem; }

.promo__label{ 
  font-weight:600; 
  color:#475569; 
  margin-bottom:.55rem; 
}
.promo__row{ display:flex; gap:.75rem; }
.promo__input{
  flex: 1;
  height: 3rem;
  border-radius: 1rem;
  border: 1px solid rgba(2,6,23,.14);
  padding: 0 1rem;
  font-weight:600;
  outline:none;
}
.promo__btn{
  height: 3rem;
  padding: 0 1.1rem;
  border-radius: 1rem;
  border: none;
  cursor: pointer;

  background:#0b1220;
  color:#fff;
  font-weight:700;

  transition: transform .25s ease,
              box-shadow .25s ease,
              background .25s ease;
}

.promo__btn:hover{
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(11,18,32,.25);
}

.promo__btn:active{
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(11,18,32,.2);
}

.promo__hint{ 
  margin-top:.55rem; 
  font-weight:600; 
  color:#64748b; 
  min-height: 1.1rem; 
}

.summary__lines{
  border-top: 1px solid rgba(2,6,23,.08);
  padding-top: 1rem;
  margin-top: 1rem;
}
.line{
  display:flex; justify-content:space-between; align-items:center;
  padding: .55rem 0;
  color:#334155;
  font-weight:600;
}
.summary__total{
  display:flex; justify-content:space-between; align-items:baseline;
  padding-top: 1rem;
  margin-top: .5rem;
  border-top: 1px solid rgba(2,6,23,.08);
}
.summary__total strong{
  font-size: 1.85rem;
  font-weight: 800;
  color:#6d5dfc;
}

.checkout-btn{
  margin-top: 1.1rem;
  width: 100%;
  height: 3.4rem;

  border: none;
  border-radius: 1.1rem;
  cursor:pointer;

  font-weight: 750;
  font-size: 1.05rem;
  color:#fff;

  background: linear-gradient(90deg,#6d5dfc,#9b5cff);
  box-shadow: 0 1rem 2rem rgba(109,93,252,0.25);

  display:flex;
  align-items:center;
  justify-content:center;
  gap:.7rem;

  transition: transform .25s ease,
              box-shadow .25s ease,
              background .25s ease;
}

.checkout-btn:hover{
  transform: translateY(-4px);
  box-shadow: 0 1.6rem 3rem rgba(109,93,252,0.35);
  background: linear-gradient(90deg,#7c6bff,#a86bff);
}

.checkout-btn:active{
  transform: translateY(-1px);
  box-shadow: 0 .6rem 1.2rem rgba(109,93,252,0.3);
}

.checkout-btn__icon{
  display:flex;
  align-items:center;
  transition: transform .25s ease;
}

.checkout-btn:hover .checkout-btn__icon{
  transform: translateX(6px);
}

.checkout-btn__icon svg{
  width: 1.25rem;
  height: 1.25rem;
  stroke:#fff;
  fill:none;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
  transition: transform .25s ease;
}

.summary-bullets{
  margin: 1.1rem 0 0;
  padding: 0;
  list-style: none;
  color:#475569;
  font-weight:650;
}
.summary-bullets li{
  display:flex; gap:.6rem; align-items:center;
  padding: .45rem 0;
}
.summary-bullets li::before{
  content:"";
  width: .55rem; height: .55rem;
  border-radius: 999rem;
  background:#22c55e;
  display:inline-block;
}

.cart-empty{
  padding: 2.5rem 1.5rem;
  text-align:center;
}
.cart-empty__title{ 
  font-weight:900; 
  font-size:1.35rem; 
  margin-bottom:.35rem; 
}
.cart-empty__text{ 
  color:#64748b; 
  font-weight:600; 
  margin-bottom: 1.1rem; 
}

.cart-empty__btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  height: 3rem;
  padding: 0 1.2rem;
  border-radius: 1rem;

  background: #0b1220;
  color:#fff;
  text-decoration:none;
  font-weight:750;

  transition: transform .25s ease,
              box-shadow .25s ease,
              background .25s ease;
}

.cart-empty__btn:hover{
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(11,18,32,.25);
}

.cart-empty__btn:active{
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(11,18,32,.2);
}

/* responsive */
@media (max-width: 62rem){
  .cart-layout{ grid-template-columns: 1fr; }
  .summary{ position: relative; top: 0; }
}
@media (max-width: 40rem){
  .cart-item{ grid-template-columns: 6rem 1fr; }
  .cart-rightCol{ grid-column: 1 / -1; justify-content:space-between; }
}

/* ===== Checkout modal ===== */
.checkoutModal{
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: none;
  align-items: flex-start;
  justify-content: center;

  padding: 4vh 1rem 2rem;
}

.checkoutModal.is-open{
  display: flex;
}

.checkoutModal__overlay{
  position: absolute;
  inset: 0;
  background: rgba(2,6,23,.62);
  backdrop-filter: blur(10px);
}

.checkoutModal__dialog{
  position: relative;

  width: min(46rem, calc(100vw - 2rem));
  margin: 0;

  background:
    radial-gradient(1200px 500px at 20% -10%, rgba(124,58,237,.18), transparent 55%),
    radial-gradient(900px 450px at 90% 0%, rgba(236,72,153,.16), transparent 50%),
    #ffffff;

  border: 1px solid rgba(2,6,23,.10);
  border-radius: 1.4rem;

  box-shadow: 0 2.2rem 5rem rgba(2,6,23,.35);

  padding: 1.3rem 1.3rem 1.1rem;

  max-height: 92vh;
  overflow: auto;

  animation: checkoutPop .22s ease-out;
}

/* animation */
@keyframes checkoutPop{
  from{
    transform: translateY(12px);
    opacity: 0;
  }
  to{
    transform: translateY(0);
    opacity: 1;
  }
}

/* close button */
.checkoutModal__close{
  position: absolute;
  top: .85rem;
  right: .85rem;

  width: 2.6rem;
  height: 2.6rem;

  border-radius: .95rem;
  border: 1px solid rgba(2,6,23,.12);
  background:#fff;

  cursor:pointer;

  display:flex;
  align-items:center;
  justify-content:center;

  transition: background .2s ease, transform .15s ease;
}

.checkoutModal__close:hover{
  background:#f8fafc;
  transform: translateY(-1px);
}

.checkoutModal__close svg{
  width: 1.15rem;
  height: 1.15rem;
  stroke:#0f172a;
  fill:none;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

/* header */
.checkoutModal__head{
  padding-right: 3.2rem;
  margin-bottom: 1rem;
}

.checkoutModal__title{
  margin: 0 0 .25rem;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color:#0f172a;
}

.checkoutModal__sub{
  margin: 0;
  color:#64748b;
  font-weight: 500;
}

/* ===== form ===== */

.checkoutGrid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.field{
  display:flex;
  flex-direction:column;
  gap:.4rem;
}

.field--full{
  grid-column: 1 / -1;
}

.field__label{
  font-size: .85rem;
  font-weight: 600;
  color:#334155;
}

.field__input{
  width: 100%;

  border: 1px solid rgba(2,6,23,.10);
  border-radius: 1rem;

  padding: .8rem .9rem;

  font: inherit;
  outline: none;

  background: rgba(255,255,255,.9);

  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset;

  transition: border .2s ease, box-shadow .2s ease;
  
}

.field__input:hover{
  border-color: rgba(124,58,237,.25);
}

.field__input:focus{
  border-color: rgba(124,58,237,.55);
  box-shadow: 0 0 0 4px rgba(124,58,237,.14);
}

.field__textarea{
  resize: vertical;
  min-height: 3.2rem;
}

.field__hint{
  color:#64748b;
  font-size: .8rem;
}

/* divider */
.divider{
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(79,70,229,.20),
    rgba(147,51,234,.18),
    rgba(236,72,153,.16)
  );
  margin: .25rem 0;
}

/* buttons */
/* ===== Checkout buttons (pretty) ===== */
.checkoutActions{
  display:flex;
  justify-content:flex-end;
  gap:.75rem;
  margin-top: 1rem;
}

/* базова кнопка */
.btn{
  -webkit-tap-highlight-color: transparent;
  border: 1px solid rgba(2,6,23,.12);
  background: #fff;
  border-radius: 1rem;
  padding: .78rem 1.05rem;
  font: inherit;
  font-weight: 650;            /* менша "жирність", але все ще виразно */
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.55rem;
  line-height: 1;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, opacity .2s ease;
}

.btn:focus-visible{
  outline: none;
  box-shadow: 0 0 0 4px rgba(124,58,237,.16);
  border-color: rgba(124,58,237,.35);
}

.btn:active{
  transform: translateY(1px) scale(0.99);
}

/* Скасувати (ghost) */
.btn--ghost{
  background: rgba(2,6,23,.02);
  border-color: rgba(2,6,23,.12);
  color: #0f172a;
}

.btn--ghost:hover{
  background: rgba(2,6,23,.06);
  border-color: rgba(2,6,23,.18);
  box-shadow: 0 .75rem 1.6rem rgba(2,6,23,.10);
  transform: translateY(-1px);
}

/* Підтвердити (primary gradient) */
.btn--primary{
  border-color: transparent;
  color:#fff;
  background: linear-gradient(90deg,#4f46e5,#9333ea);
  box-shadow: 0 .9rem 2rem rgba(79,70,229,.22);
  position: relative;
}

.btn--primary:hover{
  transform: translateY(-1px);
  box-shadow: 0 1.1rem 2.4rem rgba(79,70,229,.28);
  filter: saturate(1.05);
}

/* легкий "shine" при hover */
.btn--primary::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255,255,255,.18), rgba(255,255,255,0));
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events:none;
}
.btn--primary:hover::after{ opacity: .9; }

/* disabled */
.btn:disabled{
  opacity: .55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ===== mobile ===== */

@media (max-width: 640px){

  .checkoutGrid{
    grid-template-columns: 1fr;
  }

  .checkoutModal__dialog{
    width: calc(100vw - 1.25rem);
  }

}



.toast__content{
  display:flex;
  align-items:center;
  gap:.75rem;
  font-weight: 600;
}

.toast__icon{
  width: 1.6rem;
  height: 1.6rem;
  border-radius: .6rem;
  background: rgba(17,24,39,.08);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex: 0 0 auto;
}

.toast__icon svg{
  width: 1rem;
  height: 1rem;
  stroke: #16a34a;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.toast__link{
  color:#7c3aed;
  font-weight:700;
  text-decoration:none;
  white-space:nowrap;
}

.toast__link:hover{ text-decoration: underline; }