/* Cart page styles */

/* Tokens specific to cart page */
:root {
  --color-success:      #2D8659;
  --color-success-soft: #E0F0E5;
  --space-5:  1.25rem;
  --space-7:  1.75rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --text-2xl: clamp(1.75rem, 1.5rem + 1vw, 2.25rem);
  --text-3xl: clamp(2.25rem, 1.8rem + 2vw, 3.5rem);
}

.cart-page {
  padding-block: var(--space-10) var(--space-16);
}

/* Empty cart state */
.empty-cart {
  text-align: center;
  padding-block: var(--space-12);
  max-width: 480px;
  margin: 0 auto;
}
.empty-cart-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-6);
  border-radius: 50%;
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
}
.empty-cart-icon svg { width: 36px; height: 36px; }
.empty-cart-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  margin-bottom: var(--space-3);
  letter-spacing: -0.02em;
}
.empty-cart-text {
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

.btn-block { width: 100%; }

.btn-sm { min-height: 36px; padding: var(--space-2) var(--space-4); font-size: var(--text-xs); }

.coupon-input {
  flex: 1;
  padding: var(--space-2) var(--space-3);
  font: inherit;
  font-size: var(--text-sm);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  min-height: 38px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
}

.coupon-input:focus {
  outline: 0;
  border-color: var(--color-accent);
}

.cart-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  font-size: 11px;
  color: var(--color-text-muted);
  flex-wrap: wrap;
}

.cart-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cart-trust-item svg { width: 12px; height: 12px; }

.cart-page {
  padding-block: var(--space-12) var(--space-16);
}

.cart-page-title {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-2);
  letter-spacing: -0.025em;
}

.cart-page-deck {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-12);
  font-variant-numeric: tabular-nums;
}

.cart-page-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
}

.cart-page-grid > * { min-width: 0; }

@media (min-width: 960px) {
.cart-page-grid {
    grid-template-columns: 1fr 380px;
    gap: var(--space-12);
    align-items: start;
  }
}

.cart-page-items {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--color-border);
}

.cart-page-item {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: var(--space-6);
  padding: var(--space-6) 0;
  border-bottom: 1px solid var(--color-border);
  align-items: start;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.cart-page-item > * { min-width: 0; }

@media (max-width: 600px) {
.cart-page-item {
    grid-template-columns: 72px 1fr;
    grid-template-areas:
      "thumb body"
      "thumb price";
    gap: var(--space-3) var(--space-4);
    padding: var(--space-4) 0;
  }

.cart-page-item-thumb { grid-area: thumb; }

.cart-page-item-body  { grid-area: body; }

.cart-page-item-price-block { grid-area: price; align-self: end; }

.cart-page-item-action {
    width: 32px;
    height: 32px;
    padding: 0;
    background: var(--color-bg-alt);
    border-radius: var(--radius-sm);
    justify-content: center;
    color: var(--color-text-muted);
    gap: 0;
  }

.cart-page-item-action:hover {
    background: var(--color-accent-soft);
    color: var(--color-accent);
  }

.cart-page-item-action-label { display: none; }
}

.cart-page-item-thumb {
  width: 100%;
  aspect-ratio: 4/5;
  background-color: var(--color-bg-alt);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.cart-page-item-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
}

.cart-page-item-vendor {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.cart-page-item-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  letter-spacing: -0.01em;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.cart-page-item-name a { word-wrap: break-word; overflow-wrap: break-word; }

.cart-page-item-variants {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.cart-page-item-actions {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-2);
  font-size: var(--text-sm);
}

.cart-page-item-action {
  color: var(--color-text-muted);
  transition: color 0.2s var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cart-page-item-action:hover { color: var(--color-accent); }

.cart-page-item-action svg { width: 14px; height: 14px; }

.cart-page-item-price-block {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: flex-end;
  font-variant-numeric: tabular-nums;
}

.cart-page-item-line-total {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
}

.cart-page-item-unit {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.qty-selector {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  height: 44px;
}

.qty-selector .qty-btn {
  width: 36px;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.qty-selector .qty-btn:hover { background: var(--color-bg-alt); }

.qty-selector .qty-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.qty-selector .qty-btn svg { width: 14px; height: 14px; }

.qty-selector .qty-input {
  width: 40px;
  height: 100%;
  text-align: center;
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  background: transparent;
  border: 0;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}

.qty-selector .qty-input::-webkit-outer-spin-button,
.qty-selector .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.order-summary {
  background: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  position: sticky;
  top: calc(var(--header-h) + var(--space-6));
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

@media (max-width: 959px) {
.order-summary {
    position: static;
    padding: var(--space-4);
  }
}

.order-summary-title {
  font-size: var(--text-lg);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.order-totals {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  font-variant-numeric: tabular-nums;
}

.order-row {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-sm);
  color: var(--color-text);
}

.order-row.is-muted { color: var(--color-text-muted); }

.order-row.is-discount { color: var(--color-success); font-weight: 500; }

.order-row.is-total {
  font-size: var(--text-lg);
  font-weight: 600;
  padding-top: var(--space-3);
  margin-top: var(--space-2);
  border-top: 1px solid var(--color-border);
  /* Der Steuerhinweis bricht in eine zweite Zeile um. Ohne baseline stuende
     das Label "Gesamt" optisch zwischen beiden Zeilen statt neben dem Betrag. */
  align-items: baseline;
}

/* Rechte Spalte ist so breit wie ihr breitester Inhalt — das ist der
   Steuerhinweis, nicht der Betrag. Ohne text-align stuende der Betrag
   linksbuendig darueber statt an der Aussenkante. */
.order-row.is-total > span:last-child {
  text-align: right;
}

/* Steuerhinweis der Gesamtsumme. Das Markup liefert
   wc_cart_totals_order_total_html():
   <strong>Betrag</strong> <small class="includes_tax">(inkl. … MwSt.)</small>
   Die Zeile ist ein Flex-Container, ihre Kinder sind dadurch blockifiziert —
   display:block auf dem <small> erzeugt den Umbruch ohne Zusatz-Markup. */
.order-row.is-total .includes_tax {
  display: block;
  margin-top: 2px;
  font-size: var(--text-xs);
  font-weight: 400;
  line-height: 1.4;
  color: var(--color-text-muted);
}

.shipping-calc {
  margin-block: var(--space-4);
}

.shipping-calc-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) 0;
  font-size: var(--text-sm);
  color: var(--color-text);
  font-weight: 500;
}

.shipping-calc-arrow {
  width: 14px; height: 14px;
  transition: transform 0.25s var(--ease);
}

.shipping-calc-toggle[aria-expanded="true"] .shipping-calc-arrow {
  transform: rotate(180deg);
}

.shipping-calc-body {
  display: none;
  padding-top: var(--space-3);
  flex-direction: column;
  gap: var(--space-3);
}

.shipping-calc-body.is-open { display: flex; }

.shipping-calc-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}

.shipping-input {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  font: inherit;
  font-size: var(--text-sm);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  min-height: 36px;
}

.shipping-input:focus { outline: 0; border-color: var(--color-accent); }

.shipping-method-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.shipping-method {
  padding: var(--space-3);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-sm);
  transition: border-color 0.2s var(--ease);
}

.shipping-method:hover { border-color: var(--color-text); }

.shipping-method.is-selected {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}

.shipping-method-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.shipping-method-time {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.shipping-method-price {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.order-cta {
  width: 100%;
  margin-top: var(--space-6);
}

.order-de-notice {
  display: none;
  font-size: 11px;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

body.is-de-compliant .order-de-notice { display: block; }

.order-de-notice a {
  color: var(--color-text);
  border-bottom: 1px solid var(--color-text);
}

.order-de-notice a:hover { color: var(--color-accent); border-color: var(--color-accent); }

.cross-sell-section {
  margin-top: var(--space-16);
  padding-top: var(--space-12);
  border-top: 1px solid var(--color-border);
}

.cross-sell-title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
}

.cross-sell-deck {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
}

.cross-sell-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap: var(--space-6);
}

@media (max-width: 720px) {
.cross-sell-grid {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: var(--space-3);
    padding-bottom: var(--space-4);
    scrollbar-width: none;
    /* Constrain to parent — no negative margin to avoid horizontal page overflow */
    max-width: 100%;
  }

.cross-sell-grid::-webkit-scrollbar { display: none; }

.cross-sell-grid .product-card {
    flex: 0 0 60%;
    min-width: 160px;
    max-width: 200px;
    scroll-snap-align: start;
  }
}

.cross-sell-grid .product-card:nth-child(2) .product-card-thumb::after {
  background: linear-gradient(135deg, #F0E4D7 0%, var(--color-bg-alt) 100%);
}

.cross-sell-grid .product-card:nth-child(3) .product-card-thumb::after {
  background: linear-gradient(135deg, var(--color-bg-alt) 0%, #ECDED0 100%);
}

.cross-sell-grid .product-card:nth-child(4) .product-card-thumb::after {
  background: linear-gradient(135deg, #F4E5DD 0%, var(--color-bg) 100%);
}

.product-card-base-price {
  display: none;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

body.is-de-compliant .product-card-base-price { display: block; }

.cart-page-empty {
  text-align: center;
  padding: var(--space-24) var(--space-6);
  max-width: 480px;
  margin-inline: auto;
}

.cart-page-empty-icon {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-6);
}

.cart-page-empty-icon svg { width: 40px; height: 40px; }

.cart-page-empty h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-3);
}

.cart-page-empty p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
  font-size: var(--text-base);
}

.product-card-quickadd-mini {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  z-index: 2;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.product-card-quickadd-mini:hover {
  background: var(--color-accent);
  color: #fff;
  transform: scale(1.05);
}

.product-card-quickadd-mini svg { width: 16px; height: 16px; }

.product-card-quickadd-mini.is-added {
  background: var(--color-success);
  color: #fff;
}
/* ── Cross-sell product cards (mini cards for "You might also need")
   Standalone styles — cart page doesn't load shop.css. ── */
.cross-sell-grid .product-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  position: relative;
}

.cross-sell-grid .product-card-thumb {
  aspect-ratio: 4/5;
  background-color: var(--color-bg-alt);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  display: block;
}

.cross-sell-grid .product-card-name {
  font-size: var(--text-sm);
  font-weight: 500;
  margin: 0;
  letter-spacing: 0;
}

.cross-sell-grid .product-card-name a {
  color: var(--color-text);
  text-decoration: none;
}

.cross-sell-grid .product-card-name a:hover {
  color: var(--color-accent);
}

.cross-sell-grid .product-card-price {
  font-size: var(--text-sm);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.cross-sell-grid .product-card-quickadd-mini {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--color-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-text);
  transition: background 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease);
  z-index: 2;
}

.cross-sell-grid .product-card-quickadd-mini:hover {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.cross-sell-grid .product-card-quickadd-mini svg {
  width: 18px;
  height: 18px;
}

/* ── Cross-sell card mini swatches: overlay on thumb bottom with dark gradient ── */
.jenva-cs-thumb-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
}

/* The thumb itself shouldn't clip the overlay */
.jenva-cs-thumb-wrap .product-card-thumb {
  display: block;
  border-radius: 0; /* parent now does the rounding */
}

/* Swatch overlay — pinned to thumb bottom with dark fade for contrast */
.jenva-cs-attrs {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.35) 50%, transparent 100%);
  pointer-events: none; /* let interactive children opt back in */
  z-index: 2;
}
.jenva-cs-attrs > * { pointer-events: auto; }

.jenva-cs-attr-options {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

/* Color swatches: small white-bordered circles for legibility on photo */
.jenva-cs-swatch--color {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  padding: 0;
  cursor: pointer;
  position: relative;
  background: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s var(--ease), border-color 0.15s var(--ease);
}
.jenva-cs-swatch--color::before {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: 50%;
  background: var(--swatch-color);
}
.jenva-cs-swatch--color:hover { transform: scale(1.12); }
.jenva-cs-swatch--color.is-active {
  border-color: #fff;
  box-shadow: 0 0 0 1.5px var(--color-accent), 0 1px 3px rgba(0,0,0,0.45);
}

/* Text/size swatches: subtle frosted-glass pills on the gradient */
.jenva-cs-swatch--text {
  min-width: 28px;
  height: 22px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.02em;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}
.jenva-cs-swatch--text:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.7);
}
.jenva-cs-swatch--text.is-active {
  background: #fff;
  border-color: #fff;
  color: var(--color-text);
}

/* Quickadd Plus floats at top-right above swatches stack */
.jenva-cs-thumb-wrap .product-card-quickadd-mini {
  z-index: 3;
}

/* ── Cross-sell swatches: bigger touch targets on mobile ── */
@media (max-width: 720px) {
  .jenva-cs-attrs {
    padding: 36px 12px 12px;
    gap: 6px;
  }
  .jenva-cs-attr-options {
    gap: 8px;
  }
  .jenva-cs-swatch--color {
    width: 28px;
    height: 28px;
    border-width: 2px;
  }
  .jenva-cs-swatch--text {
    min-width: 40px;
    height: 32px;
    padding: 0 12px;
    font-size: 13px;
  }
}


/* ────────────────────────────────────────
   COUPON / LOGIN BANNERS — hide WC defaults
   on cart, checkout, and order-received pages.
   We have our own UI inside the sidebar.
──────────────────────────────────────── */
body.woocommerce-cart .woocommerce-form-coupon-toggle,
body.woocommerce-cart .woocommerce-form-coupon,
body.woocommerce-cart form.checkout_coupon,
body.woocommerce-checkout .woocommerce-form-coupon-toggle,
body.woocommerce-checkout .woocommerce-form-coupon,
body.woocommerce-checkout form.checkout_coupon,
body.woocommerce-checkout .woocommerce-form-login-toggle,
body.woocommerce-checkout form.woocommerce-form-login,
.checkout-page .woocommerce-form-coupon-toggle,
.checkout-page .woocommerce-form-coupon,
.checkout-page form.checkout_coupon,
.cart-page .woocommerce-form-coupon-toggle,
.cart-page form.checkout_coupon {
  display: none !important;
}