/* ============================================================
   ASTROZON — cart / checkout pages
   depends on style.css for tokens, shop.css for .pcrumbs and .trust
   ============================================================ */

body{ background:#F7F8FA; }

.wcpage{ padding-block:22px 40px; }


/* ============================================================
   HEAD
   ============================================================ */

.cartpage__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  flex-wrap:wrap;
  margin-bottom:18px;
}
.cartpage__title{
  margin:0;
  font-family:var(--font-display);
  font-weight:800;
  font-size:clamp(1.35rem, 2.6vw, 1.8rem);
  letter-spacing:-.015em;
  color:var(--ink);
}
.cartpage__title span{ color:var(--brand); }
.cartpage__sub{
  margin:6px 0 0;
  font-size:13px;
  color:var(--muted);
}
.cartpage__back{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding-top:6px;
  font-size:12.5px;
  font-weight:700;
  color:var(--brand);
  transition:opacity .18s ease;
}
.cartpage__back svg{ width:16px; height:16px; }
.cartpage__back:hover{ opacity:.75; }


/* ============================================================
   LAYOUT
   ============================================================ */

.cartpage__grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) 400px;
  gap:24px;
  align-items:start;
}
.cartpage__side{
  display:flex;
  flex-direction:column;
  gap:18px;
  position:sticky;
  top:98px;
}


/* ============================================================
   ITEMS
   ============================================================ */

.citems{
  background:#fff;
  border:1px solid var(--line);
  border-radius:12px;
  overflow:hidden;
}

/* one shared column track for the head row and every item */
.citems__head,
.citem{
  display:grid;
  grid-template-columns:34px minmax(0,1fr) 110px 150px 120px 78px;
  align-items:center;
  gap:12px;
  padding:14px 18px;
}

.citems__head{
  border-bottom:1px solid var(--line);
  font-size:10px;
  font-weight:700;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--muted);
}
.citems__head .citems__col--product{ grid-column:2; }

.citems__list{ list-style:none; margin:0; padding:0; }
.citem{ border-bottom:1px solid var(--line); }
.citem:last-child{ border-bottom:0; }

/* checkbox */
.citem__pick{ display:grid; place-items:center; }
.citem__check,
.citems__all input{
  appearance:none;
  -webkit-appearance:none;
  width:18px; height:18px;
  border:1.6px solid #CFD4DD;
  border-radius:4px;
  background:#fff;
  cursor:pointer;
  transition:background .18s ease, border-color .18s ease;
}
.citem__check:checked,
.citems__all input:checked{
  background:var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m3.5 8.4 3 3 6-6.6' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;
  border-color:var(--brand);
}

/* product cell */
.citem__product{
  display:flex;
  align-items:flex-start;
  gap:14px;
  min-width:0;
}
.citem__thumb{
  flex:0 0 auto;
  width:72px;
  border-radius:8px;
  overflow:hidden;
  background:#F4F5F7;
  border:1px solid var(--line);
}
.citem__thumb img{ width:100%; height:auto; display:block; }

.citem__info{ min-width:0; }
.citem__name{
  margin:0;
  font-size:13.5px;
  font-weight:700;
  line-height:1.35;
  color:var(--ink);
}
.citem__name a{ transition:color .18s ease; }
.citem__name a:hover{ color:var(--brand); }
.citem__meta{
  margin:4px 0 0;
  font-size:11.5px;
  color:var(--muted);
}
.citem__stock{
  display:flex;
  align-items:center;
  gap:5px;
  margin:7px 0 0;
  font-size:11.5px;
  font-weight:600;
  color:#16A34A;
}
.citem__stock svg{ width:13px; height:13px; }
.citem__stock--low{ color:#F97316; }
.citem__stock--out{ color:var(--brand); }

/* price + total */
.citem__price{
  font-size:13px;
  color:var(--ink-2);
}
.citem__total{
  font-size:14px;
  font-weight:800;
  color:var(--ink);
}
.citem__price del{ color:#B0B6C2; margin-right:5px; }
.citem__price ins{ text-decoration:none; }

/* quantity */
.citem__qty .qty__ctrl{
  display:inline-flex;
  align-items:center;
  border:1px solid var(--line);
  border-radius:8px;
  overflow:hidden;
  background:#fff;
}
.citem__qty button{
  width:36px; height:36px;
  display:grid; place-items:center;
  color:var(--ink-2);
  transition:background .18s ease, color .18s ease;
}
.citem__qty button svg{ width:15px; height:15px; }
.citem__qty button:hover{ background:var(--brand-tint); color:var(--brand); }
.citem__qty input{
  width:48px; height:36px;
  border:0;
  border-inline:1px solid var(--line);
  text-align:center;
  font:inherit;
  font-size:13px;
  font-weight:700;
  color:var(--ink);
  appearance:textfield;
  -moz-appearance:textfield;
}
.citem__qty input::-webkit-outer-spin-button,
.citem__qty input::-webkit-inner-spin-button{ -webkit-appearance:none; margin:0; }
.citem__single{ font-size:13px; font-weight:700; }

/* row actions */
.citem__acts{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:6px;
}
.citem__act{
  width:32px; height:32px;
  display:grid; place-items:center;
  border-radius:7px;
  color:var(--muted);
  transition:background .18s ease, color .18s ease;
}
.citem__act svg{ width:17px; height:17px; }
.citem__act--wish:hover,
.citem__act--wish.is-on{ background:var(--brand-tint); color:var(--brand); }
.citem__act--wish.is-on svg path{ fill:currentColor; }
.citem__act--remove{ color:var(--brand); }
.citem__act--remove:hover{ background:var(--brand-tint); }


/* ---------- bulk actions ---------- */

.citems__bulk{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:12px;
  padding:14px 18px;
  border-top:1px solid var(--line);
  background:#FCFCFD;
}
.citems__all{
  display:inline-flex;
  align-items:center;
  gap:9px;
  margin-right:6px;
  font-size:12.5px;
  color:var(--ink-2);
  cursor:pointer;
}
.cbulk{
  display:inline-flex;
  align-items:center;
  gap:8px;
  height:38px;
  padding:0 15px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  font-size:12.5px;
  font-weight:600;
  color:var(--ink-2);
  transition:border-color .18s ease, color .18s ease, background .18s ease;
}
.cbulk svg{ width:16px; height:16px; }
.cbulk:hover{ border-color:var(--brand); color:var(--brand); }
.cbulk:disabled{ opacity:.45; cursor:not-allowed; }
.cbulk:disabled:hover{ border-color:var(--line); color:var(--ink-2); }
.cbulk--update{ margin-left:auto; }
.cbulk--update:hover{ background:var(--brand); border-color:var(--brand); color:#fff; }


/* ---------- promo code ---------- */
/* Named .cpromo, not .promo: style.css already owns .promo for the front
   page's Limited Edition banner, min-height:210px and all, which is what was
   stretching this panel to a third of a screen. */

.cpromo{
  display:flex;
  align-items:center;
  gap:16px;
  flex-wrap:wrap;
  margin-top:18px;
  padding:18px 20px;
  border:1px solid #FBD9A8;
  border-radius:12px;
  background:#FFF6EA;
}
.cpromo__ico{
  flex:0 0 auto;
  width:40px; height:40px;
  display:grid; place-items:center;
  border-radius:10px;
  background:#FDE7C7;
  color:#C2721A;
}
.cpromo__ico svg{ width:21px; height:21px; }
.cpromo__text{ flex:1 1 200px; }
.cpromo__text h2{
  margin:0;
  font-size:14px;
  font-weight:800;
  color:var(--ink);
}
.cpromo__text p{
  margin:3px 0 0;
  font-size:12px;
  color:var(--ink-2);
}
.cpromo__field{
  display:flex;
  gap:10px;
  flex:0 1 380px;
}
.cpromo__input{
  flex:1 1 auto;
  height:44px;
  padding:0 14px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  font:inherit;
  font-size:13px;
  color:var(--ink);
  transition:border-color .18s ease, box-shadow .18s ease;
}
.cpromo__input::placeholder{ color:#A9AEBA; }
.cpromo__input:focus{
  outline:none;
  border-color:var(--brand);
  box-shadow:0 0 0 3px rgba(224,30,38,.14);
}
.cpromo__apply{
  height:44px;
  padding:0 30px;
  border-radius:8px;
  background:var(--brand);
  color:#fff;
  font-size:13px;
  font-weight:700;
  transition:background .18s ease, transform .18s ease;
}
.cpromo__apply:hover{ background:var(--brand-dark); transform:translateY(-1px); }


/* ============================================================
   ORDER SUMMARY
   ============================================================ */

.summary{
  padding:22px 22px 24px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
}
.summary__title{
  margin:0 0 18px;
  font-family:var(--font-display);
  font-weight:800;
  font-size:1.15rem;
  letter-spacing:-.01em;
  color:var(--ink);
}

.summary__rows{ margin:0; }
.summary__rows > div{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:14px;
  margin:0 0 12px;
  font-size:13px;
}
.summary__rows dt{ color:var(--ink-2); }
.summary__rows dd{ margin:0; font-weight:600; color:var(--ink); }
.summary__row--save dd,
.summary__row--save dd .amount{ color:#16A34A; }
.summary__drop{
  margin-left:6px;
  color:var(--muted);
  font-size:15px;
  line-height:1;
}
.summary__drop:hover{ color:var(--brand); }

/* WooCommerce injects its shipping rows as <tr>; keep them on the same rhythm */
.summary__rows .shipping,
.summary__rows tr{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:14px;
  margin:0 0 12px;
  font-size:13px;
}
.summary__rows th{ font-weight:400; text-align:left; color:var(--ink-2); }
.summary__rows td{ font-weight:600; color:var(--ink); }
.summary__rows ul{ list-style:none; margin:0; padding:0; text-align:right; }
.summary__rows .woocommerce-shipping-destination{ font-size:11.5px; color:var(--muted); }

.summary__total{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:14px;
  padding-top:16px;
  border-top:1px solid var(--line);
}
.summary__total span{
  font-family:var(--font-display);
  font-weight:800;
  font-size:1.1rem;
  color:var(--ink);
}
.summary__total strong,
.summary__total strong *{
  font-family:var(--font-display);
  font-weight:800;
  font-size:1.35rem;
  line-height:1.1;
  letter-spacing:-.015em;
  color:var(--brand);
}
.summary__total small{ display:none; }
.summary__note{
  margin:4px 0 0;
  font-size:11px;
  color:var(--muted);
}

/* free shipping progress */
.freeship{
  display:flex;
  align-items:flex-start;
  gap:11px;
  margin-top:18px;
  padding:13px 15px;
  border:1px solid #CFE8D6;
  border-radius:10px;
  background:#F1FAF3;
}
.freeship__ico{
  flex:0 0 auto;
  width:26px; height:26px;
  display:grid; place-items:center;
  color:#16A34A;
}
.freeship__ico svg{ width:20px; height:20px; }
.freeship strong{
  display:block;
  font-size:12.5px;
  font-weight:700;
  color:#15803D;
}
.freeship p{
  margin:2px 0 0;
  font-size:11.5px;
  color:var(--ink-2);
}

/* Checkout button. WooCommerce's own .button.alt rule is both loaded later and
   more specific, so these have to out-specify it rather than merely restate it. */

/*
 * Express buttons — Apple Pay, G Pay, Amazon Pay — are injected into this same
 * container by the payment plugin, and arrived stacked flush against Proceed to
 * Checkout. A column gap spaces whatever ends up here without the theme having
 * to know any plugin's class names.
 */
.summary .wc-proceed-to-checkout{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin:16px 0 18px;
}
.summary .wc-proceed-to-checkout > *{ margin:0; }

/* and if a plugin drops its buttons in a sibling of its own */
.summary .wc-proceed-to-checkout + *{ margin-top:12px; }

.woocommerce .summary a.checkout-button.button,
.woocommerce .summary a.checkout-button.button.alt,
.summary a.checkout-button,
.summary .wc-proceed-to-checkout a.button{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  width:100%;
  height:52px;
  margin:0;
  padding:0 18px;
  border:0;
  border-radius:9px;
  background:var(--brand);
  background-image:none;
  color:#fff;
  font-size:14px;
  font-weight:800;
  letter-spacing:.01em;
  text-shadow:none;
  box-shadow:0 12px 24px -14px rgba(224,30,38,.85);
  transition:background .18s ease, transform .18s ease;
}

/* express buttons come with their own artwork; just give them the same shape */
.summary .wc-proceed-to-checkout iframe,
.summary .wc-proceed-to-checkout > div{ border-radius:9px; }
.woocommerce .summary a.checkout-button.button:hover,
.woocommerce .summary a.checkout-button.button.alt:hover,
.summary a.checkout-button:hover{
  background:var(--brand-dark);
  color:#fff;
  transform:translateY(-1px);
}

.summary__safe{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  margin:16px 0 0;
  font-size:11.5px;
  color:var(--muted);
}
.summary__safe svg{ width:14px; height:14px; }

.summary__accept{
  margin:20px 0 10px;
  font-size:12px;
  font-weight:600;
  color:var(--ink-2);
}

/* the cart sidebar stacks its promises two-up */
.trust--2up{ grid-template-columns:repeat(2, 1fr); }
.trust--2up li:nth-child(odd){ border-left:0; }
.trust--2up li:nth-child(n+3){ border-top:1px solid var(--line); }


/* ============================================================
   EMPTY CART
   ============================================================ */

.cartempty{
  padding:56px 24px 60px;
  margin-bottom:22px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  text-align:center;
}
.cartempty__ico{
  display:grid;
  place-items:center;
  width:64px; height:64px;
  margin:0 auto 18px;
  border-radius:50%;
  background:var(--brand-tint);
  color:var(--brand);
}
.cartempty__ico svg{ width:30px; height:30px; }
.cartempty h1{
  margin:0 0 8px;
  font-family:var(--font-display);
  font-weight:800;
  font-size:1.45rem;
  color:var(--ink);
}
.cartempty p{
  margin:0 0 22px;
  font-size:13.5px;
  color:var(--muted);
}


/* ============================================================
   WOOCOMMERCE NOTICES
   ============================================================ */

.woocommerce-message,
.woocommerce-info,
.woocommerce-error{
  list-style:none;
  margin:0 0 18px;
  padding:14px 18px;
  border:1px solid var(--line);
  border-left:3px solid var(--brand);
  border-radius:9px;
  background:#fff;
  font-size:13px;
  line-height:1.6;
  color:var(--ink-2);
}
/*
 * WooCommerce reserves ~3.5em of left padding for an icon it draws in ::before.
 * The padding above reclaims that space, so the icon has to go too — otherwise
 * it lands on top of the first word.
 */
.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before{ display:none !important; }

/* the coupon toggle inside that notice */
.woocommerce-info .showcoupon{
  font-weight:700;
  color:var(--brand);
  text-decoration:underline;
  text-underline-offset:2px;
}
.woocommerce-info .showcoupon:hover{ opacity:.75; }
.woocommerce-message{ border-left-color:#16A34A; }

/* An error should read as one. The neutral panel the notices share made a
   list of blocking problems look like an ordinary note. */
.woocommerce-error{
  border-color:#F5C2C2;
  border-left-color:#DC2626;
  background:#FFF7F7;
  color:#7F1D1D;
}
/* WooCommerce zeroes this padding with !important, so the bullet drawn below
   would otherwise sit on top of the first word. */
.woocommerce ul.woocommerce-error li,
.woocommerce-error li{
  position:relative;
  padding-left:18px !important;
}
.woocommerce-error li + li{ margin-top:5px; }
.woocommerce-error li::before{
  content:"";
  position:absolute;
  left:0;
  top:.5em;
  width:6px; height:6px;
  border-radius:50%;
  background:#DC2626;
}
.woocommerce-error strong{ color:#7F1D1D; }
.woocommerce-error a{ color:#DC2626; text-decoration:underline; text-underline-offset:2px; }
.woocommerce-message .button,
.woocommerce-info .button{
  float:right;
  font-weight:700;
  color:var(--brand);
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width:1180px){
  .cartpage__grid{ grid-template-columns:minmax(0,1fr) 340px; }
  .citems__head,
  .citem{ grid-template-columns:30px minmax(0,1fr) 92px 130px 100px 70px; gap:10px; padding-inline:14px; }
}

@media (max-width:980px){
  .cartpage__grid{ grid-template-columns:1fr; }
  .cartpage__side{ position:static; }
}

@media (max-width:720px){
  .citems__head{ display:none; }

  .citem{
    grid-template-columns:26px minmax(0,1fr);
    grid-template-areas:
      'pick product'
      '.    qty'
      '.    money';
    row-gap:12px;
    align-items:start;
    padding:16px 14px;
  }
  .citem__pick{ grid-area:pick; place-items:start; padding-top:3px; }
  .citem__product{ grid-area:product; }
  .citem__qty{ grid-area:qty; }
  .citem__price,
  .citem__total{
    display:flex;
    align-items:baseline;
    gap:8px;
  }
  .citem__price{ grid-area:money; }
  .citem__total{ grid-area:money; justify-self:end; }
  .citem__price::before,
  .citem__total::before{
    content:attr(data-label);
    font-size:10px;
    font-weight:700;
    letter-spacing:.1em;
    text-transform:uppercase;
    color:var(--muted);
  }
  .citem__acts{
    grid-area:qty;
    justify-self:end;
  }

  .cbulk--update{ margin-left:0; width:100%; justify-content:center; }

  .cpromo__field{ flex:1 1 100%; }
}
