/* =========================================================
   CART + CHECKOUT styles — Kaustubha by Gita
   ========================================================= */
.cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: transparent;
  border: 1px solid var(--gold-dark);
  border-radius: 50%;
  color: var(--maroon-900);
  cursor: pointer;
  transition: var(--transition);
}
.cart-btn:hover { background: rgba(201, 161, 91, 0.2); }
.cart-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--gold);
  color: var(--maroon-950);
  font: 600 0.72rem/20px var(--font-display);
  text-align: center;
}

.product-add {
  display: block;
  width: 100%;
  margin: 4px 0 12px;
  padding: 11px 14px;
  background: var(--maroon-900);
  color: var(--gold-light);
  border: 1px solid var(--maroon-900);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: var(--transition);
}
.product-add:hover { background: var(--maroon-700); }
.product-add.is-added { background: var(--gold-dark); border-color: var(--gold-dark); color: var(--white); }

.cart-overlay {
  position: fixed; inset: 0;
  background: rgba(31, 1, 2, 0.6);
  z-index: 1000;
}
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(440px, 100%);
  background: var(--cream);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  box-shadow: -20px 0 50px -20px rgba(0, 0, 0, 0.5);
}
.cart-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--gold-light);
  background: var(--white);
}
.cart-head h2 { font-size: 1.35rem; margin: 0; }
.cart-close { background: none; border: 0; font-size: 2rem; line-height: 1; color: var(--maroon-900); cursor: pointer; padding: 0 6px; }
.cart-body { flex: 1; overflow-y: auto; padding: 18px 22px 28px; }
body.cart-open { overflow: hidden; }

.cart-empty, .cart-success { text-align: center; padding: 50px 6px; color: var(--ink-soft); }
.cart-empty .btn, .cart-success .btn { margin-top: 18px; cursor: pointer; }
.cart-success h3 { font-size: 1.5rem; margin-bottom: 10px; }
.cart-success p { margin-bottom: 10px; line-height: 1.6; }
.cart-tick {
  width: 64px; height: 64px; margin: 0 auto 14px;
  border-radius: 50%; background: var(--gold); color: var(--maroon-950);
  font-size: 2rem; line-height: 64px;
}

.cart-lines { list-style: none; margin: 0; padding: 0; }
.cart-line {
  display: grid;
  grid-template-columns: 68px 1fr auto;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--ivory);
  align-items: start;
}
.cart-line img, .cart-noimg {
  width: 68px; height: 68px; object-fit: cover; border-radius: var(--radius);
  background: var(--ivory); display: flex; align-items: center; justify-content: center; color: var(--gold-dark);
}
.cart-line-name { font-family: var(--font-display); color: var(--maroon-950); margin: 0 0 2px; line-height: 1.25; }
.cart-line-price { color: var(--ink-soft); font-size: 0.95rem; margin: 0 0 8px; }
.cart-line-total { font-family: var(--font-display); color: var(--maroon-900); margin: 0; white-space: nowrap; }
.cart-qty { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cart-qty button:not(.cart-remove) {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--gold); background: var(--white); color: var(--maroon-900);
  cursor: pointer; font-size: 1rem; line-height: 1;
}
.cart-qty button:disabled { opacity: 0.4; cursor: not-allowed; }
.cart-qty span { min-width: 20px; text-align: center; }
.cart-remove { background: none; border: 0; color: var(--ink-soft); text-decoration: underline; cursor: pointer; font: inherit; font-size: 0.85rem; margin-left: 6px; }

.cart-summary { padding-top: 18px; }
.cart-row { display: flex; justify-content: space-between; font-size: 1.15rem; margin-bottom: 8px; }
.cart-note { font-size: 0.88rem; color: var(--ink-soft); margin: 8px 0 14px; line-height: 1.5; }
.cart-note a { text-decoration: underline; }
.cart-primary { width: 100%; justify-content: center; cursor: pointer; }
.cart-primary:disabled { opacity: 0.65; cursor: wait; }
.cart-link { display: block; margin: 14px auto 0; background: none; border: 0; color: var(--maroon-900); text-decoration: underline; cursor: pointer; font: inherit; }
.cart-secure { text-align: center; font-size: 0.8rem; color: var(--ink-soft); margin-top: 14px; }

.cart-form-total { font-size: 1.1rem; margin-bottom: 12px; }
.cart-field { display: block; margin-bottom: 12px; }
.cart-field span { display: block; font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 4px; }
.cart-field input {
  width: 100%; padding: 11px 12px; font: inherit; font-size: 1rem;
  border: 1px solid var(--gold-light); border-radius: var(--radius); background: var(--white); color: var(--ink);
}
.cart-field input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.cart-two { display: grid; grid-template-columns: 1fr 130px; gap: 12px; }
.cart-error {
  background: #fdecea; color: #8a1c13; border: 1px solid #f1b5af;
  padding: 10px 12px; border-radius: var(--radius); margin-bottom: 14px; font-size: 0.95rem;
}

@media (max-width: 480px) {
  .cart-line { grid-template-columns: 56px 1fr; }
  .cart-line img, .cart-noimg { width: 56px; height: 56px; }
  .cart-line-total { grid-column: 2; }
  .cart-two { grid-template-columns: 1fr; }
}
