/* =========================================================
 * checkout.css – PREMIUM CHECKOUT UI (v3.1 ELEGANT MONLE)
 * Luxury editorial design with Amber → Rose palette
 * Mobile-first with warm, feminine aesthetics
 * ======================================================= */

/* v3.2: Global zoom for refined appearance */
/* Desktop: 90%, Mobile: 75% for more compact feel */
html {
    zoom: 0.9;
}

@media (max-width: 768px) {
    html {
        zoom: 0.75;
    }
}

/* ---------------------------------------------------------
 * 0) FONTS & ROOT VARIABLES
 * ------------------------------------------------------ */

/* v3.1: Local self-hosted fonts - Outfit (display) + Inter (body) */
@font-face {
    font-family: 'Outfit';
    src: local('Outfit'), url('/static/fonts/Outfit-Variable.woff2') format('woff2-variations');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: local('Inter'), url('/static/fonts/Inter-Variable.woff2') format('woff2-variations');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    /* v3.1 ELEGANT MONLE: Amber → Rose color palette (warm, feminine) */
    --checkout-accent: #f59e0b;
    /* Amber-500 */
    --checkout-accent-hover: #d97706;
    /* Amber-600 */
    --checkout-accent-glow: rgba(245, 158, 11, 0.35);
    --checkout-accent-secondary: #fb7185;
    /* Rose-400 */
    --checkout-accent-secondary-hover: #f43f5e;
    /* Rose-500 */
    --checkout-success: #22c55e;
    /* Green-500 */
    --checkout-success-glow: rgba(34, 197, 94, 0.25);
    --checkout-warning: #f59e0b;
    --checkout-danger: #ef4444;

    /* Stone neutrals (warm grays) */
    --checkout-stone-50: #fafaf9;
    --checkout-stone-100: #f5f5f4;
    --checkout-stone-200: #e7e5e4;
    --checkout-stone-300: #d6d3d1;
    --checkout-stone-400: #a8a29e;
    --checkout-stone-500: #78716c;
    --checkout-stone-600: #57534e;
    --checkout-stone-700: #44403c;
    --checkout-stone-800: #292524;
    --checkout-stone-900: #1c1917;

    /* Glass & surface colors (warm tones) */
    --checkout-surface: rgba(255, 255, 255, 0.85);
    --checkout-surface-elevated: rgba(255, 255, 255, 0.95);
    --checkout-glass-border: rgba(231, 229, 228, 0.5);
    /* Stone-200 with opacity */
    --checkout-glass-shadow-sm: 0 4px 16px rgba(28, 25, 23, 0.06);
    --checkout-glass-shadow: 0 8px 32px rgba(28, 25, 23, 0.10);
    --checkout-glass-shadow-lg: 0 16px 48px rgba(28, 25, 23, 0.14);
    --checkout-glass-shadow-xl: 0 24px 64px rgba(28, 25, 23, 0.18);

    /* v3.1 Gradients - Amber → Rose transitions */
    --checkout-gradient-primary: linear-gradient(135deg, #fbbf24 0%, #f59e0b 35%, #fb7185 100%);
    --checkout-gradient-primary-hover: linear-gradient(135deg, #f59e0b 0%, #ea580c 35%, #f43f5e 100%);
    --checkout-gradient-success: linear-gradient(135deg, #22c55e 0%, #10b981 50%, #14b8a6 100%);
    --checkout-gradient-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(250, 250, 249, 0.90) 100%);
    --checkout-gradient-header: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(254, 249, 243, 0.92) 100%);
    --checkout-gradient-bg: linear-gradient(160deg, #fafaf9 0%, #fef3c7 25%, #fff1f2 55%, #fdf4ff 85%, #fafaf9 100%);

    /* v3.1 Typography - Local sans-serif: Outfit (display) + Inter (body) with system fallback */
    --checkout-font-base: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --checkout-font-display: 'Outfit', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --checkout-font-mono: ui-monospace, 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;

    /* R2-7: Fluid typography scale (responsive 375px → 1920px) */
    --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --text-sm: clamp(0.875rem, 0.825rem + 0.25vw, 1rem);
    --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    --text-lg: clamp(1.125rem, 1.05rem + 0.375vw, 1.25rem);
    --text-xl: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
    --text-2xl: clamp(1.5rem, 1.35rem + 0.75vw, 2rem);
    --text-3xl: clamp(1.875rem, 1.65rem + 1.125vw, 2.5rem);

    /* Optimal line heights (golden ratio derived) */
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;

    /* Letter spacing */
    --tracking-tight: -0.025em;
    --tracking-normal: 0;
    --tracking-wide: 0.025em;
    --tracking-wider: 0.05em;

    /* Spacing */
    --checkout-space-xs: 0.375rem;
    --checkout-space-sm: 0.625rem;
    --checkout-space-md: 1rem;
    --checkout-space-lg: 1.5rem;
    --checkout-space-xl: 2rem;

    /* Animations - R2-3: Spring Physics (2026 SOTA) */
    --checkout-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --checkout-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

    /* R2-3: Spring physics easing (natural motion using CSS linear()) */
    --ease-spring: linear(0, 0.002, 0.01 0.9%, 0.038 1.8%, 0.156, 0.312 5.8%,
            0.789 11.1%, 1.015 14.2%, 1.096, 1.157, 1.199,
            1.224 20.3%, 1.231, 1.231, 1.226 24.6%, 1.214 27.5%,
            1.172 32.6%, 1.057 40.9%, 1.007 47.2%, 0.984,
            0.968, 0.956 60.7%, 0.949 63.9%, 0.946 67.7%,
            0.951 79.3%, 0.998 99.5%);

    /* Bounce spring for button presses */
    --ease-bounce: linear(0, 0.004, 0.016, 0.035, 0.063, 0.098, 0.141, 0.191,
            0.25, 0.316, 0.391 36.8%, 0.563, 0.766, 1 58.8%,
            0.946, 0.908 69.1%, 0.895, 0.885, 0.879, 0.878,
            0.879, 0.885, 0.894, 0.906, 0.921, 0.939 89.7%,
            1.001 100%);

    /* Elastic spring for playful interactions */
    --ease-elastic: linear(0, 0.002 12.5%, 0.007 25%, -0.016 37.5%, -0.051 50%,
            -0.048 56.25%, -0.038 62.5%, -0.025 68.75%,
            -0.011 75%, 0.008 81.25%, 0.022 87.5%, 0.027 93.75%, 1);
}

body.page-checkout {
    font-family: var(--checkout-font-base);
    font-size: var(--text-base);
    /* R2-7: Fluid typography */
    line-height: var(--leading-relaxed);
    /* v3.1: Warm Amber → Rose gradient background */
    background: var(--checkout-gradient-bg);
    min-height: 100vh;
    /* R2-7: Subpixel antialiasing for crisp text */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1, "liga" 1;
}

/* v2.31.0: Disable text selection across UI (mobile + desktop)
   Prevents accidental text highlighting during touch/mouse interactions */
body.page-checkout {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    /* iOS Safari context menu */
    -webkit-tap-highlight-color: transparent;
    /* Remove tap highlight on mobile */
}

/* Exceptions: Allow text selection in form inputs and specific copyable elements */
body.page-checkout input,
body.page-checkout textarea,
body.page-checkout [contenteditable="true"],
body.page-checkout .selectable,
body.page-checkout .copyable,
body.page-checkout code,
body.page-checkout pre,
body.page-checkout .bank-account-number,
body.page-checkout .variable-symbol,
body.page-checkout .order-id,
body.page-checkout .public-token {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
    -webkit-touch-callout: default;
}

/* Utility helper for invisible Alpine effects */
.checkout-hidden-helper {
    display: none !important;
}

/* Initial loader overlay (prevents perceived blank page on slow/blocking scripts) */
.page-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(248, 250, 252, 0.82);
    backdrop-filter: blur(10px);
    animation: loaderFadeIn 0.18s ease forwards;
    animation-delay: 0.25s;
    opacity: 0;
    visibility: hidden;
}

.page-loader-card {
    width: min(520px, 92vw);
    padding: 1.15rem 1.25rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(168, 162, 158, 0.35);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
    text-align: center;
}

.page-loader-spinner {
    width: 34px;
    height: 34px;
    border-radius: 9999px;
    border: 3px solid rgba(37, 99, 235, 0.18);
    border-top-color: rgba(37, 99, 235, 0.95);
    margin: 0 auto 0.75rem;
    animation: loaderSpin 0.9s linear infinite;
}

.page-loader-title {
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.35rem;
}

.page-loader-subtitle {
    font-size: 0.9rem;
    color: rgba(51, 65, 85, 0.88);
    line-height: 1.25;
}

@keyframes loaderSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes loaderFadeIn {
    to {
        opacity: 1;
        visibility: visible;
    }
}

/* Product grid loading hint */
.product-grid-loading {
    padding: 0.75rem 0.25rem 0.25rem;
    color: rgba(51, 65, 85, 0.8);
    font-size: 0.95rem;
}

/* ---------------------------------------------------------
 * R2-1: SKELETON SCREENS - Loading States
 * ------------------------------------------------------ */

/* Skeleton base animation */
@keyframes skeleton-loading {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.skeleton {
    background: linear-gradient(90deg,
            rgba(168, 162, 158, 0.1) 0%,
            rgba(168, 162, 158, 0.2) 50%,
            rgba(168, 162, 158, 0.1) 100%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 8px;
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-text:last-child {
    width: 60%;
}

.skeleton-title {
    height: 1.5rem;
    width: 40%;
    margin-bottom: 1rem;
}

.skeleton-avatar {
    width: 64px;
    height: 64px;
    border-radius: 8px;
}

.skeleton-button {
    height: 44px;
    border-radius: 8px;
}

/* Product card skeleton */
.product-skeleton {
    display: grid;
    gap: 1rem;
}

.product-skeleton-image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
}

.product-skeleton-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Cart item skeleton */
.cart-item-skeleton {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    margin-bottom: 0.75rem;
}

/* ---------------------------------------------------------
 * 1) APP SHELL & LAYOUT
 * ------------------------------------------------------ */

body.page-checkout .app-shell-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

body.page-checkout .app-shell-inner>.site-header,
body.page-checkout .app-shell-inner>.checkout-page {
    width: 100%;
}

#main-content {
    padding-top: 16px;
}

body.page-checkout .checkout-page {
    width: 100%;
    max-width: 1600px;
    /* QW-3: Unified from 1180px to 1200px */
    margin: 0 auto var(--checkout-space-xl);
    padding: 0 var(--checkout-space-md) var(--checkout-space-lg);
}

body.page-checkout .checkout-layout {
    display: block;
}

body.page-checkout .checkout-main {
    display: block;
}

body.page-checkout .checkout-summary-desktop {
    display: none;
    margin-top: var(--checkout-space-md);
}

/* ---------------------------------------------------------
 * 2) HEADER - MODERN STICKY (v2.43.5: Dynamic branding support)
 * ------------------------------------------------------ */

body.page-checkout .site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    /* v2.43.5: Dynamic branding via CSS custom properties */
    background: var(--header-bg, rgba(248, 250, 252, 0.95));
    color: var(--header-text, var(--checkout-stone-900));
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s var(--checkout-ease);
    /* User request: Small gap under header when at top */
    margin-bottom: 0.5rem;
}

/* v2.43.5: Brand text inherits header text color */
body.page-checkout .site-header .brand-text {
    color: var(--header-text, #111827);
}

body.page-checkout .site-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

body.page-checkout .site-header .header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

body.page-checkout .site-header .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

body.page-checkout .site-header .logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    transition: all 0.4s var(--checkout-spring);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body.page-checkout .site-header .brand:hover .logo {
    transform: scale(1.08) rotate(-3deg);
}

body.page-checkout .site-header .brand-text {
    font-size: 17px;
    font-weight: 800;
    color: #111827;
    letter-spacing: -0.02em;
    transition: all 0.3s ease;
}

body.page-checkout .site-header .brand:hover .brand-text {
    background: var(--checkout-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.page-checkout .site-header .header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Header wishlist button (scoped to header to avoid clash with wishlist actions elsewhere) */
body.page-checkout .site-header .wishlist-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 14px;
    margin-top: 0;
    background: transparent;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
}

body.page-checkout .site-header .wishlist-btn:hover {
    background: rgba(245, 158, 11, 0.08);
    color: var(--checkout-accent);
}

body.page-checkout .site-header .wishlist-btn svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

body.page-checkout .site-header .wishlist-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--checkout-gradient-primary);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 9px;
    padding: 0 5px;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
}

body.page-checkout .site-header .user-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 40px;
    padding: 0 12px;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: default;
    transition: all 0.2s ease;
}

body.page-checkout .site-header .user-menu:hover {
    background: #f9fafb;
}

body.page-checkout .site-header .user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--checkout-gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}

body.page-checkout .site-header .user-email {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.page-checkout .site-header .chevron {
    width: 16px;
    height: 16px;
    stroke: #9ca3af;
    transition: transform 0.2s ease;
}

body.page-checkout .site-header .user-menu:hover .chevron {
    transform: translateY(2px);
}

@media (max-width: 768px) {
    body.page-checkout .site-header .header-inner {
        padding: 0 16px;
        height: 56px;
    }

    body.page-checkout .site-header .logo {
        width: 36px;
        height: 36px;
    }

    body.page-checkout .site-header .brand-text {
        font-size: 15px;
    }

    body.page-checkout .site-header .user-email {
        display: none;
    }

    body.page-checkout .site-header .user-menu {
        padding: 0 8px;
    }

    body.page-checkout .site-header .wishlist-btn {
        padding: 0 10px;
    }

    body.page-checkout .site-header .wishlist-text {
        display: none;
    }
}

/* ---------------------------------------------------------
 * 3) GLASS CARDS - ENHANCED DEPTH
 * ------------------------------------------------------ */

/* QW-9: Checkout-specific glass-card (premium version, overrides base.css) */
.checkout-page .glass-card {
    --glass-blur: 20px;
    /* Override: stronger blur */
    --glass-radius: 16px;
    /* Reduced from 20px for cleaner look */

    background: var(--checkout-gradient-surface);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow:
        var(--checkout-glass-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        0 0 0 1px rgba(168, 162, 158, 0.08);
    backdrop-filter: blur(var(--glass-blur)) saturate(160%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
    position: relative;
    overflow: hidden;
    transition: all 0.3s var(--checkout-ease);
}

.checkout-page .glass-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, transparent 40%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--checkout-ease);
}

.checkout-page .glass-card:hover::before {
    opacity: 1;
}

.glass-card:hover {
    box-shadow:
        var(--checkout-glass-shadow-lg),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 0 0 1px rgba(168, 162, 158, 0.12);
    transform: translateY(-2px);
}

/* All main sections */
.cart-section,
.order-summary-section,
.customer-section,
.pickup-section,
.payment-method-section,
.qr-payment-section,
.product-grid-section {
    padding: 1.5rem;
    border-radius: 16px;
    margin-bottom: 1.25rem;
}

/* ---------------------------------------------------------
 * 4) CART SECTION - REFINED
 * ------------------------------------------------------ */

.cart-section h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cart-section .cart-item {
    display: block;
    padding: 1rem 1.15rem;
    border-radius: 12px;
    border: 1px solid rgba(168, 162, 158, 0.15);
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-section .cart-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    border-radius: 2px;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cart-section .cart-item:hover {
    padding-left: calc(1.15rem + 8px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.cart-section .cart-item:hover::before {
    opacity: 1;
}

.cart-section .cart-item+.cart-item {
    margin-top: 0.875rem;
}

/* Soft vs committed reservation styling */
.cart-section .cart-item.cart-item-soft {
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.06) 0%, rgba(59, 130, 246, 0.02) 100%);
    border-color: rgba(59, 130, 246, 0.2);
}

.cart-section .cart-item.cart-item-soft::before {
    background: linear-gradient(180deg, #3b82f6 0%, #60a5fa 100%);
    opacity: 1;
}

.cart-section .cart-item.cart-item-committed {
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0.03) 100%);
    border-color: rgba(16, 185, 129, 0.25);
}

.cart-section .cart-item.cart-item-committed::before {
    background: var(--checkout-gradient-success);
    opacity: 1;
}

/* Cart item layout (image left, content right) */
/* v2.31.0: Image sizing based on row height, not fixed pixels */
.cart-item-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    align-items: stretch;
    min-height: 4.5rem;
    /* v2.39: More compact row height */
}

.cart-item-image {
    border-radius: 8px;
    overflow: hidden;
    background: #f9fafb;
    /* v2.40.0 FIX: Square image - height from row, constrained width */
    aspect-ratio: 1;
    height: 100%;
    width: auto;
    min-width: 3rem;
    max-width: 5.5rem;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.cart-item-image:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.15);
}

/* Cart item thumbnail */
.cart-item-thumb-lg {
    width: 100%;
    height: 100%;
    aspect-ratio: 1;
    /* R2-6: Prevent layout shift with lazy loading */
    border-radius: 0;
    object-fit: cover;
    cursor: pointer;
    background: linear-gradient(135deg, var(--checkout-stone-100) 0%, #e2e8f0 100%);
    box-shadow: none;
    transition: all 0.3s var(--checkout-ease);
    display: block;
}

.cart-item-thumb-lg:hover {
    transform: none;
    box-shadow: none;
}

/* Cart item body */
.cart-item-body {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    /* v2.39: Tighter spacing */
    width: 100%;
    min-width: 0;
}

/* Top row: info + total */
.cart-item-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

/* Meta row */
.cart-item-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.2rem;
}

.cart-item-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
    /* v2.39: Tighter line height */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.cart-item-price {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 700;
    background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.vat-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border: 1px solid rgba(245, 158, 11, 0.15);
    color: #4338ca;
    font-size: 0.7rem;
    font-weight: 500;
}

/* Availability */
.cart-item-availability {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(168, 162, 158, 0.22);
    background: rgba(15, 23, 42, 0.03);
    color: #64748b;
    font-size: 0.72rem;
}

/* Bottom row: qty + remove */
.cart-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.875rem;
}

.qty-pill {
    display: inline-flex;
    align-items: center;
    background: #f9fafb;
    border-radius: 12px;
    border: 2px solid transparent;
    overflow: hidden;
    transition: all 0.3s ease;
}

.qty-pill:hover {
    border-color: var(--checkout-accent);
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

.qty-btn {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0;
    border-radius: 0;
    border: none;
    background: transparent;
    color: #6b7280;
    transition: all 0.2s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.qty-btn:hover:not(:disabled) {
    background: var(--checkout-accent);
    color: #ffffff;
}

.qty-btn:first-child {
    border-radius: 10px 0 0 10px;
}

.qty-btn:last-child {
    border-radius: 0 10px 10px 0;
}

.qty-value {
    min-width: 2.25rem;
    text-align: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: #1e293b;
}

.cart-item-total {
    font-weight: 800;
    font-size: 1.25rem;
    justify-self: start;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.remove-btn,
.cart-item-remove {
    border-radius: 12px;
    width: 44px;
    /* QW-5: WCAG 2.1 Level AA minimum (was 32px) */
    height: 44px;
    /* QW-5: WCAG 2.1 Level AA minimum (was 32px) */
    font-size: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* QW-5: Better touch feedback */
    position: relative;
    touch-action: manipulation;
    border: 1px solid rgba(239, 68, 68, 0.2);
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #dc2626;
    transition: all 0.2s var(--checkout-ease);
}

.remove-btn:hover,
.cart-item-remove:hover {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

@media (max-width: 520px) {
    .cart-item-grid {
        /* v2.31.0: Use auto sizing instead of fixed pixels */
        min-height: 4.5rem;
        gap: 0.875rem;
    }

    .cart-item-image {
        /* v2.40.0 FIX: Keep square with constrained width on mobile */
        aspect-ratio: 1;
        height: 100%;
        width: auto;
        min-width: 3rem;
        max-width: 4.5rem;
    }

    .cart-item-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .cart-item-total {
        font-size: 1.1rem;
    }
}

/* Reservation countdown */
.reservation-countdown-row {
    grid-column: 1 / -1;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    padding: 0.35rem 0.65rem;
    border-radius: 8px;
}

.reservation-countdown-normal {
    color: #0f766e;
    background: rgba(16, 185, 129, 0.08);
}

.reservation-countdown-soon {
    color: #dc2626;
    background: rgba(239, 68, 68, 0.08);
    animation: pulse-subtle 2s ease-in-out infinite;
}

@keyframes pulse-subtle {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* ---------------------------------------------------------
 * 5) CHECKOUT WIZARD (Alza-style)
 * ------------------------------------------------------ */

.checkout-success {
    padding: 1.5rem 1.75rem;
    border-radius: 20px;
    border: 1px solid rgba(16, 185, 129, 0.18);
    background: linear-gradient(180deg, rgba(236, 253, 245, 0.92) 0%, rgba(255, 255, 255, 0.92) 100%);
    box-shadow: var(--checkout-glass-shadow-lg);
    margin-bottom: 1.25rem;
}

.checkout-success-head {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.checkout-success-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.18) 0%, rgba(16, 185, 129, 0.08) 100%);
    border: 1px solid rgba(16, 185, 129, 0.22);
}

.checkout-success-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: #064e3b;
}

.checkout-success-subtitle {
    margin: 0.35rem 0 0 0;
    color: rgba(15, 23, 42, 0.75);
    font-size: 0.95rem;
}

.checkout-success-meta {
    margin-top: 1rem;
}

.checkout-success-order {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(16, 185, 129, 0.18);
}

.checkout-success-label {
    color: rgba(15, 23, 42, 0.7);
    font-weight: 600;
}

.checkout-success-value {
    font-weight: 800;
    color: #0f172a;
}

.checkout-success-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
}

@media (max-width: 640px) {
    .checkout-success {
        padding: 1.25rem 1.25rem;
    }

    .checkout-success-actions .btn-primary,
    .checkout-success-actions .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

.checkout-wizard {
    /* v3.1: Generous rounded corners (rounded-3xl) */
    border-radius: 24px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--checkout-stone-200);
    box-shadow: var(--checkout-glass-shadow-lg);
    margin-bottom: 1.5rem;
}

.checkout-wizard .step-indicator {
    display: flex;
    justify-content: space-between;
    padding: 2rem 2.5rem;
    /* v3.1: Warm stone gradient */
    background: linear-gradient(to bottom, var(--checkout-stone-50) 0%, #ffffff 100%);
    border-bottom: 1px solid var(--checkout-stone-200);
}

.checkout-wizard .step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    cursor: pointer;
    transition: all 0.3s var(--checkout-ease);
}

.checkout-wizard .step.disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.checkout-wizard .step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 24px;
    left: 60%;
    width: 80%;
    height: 3px;
    background: rgba(168, 162, 158, 0.35);
    transition: all 0.3s var(--checkout-ease);
}

.checkout-wizard .step.active:not(:last-child)::after,
.checkout-wizard .step.completed:not(:last-child)::after {
    background: var(--checkout-gradient-primary);
}

.checkout-wizard .step-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #f3f4f6;
    border: 3px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    transition: all 0.4s var(--checkout-spring);
    position: relative;
    z-index: 1;
}

.checkout-wizard .step-icon svg {
    width: 28px;
    height: 28px;
    stroke: #9ca3af;
    transition: stroke 0.3s ease;
}

.checkout-wizard .step.active .step-icon {
    background: var(--checkout-gradient-primary);
    border-color: var(--checkout-accent);
    /* v3.1: Amber glow */
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2), 0 8px 16px rgba(251, 113, 133, 0.25);
    transform: scale(1.12);
}

.checkout-wizard .step.completed .step-icon {
    background: var(--checkout-gradient-success);
    border-color: var(--checkout-success);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.checkout-wizard .step.active .step-icon svg,
.checkout-wizard .step.completed .step-icon svg {
    stroke: #ffffff;
}

.checkout-wizard .step-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #6b7280;
    text-align: center;
}

.checkout-wizard .step.active .step-label {
    color: var(--checkout-accent);
    font-weight: 800;
}

.checkout-wizard .step.completed .step-label {
    color: var(--checkout-success);
    font-weight: 700;
}

.checkout-wizard .wizard-error {
    margin: 1rem 1.25rem 0;
    padding: 0.75rem 1rem;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(254, 242, 242, 0.9) 0%, rgba(254, 226, 226, 0.9) 100%);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #991b1b;
    font-weight: 600;
}

.checkout-wizard .wizard-steps {
    padding: 1.75rem 2.5rem 1.25rem;
    min-height: 420px;
    position: relative;
}

/* v2.40.0: Semi-transparent loading overlay */
.wizard-loading-overlay {
    position: absolute;
    inset: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: inherit;
}

.wizard-loading-spinner {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 4px solid rgba(245, 158, 11, 0.2);
    border-top-color: var(--checkout-accent);
    animation: loaderSpin 0.8s linear infinite;
}

.wizard-loading-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--checkout-accent-hover);
    text-align: center;
}

.checkout-wizard .shipping-mode-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

/* Hide legacy accordion headers inside wizard (step indicator replaces them) */
.checkout-wizard .checkout-step {
    margin: 0;
}

.checkout-wizard .checkout-step .step-header {
    display: none;
}

.checkout-wizard .checkout-step .step-body {
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

.checkout-wizard .customer-section.glass-card,
.checkout-wizard .pickup-section.glass-card,
.checkout-wizard .payment-method-section.glass-card {
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
}

.checkout-wizard .checkout-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(168, 162, 158, 0.18);
    background: rgba(255, 255, 255, 0.92);
}

.checkout-wizard .nav-buttons {
    display: flex;
    gap: 0.75rem;
    width: 100%;
}

.checkout-wizard .nav-button {
    flex: 1;
    justify-content: center;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border-radius: 12px;
    border: 1px solid rgba(168, 162, 158, 0.25);
    /* User request: Back button colored but less prominent than primary */
    background: rgba(245, 158, 11, 0.05);
    color: var(--checkout-accent);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s var(--checkout-ease);
    touch-action: manipulation;
}

.checkout-wizard .nav-button svg {
    width: 18px;
    height: 18px;
}

.checkout-wizard .nav-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.checkout-wizard .nav-button-next {
    background: var(--checkout-gradient-primary);
    border-color: transparent;
    color: #ffffff !important;
    /* Force white text */
    box-shadow: 0 12px 24px rgba(245, 158, 11, 0.22);
}

.checkout-wizard .nav-button-next:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #cbd5e1;
    /* Grey when disabled */
    color: #94a3b8 !important;
    box-shadow: none;
}

.checkout-wizard .nav-button-back:hover:not(:disabled) {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.35);
    box-shadow: 0 8px 18px rgba(245, 158, 11, 0.12);
    transform: translateY(-1px);
}



.checkout-wizard .nav-button-next:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 18px 36px rgba(245, 158, 11, 0.25);
}

.checkout-wizard .order-summary {
    text-align: center;
    min-width: 160px;
}

.checkout-wizard .order-summary .summary-label {
    font-size: 0.8rem;
    color: #6b7280;
}

.checkout-wizard .order-summary .summary-amount {
    font-size: 1.25rem;
    font-weight: 900;
    color: #111827;
    letter-spacing: -0.02em;
}

@media (max-width: 768px) {
    .checkout-wizard .step-indicator {
        padding: 1.5rem 1.25rem;
    }

    .checkout-wizard .wizard-steps {
        padding: 1.25rem 1.25rem 1rem;
        min-height: 0;
    }

    .checkout-wizard .order-summary {
        min-width: auto;
    }
}

/* ---------------------------------------------------------
 * 5) CHECKOUT STEPS (ACCORDION)
 * ------------------------------------------------------ */

.checkout-step {
    border-radius: 18px;
    margin-bottom: 1.25rem;
    padding: 0;
}

.checkout-step .step-header {
    width: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.9) 100%);
    border: 1px solid rgba(168, 162, 158, 0.15);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
    transition: all 0.25s var(--checkout-ease);
}

.checkout-step .step-header:hover {
    background: linear-gradient(180deg, #ffffff 0%, rgba(248, 250, 252, 0.95) 100%);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.checkout-step.open .step-header {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-color: transparent;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.checkout-step .step-titles {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
}

.checkout-step .step-titles>span:first-child {
    font-weight: 700;
    font-size: 0.95rem;
}

.checkout-step .step-summary {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.checkout-step .step-arrow {
    transition: transform 0.3s var(--checkout-spring);
    font-size: 1.2rem;
    color: var(--checkout-accent);
    font-weight: 700;
}

.checkout-step.open .step-arrow {
    transform: rotate(180deg);
}

.checkout-step .step-body {
    padding: 0.875rem 0 1.25rem 0;
}

/* ---------------------------------------------------------
 * 6) SUMMARY SECTION
 * ------------------------------------------------------ */

.cart-summary {
    margin-top: 1.125rem;
    border-top: 1px dashed rgba(168, 162, 158, 0.3);
    padding-top: 1.125rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.summary-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.summary-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 2px solid rgba(245, 158, 11, 0.15);
    font-size: 1.05rem;
}

.summary-total strong:first-child {
    color: var(--text-primary);
}

.summary-total strong:last-child {
    font-size: 1.2rem;
    font-weight: 800;
    background: var(--checkout-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.summary-vat {
    font-size: 0.78rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

/* Checkout summary desktop aside */
.checkout-summary-desktop {
    padding: 1.5rem;
    position: sticky;
    top: 1.5rem;
}

.checkout-summary-desktop h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

/* ---------------------------------------------------------
 * 7) CONTACT & COMPANY FORMS
 * ------------------------------------------------------ */

.customer-section h2,
.order-summary-section h2,
.pickup-section h2,
.payment-method-section h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.customer-section input[type="text"],
.customer-section input[type="email"],
.customer-section input[type="tel"],
.company-fields input[type="text"],
.company-fields input[type="email"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(168, 162, 158, 0.3);
    font-size: 0.95rem;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    transition: all 0.25s var(--checkout-ease);
    margin-bottom: 0.75rem;
}

.customer-section input:focus,
.company-fields input:focus {
    border-color: var(--checkout-accent);
    box-shadow: 0 0 0 3px var(--checkout-accent-glow);
    background: #ffffff;
    outline: none;
}

/* ---------------------------------------------------------
 * R2-2: MODERN INPUT POLISH
 * ------------------------------------------------------ */

/* Autofill styling (Chrome, Safari, Firefox) */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--checkout-accent);
    -webkit-box-shadow: 0 0 0 1000px rgba(245, 158, 11, 0.05) inset;
    transition: background-color 5000s ease-in-out 0s;
    border-color: var(--checkout-accent);
}

input:autofill,
textarea:autofill,
select:autofill {
    background-color: rgba(245, 158, 11, 0.05);
}

/* Enhanced focus states with glow and subtle lift */
.customer-section input:focus,
.company-fields input:focus,
.product-search-input:focus,
textarea:focus,
select:focus {
    transform: translateY(-1px);
    box-shadow:
        0 0 0 3px rgba(245, 158, 11, 0.1),
        0 4px 12px rgba(245, 158, 11, 0.15);
}

/* Disabled state polish */
input:disabled,
textarea:disabled,
select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(168, 162, 158, 0.05);
}

/* Placeholder enhancement */
::placeholder {
    color: rgba(100, 116, 139, 0.6);
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

input:focus::placeholder,
textarea:focus::placeholder {
    opacity: 0.3;
}

/* ---------------------------------------------------------
 * R2-3: SPRING ANIMATIONS - Natural Motion
 * ------------------------------------------------------ */

/* Apply spring transitions to all interactive elements */
button,
.btn,
.glass-card,
.product-card,
.cart-item {
    transition: all 0.3s var(--ease-spring);
}

/* Glass card hover with spring */
.glass-card:hover {
    transform: translateY(-4px) scale(1.01);
}

/* Product card enhanced hover */
.product-card:hover {
    transform: translateY(-6px);
}

.product-card:hover .product-card-thumb {
    transform: scale(1.05);
    transition: transform 0.4s var(--ease-spring);
}

/* Button hover micro-interactions */
.product-card-btn:hover:not(:disabled),
button:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.02);
}

/* Button active state with bounce */
.product-card-btn:active:not(:disabled),
button:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
    transition: all 0.1s var(--ease-bounce);
}

/* Quantity buttons bounce */
.cart-item-qty button,
.qty-btn {
    transition: transform 0.15s var(--ease-spring);
}

.cart-item-qty button:active:not(:disabled),
.qty-btn:active:not(:disabled) {
    transform: scale(0.9);
    transition: transform 0.15s var(--ease-bounce);
}

/* Cart item remove button with elastic */
.cart-item-remove,
.remove-btn {
    transition: all 0.2s var(--ease-spring);
}

.cart-item-remove:hover:not(:disabled),
.remove-btn:hover:not(:disabled) {
    transform: rotate(90deg) scale(1.1);
    transition: all 0.3s var(--ease-elastic);
}

/* View Transitions API (Chrome 111+, progressive enhancement) */
@supports (view-transition-name: none) {
    @view-transition {
        navigation: auto;
    }

    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation-duration: 0.3s;
        animation-timing-function: var(--ease-spring);
    }

    /* Specific transition for cart items */
    .cart-item {
        view-transition-name: cart-item;
    }

    ::view-transition-old(cart-item),
    ::view-transition-new(cart-item) {
        animation-duration: 0.4s;
        animation-timing-function: var(--ease-elastic);
    }
}

/* Scroll-Driven Animations (progressive enhancement) */
@supports (animation-timeline: view()) {

    .cart-item,
    .product-card,
    .glass-card {
        animation: fade-in-up linear;
        animation-timeline: view();
        animation-range: entry 0% cover 30%;
    }

    @keyframes fade-in-up {
        from {
            opacity: 0;
            transform: translateY(20px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* ---------------------------------------------------------
 * R2-4: ENHANCED FOCUS MANAGEMENT - Keyboard Navigation
 * ------------------------------------------------------ */

/* Remove default outline (we'll use custom focus-visible) */
*:focus {
    outline: none;
}

/* Custom focus-visible (keyboard navigation only) */
*:focus-visible {
    outline: 2px solid var(--checkout-accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Enhanced button focus */
button:focus-visible,
.btn:focus-visible,
.product-card-btn:focus-visible {
    outline: 3px solid var(--checkout-accent);
    outline-offset: 3px;
    box-shadow:
        0 0 0 6px rgba(245, 158, 11, 0.1),
        0 4px 12px rgba(245, 158, 11, 0.2);
}

/* Input focus ring */
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--checkout-accent);
    outline-offset: 0;
    box-shadow:
        0 0 0 4px rgba(245, 158, 11, 0.15),
        0 4px 12px rgba(245, 158, 11, 0.1);
}

/* Link focus */
a:focus-visible {
    outline: 2px dashed var(--checkout-accent);
    outline-offset: 4px;
    border-radius: 2px;
}

/* Skip to content link (accessibility) */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--checkout-accent);
    color: white;
    padding: 1rem 2rem;
    border-radius: 0 0 12px 0;
    font-weight: 600;
    z-index: 9999;
    transition: top 0.2s var(--ease-spring);
    text-decoration: none;
}

.skip-to-content:focus {
    top: 0;
    outline: 3px solid white;
    outline-offset: -3px;
}

/* ---------------------------------------------------------
 * R2-7: TYPOGRAPHY REFINEMENTS - Fluid Scales & Readability
 * ------------------------------------------------------ */

/* Headings with optimal line heights and letter spacing */
h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    font-optical-sizing: auto;
}

h1 {
    font-size: var(--text-3xl);
}

h2 {
    font-size: var(--text-2xl);
}

h3 {
    font-size: var(--text-xl);
}

h4 {
    font-size: var(--text-lg);
}

h5,
h6 {
    font-size: var(--text-base);
}

/* Body text optimization */
p,
li {
    line-height: var(--leading-relaxed);
    letter-spacing: var(--tracking-normal);
}

/* Small text (legibility enhancement) */
small,
.text-sm {
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
    letter-spacing: var(--tracking-wide);
}

/* Code/monospace */
code,
pre {
    font-family: var(--checkout-font-mono);
    font-variant-ligatures: none;
    letter-spacing: var(--tracking-normal);
}

/* Improved text rendering */
.prose {
    max-width: 65ch;
    text-wrap: pretty;
}

/* Better hyphenation (if needed for long text) */
@supports (hyphenate-limit-chars: 6 3 2) {
    .prose {
        hyphenate-limit-chars: 6 3 2;
    }
}

/* ---------------------------------------------------------
 * R2-5: OPTIMISTIC UI - Toast Notifications
 * ------------------------------------------------------ */

.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    min-width: 320px;
    max-width: 420px;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    animation: slide-in-right 0.3s var(--ease-spring);
    pointer-events: auto;
}

.toast--success {
    border-left: 4px solid var(--checkout-success);
}

.toast--error {
    border-left: 4px solid var(--checkout-danger);
}

.toast--info {
    border-left: 4px solid var(--checkout-accent);
}

.toast-message {
    flex: 1;
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
}

.toast-undo {
    background: var(--checkout-accent);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    font-size: var(--text-sm);
    transition: all 0.2s var(--ease-spring);
}

.toast-undo:hover {
    background: var(--checkout-accent-hover);
    transform: translateY(-1px);
}

@keyframes slide-in-right {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .toast-container {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }

    .toast {
        min-width: unset;
        width: 100%;
    }
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--checkout-accent);
    cursor: pointer;
}

/* Checkbox label with spacing */
.checkbox-label-spaced {
    margin-top: 1.25rem;
    margin-bottom: 0.875rem;
}

.checkbox-text {
    font-weight: 500;
}

/* Company fields */
.company-fields {
    margin-top: 0.75rem;
}

/* Form grid layouts */
.form-grid {
    display: grid;
    gap: 0.75rem;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.form-row-2-1 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 0.75rem;
}

.form-row-2-1-1 {
    display: grid;
    grid-template-columns: 2fr 1fr 0.8fr;
    gap: 0.75rem;
}

@media (max-width: 520px) {
    .form-row-2-1-1 {
        grid-template-columns: 1fr;
    }
}

/* ---------------------------------------------------------
 * 8) PACKETA PICKUP SECTION
 * ------------------------------------------------------ */

.pickup-hint {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.pickup-controls {
    display: flex;
    gap: 0.875rem;
    align-items: center;
    flex-wrap: wrap;
}

.pickup-selected-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.pickup-section .selected-point {
    margin-top: 0.875rem;
    font-size: 0.9rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.06) 0%, rgba(59, 130, 246, 0.02) 100%);
    border: 1px dashed rgba(59, 130, 246, 0.3);
    border-radius: 14px;
    padding: 1rem;
}

.selected-point-details {
    margin-top: 0.25rem;
}

/* ---------------------------------------------------------
 * 9) PAYMENT METHODS - PREMIUM CARDS
 * ------------------------------------------------------ */

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.payment-option {
    border-radius: 16px;
    border: 1px solid rgba(168, 162, 158, 0.2);
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.25s var(--checkout-ease);
    position: relative;
    overflow: hidden;
}

.payment-option::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--checkout-gradient-primary);
    opacity: 0;
    transition: opacity 0.25s var(--checkout-ease);
}

.payment-option:hover {
    border-color: rgba(245, 158, 11, 0.3);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.1);
    transform: translateY(-2px);
}

.payment-option input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-right: 1rem;
    accent-color: var(--checkout-accent);
}

.payment-option-content {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.payment-icon {
    font-size: 1.5rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--checkout-stone-50) 0%, var(--checkout-stone-100) 100%);
    border-radius: 12px;
}

.payment-info strong {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.15rem;
}

.payment-info small {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Active payment option */
.payment-option-active {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(251, 113, 133, 0.04) 100%);
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow:
        0 8px 24px var(--checkout-accent-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.payment-option-active::before {
    opacity: 1;
}

/* Disabled payment option */
.payment-option-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* QR / COD info sections */
.qr-payment-section {
    margin-top: 1rem;
    text-align: center;
    display: block !important;
}

.qr-payment-section[x-cloak] {
    display: none !important;
}

.qr-payment-section h3 {
    color: var(--checkout-success, #10b981) !important;
    margin-bottom: 1rem;
}

#qr-code-container {
    display: inline-block;
    padding: 1.25rem;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
}

#qr-code-container canvas,
#qr-code-container img,
#qr-code-container svg {
    display: block;
    max-width: 100%;
    height: auto;
}

.qr-code-display {
    margin-bottom: 1.25rem;
}

.qr-payment-details {
    text-align: left;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.04) 0%, rgba(15, 23, 42, 0.02) 100%);
    padding: 1.25rem;
    border-radius: 14px;
    margin-bottom: 1rem;
}

.qr-payment-details p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.qr-payment-details p:last-child {
    margin-bottom: 0;
}

.cod-info-section {
    font-size: 0.9rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.03) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 14px;
    padding: 1.25rem;
}

/* ---------------------------------------------------------
 * 10) BUTTONS - ULTRA PREMIUM
 * ------------------------------------------------------ */

.btn-primary {
    background: var(--checkout-gradient-primary);
    border-radius: 14px;
    border: none;
    color: #ffffff;
    font-weight: 600;
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow:
        0 8px 24px var(--checkout-accent-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.25s var(--checkout-ease);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.25s var(--checkout-ease);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    background: var(--checkout-gradient-primary-hover);
    box-shadow:
        0 12px 32px var(--checkout-accent-glow),
        0 4px 12px rgba(251, 113, 133, 0.3);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled,
.btn-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none;
}

/* Secondary button */
.btn-secondary,
.secondary-button {
    background: linear-gradient(180deg, #ffffff 0%, var(--checkout-stone-50) 100%);
    border-radius: 12px;
    border: 1px solid rgba(168, 162, 158, 0.3);
    color: var(--text-primary);
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
    transition: all 0.25s var(--checkout-ease);
}

.btn-secondary:hover,
.secondary-button:hover {
    border-color: rgba(245, 158, 11, 0.4);
    background: linear-gradient(180deg, #ffffff 0%, rgba(238, 242, 255, 0.8) 100%);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.1);
    transform: translateY(-1px);
}

/* Commit reservation button */
.btn-commit {
    width: 100%;
    padding: 1rem 1.75rem;
    background: var(--checkout-gradient-success);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s var(--checkout-ease);
    box-shadow:
        0 8px 24px var(--checkout-success-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-commit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow:
        0 12px 32px var(--checkout-success-glow),
        0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-commit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none;
}

/* ---------------------------------------------------------
 * 11) PRODUCT GRID - SHOWCASE CARDS
 * ------------------------------------------------------ */

.product-grid-section {
    margin-top: 2rem;
}

.product-grid-section h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.product-grid-controls {
    margin-top: 0.625rem;
}

.product-search-input {
    width: 100%;
    padding: 0.75rem 1.25rem;
    border-radius: 14px;
    border: 1px solid rgba(168, 162, 158, 0.25);
    font-size: 0.95rem;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    transition: all 0.25s var(--checkout-ease);
}

.product-search-input:focus {
    border-color: var(--checkout-accent);
    box-shadow: 0 0 0 3px var(--checkout-accent-glow);
    background: #ffffff;
    outline: none;
}

/* Product grid layout */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.125rem;
    margin-top: 1.25rem;
}

/* Product card */
.product-card {
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    padding: 0.875rem;
    border: 1px solid rgba(168, 162, 158, 0.15);
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    box-shadow:
        0 4px 16px rgba(15, 23, 42, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: all 0.35s var(--checkout-ease);
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.03) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.35s var(--checkout-ease);
    pointer-events: none;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow:
        0 20px 48px rgba(15, 23, 42, 0.15),
        0 8px 24px rgba(245, 158, 11, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    border-color: rgba(245, 158, 11, 0.2);
}

.product-card:hover::before {
    opacity: 1;
}

/* Product media */
.product-card-media {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 0.625rem;
    background: linear-gradient(135deg, var(--checkout-stone-100) 0%, #e2e8f0 100%);
    aspect-ratio: 1;
}

.product-card-thumb {
    width: 100%;
    height: 100%;
    aspect-ratio: 1;
    /* R2-6: Prevent layout shift with lazy loading */
    object-fit: cover;
    display: block;
    background: rgba(168, 162, 158, 0.1);
    transition: transform 0.5s var(--checkout-ease);
}

.product-card:hover .product-card-thumb {
    transform: scale(1.08);
}

/* Product texts */
.product-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
    color: var(--text-primary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-code {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.product-card-price {
    font-size: 1rem;
    font-weight: 700;
    margin-top: 0.375rem;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.product-card-vat {
    font-size: 0.75rem;
    margin-top: 0.1rem;
    color: var(--text-secondary);
}

.product-card-stock {
    font-size: 0.78rem;
    margin-top: 0.25rem;
    margin-bottom: 0.625rem;
    color: var(--checkout-success);
}

.product-card-stock.stock-out {
    color: var(--checkout-danger);
}

/* Card button */
.product-card-btn {
    width: 100%;
    padding: 0.625rem 0.875rem;
    margin-top: auto;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--checkout-gradient-primary);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 12px var(--checkout-accent-glow);
    transition: all 0.25s var(--checkout-ease);
}

.product-card-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px var(--checkout-accent-glow);
}

/* In-cart state */
.product-card-in-cart {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--checkout-glass-border);
    cursor: default;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    box-shadow: none;
}

/* Product media cursor */
.product-card-media {
    cursor: pointer;
}

/* Product grid section padding */
.product-grid-section {
    padding: 1.5rem;
}

/* Empty state */
.product-empty-state {
    padding: 1rem;
    background: var(--checkout-stone-50);
    border: 1px dashed rgba(168, 162, 158, 0.5);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    color: #6b7280;
}

.product-empty-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

/* Wishlist actions in card */
.wishlist-actions {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.wishlist-email-wrapper {
    width: 100%;
}

/* ---------------------------------------------------------
 * 12) WISHLIST
 * ------------------------------------------------------ */

.wishlist-btn {
    margin-top: 0.625rem;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    background: linear-gradient(180deg, #ffffff 0%, var(--checkout-stone-50) 100%);
    border: 1px solid rgba(168, 162, 158, 0.3);
    cursor: pointer;
    transition: all 0.2s var(--checkout-ease);
}

.wishlist-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #fef3f2 0%, #fff1f2 100%);
    border-color: rgba(244, 63, 94, 0.4);
    color: #e11d48;
}

.wishlist-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Wishlist badge in header */
.wishlist-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.875rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid rgba(251, 191, 36, 0.5);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #92400e;
    cursor: pointer;
    transition: all 0.2s var(--checkout-ease);
}

.wishlist-badge:hover {
    background: linear-gradient(135deg, #fde68a 0%, #fcd34d 100%);
    transform: scale(1.03);
}

/* Wishlist modal */
.wishlist-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.wishlist-modal {
    background: #ffffff;
    border-radius: 24px;
    max-width: 440px;
    width: 100%;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 32px 80px rgba(15, 23, 42, 0.35);
}

.wishlist-modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(168, 162, 158, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
}

.wishlist-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.wishlist-modal-close {
    background: none;
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s var(--checkout-ease);
    padding: 0.25rem;
    border-radius: 8px;
}

.wishlist-modal-close:hover {
    background: rgba(168, 162, 158, 0.15);
    color: var(--text-primary);
}

.wishlist-modal-body {
    padding: 1.25rem 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.wishlist-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem;
    background: linear-gradient(180deg, var(--checkout-stone-50) 0%, var(--checkout-stone-100) 100%);
    border-radius: 14px;
    margin-bottom: 0.625rem;
    transition: all 0.2s var(--checkout-ease);
}

.wishlist-item:hover {
    background: linear-gradient(180deg, var(--checkout-stone-100) 0%, #e2e8f0 100%);
}

.wishlist-item img {
    width: 52px;
    height: 52px;
    aspect-ratio: 1;
    /* R2-6: Prevent layout shift with lazy loading */
    border-radius: 10px;
    object-fit: cover;
    background: rgba(168, 162, 158, 0.1);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
    cursor: pointer;
}

.wishlist-item-info {
    flex: 1;
    cursor: pointer;
}

.wishlist-item-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.wishlist-item-status {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
}

.wishlist-item-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.375rem;
    border-radius: 8px;
    transition: all 0.2s var(--checkout-ease);
}

.wishlist-item-remove:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--checkout-danger);
}

.wishlist-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-secondary);
}

.wishlist-warning {
    font-size: 0.8rem;
    color: var(--checkout-danger);
    margin-bottom: 0.375rem;
}

.wishlist-email-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border-radius: 10px;
    border: 1px solid rgba(168, 162, 158, 0.3);
    font-size: 0.9rem;
    transition: all 0.2s var(--checkout-ease);
}

.wishlist-email-input:focus {
    border-color: var(--checkout-accent);
    box-shadow: 0 0 0 3px var(--checkout-accent-glow);
    outline: none;
}

/* ---------------------------------------------------------
 * 13) MODAL & LIGHTBOX
 * ------------------------------------------------------ */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    padding: 1rem;
}

.modal.glass-modal {
    max-width: 980px;
    width: 100%;
    max-height: 90vh;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 32px 80px rgba(15, 23, 42, 0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(168, 162, 158, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
}

.modal-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0.25rem;
    border-radius: 8px;
    transition: all 0.2s var(--checkout-ease);
}

.modal-close:hover {
    background: rgba(168, 162, 158, 0.15);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

/* Lightbox */
.lightbox-container {
    display: grid;
    grid-template-columns: minmax(0, 3fr);
    gap: 1rem;
}

.lightbox-main {
    border-radius: 16px;
    overflow: hidden;
    background: #0f172a;
    position: relative;
}

.lightbox-image {
    width: 100%;
    height: auto;
    display: block;
    max-height: 440px;
    object-fit: contain;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #1e293b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.2);
    transition: all 0.2s var(--checkout-ease);
}

.lightbox-nav:hover {
    background: #ffffff;
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
}

.lightbox-prev {
    left: 12px;
}

.lightbox-next {
    right: 12px;
}

.lightbox-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.lightbox-thumb {
    width: 64px;
    height: 64px;
    aspect-ratio: 1;
    /* R2-6: Prevent layout shift with lazy loading */
    border-radius: 10px;
    object-fit: cover;
    background: rgba(168, 162, 158, 0.1);
    cursor: pointer;
    opacity: 0.6;
    border: 2px solid transparent;
    transition: all 0.25s var(--checkout-ease);
}

.lightbox-thumb:hover {
    opacity: 0.9;
}

.lightbox-thumb.active {
    opacity: 1;
    border-color: var(--checkout-accent);
    box-shadow: 0 4px 12px var(--checkout-accent-glow);
}

/* Product modal info */
.product-modal-info {
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid rgba(168, 162, 158, 0.15);
}

.product-modal-code {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0 !important;
    /* -0.5rem 0 0.5rem; */
}

.product-modal-price strong {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Variant selector */
.variant-selector {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.variant-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.375rem;
}

.variant-btn {
    border-radius: 999px;
    border: 1px solid rgba(168, 162, 158, 0.3);
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    background: linear-gradient(180deg, #ffffff 0%, var(--checkout-stone-50) 100%);
    cursor: pointer;
    transition: all 0.25s var(--checkout-ease);
}

.variant-btn:hover:not(.variant-btn-out-of-stock) {
    border-color: rgba(245, 158, 11, 0.4);
    background: linear-gradient(135deg, rgba(238, 242, 255, 0.8) 0%, #ffffff 100%);
}

.variant-btn-active {
    background: var(--checkout-gradient-primary);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 12px var(--checkout-accent-glow);
}

.variant-btn-out-of-stock {
    opacity: 0.4;
    cursor: not-allowed;
    text-decoration: line-through;
}

.product-modal-stock {
    margin-top: 0.625rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--checkout-success);
}

.product-modal-stock.stock-out {
    color: var(--checkout-danger);
}

.product-modal-description {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.product-modal-actions {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}

.product-modal-action-row {
    width: 100%;
    display: flex;
    justify-content: center;
}

.product-modal-action-btn-full {
    width: 100%;
    padding: 0.6rem 1.2rem;
}

.product-modal-in-cart-label {
    cursor: default;
    text-align: center;
    opacity: 0.8;
}

.product-modal-wishlist-block {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.product-modal-wishlist-inner {
    width: 100%;
}

.variant-selector-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.variant-fb-hint {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ---------------------------------------------------------
 * 14) FOOTER & LEGAL
 * ------------------------------------------------------ */

.checkout-footer-legal {
    max-width: 1120px;
    margin: 0 auto 2rem;
    padding: 0 1.5rem;
}

.legal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.legal-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s var(--checkout-ease);
}

.legal-links a:hover {
    color: var(--checkout-accent);
}

.legal-brand {
    font-weight: 600;
    color: var(--text-primary);
}

/* ---------------------------------------------------------
 * 15) ERROR, INFO, COOKIE BANNERS
 * ------------------------------------------------------ */

.error-banner {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #b91c1c;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.cookie-banner {
    padding: 1rem 1.25rem;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, var(--checkout-stone-50) 100%);
    border: 1px solid rgba(168, 162, 158, 0.2);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.cookie-link {
    color: var(--checkout-accent);
    text-decoration: underline;
    font-size: 0.8rem;
}

.cookie-button {
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    border: none;
    background: var(--checkout-gradient-primary);
    color: #ffffff;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s var(--checkout-ease);
    box-shadow: 0 4px 12px var(--checkout-accent-glow);
}

.cookie-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px var(--checkout-accent-glow);
}

/* ---------------------------------------------------------
 * 16) RESPONSIVE - MOBILE FIRST REFINEMENTS
 * ------------------------------------------------------ */

@media (max-width: 768px) {
    body.page-checkout .checkout-page {
        padding: 0 0.5rem 1rem;
        /* QW-1: Reduced from 0.875rem to 0.5rem (43% reduction) */
    }

    .cart-section,
    .customer-section,
    .pickup-section,
    .payment-method-section,
    .qr-payment-section,
    .product-grid-section {
        padding: 0.75rem;
        /* QW-1: Reduced from 1.125rem 1rem (33% reduction, uniform) */
        border-radius: 12px;
        /* QW-1: Smaller radius for mobile (was 18px) */
    }

    .cart-item-grid {
        /* v2.31.0: Use auto sizing instead of fixed pixels */
        min-height: 5rem;
    }

    .cart-item-image {
        /* v2.39.1: Keep square */
        aspect-ratio: 1;
        height: 100%;
        width: unset;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.875rem;
    }

    .product-card {
        padding: 0.75rem;
        border-radius: 16px;
    }

    .product-card-title {
        font-size: 0.85rem;
    }

    .product-card-price {
        font-size: 0.95rem;
    }

    .modal.glass-modal {
        border-radius: 24px 24px 0 0;
        max-width: 100%;
        margin: 0;
        max-height: 95vh;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
    }

    .modal.glass-modal::before {
        content: '';
        position: absolute;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        border-radius: 999px;
        background: rgba(168, 162, 158, 0.4);
    }

    .lightbox-image {
        max-height: 300px;
    }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 1023px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* QW-4: Tablet layout fix (768px-1023px) - CRITICAL BUG FIX */
@media (min-width: 768px) and (max-width: 1023px) {
    .checkout-sidebar {
        display: none;
        /* Hide desktop sidebar on tablets */
    }
}

/* Desktop layout (1024px+) */
@media (min-width: 1024px) {
    .checkout-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        column-gap: 0;
        align-items: flex-start;
    }

    .checkout-sidebar {
        display: none;
    }

    .cart-item-grid {
        /* v2.31.0: Use auto sizing instead of fixed pixels */
        min-height: 6rem;
        gap: 1.25rem;
    }

    .cart-item-image {
        /* v2.39.1: Keep square */
        aspect-ratio: 1;
        height: 100%;
        width: unset;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1.25rem;
    }
}

/* Large desktop */
@media (min-width: 1280px) {
    .checkout-layout {
        column-gap: 2.5rem;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

/* ---------------------------------------------------------
 * SIDEBAR & PAYMENT PANEL
 * ------------------------------------------------------ */

.checkout-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.checkout-summary {
    padding: 1.25rem 1.5rem;
}

.checkout-summary h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Coupon input */
.summary-coupon {
    border-top: 1px dashed rgba(168, 162, 158, 0.3);
    padding-top: 0.875rem;
    margin-top: 0.875rem;
}

.coupon-input-row {
    display: flex;
    gap: 0.5rem;
}

.coupon-input {
    flex: 1;
    padding: 0.625rem 0.875rem;
    border-radius: 10px;
    border: 1px solid rgba(168, 162, 158, 0.3);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.coupon-input:focus {
    border-color: var(--checkout-accent);
    box-shadow: 0 0 0 3px var(--checkout-accent-glow);
    outline: none;
}

.summary-discount {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* ---------------------------------------------------------
 * PREMIUM SIDEBAR STYLING
 * ------------------------------------------------------ */

/* Sidebar container */
.checkout-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Order Summary Card */
.checkout-summary {
    /*SIN*/
    display: none !important;
    padding: 1.5rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 255, 0.95) 100%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow:
        0 12px 40px rgba(15, 23, 42, 0.08),
        0 4px 16px rgba(245, 158, 11, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
}

.checkout-summary h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    padding-bottom: 0.875rem;
    border-bottom: 1px solid rgba(168, 162, 158, 0.15);
    background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 0.95rem;
}

.summary-vat {
    text-align: right;
    margin-top: -0.25rem;
    margin-bottom: 0.25rem;
}

.summary-vat small {
    font-size: 0.78rem;
    opacity: 0.7;
}

/* Total line with emphasis */
.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0 0.25rem;
    margin-top: 0.75rem;
    border-top: 2px solid rgba(245, 158, 11, 0.15);
    font-size: 1.15rem;
}

.summary-total strong:last-child {
    font-size: 1.25rem;
    background: var(--checkout-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Coupon section */
.summary-coupon {
    border-top: 1px dashed rgba(168, 162, 158, 0.25);
    padding-top: 1rem;
    margin-top: 1rem;
}

.coupon-input-row {
    display: flex;
    gap: 0.625rem;
}

.coupon-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(168, 162, 158, 0.25);
    background: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s var(--checkout-ease);
}

.coupon-input:focus {
    border-color: var(--checkout-accent);
    box-shadow: 0 0 0 4px var(--checkout-accent-glow);
    outline: none;
    background: #ffffff;
}

.summary-discount {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.625rem 0.875rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0.03) 100%);
    border-radius: 10px;
    font-size: 0.9rem;
}

/* ---------------------------------------------------------
 * PAYMENT PANEL - PREMIUM CARD
 * ------------------------------------------------------ */

.payment-panel {
    padding: 1.5rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 255, 0.95) 100%);
    border-radius: 20px;
    border: 1px solid rgba(245, 158, 11, 0.12);
    box-shadow:
        0 12px 40px rgba(15, 23, 42, 0.08),
        0 4px 16px rgba(245, 158, 11, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
}

.payment-error {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #b91c1c;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    font-weight: 500;
}

.payment-view {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.payment-view-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(168, 162, 158, 0.12);
}

.payment-view-icon {
    font-size: 1.75rem;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--checkout-stone-100) 0%, #e2e8f0 100%);
    border-radius: 16px;
    box-shadow:
        0 4px 12px rgba(15, 23, 42, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.payment-view-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.payment-view-subtitle {
    margin: 0.125rem 0 0 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.payment-view-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ---------------------------------------------------------
 * PAYMENT DETAILS (Wizard Step 3)
 * ------------------------------------------------------ */

.payment-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.payment-details-card {
    padding: 1.25rem;
}

.stripe-element-wrap {
    position: relative;
}

.payment-hint {
    margin: 0;
}

.qr-placeholder {
    padding: 1rem;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.06) 0%, rgba(245, 158, 11, 0.02) 100%);
    border: 1px solid rgba(245, 158, 11, 0.12);
}

.qr-infographic {
    display: grid;
    grid-template-columns: 1fr 26px 1fr 26px 1fr;
    align-items: center;
    gap: 0.75rem;
}

.qr-step {
    text-align: center;
    padding: 0.9rem 0.85rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(168, 162, 158, 0.16);
}

.qr-step-icon {
    font-size: 1.35rem;
    margin-bottom: 0.35rem;
}

.qr-step-title {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--text-primary);
}

.qr-step-text {
    margin-top: 0.15rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.qr-step-connector {
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.25) 0%, rgba(245, 158, 11, 0.12) 100%);
}

.qr-placeholder-note {
    margin-top: 0.85rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

@media (max-width: 640px) {
    .qr-infographic {
        grid-template-columns: 1fr;
    }

    .qr-step-connector {
        display: none;
    }
}

/* Pending payment fallback (after refresh with active payment) */
.payment-pending-fallback {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.08) 0%, transparent 100%);
    border-radius: 12px;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.pending-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--checkout-warning);
    margin-bottom: 0.75rem;
}

.pending-icon {
    font-size: 1.5rem;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.pending-hint {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* v2.40.0: Enhanced QR loading spinner */
.qr-loading-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.qr-spinner {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 4px solid rgba(245, 158, 11, 0.2);
    border-top-color: var(--checkout-accent);
    animation: loaderSpin 0.8s linear infinite;
    margin-bottom: 1rem;
}

.qr-loading-text {
    font-size: 1rem;
    font-weight: 500;
    color: var(--checkout-accent-hover);
    margin: 0;
}

/* Payment actions - unified button row */
.payment-actions {
    display: flex;
    gap: 0.875rem;
    margin-top: 0.75rem;
}

.payment-actions .btn-secondary {
    flex: 1;
    min-width: 100px;
}

.payment-actions .btn-primary {
    flex: 2;
}

/* ---------------------------------------------------------
 * QR PAYMENT VIEW
 * ------------------------------------------------------ */

.qr-active {
    text-align: center;
}

.qr-code-wrapper {
    display: flex;
    justify-content: center;
    padding: 1rem;
    margin-bottom: 1rem;
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.04) 0%, transparent 100%);
    border-radius: 16px;
}

#qr-code-container {
    display: inline-block;
    padding: 1.25rem;
    background: #ffffff;
    border-radius: 16px;
    box-shadow:
        0 12px 32px rgba(15, 23, 42, 0.12),
        0 4px 12px rgba(245, 158, 11, 0.08);
}

#qr-code-container canvas,
#qr-code-container img,
#qr-code-container svg {
    display: block;
    max-width: 100%;
    height: auto;
}

.qr-details {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.04) 0%, rgba(15, 23, 42, 0.02) 100%);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    text-align: left;
    margin-bottom: 1rem;
}

.qr-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.qr-detail-row:not(:last-child) {
    border-bottom: 1px solid rgba(168, 162, 158, 0.12);
}

.qr-label {
    color: var(--text-secondary);
}

.qr-value {
    font-weight: 600;
}

.qr-amount {
    font-size: 1.15rem;
    background: var(--checkout-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.qr-vs {
    font-family: monospace;
    letter-spacing: 0.08em;
    background: rgba(245, 158, 11, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.qr-expires {
    font-size: 0.85rem;
    opacity: 0.75;
}

.qr-status-polling {
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 0.75rem;
    background: rgba(245, 158, 11, 0.08);
    border-radius: 10px;
    margin-bottom: 0.75rem;
    animation: pulse-subtle 2s ease-in-out infinite;
}

/* COD View */
.cod-info {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.06) 0%, rgba(59, 130, 246, 0.02) 100%);
    border-radius: 10px;
}

/* Retry/Commit/Reservation sections */
.payment-retry,
.payment-commit {
    padding-top: 1rem;
    border-top: 1px solid rgba(168, 162, 158, 0.15);
    margin-top: 1rem;
}

.commit-hint {
    display: block;
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.trust-score-hint {
    display: block;
    text-align: center;
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: var(--checkout-danger);
}

.reservation-active {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    font-size: 0.9rem;
    color: var(--checkout-success);
    margin-top: 1rem;
}

.reservation-icon {
    font-size: 1.1rem;
}

.reservation-extensions {
    opacity: 0.7;
    font-size: 0.85rem;
}

.payment-success {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(16, 185, 129, 0.05) 100%);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 12px;
    color: var(--checkout-success);
    margin-top: 1rem;
}

.success-icon {
    font-size: 1.2rem;
}

/* ---------------------------------------------------------
 * STATUS BANNERS
 * ------------------------------------------------------ */

.checkout-banners {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.banner {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.875rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
}

.banner-icon {
    font-size: 1.1rem;
}

.banner-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(239, 68, 68, 0.06) 100%);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #b91c1c;
}

.banner-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(245, 158, 11, 0.06) 100%);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #92400e;
}

.banner-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(16, 185, 129, 0.06) 100%);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #065f46;
}

/* ---------------------------------------------------------
 * ACCORDION LOCK STATE
 * ------------------------------------------------------ */

.checkout-step.locked .step-header {
    pointer-events: none;
    opacity: 0.7;
}

.checkout-step .step-lock-icon {
    display: none;
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

.checkout-step.locked .step-lock-icon {
    display: inline;
}

.checkout-step.locked .step-arrow {
    display: none;
}

/* Payment loading */
.payment-loading {
    text-align: center;
    padding: 1rem;
    opacity: 0.7;
    font-size: 0.9rem;
}

/* ---------------------------------------------------------
 * BUTTON UTILITIES
 * ------------------------------------------------------ */

.btn-lg {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.full-width {
    width: 100%;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
}

.btn-ghost {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: rgba(168, 162, 158, 0.1);
}

.btn-danger {
    background: var(--checkout-danger);
    color: #ffffff;
    border: none;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Text utilities */
.text-success {
    color: var(--checkout-success);
}

.text-muted {
    color: var(--text-secondary);
}

/* ============================================================================
   QW-6: HTML5 Input Validation Styles
   ============================================================================ */

/* Invalid input styling (only when user has typed something) */
input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown),
select:invalid:not(:placeholder-shown) {
    border-color: var(--checkout-danger);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Valid input styling */
input:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown),
select:valid:not(:placeholder-shown) {
    border-color: var(--checkout-success);
}

/* Focus states for invalid inputs */
input:focus:invalid,
textarea:focus:invalid,
select:focus:invalid {
    outline-color: var(--checkout-danger);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

/* Focus states for valid inputs */
input:focus:valid,
textarea:focus:valid,
select:focus:valid {
    outline-color: var(--checkout-success);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* ============================================================================
   METHOD TABS - Compact horizontal shipping/payment method selector
   ============================================================================ */

.method-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.25rem;
    background: #f3f4f6;
    border-radius: 10px;
}

.method-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s var(--checkout-ease);
    white-space: nowrap;
}

.method-tab:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.6);
    color: #374151;
}

.method-tab.active {
    background: #ffffff;
    color: var(--checkout-accent);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.method-tab.disabled,
.method-tab:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.method-tab-icon {
    font-size: 1.125rem;
}

.method-tab-label {
    font-size: 0.875rem;
}

@media (max-width: 520px) {
    .method-tabs {
        gap: 0.375rem;
    }

    .method-tab {
        padding: 0.5rem 0.625rem;
        gap: 0.375rem;
    }

    .method-tab-label {
        font-size: 0.8rem;
    }
}

/* ============================================================================
   CHECKOUT WIZARD - Updated styles (matching component)
   ============================================================================ */

/* Navigation bar at bottom */
.checkout-wizard .checkout-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(180deg, rgba(248, 250, 255, 0.95) 0%, rgba(255, 255, 255, 0.98) 100%);
    border-top: 1px solid rgba(168, 162, 158, 0.15);
    border-bottom: none;
}

.checkout-wizard .order-summary {
    text-align: center;
    flex: 1;
    min-width: 120px;
}

.checkout-wizard .order-summary .summary-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.125rem;
}

.checkout-wizard .order-summary .summary-amount {
    font-size: 1.35rem;
    font-weight: 800;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.checkout-wizard .nav-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    border: 1px solid rgba(168, 162, 158, 0.25);
    background: #ffffff;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s var(--checkout-ease);
    touch-action: manipulation;
}

.checkout-wizard .nav-button-next {
    background: var(--checkout-gradient-primary);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.25);
}

.checkout-wizard .nav-button-next:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.3);
}

/* Reduce border-radius throughout wizard */
.checkout-wizard {
    border-radius: 16px;
}

.checkout-wizard .step-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border-width: 2px;
}

.checkout-wizard .step.active .step-icon {
    transform: scale(1.1);
}

/* Wizard steps content area */
.checkout-wizard .wizard-steps {
    padding: 1rem;
    min-height: 320px;
}

/* ============================================================================
   v2.29.0: Navigation bar - summary above buttons
   ============================================================================ */

.checkout-wizard .checkout-navigation {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(180deg, var(--checkout-stone-50) 0%, #ffffff 100%);
    border-top: 1px solid rgba(168, 162, 158, 0.12);
}

.checkout-wizard .nav-summary {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.25rem 0;
}

.checkout-wizard .nav-summary-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.checkout-wizard .nav-summary-amount {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1e293b;
}

.checkout-wizard .nav-buttons {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
}

.checkout-wizard .nav-button {
    flex: 1;
    justify-content: center;
    padding: 0.625rem 1rem;
    font-size: 0.85rem;
    border-radius: 8px;
}

/* ============================================================================
   v2.29.0: Cart step icon (toggle wizard)
   ============================================================================ */

.checkout-wizard .step.step-cart {
    flex: 0 0 auto;
}

.checkout-wizard .step.step-cart .step-icon {
    background: linear-gradient(135deg, var(--checkout-stone-100) 0%, #e2e8f0 100%);
    border-color: #cbd5e1;
}

.checkout-wizard .step.step-cart.active .step-icon {
    background: var(--checkout-gradient-primary);
    border-color: var(--checkout-accent);
}

.checkout-wizard .step.step-cart.active .step-icon svg {
    stroke: #ffffff;
}

.checkout-wizard .step.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ============================================================================
   v2.29.0: Compact sizing - reduce everything by ~20%
   ============================================================================ */

:root {
    --compact-scale: 0.85;
}

/* Reduce base line-height */
body.page-checkout {
    line-height: 1.4;
}

/* Smaller border-radius everywhere */
.checkout-wizard {
    border-radius: 10px;
}

.checkout-wizard .step-icon {
    width: 44px;
    height: 44px;
    border-width: 2px;
}

.checkout-wizard .step-icon svg {
    width: 22px;
    height: 22px;
}

.checkout-wizard .step-label {
    font-size: 0.8rem;
    margin-top: 0.35rem;
}

.checkout-wizard .step:not(:last-child)::after {
    top: 20px;
    height: 2px;
}

.checkout-wizard .step-indicator {
    padding: 1rem 1.25rem;
    gap: 0.25rem;
}

/* Smaller sections */
.cart-section,
.customer-section,
.pickup-section,
.payment-method-section,
.product-grid-section {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 0.75rem;
}

.cart-section h2,
.customer-section h2,
.pickup-section h2,
.payment-method-section h2 {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

/* Smaller cart items */
/* v2.31.0: Use auto sizing instead of fixed pixels */
.cart-item-grid {
    min-height: 4.5rem;
    gap: 0.75rem;
}

.cart-item-image {
    /* v2.39.1: Keep square */
    border-radius: 6px;
    aspect-ratio: 1;
    height: 100%;
    width: unset;
}

.cart-item-name {
    font-size: 0.85rem;
}

.cart-item-meta {
    font-size: 0.75rem;
    gap: 0.35rem;
}

.cart-item-total {
    font-size: 1rem;
}

.qty-pill {
    border-radius: 8px;
}

.qty-btn {
    width: 30px;
    height: 30px;
    font-size: 0.95rem;
}

.qty-btn:first-child {
    border-radius: 6px 0 0 6px;
}

.qty-btn:last-child {
    border-radius: 0 6px 6px 0;
}

.qty-value {
    min-width: 1.75rem;
    font-size: 0.85rem;
}

.remove-btn {
    width: 32px;
    height: 32px;
    font-size: 1rem;
    border-radius: 8px;
}

/* Smaller inputs */
.checkout-wizard input,
.checkout-wizard select,
.checkout-wizard textarea {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 6px;
}

/* Smaller method tabs */
.method-tabs {
    gap: 0.35rem;
    padding: 0.2rem;
    border-radius: 6px;
}

.method-tab {
    padding: 0.45rem 0.6rem;
    border-radius: 5px;
    font-size: 0.8rem;
    gap: 0.35rem;
}

.method-tab-icon {
    font-size: 0.95rem;
}

/* ============================================================================
   v2.29.0: Header full width
   ============================================================================ */

body.page-checkout .site-header {
    padding: 0;
    margin: 0;
}

body.page-checkout .site-header .header-inner {
    max-width: 100%;
    padding: 0 1rem;
    height: 56px;
}


/* Logo and user aligned to content width */
body.page-checkout .site-header .header-content-wrapper {
    max-width: 960px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Smaller logo */
body.page-checkout .site-header .logo {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

body.page-checkout .site-header .brand-text {
    font-size: 0.9rem;
}

body.page-checkout .site-header .user-avatar {
    width: 24px;
    height: 24px;
    font-size: 0.7rem;
}

body.page-checkout .site-header .user-email {
    font-size: 0.8rem;
}

/* ============================================================================
   v2.29.0: Product grid always visible (no blur)
   ============================================================================ */

.product-grid-section {
    filter: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* ============================================================================
   v2.29.0: Mobile responsive - even smaller
   ============================================================================ */

@media (max-width: 640px) {
    body.page-checkout .checkout-page {
        padding: 0 0.5rem 0.75rem;
    }

    body.page-checkout .site-header .header-inner {
        height: 48px;
        padding: 0 0.5rem;
    }

    body.page-checkout .site-header .logo {
        width: 28px;
        height: 28px;
    }

    body.page-checkout .site-header .brand-text {
        font-size: 0.8rem;
    }

    .checkout-wizard .step-indicator {
        padding: 0.75rem 0.5rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .checkout-wizard .step-icon {
        width: 36px;
        height: 36px;
    }

    .checkout-wizard .step-icon svg {
        width: 18px;
        height: 18px;
    }

    .checkout-wizard .step-label {
        font-size: 0.7rem;
    }

    .checkout-wizard .wizard-steps {
        padding: 0.75rem;
        min-height: 280px;
    }

    .checkout-wizard .checkout-navigation {
        padding: 0.5rem 0.75rem;
    }

    .checkout-wizard .nav-button {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .cart-section,
    .customer-section,
    .pickup-section,
    .payment-method-section,
    .product-grid-section {
        padding: 0.75rem;
        border-radius: 8px;
        margin-bottom: 0.5rem;
    }

    .cart-item-grid {
        /* v2.31.0: Use auto sizing instead of fixed pixels */
        min-height: 4rem;
        gap: 0.5rem;
    }

    .cart-item-image {
        /* v2.39.1: Keep square */
        aspect-ratio: 1;
        height: 100%;
        width: unset;
    }

    .cart-item-name {
        font-size: 0.8rem;
    }

    .cart-item-total {
        font-size: 0.9rem;
    }

    .qty-btn {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }

    .remove-btn {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }

    .method-tab {
        padding: 0.4rem 0.5rem;
        font-size: 0.75rem;
    }

    .method-tab-icon {
        font-size: 0.9rem;
    }

    .checkout-wizard input,
    .checkout-wizard select {
        padding: 0.45rem 0.6rem;
        font-size: 0.8rem;
    }

    .glass-card h2 {
        font-size: 0.9rem;
    }
}

/* v2.38.2: Mobile deep link for banking apps */
.qr-mobile-actions {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px dashed rgba(168, 162, 158, 0.2);
    text-align: center;
}

.qr-deeplink-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 1rem 1.5rem;
    font-weight: 700;
    font-size: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: none !important;
    text-decoration: none !important;
    color: white !important;
    transition: all 0.3s var(--checkout-spring);
}

.qr-deeplink-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 35px rgba(245, 158, 11, 0.3);
    color: white !important;
}

.qr-mobile-hint {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.4;
    font-weight: 500;
}

/* v2.39.0: Terms consent checkbox */
.terms-consent-section {
    width: 100%;
    padding: 1rem 0;
    border-top: 1px dashed rgba(168, 162, 158, 0.2);
    margin-top: 0.75rem;
}

.terms-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1.4;
    color: #374151;
}

.terms-checkbox {
    width: 22px;
    height: 22px;
    min-width: 22px;
    accent-color: var(--checkout-accent, #f59e0b);
    cursor: pointer;
    margin-top: 2px;
}

.terms-checkbox:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.terms-checkbox-text {
    flex: 1;
}

.terms-link {
    color: var(--checkout-accent, #f59e0b);
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.2s ease;
}

.terms-link:hover {
    color: #d97706;
}
