/* ==========================================================================
   ARADHNAA — cart.css
   The basket page, plus the quantity stepper and the header cart button,
   which both appear on other pages too.
   ========================================================================== */

.cart{ padding-block:var(--space-6) var(--space-7); }

/* --------------------------------------------------------------------------
   EMPTY
   -------------------------------------------------------------------------- */
.cart__empty{
  max-width:52ch; margin-inline:auto;
  padding-block:var(--space-6);
  text-align:center;
}
.cart__empty-line{
  font-family:var(--font-display); font-weight:600;
  font-size:clamp(21px, 2.6vw, 27px); color:var(--ink);
}
.cart__empty-sub{
  margin-top:var(--space-3);
  font-family:var(--font-accent); font-style:italic;
  font-size:16px; line-height:1.55; color:var(--ink-muted);
}
.cart__empty-actions{
  display:flex; flex-wrap:wrap; gap:var(--space-3);
  justify-content:center; margin-top:var(--space-5);
}

/* --------------------------------------------------------------------------
   THE LINES
   A table, because it is a table: an item, a price, a count and a subtotal.
   The wrapper scrolls rather than letting a long kit name widen the page.
   -------------------------------------------------------------------------- */
.cart__tablewrap{ overflow-x:auto; }
.cart__table{
  width:100%; border-collapse:collapse;
  --table-line:rgba(140,106,46,.75);
  border:1px solid var(--table-line);
  font-size:15px;
}
.cart__table th,
.cart__table td{
  border:1px solid var(--table-line);
  padding:12px 14px; text-align:left; vertical-align:middle;
}
.cart__table thead th{
  background:linear-gradient(168deg, #FBF2E1, #F4E7D1);
  font-family:var(--font-body); font-weight:700;
  font-size:11px; letter-spacing:.12em; text-transform:uppercase;
  color:var(--sindoor); white-space:nowrap;
}
.cart__table tbody tr:nth-child(even){ background:rgba(36,18,9,.025); }

.cart__name{
  font-family:var(--font-display); font-weight:600;
  font-size:15.5px; color:var(--ink);
  display:inline-block;
}
.cart__name:hover{ color:var(--sindoor); }
.cart__cat{
  display:block; margin-top:3px;
  font-size:10.5px; font-weight:700; letter-spacing:.12em;
  text-transform:uppercase; color:var(--sindoor); opacity:.8;
}
.cart__cell-price,
.cart__cell-total{ font-variant-numeric:tabular-nums; white-space:nowrap; }
.cart__cell-total{ font-family:var(--font-display); font-weight:700; }
.cart__cell-qty,
.cart__cell-remove{ width:1%; }

.cart__remove{
  font-size:12px; letter-spacing:.04em; color:var(--ink-subtle);
  text-decoration:underline; text-underline-offset:3px;
  padding:6px 2px; min-height:32px;
}
.cart__remove:hover{ color:var(--sindoor); }

/* --------------------------------------------------------------------------
   SUMMARY
   -------------------------------------------------------------------------- */
.cart__summary{
  display:grid; gap:var(--space-5);
  margin-top:var(--space-5);
}
@media (min-width:820px){
  .cart__summary{ grid-template-columns:1fr auto; align-items:start; gap:var(--space-7); }
  .cart__actions{ justify-self:end; }
}
.cart__count{ font-size:13px; color:var(--ink-subtle); }
.cart__total-row{
  display:flex; align-items:baseline; gap:var(--space-4);
  margin-top:var(--space-2);
  font-family:var(--font-body); font-weight:600;
  font-size:13px; letter-spacing:.1em; text-transform:uppercase;
  color:var(--ink-muted);
}
.cart__total{
  font-family:var(--font-display); font-weight:700;
  font-size:30px; letter-spacing:0; text-transform:none;
  color:var(--ink); font-variant-numeric:tabular-nums;
}
.cart__saved{
  margin-top:var(--space-2);
  font-size:13px; font-weight:700; color:var(--success-deep);
}
.cart__note{
  margin-top:var(--space-3); max-width:46ch;
  font-size:13px; line-height:1.6; color:var(--ink-subtle);
}
.cart__actions{
  display:flex; flex-direction:column; gap:var(--space-3);
  align-items:stretch;
}
.cart__clear{
  align-self:center; margin-top:var(--space-1);
  font-size:12.5px; color:var(--ink-subtle);
  text-decoration:underline; text-underline-offset:3px;
  min-height:36px; padding:6px 10px;
}
.cart__clear:hover{ color:var(--sindoor); }

/* --------------------------------------------------------------------------
   QUANTITY STEPPER
   Used on the kit page and in every cart row. The number input keeps its
   own keyboard behaviour; the buttons are a shortcut, not a replacement.
   -------------------------------------------------------------------------- */
.qty{
  display:inline-flex; align-items:stretch;
  border:1px solid var(--paper-line-strong);
  border-radius:var(--radius-pill);
  overflow:hidden; background:var(--paper-surface);
}
.qty__btn{
  width:36px; min-height:36px;
  display:grid; place-items:center;
  font-size:16px; line-height:1; color:var(--ink);
  transition:background-color var(--dur-fast) var(--ease-out),
             color var(--dur-fast) var(--ease-out);
}
.qty__btn:hover{ background:rgba(163,44,30,.07); color:var(--sindoor); }
.qty__input{
  width:44px; border:0; background:transparent;
  text-align:center; font-variant-numeric:tabular-nums;
  font-family:var(--font-body); font-weight:600; font-size:14.5px;
  color:var(--ink);
  -moz-appearance:textfield;
}
.qty__input::-webkit-outer-spin-button,
.qty__input::-webkit-inner-spin-button{ -webkit-appearance:none; margin:0; }
.qty__input:focus-visible{ outline:2px solid var(--focus); outline-offset:-2px; }

@media (pointer: coarse){
  .qty__btn{ width:44px; min-height:44px; }
  .qty__input{ width:48px; }
}

/* --------------------------------------------------------------------------
   KIT PAGE BUY BOX
   -------------------------------------------------------------------------- */
.pdp__buybox{
  display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-3);
  margin-top:var(--space-5);
}
.pdp__add{ flex:1 1 200px; justify-content:center; }
.pdp__add.is-added{ background:var(--success-deep); }
.pdp__cartstatus{
  font-size:13.5px; color:var(--success-deep);
}
.pdp__cartstatus:not(:empty){ margin-top:var(--space-2); }

/* --------------------------------------------------------------------------
   HEADER CART BUTTON
   -------------------------------------------------------------------------- */
.header__cart{
  position:relative;
  display:grid; place-items:center;
  width:40px; height:40px;
  color:var(--sandalwood);
  transition:color var(--dur-fast) var(--ease-out);
}
.header__cart:hover{ color:var(--ember); }
.header__cart svg{ width:21px; height:21px; }
.header__cart-count{
  position:absolute; top:1px; right:0;
  min-width:17px; height:17px; padding:0 4px;
  display:grid; place-items:center;
  border-radius:var(--radius-pill);
  background:var(--sindoor); color:var(--sandalwood);
  font-family:var(--font-body); font-weight:700;
  font-size:10px; line-height:1; font-variant-numeric:tabular-nums;
}
@media (pointer: coarse){
  .header__cart{ width:44px; height:44px; }
}

@media (max-width:599px){
  .cart{ padding-block:var(--space-4) var(--space-5); }
  .cart__table{ font-size:14px; }
  .cart__table th,
  .cart__table td{ padding:10px; }
  .cart__total{ font-size:26px; }
  .cart__actions .btn{ width:100%; }
}

/* --------------------------------------------------------------------------
   CART DRAWER
   The same basket as cart.html, condensed into the panel the header opens.
   Sits on the dark drawer surface, so it takes the dark palette rather than
   the Paper one the cart page uses.
   -------------------------------------------------------------------------- */
.drawer--cart{ display:flex; flex-direction:column; }
.drawer__title{
  font-family:var(--font-display); font-weight:600;
  font-size:22px; color:var(--text);
  margin-bottom:var(--space-4);
}

.drawer-cart__empty{ color:var(--text-muted); font-size:15px; }
.drawer-cart__empty .btn{ margin-top:var(--space-4); width:100%; }

.drawer-cart__lines{
  list-style:none;
  flex:1 1 auto; min-height:0; overflow-y:auto;
  margin:0 calc(var(--space-2) * -1);
  padding:0 var(--space-2);
}
.drawer-cart__line{
  display:grid; align-items:center; gap:var(--space-2);
  grid-template-columns:1fr auto auto;
  grid-template-areas:"info qty total" "info qty remove";
  padding:var(--space-3) 0;
  border-bottom:1px solid var(--line);
}
.drawer-cart__info{ grid-area:info; min-width:0; }
.drawer-cart__name{
  display:block;
  font-family:var(--font-display); font-weight:600;
  font-size:15px; color:var(--text);
  overflow-wrap:anywhere;
}
.drawer-cart__name:hover{ color:var(--ember); }
.drawer-cart__price{
  display:block; margin-top:2px;
  font-size:12px; color:var(--text-subtle);
  font-variant-numeric:tabular-nums;
}
.drawer-cart__line .qty{
  grid-area:qty;
  background:transparent; border-color:var(--line-strong);
}
.drawer-cart__line .qty__btn{ color:var(--sandalwood); }
.drawer-cart__line .qty__btn:hover{ background:rgba(240,169,62,.12); color:var(--ember); }
.drawer-cart__line .qty__input{ color:var(--text); }
.qty--sm .qty__btn{ width:30px; min-height:30px; font-size:14px; }
.qty--sm .qty__input{ width:34px; font-size:13.5px; }
@media (pointer: coarse){
  .qty--sm .qty__btn{ width:38px; min-height:38px; }
  .qty--sm .qty__input{ width:38px; }
}
.drawer-cart__linetotal{
  grid-area:total;
  font-family:var(--font-display); font-weight:700;
  font-size:14.5px; color:var(--brass);
  font-variant-numeric:tabular-nums; white-space:nowrap;
}
.drawer-cart__remove{
  grid-area:remove; justify-self:end;
  width:26px; height:26px; display:grid; place-items:center;
  font-size:11px; color:var(--text-subtle);
}
.drawer-cart__remove:hover{ color:var(--ember); }

.drawer-cart__total{
  display:flex; align-items:baseline; justify-content:space-between;
  gap:var(--space-3);
  margin-top:var(--space-4); padding-top:var(--space-4);
  border-top:1px dashed var(--line-strong);
  font-family:var(--font-body); font-weight:600;
  font-size:12px; letter-spacing:.1em; text-transform:uppercase;
  color:var(--text-muted);
}
.drawer-cart__amount{
  font-family:var(--font-display); font-weight:700;
  font-size:24px; letter-spacing:0; text-transform:none;
  color:var(--text); font-variant-numeric:tabular-nums;
}
.drawer-cart__note{
  margin-top:var(--space-2);
  font-size:12px; line-height:1.5; color:var(--text-subtle);
}
.drawer-cart__filled .btn{ width:100%; margin-top:var(--space-4); }
.drawer-cart__full{
  display:block; margin-top:var(--space-3); text-align:center;
  font-size:13px; color:var(--text-muted);
  text-decoration:underline; text-underline-offset:3px;
  min-height:34px; padding:8px;
}
.drawer-cart__full:hover{ color:var(--ember); }
