/* ============================================================
   CARPCORE — cart page skin. Ported from
   legacy/shopify-theme/assets/carpcore-cart.css, retargeted at
   WooCommerce's own stable public cart classes (WooCommerce's default
   markup is a <table>, not Shopify's custom cart-page sections, so the
   selectors below are new — but the colors/borders/hard-offset shadows/
   fonts are carried over unchanged). Pure CSS, no markup or JS changes,
   so cart AJAX (quantity, remove, coupon) keeps working exactly as
   WooCommerce ships it. Scoped under .cc-herb--cart to contain the
   blast radius to /cart. No .cc-herb__in wrapper — cart is a utility
   page, no tilt.
   ============================================================ */

.cc-herb--cart {
  font-family: 'Nunito', sans-serif;
}

/* ---- page title (from page.php's the_title(), rendered above the
   shortcode content by WordPress's normal page template) ---- */
.cc-herb--cart .woocommerce-cart-form,
.cc-herb--cart .cart-collaterals {
  max-width: 1100px;
  margin-inline: auto;
}

/* ---- empty state ---- */
.cc-herb--cart .cart-empty {
  font-family: 'Dela Gothic One', sans-serif;
  font-size: 15px;
  text-align: center;
  color: var(--ink);
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 1rem;
}
.cc-herb--cart .return-to-shop {
  text-align: center;
}
.cc-herb--cart .return-to-shop .button {
  display: inline-block;
  background: var(--coral);
  color: var(--paper-l);
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  font-family: 'Dela Gothic One', sans-serif;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 6px;
  transition: transform 0.1s, box-shadow 0.1s;
}
.cc-herb--cart .return-to-shop .button:hover {
  background: var(--pink);
  transform: translate(-1px, -1px);
  box-shadow: 6px 6px 0 var(--ink);
}

/* ---- line items: reflow the stock <table> into paper cards ---- */
.cc-herb--cart table.cart {
  display: block;
  width: 100%;
  border: none;
}
.cc-herb--cart table.cart tbody {
  display: block;
}
.cc-herb--cart table.cart thead {
  display: none;
}
.cc-herb--cart table.cart tr {
  display: block;
  border: none;
}
.cc-herb--cart table.cart td {
  display: block;
  border: none;
  padding: 0;
  vertical-align: middle;
}
.cc-herb--cart table.cart tr.cart_item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  background: var(--paper-l);
  border: 2px solid var(--ink);
  box-shadow: var(--sh-sm);
  border-radius: 8px 5px 9px 6px;
  padding: 12px;
  margin-block-end: 14px;
}

.cc-herb--cart td.product-remove {
  order: 3;
}
.cc-herb--cart td.product-remove a.remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  font-family: 'Dela Gothic One', sans-serif;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--coral);
  text-decoration: none;
  border-radius: 50%;
  transition: background 0.14s ease;
}
.cc-herb--cart td.product-remove a.remove:hover {
  background: rgb(var(--color-brand-coral-rgb) / 0.14);
}

.cc-herb--cart td.product-thumbnail {
  order: 1;
  flex: 0 0 auto;
}
.cc-herb--cart td.product-thumbnail a {
  display: block;
}
.cc-herb--cart td.product-thumbnail img {
  display: block;
  width: 76px;
  height: 76px;
  object-fit: cover;
  border: 2px solid var(--ink);
  border-radius: 6px 4px 7px 5px;
  filter: url(#rough);
}

.cc-herb--cart td.product-name {
  order: 2;
  flex: 1 1 220px;
  min-width: 0;
}
.cc-herb--cart td.product-name a {
  font-family: 'Dela Gothic One', sans-serif;
  font-size: 13px;
  color: var(--ink);
  letter-spacing: 0.02em;
  text-decoration: none;
}
.cc-herb--cart td.product-name dl.variation {
  margin: 0.35em 0 0;
  font-family: 'VT323', monospace;
  font-size: 15px;
  color: var(--navy);
  opacity: 0.85;
}
.cc-herb--cart td.product-name dl.variation dt,
.cc-herb--cart td.product-name dl.variation dd {
  display: inline;
  margin: 0;
  padding: 0;
}
.cc-herb--cart td.product-name dl.variation dt::after {
  content: ': ';
}
.cc-herb--cart td.product-name dl.variation dd p {
  display: inline;
  margin: 0;
}
.cc-herb--cart td.product-name dl.variation + dl.variation::before {
  content: ' · ';
}

.cc-herb--cart td.product-price {
  order: 4;
  flex: 0 0 auto;
  font-family: 'VT323', monospace;
  font-size: 17px;
  color: var(--ink);
}

.cc-herb--cart td.product-quantity {
  order: 5;
  flex: 0 0 auto;
}
.cc-herb--cart td.product-quantity .quantity {
  display: inline-flex;
  border: 2px solid var(--ink);
  border-radius: 6px 4px 7px 5px;
  background: var(--paper);
  overflow: hidden;
}
.cc-herb--cart td.product-quantity .qty {
  width: 3rem;
  border: none;
  background: transparent;
  text-align: center;
  font-family: 'VT323', monospace;
  font-size: 16px;
  color: var(--ink);
  padding: 8px 4px;
}

.cc-herb--cart td.product-subtotal {
  order: 6;
  flex: 0 0 auto;
  margin-left: auto;
  font-family: 'VT323', monospace;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

/* ---- actions row: coupon + update cart ---- */
.cc-herb--cart td.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  border: none;
  padding: 6px 0 0;
}
.cc-herb--cart .coupon {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cc-herb--cart #coupon_code {
  border: 2px solid var(--ink);
  border-radius: 5px;
  background: var(--paper);
  font-family: 'VT323', monospace;
  font-size: 16px;
  color: var(--ink);
  padding: 8px 10px;
}
.cc-herb--cart .coupon button[name='apply_coupon'],
.cc-herb--cart button[name='update_cart'] {
  border: 2px solid var(--ink);
  border-radius: 5px;
  background: var(--paper-l);
  box-shadow: 2px 2px 0 var(--ink);
  font-family: 'Dela Gothic One', sans-serif;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 10px 14px;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
}
.cc-herb--cart .coupon button[name='apply_coupon']:hover,
.cc-herb--cart button[name='update_cart']:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--ink);
}

/* ---- cross-sells ("you may be interested in…") ----
   Renders through the same woocommerce_product_loop_start()/_end() hooks
   as the shop archive and single-product related products, so it already
   gets the .shopgrid specimen-card grid (see carpcore-herbiary.css) —
   only the section heading needs its own styling here. */
.cc-herb--cart .cross-sells {
  max-width: 1600px;
  margin: 32px auto 0;
}
.cc-herb--cart .cross-sells > h2 {
  font-family: 'Mochiy Pop P One', sans-serif;
  font-size: clamp(22px, 3vw, 32px);
  color: var(--ink);
  margin: 0 0 1rem;
}

/* ---- totals sidebar ---- */
.cc-herb--cart .cart-collaterals {
  margin-top: 24px;
}
.cc-herb--cart .cart_totals {
  background: var(--paper-l);
  border: 3px solid var(--ink);
  box-shadow: var(--sh-md);
  border-radius: 10px 7px 12px 6px;
  padding: 18px;
  max-width: 420px;
  margin-left: auto;
}
.cc-herb--cart .cart_totals > h2 {
  font-family: 'Dela Gothic One', sans-serif;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 12px;
}
.cc-herb--cart .cart_totals table.shop_table {
  width: 100%;
  border-collapse: collapse;
}
.cc-herb--cart .cart_totals table.shop_table tr {
  border-bottom: 1px solid rgb(var(--color-foreground-rgb) / 0.2);
}
.cc-herb--cart .cart_totals table.shop_table tr:last-child {
  border-bottom: none;
}
.cc-herb--cart .cart_totals table.shop_table th,
.cc-herb--cart .cart_totals table.shop_table td {
  padding: 10px 0;
  font-family: 'VT323', monospace;
  font-size: 17px;
  color: var(--ink);
  text-align: left;
}
.cc-herb--cart .cart_totals table.shop_table td {
  text-align: right;
}
.cc-herb--cart .cart_totals .order-total th,
.cc-herb--cart .cart_totals .order-total td {
  font-family: 'Dela Gothic One', sans-serif;
  font-size: 14px;
  letter-spacing: 0.04em;
}

/* ---- proceed to checkout ---- */
.cc-herb--cart .wc-proceed-to-checkout {
  margin-top: 16px;
}
.cc-herb--cart .wc-proceed-to-checkout .checkout-button {
  display: block;
  text-align: center;
  background: var(--coral);
  color: var(--paper-l);
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  font-family: 'Dela Gothic One', sans-serif;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 18px;
  border-radius: 8px;
  transition: transform 0.1s, box-shadow 0.1s;
}
.cc-herb--cart .wc-proceed-to-checkout .checkout-button:hover {
  background: var(--pink);
  transform: translate(-1px, -1px);
  box-shadow: 6px 6px 0 var(--ink);
}

/* ---- mobile ---- */
@media screen and (max-width: 640px) {
  .cc-herb--cart table.cart tr.cart_item {
    position: relative;
  }
  .cc-herb--cart td.product-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    order: 0;
  }
  .cc-herb--cart td.product-subtotal {
    margin-left: 0;
  }
  .cc-herb--cart .cart_totals {
    max-width: none;
    margin-left: 0;
  }
}
