.sa-cart-coupon {
  margin: 0 0 1rem;
  border: 1px solid var(--sa-border);
  border-radius: var(--sa-radius);
  background: var(--sa-bg-alt);
}
.sa-cart-coupon__summary {
  cursor: pointer;
  padding: .7rem .85rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--sa-heading);
  list-style: none;
}
.sa-cart-coupon__summary::-webkit-details-marker { display: none; }
.sa-cart-coupon__body {
  display: flex;
  gap: .5rem;
  padding: 0 .85rem .85rem;
}
.sa-cart-coupon__body .input-text {
  flex: 1;
  min-width: 0;
}
.sa-cart-free-ship {
  color: #3ecf8e;
  font-weight: 700;
  letter-spacing: .04em;
}
.sa-cart-estimated-total th,
.sa-cart-estimated-total td {
  font-size: 1.05rem;
  color: var(--sa-heading) !important;
  padding-top: .85rem !important;
}
.sa-cart-proceed .checkout-button {
  width: 100%;
  justify-content: center;
  text-align: center;
}
.sa-cart-sticky-bar {
  display: none;
}

/* Mobile: AliExpress / Shopify-style line-item cards */
@media (max-width: 900px) {
  .sa-cart-layout {
    padding: 1rem 0 5.5rem;
    gap: 1rem;
  }
  .sa-cart-table thead { display: none; }
  .sa-cart-table,
  .sa-cart-table tbody,
  .sa-cart-table tr.cart_item {
    display: block;
    width: 100%;
  }
  .sa-cart-table tr.cart_item {
    position: relative;
    display: grid;
    grid-template-columns: 72px 1fr;
    grid-template-areas:
      "remove remove"
      "thumb name"
      "thumb price"
      "qty qty"
      "sub sub";
    gap: .55rem .85rem;
    margin: 0 0 .85rem;
    padding: 1rem;
    background: var(--sa-bg-card);
    border: 1px solid var(--sa-border);
    border-radius: var(--sa-radius-lg);
  }
  .sa-cart-table tr.cart_item td {
    border: 0 !important;
    padding: 0 !important;
    display: block;
    text-align: left !important;
  }
  .sa-cart-table tr.cart_item td::before { display: none !important; content: none !important; }
  .sa-cart-table .product-remove { grid-area: remove; justify-self: end; }
  .sa-cart-table .product-thumbnail { grid-area: thumb; }
  .sa-cart-table .product-name { grid-area: name; align-self: end; }
  .sa-cart-table .product-price { grid-area: price; align-self: start; color: var(--sa-accent); font-weight: 700; }
  .sa-cart-table .product-quantity { grid-area: qty; }
  .sa-cart-table .product-subtotal {
    grid-area: sub;
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding-top: .65rem !important;
    border-top: 1px solid var(--sa-border) !important;
    font-weight: 700;
    color: var(--sa-heading);
  }
  .sa-cart-table .product-subtotal::before {
    display: inline !important;
    content: attr(data-title);
    font-weight: 500;
    color: var(--sa-text-muted);
    font-size: .8rem;
  }
  .sa-cart-table tr.actions {
    display: block;
    background: transparent;
    border: 0;
    padding: .25rem 0;
  }
  .sa-cart-table tr.actions td {
    display: block;
    padding: 0 !important;
    border: 0 !important;
  }
  .sa-cart-sticky-bar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1200;
    gap: .75rem;
    align-items: center;
    justify-content: space-between;
    padding: .85rem 1rem calc(.85rem + env(safe-area-inset-bottom, 0px));
    background: #fff;
    border-top: 1px solid #ddd;
    box-shadow: 0 -1px 0 rgba(0,0,0,.04);
  }
  .sa-cart-sticky-bar__total {
    color: var(--sa-heading);
    font-weight: 700;
  }
  .sa-cart-sticky-bar__total small {
    display: block;
    font-weight: 500;
    color: var(--sa-text-muted);
    font-size: .72rem;
  }
  .sa-cart-sticky-bar .checkout-button,
  .sa-cart-sticky-bar .sa-btn {
    margin: 0;
    white-space: nowrap;
    min-height: 2.75rem;
    padding: .65rem 1.15rem !important;
  }
  body.woocommerce-cart {
    padding-bottom: 5.5rem;
  }
}

/* Checkout review thumbs */
.sa-checkout-review-table .sa-checkout-line {
  display: flex;
  gap: .75rem;
  align-items: center;
}
.sa-checkout-review-table .sa-checkout-line__thumb,
.sa-checkout-review-table .sa-checkout-line img,
.sa-checkout-review-table .sa-cart-thumb {
  width: 48px !important;
  height: 48px !important;
  object-fit: contain;
  border-radius: 8px;
  background: #f7f7f7;
  border: 1px solid var(--sa-border);
  flex-shrink: 0;
}
.sa-cart-thumb--empty {
  display: inline-block;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  background: #f7f7f7;
  border: 1px dashed var(--sa-border);
}
.sa-checkout-review-table .sa-checkout-line__meta {
  min-width: 0;
}
.sa-ticket-open {
  margin: 1rem 0 1.5rem;
  border: 1px solid var(--sa-border);
  border-radius: 10px;
  padding: .85rem 1rem;
  background: var(--sa-bg-card);
}
.sa-ticket-open > summary {
  cursor: pointer;
  font-weight: 650;
  color: var(--sa-heading);
}
.sa-ticket-open-form { margin-top: .85rem; }
.sa-ticket-open-form input,
.sa-ticket-open-form textarea { width: 100%; }


/* —— Cart / checkout storefront polish (v1.4.40) —— */
body.woocommerce-cart .sa-page__content > h1,
body.woocommerce-checkout .sa-page__content > h1 {
  display: none;
}
body.woocommerce-cart .sa-page__content,
body.woocommerce-checkout .sa-page__content {
  padding-top: 0;
}
.woocommerce-cart .woocommerce,
.woocommerce-checkout .woocommerce {
  padding-top: 0.75rem;
}

.sa-cart-page { max-width: 1120px; margin: 0 auto; }
.sa-cart-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1.15rem;
  padding: 0.15rem 0 0;
}
.sa-cart-hero__eyebrow {
  margin: 0 0 0.2rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sa-accent);
}
.sa-cart-hero__title {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  color: var(--sa-heading);
  text-transform: none;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.sa-cart-hero__count {
  color: var(--sa-text-muted);
  font-weight: 550;
  font-size: 0.72em;
}
.sa-cart-hero__shop {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--sa-accent);
  text-decoration: none;
  white-space: nowrap;
}
.sa-cart-hero__shop:hover { color: var(--sa-accent-hover); text-decoration: underline; text-underline-offset: 3px; }

.sa-cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 1.35rem;
  align-items: start;
  padding: 0 0 2.5rem;
  max-width: none;
  margin: 0;
}

.sa-cart-table {
  table-layout: fixed;
  width: 100%;
  border: 1px solid var(--sa-border) !important;
  border-radius: var(--sa-radius-lg);
  background: var(--sa-bg-card);
  overflow: hidden;
  border-collapse: separate;
  border-spacing: 0;
}
.sa-cart-col--remove { width: 44px; }
.sa-cart-col--thumb { width: 88px; }
.sa-cart-col--name { width: auto; }
.sa-cart-col--price { width: 108px; }
.sa-cart-col--qty { width: 140px; }
.sa-cart-col--subtotal { width: 118px; }

.sa-cart-table thead th {
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--sa-text-muted);
  padding: 0.7rem 0.85rem !important;
  background: rgba(0, 0, 0, 0.28);
  border-bottom: 1px solid var(--sa-border) !important;
}
.sa-cart-table td {
  padding: 0.9rem 0.85rem !important;
  vertical-align: middle !important;
  border-top: 1px solid var(--sa-border) !important;
}
.sa-cart-table tbody tr.cart_item:first-child td { border-top: 0 !important; }

.sa-cart-thumb-wrap {
  display: block;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
}
.sa-cart-thumb-wrap a {
  display: block;
  width: 100%;
  height: 100%;
}
.sa-cart-table .product-thumbnail {
  width: 88px;
  min-width: 88px;
}
.sa-cart-table img,
.sa-cart-table .sa-cart-thumb,
.sa-cart-table .attachment-woocommerce_thumbnail,
.sa-cart-table .attachment-woocommerce_gallery_thumbnail {
  width: 72px !important;
  height: 72px !important;
  max-width: 72px !important;
  object-fit: contain;
  background: #f7f7f7;
  border-radius: 10px;
  border: 1px solid var(--sa-border);
  display: block;
}
.sa-cart-thumb--empty {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  background: #f7f7f7;
  border: 1px dashed var(--sa-border-strong);
}

.sa-cart-table .product-name {
  min-width: 0;
}
.sa-cart-table .product-name a {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--sa-heading);
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.35;
  text-decoration: none;
}
.sa-cart-table .product-name a:hover { color: var(--sa-accent); }
.sa-cart-table .product-price,
.sa-cart-table .product-subtotal {
  font-weight: 650;
  color: var(--sa-heading);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
