/* ============================================
   CART DRAWER — slide-in panel from right
   Uses design tokens from oz-variations-bcw/tokens.css
   which are defined on :root and inherited globally.
   ============================================ */

/* === Drawer-specific variables === */
:root {
    --drawer-width: 430px;
    --drawer-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --drawer-slide-ease: cubic-bezier(0.32, 0.72, 0, 1);
}

/* === Body scroll lock when drawer is open === */
body.oz-drawer-open {
    overflow: hidden;
}

/* ============================================
   FLATSOME RESET — targeted, not sledgehammer
   Only neutralize the specific Flatsome base properties
   that conflict with our components. No border/background/
   transition kill — components set those themselves.
   ============================================ */
.oz-drawer button,
.oz-drawer input[type="number"] {
    margin: 0 !important;
    margin-bottom: 0 !important;
    margin-right: 0 !important;
    min-height: 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
    line-height: normal !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    text-shadow: none !important;
    box-shadow: none !important;
    vertical-align: middle;
    box-sizing: border-box;
}

/* Size pills — must use .oz-drawer scope to beat the button reset above.
   All visual styles live here, the standalone .oz-upsell-size-pill block
   below is only for properties that don't conflict with the reset. */
.oz-drawer .oz-upsell-size-pill {
    font-size: 10px !important;
    font-weight: 600 !important;
    padding: 2px 6px !important;
    margin: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    border-radius: 10px !important;
    border: 1px solid #ddd !important;
    background: #f5f5f5 !important;
    color: #555 !important;
    line-height: 1.3 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    text-shadow: none !important;
    box-shadow: none !important;
    cursor: pointer;
    transition: all 0.15s ease;
}

.oz-drawer .oz-upsell-size-pill:hover {
    border-color: var(--oz-accent, #135350) !important;
    color: var(--oz-accent, #135350) !important;
    background: #f0f0f0 !important;
}

.oz-drawer .oz-upsell-size-pill.active {
    background: var(--oz-accent, #135350) !important;
    color: white !important;
    border-color: var(--oz-accent, #135350) !important;
}

.oz-drawer .oz-upsell-size-pill.in-cart {
    opacity: 0.45;
}
.oz-drawer .oz-upsell-size-pill.in-cart.active {
    opacity: 0.7;
}

/* ============================================
   OVERLAY
   ============================================ */
.oz-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 999998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s var(--drawer-ease), visibility 0.35s var(--drawer-ease);
}

.oz-drawer-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   DRAWER PANEL
   ============================================ */
.oz-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: var(--drawer-width);
    height: 100%;
    background: var(--oz-bg-page, #FFFFFF);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.38s var(--drawer-slide-ease);
    box-shadow: var(--oz-shadow-lg, 0 10px 40px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04));
}

.oz-drawer.open {
    transform: translateX(0);
}

/* ============================================
   DRAWER HEADER
   ============================================ */
.oz-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--oz-border-light, #F0EFED);
    flex-shrink: 0;
}

.oz-drawer-title {
    font-family: 'DM Serif Display', serif;
    font-size: 20px;
    font-weight: 400;
    color: var(--oz-text-primary, #1A1A1A);
}

.oz-drawer-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--oz-accent-light, #E8F0F0);
    color: var(--oz-accent, #135350);
    font-size: 11px;
    font-weight: 700;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    padding: 0 7px;
    margin-left: 10px;
}

/* Close button — explicit dimensions beat Flatsome's button reset */
.oz-drawer-close {
    background: none !important;
    border: 1px solid var(--oz-border, #E5E5E3) !important;
    width: 34px !important;
    height: 34px !important;
    border-radius: 50% !important;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s var(--drawer-ease), background 0.2s var(--drawer-ease) !important;
    flex-shrink: 0;
    color: var(--oz-text-body, #555555);
}

.oz-drawer-close:hover {
    border-color: var(--oz-label-border, #E0DFDD) !important;
    background: var(--oz-bg-subtle, #FAFAF9) !important;
}

.oz-drawer-close svg {
    width: 13px;
    height: 13px;
    color: var(--oz-text-body, #555555);
    display: block;
}

/* ============================================
   FREE SHIPPING BAR
   ============================================ */
.oz-shipping-bar {
    padding: 12px 24px;
    background: var(--oz-accent-light, #E8F0F0);
    flex-shrink: 0;
}

.oz-shipping-text {
    font-size: 12px;
    line-height: 1.5;
    color: var(--oz-text-body, #555555);
    margin-bottom: 8px;
}

.oz-shipping-text strong {
    color: var(--oz-accent, #135350);
    font-weight: 700;
}

.oz-shipping-text.qualified {
    color: var(--oz-accent, #135350);
    font-weight: 600;
}

.oz-shipping-track {
    width: 100%;
    height: 3px;
    background: var(--oz-border, #E5E5E3);
    border-radius: 3px;
    overflow: hidden;
}

.oz-shipping-fill {
    height: 100%;
    background: var(--oz-accent, #135350);
    border-radius: 3px;
    transition: width 0.5s var(--drawer-ease);
    position: relative;
}

/* Shimmer on unfilled bar */
.oz-shipping-fill:not(.full)::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: oz-shimmer 2.5s infinite;
}

@keyframes oz-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ============================================
   SCROLLABLE REGIONS — cart + upsells independent
   ============================================ */

/* Cart items region: takes remaining space, scrolls independently */
.oz-drawer-body {
    flex: 1;
    min-height: 0; /* required for flex child overflow */
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

/* Subtle scroll fade indicators at top and bottom edges */
.oz-drawer-body::before,
.oz-drawer-body::after {
    content: '';
    position: sticky;
    left: 0;
    right: 0;
    height: 16px;
    pointer-events: none;
    z-index: 1;
    display: block;
}

.oz-drawer-body::before {
    top: 0;
    background: linear-gradient(to bottom, var(--oz-bg-page, #FFFFFF), transparent);
    margin-bottom: -16px;
}

.oz-drawer-body::after {
    bottom: 0;
    background: linear-gradient(to top, var(--oz-bg-page, #FFFFFF), transparent);
    margin-top: -16px;
}

/* ============================================
   LOADING SKELETON — shown during initial fetch
   ============================================ */
.oz-cart-skeleton {
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.oz-cart-skeleton-item {
    display: grid;
    grid-template-columns: 68px 1fr;
    gap: 14px;
}

.oz-cart-skeleton-img {
    width: 68px;
    height: 68px;
    border-radius: 8px;
    background: var(--oz-border-light, #F0EFED);
    animation: oz-pulse 1.5s ease-in-out infinite;
}

.oz-cart-skeleton-lines {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 4px;
}

.oz-cart-skeleton-line {
    height: 12px;
    border-radius: 4px;
    background: var(--oz-border-light, #F0EFED);
    animation: oz-pulse 1.5s ease-in-out infinite;
}

.oz-cart-skeleton-line:nth-child(1) { width: 75%; }
.oz-cart-skeleton-line:nth-child(2) { width: 50%; animation-delay: 0.15s; }
.oz-cart-skeleton-line:nth-child(3) { width: 35%; animation-delay: 0.3s; }

@keyframes oz-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ============================================
   CART ITEMS
   ============================================ */
.oz-cart-items {
    padding: 0 24px;
}

.oz-cart-item {
    display: grid;
    grid-template-columns: 68px 1fr;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--oz-border-light, #F0EFED);
    transition: opacity 0.2s var(--drawer-ease);
}

.oz-cart-item:last-child {
    border-bottom: none;
}

.oz-cart-item.updating {
    opacity: 0.4;
    pointer-events: none;
}

/* Item image */
.oz-cart-item-img {
    width: 68px;
    height: 68px;
    border-radius: 8px;
    background: var(--oz-bg-warm, #F5F4F0);
    border: 1px solid var(--oz-border-light, #F0EFED);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.oz-cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.oz-cart-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.oz-cart-item-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--oz-text-primary, #1A1A1A);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.oz-cart-item-meta {
    font-size: 11px;
    color: var(--oz-text-muted, #999999);
    font-weight: 500;
}

/* Price + qty row */
.oz-cart-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 6px;
    gap: 8px;
}

.oz-cart-item-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--oz-accent, #135350);
    white-space: nowrap;
}

/* ============================================
   QTY CONTROLS — matches oz-tool-qty from plugin
   ============================================ */
.oz-cart-qty {
    display: inline-flex;
    border: 1px solid var(--oz-border, #E5E5E3);
    border-radius: 6px;
    overflow: hidden;
}

.oz-cart-qty-btn {
    width: 28px !important;
    height: 28px !important;
    background: var(--oz-bg-subtle, #FAFAF9) !important;
    border: none !important;
    border-radius: 0 !important;
    cursor: pointer;
    font-size: 13px !important;
    font-weight: 400 !important;
    color: var(--oz-text-primary, #1A1A1A);
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: background 0.1s var(--drawer-ease) !important;
    flex-shrink: 0;
    touch-action: manipulation; /* prevent double-tap zoom on mobile */
}

.oz-cart-qty-btn:hover {
    background: var(--oz-border-light, #F0EFED) !important;
}

.oz-cart-qty-btn:active {
    background: var(--oz-border, #E5E5E3) !important;
}

.oz-cart-qty-btn.bin {
    color: #c33 !important;
}

.oz-cart-qty-btn.bin:hover {
    background: #FEF2F2 !important;
    color: #a22 !important;
}

/* Number input — matches .oz-tool-qty-input */
.oz-cart-qty-input {
    width: 30px !important;
    height: 28px !important;
    text-align: center;
    border: none !important;
    border-left: 1px solid var(--oz-border, #E5E5E3) !important;
    border-right: 1px solid var(--oz-border, #E5E5E3) !important;
    border-radius: 0 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    font-family: "Raleway", sans-serif;
    color: var(--oz-text-primary, #1A1A1A) !important;
    background: var(--oz-bg-page, white) !important;
    -moz-appearance: textfield;
    -webkit-appearance: none;
    appearance: none;
}

/* Focus ring for keyboard/tap users */
.oz-cart-qty-input:focus {
    outline: 2px solid var(--oz-accent, #135350);
    outline-offset: -2px;
}

/* Hide number spinners */
.oz-cart-qty-input::-webkit-inner-spin-button,
.oz-cart-qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ============================================
   BIN ICON in dec button — shows when qty=1 (1-1=0 means remove)
   ============================================ */
.oz-cart-qty-btn .oz-bin-icon {
    display: block;
}

.oz-cart-qty-btn .oz-minus-icon {
    font-size: 13px;
    line-height: 1;
}

/* ============================================
   UPSELL SECTION — own scrollable region, capped height
   ============================================ */
.oz-drawer-upsells {
    padding: 16px 24px 12px;
    /* Enough height for 2 upsell cards + title (~160px), capped at 25vh */
    max-height: min(25vh, 250px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    flex-shrink: 0;
    border-top: 1px solid var(--oz-border-light, #F0EFED);
}

/* Section header — flanking lines */
.oz-drawer-upsells-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--oz-text-muted, #999999);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.oz-drawer-upsells-title::before,
.oz-drawer-upsells-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--oz-border-light, #F0EFED);
}

.oz-drawer-upsell-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Upsell card */
.oz-drawer-upsell-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--oz-label-bg, #F7F7F5);
    border: 1px solid var(--oz-label-border, #E0DFDD);
    border-radius: 8px;
    transition: border-color 0.2s var(--drawer-ease);
}

.oz-drawer-upsell-card:hover {
    border-color: var(--oz-accent, #135350);
}

.oz-drawer-upsell-img {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: var(--oz-bg-warm, #F5F4F0);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.oz-drawer-upsell-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Upsell icon fallback (when no product image) */
.oz-upsell-icon {
    max-width: 48px;
    max-height: 48px;
    margin: auto;
}

.oz-drawer-upsell-info {
    flex: 1;
    min-width: 0;
}

.oz-drawer-upsell-name {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--oz-text-primary, #1A1A1A);
}

.oz-drawer-upsell-price {
    font-size: 11px;
    color: var(--oz-text-muted, #999999);
    font-weight: 500;
    margin-top: 1px;
}

/* Upsell add button — circular icon button */
.oz-drawer-upsell-add {
    width: 32px !important;
    height: 32px !important;
    background: var(--oz-accent, #135350) !important;
    border: 1.5px solid var(--oz-accent, #135350) !important;
    border-radius: 50% !important;
    padding: 0 !important;
    color: var(--oz-accent-text, #FFFFFF) !important;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: background 0.15s var(--drawer-ease), color 0.15s var(--drawer-ease), transform 0.15s var(--drawer-ease) !important;
    flex-shrink: 0;
    touch-action: manipulation;
}

.oz-drawer-upsell-add svg {
    display: block;
}

.oz-drawer-upsell-add:hover {
    background: none !important;
    color: var(--oz-accent, #135350) !important;
    transform: scale(1.05);
}

.oz-drawer-upsell-add:active {
    transform: scale(0.95);
}

.oz-drawer-upsell-add.added {
    background: var(--oz-accent, #135350) !important;
    color: var(--oz-accent-text, white) !important;
    border-color: var(--oz-accent, #135350) !important;
    pointer-events: none;
}

/* Sized upsell cards — size pills for PU Roller, Verfbak, etc. */
.oz-upsell-sizes {
    display: flex;
    gap: 4px;
    margin-top: 3px;
}

/* (Size pill styles moved to .oz-drawer scoped rules near the button reset) */

/* Option upsell cards — option pills for Stuco Paste primer Ja/Nee, etc. */
.oz-upsell-options {
    display: flex;
    gap: 4px;
    margin-top: 3px;
}

/* Option pills — same visual style as size pills, scoped to .oz-drawer */
.oz-drawer .oz-upsell-option-pill {
    font-size: 10px !important;
    font-weight: 600 !important;
    padding: 2px 6px !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    background: white !important;
    color: #333 !important;
    cursor: pointer !important;
    line-height: 1.4 !important;
    white-space: nowrap !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    transition: all 0.15s ease;
}
.oz-drawer .oz-upsell-option-pill:hover {
    border-color: var(--oz-accent, #135350) !important;
    color: var(--oz-accent, #135350) !important;
    background: #f0f0f0 !important;
}
.oz-drawer .oz-upsell-option-pill.active {
    background: var(--oz-accent, #135350) !important;
    color: white !important;
    border-color: var(--oz-accent, #135350) !important;
}

/* Sized cards keep their add button clickable after adding (customer may want more sizes) */
.oz-sized-upsell .oz-drawer-upsell-add.added {
    pointer-events: auto;
}

/* ============================================
   EMPTY CART STATE
   ============================================ */
.oz-cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 32px;
    text-align: center;
}

.oz-cart-empty svg {
    width: 56px;
    height: 56px;
    color: var(--oz-border, #E5E5E3);
    margin-bottom: 20px;
    stroke-width: 1;
}

.oz-cart-empty-title {
    font-family: 'DM Serif Display', serif;
    font-size: 20px;
    font-weight: 400;
    color: var(--oz-text-primary, #1A1A1A);
    margin-bottom: 8px;
}

.oz-cart-empty-text {
    font-size: 13px;
    color: var(--oz-text-muted, #999999);
    margin-bottom: 24px;
    max-width: 240px;
    line-height: 1.6;
}

.oz-cart-empty-btn {
    padding: 10px 24px !important;
    background: var(--oz-cta, #E67C00) !important;
    color: var(--oz-cta-text, #FFFFFF) !important;
    border: none !important;
    border-radius: 5px !important;
    font-family: inherit;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    cursor: pointer;
    transition: background 0.2s var(--drawer-ease) !important;
    touch-action: manipulation;
}

.oz-cart-empty-btn:hover {
    background: var(--oz-cta-hover, #D06E00) !important;
}

/* ============================================
   STICKY FOOTER
   ============================================ */
.oz-drawer-footer {
    padding: 16px 24px 8px;
    /* iOS safe area inset for notch devices */
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--oz-border, #E5E5E3);
    background: var(--oz-bg-page, white);
    flex-shrink: 0;
}

.oz-drawer-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.oz-drawer-footer-label {
    font-size: 12px;
    color: var(--oz-text-muted, #999999);
}

.oz-drawer-footer-value {
    font-size: 12px;
    color: var(--oz-text-muted, #999999);
}

/* Subtotal row */
.oz-drawer-footer-row.subtotal {
    margin-bottom: 16px;
    margin-top: 4px;
}

.oz-drawer-footer-row.subtotal .oz-drawer-footer-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--oz-text-primary, #1A1A1A);
}

.oz-drawer-footer-row.subtotal .oz-drawer-footer-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--oz-accent, #135350);
}

/* Checkout button — ORANGE CTA (is an <a> tag, not affected by button reset) */
.oz-checkout-btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: var(--oz-cta, #E67C00);
    color: var(--oz-cta-text, #FFFFFF);
    border: none;
    border-radius: 5px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s var(--drawer-ease);
}

.oz-checkout-btn:hover {
    background: var(--oz-cta-hover, #D06E00);
    color: var(--oz-cta-text, #FFFFFF);
}

.oz-checkout-btn:active {
    transform: scale(0.985);
}

/* Payment icons */
.oz-drawer-payment-icons {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
}

.oz-drawer-payment-icon {
    width: 38px;
    height: 24px;
    background: var(--oz-bg-subtle, #FAFAF9);
    border: 1px solid var(--oz-border-light, #F0EFED);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: 700;
    color: var(--oz-text-muted, #999999);
    letter-spacing: 0.3px;
}

/* Mollie gateway icons inside drawer payment section */
.oz-drawer-payment-icon img {
    max-height: 18px;
    max-width: 32px;
    object-fit: contain;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Short viewports (small laptops ~768px tall) — compact everything */
@media (max-height: 800px) {
    .oz-drawer-header { padding: 12px 24px; }

    .oz-shipping-bar { padding: 8px 24px; }
    .oz-shipping-text { margin-bottom: 4px; }

    /* Cart items — smaller images, tighter spacing */
    .oz-cart-item {
        grid-template-columns: 52px 1fr;
        gap: 10px;
        padding: 10px 0;
    }
    .oz-cart-item-img { width: 52px; height: 52px; }
    .oz-cart-item-name { font-size: 12px; }
    .oz-cart-item-meta { font-size: 10px; }
    .oz-cart-item-price { font-size: 13px; }
    .oz-cart-item-row { padding-top: 4px; }

    /* Upsells — compact cards, enough room for 2 items */
    .oz-drawer-upsells {
        max-height: min(20vh, 170px);
        padding: 8px 24px 6px;
    }
    .oz-drawer-upsells-title { margin-bottom: 6px; font-size: 10px; }
    .oz-drawer-upsell-list { gap: 4px; }
    .oz-drawer-upsell-card { padding: 6px 10px; gap: 10px; border-radius: 6px; }
    .oz-drawer-upsell-img { width: 34px; height: 34px; }
    .oz-drawer-upsell-name { font-size: 11px; }
    .oz-drawer-upsell-price { font-size: 10px; }
    .oz-drawer-upsell-add { width: 28px !important; height: 28px !important; }
    .oz-upsell-size-pill { font-size: 9px !important; padding: 1px 4px !important; }
    .oz-upsell-sizes { gap: 3px; margin-top: 2px; }
    .oz-upsell-option-pill { font-size: 9px !important; padding: 1px 4px !important; }
    .oz-upsell-options { gap: 3px; margin-top: 2px; }

    /* Footer — tight spacing, smaller text */
    .oz-drawer-footer {
        padding: 10px 24px 12px;
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }
    .oz-drawer-footer-row { margin-bottom: 2px; }
    .oz-drawer-footer-row.subtotal { margin-bottom: 8px; margin-top: 2px; }
    .oz-drawer-footer-row.subtotal .oz-drawer-footer-label { font-size: 14px; }
    .oz-drawer-footer-row.subtotal .oz-drawer-footer-value { font-size: 16px; }
    .oz-checkout-btn { padding: 11px; font-size: 12px; }
    .oz-drawer-payment-icons { margin-top: 6px; gap: 4px; }
    .oz-drawer-payment-icon { width: 34px; height: 22px; }
}

/* Very short viewports — hide payment icons, minimal everything */
@media (max-height: 650px) {
    .oz-drawer-payment-icons { display: none; }
    .oz-drawer-upsells { max-height: min(18vh, 140px); padding: 6px 24px 4px; }
    .oz-drawer-footer { padding: 8px 24px 10px; }
    .oz-drawer-footer-row.subtotal { margin-bottom: 6px; }
    .oz-checkout-btn { padding: 10px; }

    .oz-cart-item {
        grid-template-columns: 44px 1fr;
        gap: 8px;
        padding: 8px 0;
    }
    .oz-cart-item-img { width: 44px; height: 44px; }
}

@media (max-width: 900px) {
    .oz-drawer {
        max-width: 100%;
    }

    .oz-cart-items { padding: 0 16px; }
    .oz-drawer-upsells { padding: 12px 16px 10px; }
    .oz-drawer-header { padding: 14px 16px; }
    .oz-shipping-bar { padding: 10px 16px; }
    .oz-drawer-footer { padding: 14px 16px 18px; padding-bottom: max(18px, env(safe-area-inset-bottom)); }
    .oz-cart-skeleton { padding: 16px 16px; }

    .oz-cart-item {
        grid-template-columns: 56px 1fr;
        gap: 10px;
    }

    .oz-cart-item-img {
        width: 56px;
        height: 56px;
    }

    .oz-cart-skeleton-img {
        width: 56px;
        height: 56px;
    }
}
