/* LAYOUT CONTRACT: Cart modal uses body class, not direct overflow manipulation */
body.cart-open {
  overflow: hidden;
}

/* Slide-out Cart */
.slide-out-cart {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.slide-out-cart.active {
  opacity: 1;
  visibility: visible;
}

.cart-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.cart-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 420px;
  height: 100%;
  background: var(--white);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.slide-out-cart.active .cart-drawer {
  transform: translateX(0);
}

/* Root and Base Vars for Cart Redesign */
:root {
  --cart-accent-green: #3a5c40;
  /* Organic Urban signature green */
  /* Organic Urban signature green */
  --cart-muted-green: #7a9a7a;
  --cart-neutral-faint: #fbfaf8;
  --cart-border-subtle: rgba(0, 0, 0, 0.06);
  --cart-shadow-editorial: 0 12px 40px rgba(0, 0, 0, 0.04);
}

body.cart-page-body {
  background-color: #fdfcfb;
  color: var(--text-dark);
}

/* ============================================
   DESKTOP EDITORIAL LAYOUT (min 769px)
   ============================================ */
@media screen and (min-width: 769px) {
  .cart-page {
    padding: 80px 40px;
    max-width: 1300px;
    margin: 0 auto;
  }

  .cart-header {
    margin-bottom: 50px;
    text-align: left;
  }

  .cart-title {
    font-family: var(--font-serif);
    font-size: 3.2rem;
    font-weight: 500;
    margin: 0 0 10px;
    letter-spacing: -0.02em;
  }

  .cart-trust-strip {
    font-size: 0.95rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
  }

  /* Two-column Editorial Grid */
  .cart-content {
    display: grid !important;
    grid-template-columns: 1fr 400px !important;
    gap: 80px !important;
    align-items: start !important;
  }

  /* LEFT COLUMN: Item Cards */
  .cart-items-column {
    display: flex;
    flex-direction: column;
    gap: 32px;
  }

  .cart-item-card {
    display: flex !important;
    background: var(--white);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid var(--cart-border-subtle);
    box-shadow: var(--cart-shadow-editorial);
    transition: transform 0.3s ease;
  }

  .cart-item-card:hover {
    transform: translateY(-2px);
  }

  .cart-item-image {
    width: 140px !important;
    height: 140px !important;
    flex-shrink: 0;
    border-radius: 12px;
    background: var(--cart-neutral-faint);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.02);
  }

  .cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
  }

  .cart-item-main {
    flex: 1;
    padding-left: 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .cart-item-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
  }

  .cart-item-name {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin: 0 0 4px;
    font-weight: 500;
  }

  .cart-item-name a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
  }

  .cart-item-name a:hover {
    color: var(--cart-accent-green);
  }

  .cart-item-benefit {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-family: var(--font-sans);
    letter-spacing: 0.01em;
  }

  .cart-item-remove-minimal {
    background: transparent;
    border: none;
    color: #ccc;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s ease;
  }

  .cart-item-remove-minimal:hover {
    color: #991b1b;
  }

  .cart-item-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
  }

  /* Price Hierarchy */
  .cart-item-pricing-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .price-current-large {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--cart-accent-green);
  }

  .price-meta-group {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
  }

  .price-original-strikethru {
    color: var(--text-muted);
    text-decoration: line-through;
  }

  .price-savings-badge {
    color: var(--cart-muted-green);
    font-weight: 500;
  }

  /* Quantity Selector Refinement */
  .cart-item-actions {
    display: flex;
    align-items: center;
    gap: 24px;
  }

  .minimal-qty-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-soft);
    border-radius: 100px;
    padding: 4px;
    background: var(--cart-neutral-faint);
  }

  .minimal-qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    transition: opacity 0.2s;
  }

  .minimal-qty-btn:hover {
    opacity: 0.6;
  }

  .minimal-qty-input {
    width: 36px;
    text-align: center;
    border: none;
    background: transparent;
    font-weight: 600;
    font-size: 1rem;
    -moz-appearance: textfield;
  }

  .minimal-qty-input::-webkit-outer-spin-button,
  .minimal-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }

  .btn-text-secondary {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    padding: 0;
    transition: color 0.2s;
  }

  .btn-text-secondary:hover {
    color: var(--cart-accent-green);
  }

  /* RIGHT COLUMN: Order Summary */
  .cart-summary-column {
    position: sticky;
    top: 120px;
  }

  .cart-summary-card {
    background: #f8f7f5;
    border-radius: 24px;
    padding: 40px;
    border: 1px solid var(--cart-border-subtle);
  }

  .summary-title-editorial {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    margin: 0 0 30px;
    font-weight: 500;
  }

  .summary-section-editorial {
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  }

  .delivery-estimate-editorial {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .delivery-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 600;
  }

  .delivery-value {
    font-size: 1.1rem;
    font-weight: 500;
  }

  .summary-details-editorial {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 30px;
  }

  .summary-line {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    color: var(--text-dark);
  }

  .free-label {
    color: var(--cart-muted-green);
    font-weight: 600;
  }

  .discount-line {
    color: var(--cart-accent-green);
    font-weight: 600;
  }

  /* Free Shipping Progress Component */
  .free-shipping-progress-module {
    margin-bottom: 40px;
  }

  .progress-message {
    font-size: 0.95rem;
    margin-bottom: 12px;
    line-height: 1.4;
  }

  .progress-message.success {
    color: var(--cart-accent-green);
    font-weight: 600;
  }

  .visual-progress-bar {
    height: 6px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 100px;
    overflow: hidden;
  }

  .progress-fill-editorial {
    height: 100%;
    background: var(--cart-accent-green);
    border-radius: 100px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* Upsell Section */
  .upsell-section-compact {
    margin-bottom: 40px;
  }

  .upsell-heading-editorial {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 600;
    margin: 0 0 16px;
  }

  .upsell-list-compact {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .upsell-item-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--white);
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.03);
  }

  .upsell-item-image {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 6px;
    background: var(--cart-neutral-faint);
    overflow: hidden;
  }

  .upsell-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
  }

  .upsell-item-info {
    flex: 1;
    min-width: 0;
  }

  .upsell-item-name {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
  }

  .upsell-item-benefit {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 6px;
  }

  .upsell-item-price-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .upsell-item-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--cart-accent-green);
  }

  .btn-add-minimal {
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--cart-accent-green);
    color: var(--white);
    border: none;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
  }

  .btn-add-minimal:hover {
    background: #2a4c30;
  }

  /* Total & Final CTA */
  .summary-totals-editorial {
    border-top: 2px solid rgba(0, 0, 0, 0.06);
    padding-top: 30px;
  }

  .summary-total-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 24px;
  }

  .summary-total-line span:first-child {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 500;
  }

  .total-value {
    font-size: 2rem;
    font-weight: 600;
    color: var(--cart-accent-green);
  }

  .btn-checkout-primary-editorial {
    width: 100%;
    padding: 20px;
    background: var(--cart-accent-green);
    color: var(--white);
    border: none;
    border-radius: 16px;
    font-size: 1.15rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(58, 92, 64, 0.2);
    transition: all 0.3s ease;
  }

  .btn-checkout-primary-editorial:hover {
    background: #2a4c30;
    transform: translateY(-2px);
    box-shadow: 0 14px 40px rgba(58, 92, 64, 0.3);
  }

  .trust-note-editorial {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 16px;
    letter-spacing: 0.02em;
  }

  /* Trust Signals Grid */
  .trust-signals-grid-editorial {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
  }

  .trust-item-editorial {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
    justify-content: center;
  }
}

/* Base Styles (Slide out, etc) preserved but hidden in this rewrite for clarity */
/* ... omitted base code ... */