/**
 * WE Connect / SmileFusion - Unified Master Stylesheet (main.css)
 * Consolidated, dynamic design system unifying all pages, components,
 * themes, and responsive utilities into a single external stylesheet.
 */

/* ==========================================================================
   1. DESIGN TOKENS & CSS VARIABLES
   ========================================================================== */
:root {
    /* Brand Emerald Palette (Deep Luxury Forest & Emerald Theme) */
    --sf-brand-50:  #ecfdf5;
    --sf-brand-100: #d1fae5;
    --sf-brand-200: #a7f3d0;
    --sf-brand-300: #6ee7b7;
    --sf-brand-400: #34d399;
    --sf-brand-500: #10b981;
    --sf-brand-600: #059669;
    --sf-brand-700: #047857;
    --sf-brand-800: #065f46;
    --sf-brand-850: #0d381e;
    --sf-brand-900: #072312;
    --sf-brand-950: #021108;

    /* Semantic Primary Aliases */
    --primary-brand: #047857;
    --primary-brand-hover: #064e3b;
    --primary-brand-accent: #059669;
    --primary-brand-soft: #ecfdf5;
    --brand-glow: rgba(4, 120, 87, 0.32);

    /* Neutral Slate Tones */
    --sf-slate-50:  #f8fafc;
    --sf-slate-100: #f1f5f9;
    --sf-slate-200: #e2e8f0;
    --sf-slate-300: #cbd5e1;
    --sf-slate-400: #94a3b8;
    --sf-slate-500: #64748b;
    --sf-slate-600: #475569;
    --sf-slate-700: #334155;
    --sf-slate-800: #1e293b;
    --sf-slate-900: #0f172a;
    --sf-slate-950: #020617;

    /* Accent & Functional Tones */
    --sf-accent-cyan:   #06b6d4;
    --sf-accent-yellow: #f59e0b;
    --sf-accent-emerald: #10b981;
    --sf-accent-rose:   #f43f5e;
    --sf-accent-indigo: #6366f1;
    --sf-accent-blue:   #3b82f6;

    /* Surfaces & Layout Canvas */
    --sf-bg-canvas:   #ffffff;
    --sf-bg-surface:  #ffffff;
    --sf-bg-subtle:   #f0fdf4;
    --sf-bg-muted:    #f0fdf4;
    --sf-bg-hover:    #dcfce7;
    --sf-bg-hero:     linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
    --sf-page-max-w:  1400px;
    --sf-bottom-nav-h: 56px;
    --sf-header-h:    72px;
    --sf-pd-sticky-h: 84px;

    /* Typography & Hierarchy */
    --sf-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --sf-text-primary:   #17211b;
    --sf-text-secondary: #647067;
    --sf-text-muted:     #647067;
    --sf-text-inverse:   #ffffff;

    /* Borders & Hairlines */
    --sf-border-subtle: #e5e7eb;
    --sf-border-strong: #bbf7d0;

    /* Light Frosted Glassmorphism Tokens */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-bg-hover: rgba(255, 255, 255, 0.95);
    --glass-bg-subtle: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(226, 232, 240, 0.85);
    --glass-border-focus: rgba(47, 143, 78, 0.5);
    --glass-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.05), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
    --glass-shadow-lg: 0 20px 30px -10px rgba(15, 23, 42, 0.08), 0 10px 15px -3px rgba(15, 23, 42, 0.04);

    /* Elevation Shadows */
    --sf-shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --sf-shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.05);
    --sf-shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
    --sf-shadow-lg: 0 8px 24px rgba(15, 23, 42, 0.10);
    --sf-shadow-xl: 0 16px 40px rgba(15, 23, 42, 0.12);
    --sf-shadow-glow: 0 4px 20px rgba(36, 118, 64, 0.22);

    /* Z-Index Scale */
    --sf-z-dropdown: 50;
    --sf-z-sticky:   60;
    --sf-z-header:   70;
    --sf-z-modal:    80;
    --sf-z-toast:    90;

    /* Radii */
    --sf-radius-sm:  0.5rem;
    --sf-radius-md:  0.75rem;
    --sf-radius-lg:  1rem;
    --sf-radius-xl:  1.25rem;
    --sf-radius-2xl: 1.5rem;
    --sf-radius-full: 9999px;
}

/* ==========================================================================
   2. GLOBAL FOUNDATION & RESETS
   ========================================================================== */
html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
    font-family: var(--sf-font-sans);
    background-color: var(--sf-bg-canvas);
    color: var(--sf-text-primary);
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--sf-bg-canvas);
    color: var(--sf-text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

[x-cloak] {
    display: none !important;
}

/* Layout Container */
.sf-page-shell {
    width: 100%;
    max-width: var(--sf-page-max-w);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .sf-page-shell {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .sf-page-shell {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* ==========================================================================
   3. UNIFIED GLASSMORPHISM & SURFACE SYSTEM
   ========================================================================== */
/* Glass Card (Light, Crisp, Frosted) */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--sf-radius-2xl);
    box-shadow: var(--glass-shadow);
    color: var(--sf-slate-900);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
}

.glass-card:hover {
    box-shadow: var(--glass-shadow-lg);
    border-color: rgba(184, 223, 194, 0.8);
}

/* Panel Variants */
.sf-panel {
    background: #ffffff;
    border: 1px solid var(--sf-border-subtle);
    border-radius: var(--sf-radius-2xl);
    box-shadow: var(--sf-shadow-sm);
    color: var(--sf-slate-900);
}

.sf-panel-strong {
    background: #ffffff;
    border: 1px solid var(--sf-border-strong);
    border-radius: var(--sf-radius-2xl);
    box-shadow: var(--sf-shadow-md);
    color: var(--sf-slate-900);
}

/* Glass & Unified Inputs */
.glass-input,
.glass-select,
.glass-textarea,
.sf-input {
    width: 100%;
    background: #ffffff;
    border: 1.5px solid var(--sf-slate-200);
    border-radius: var(--sf-radius-md);
    padding: 0.65rem 0.875rem;
    font-size: 0.875rem;
    line-height: 1.35;
    color: var(--sf-slate-900);
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.glass-input::placeholder,
.glass-textarea::placeholder,
.sf-input::placeholder {
    color: var(--sf-slate-400);
}

.glass-input:focus,
.glass-select:focus,
.glass-textarea:focus,
.sf-input:focus {
    border-color: var(--sf-brand-600);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.18);
    background: #ffffff;
}

.glass-input:disabled,
.sf-input:disabled {
    background-color: var(--sf-slate-100);
    color: var(--sf-slate-400);
    cursor: not-allowed;
}

/* ==========================================================================
   4. BUTTONS & INTERACTIVE ELEMENTS (LUXURY EMERALD SYSTEM)
   ========================================================================== */
.sf-btn-primary,
.sf-btn--primary,
.sf-btn-brand,
.sf-btn--brand,
.btn-glass-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--sf-radius-xl);
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #ffffff !important;
    background: linear-gradient(135deg, #059669 0%, #047857 50%, #064e3b 100%);
    border: 1px solid rgba(52, 211, 153, 0.35);
    box-shadow: 0 4px 14px rgba(6, 78, 59, 0.32), 0 1px 2px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.sf-btn-primary:hover,
.sf-btn--primary:hover,
.sf-btn-brand:hover,
.sf-btn--brand:hover,
.btn-glass-primary:hover {
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.42), 0 2px 6px rgba(0, 0, 0, 0.12);
    border-color: rgba(110, 231, 183, 0.55);
    transform: translateY(-1.5px);
    color: #ffffff !important;
}

.sf-btn-primary:active,
.sf-btn--primary:active,
.sf-btn-brand:active,
.sf-btn--brand:active,
.btn-glass-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(6, 78, 59, 0.25);
}

.sf-btn-accent {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--sf-radius-xl);
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #ffffff !important;
    background: linear-gradient(135deg, #047857 0%, #064e3b 60%, #07381c 100%);
    border: 1px solid rgba(52, 211, 153, 0.32);
    box-shadow: 0 4px 14px rgba(4, 120, 87, 0.32);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.sf-btn-accent:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 50%, #064e3b 100%);
    box-shadow: 0 8px 24px rgba(4, 120, 87, 0.45);
    border-color: rgba(52, 211, 153, 0.6);
    transform: translateY(-1.5px);
    color: #ffffff !important;
}

.sf-btn-accent:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(4, 120, 87, 0.2);
}

.sf-btn-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-radius: var(--sf-radius-lg);
    font-size: 0.8125rem;
    font-weight: 700;
    color: #064e3b;
    background: #ffffff;
    border: 1.5px solid rgba(4, 120, 87, 0.22);
    box-shadow: 0 1px 3px rgba(6, 78, 59, 0.06);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.18s ease;
}

.sf-btn-soft:hover {
    color: #047857;
    border-color: #059669;
    background: #ecfdf5;
    box-shadow: 0 4px 12px rgba(4, 120, 87, 0.14);
    transform: translateY(-1px);
}

.sf-btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-radius: var(--sf-radius-lg);
    font-size: 0.8125rem;
    font-weight: 700;
    color: #ffffff;
    background: var(--sf-accent-rose);
    border: none;
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.25);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.18s ease;
}

.sf-btn-danger:hover {
    background: #e11d48;
    box-shadow: 0 6px 18px rgba(244, 63, 94, 0.35);
}

.sf-btn--sm {
    padding: 0.45rem 0.9rem !important;
    font-size: 0.75rem !important;
    border-radius: var(--sf-radius-md) !important;
}

/* ==========================================================================
   5. HEADER, NAVIGATION & SEARCH
   ========================================================================== */
.glass-nav {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--sf-slate-200);
    position: sticky;
    top: 0;
    z-index: var(--sf-z-header);
    transition: all 0.25s ease;
}

.sf-header-brand {
    text-decoration: none;
}

.sf-header-brand-tagline {
    display: none;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--sf-slate-500);
}

@media (min-width: 1280px) {
    .sf-header-brand-tagline {
        display: inline;
    }
}

/* Brand Animated Logo */
.sf-logo-animation {
    --sf-logo-cycle: 6s;
    --sf-logo-red: #f50000;
    display: inline-flex;
    align-items: center;
    padding-top: 0.554em;
    color: inherit;
    text-decoration: none;
    font-family: Montserrat, "Segoe UI", Arial, sans-serif;
}

.sf-logo-word {
    display: flex;
    align-items: flex-end;
    gap: 0.1em;
    line-height: 1;
    font-weight: 900;
    font-size: 1.25rem;
    color: var(--sf-slate-900);
}

.sf-logo-letter {
    display: block;
    height: 0.7em;
    line-height: 0.7em;
    animation: sf-logo-letter-loop var(--sf-logo-cycle) cubic-bezier(0.2, 0.8, 0.2, 1) calc(var(--i) * 0.07s) infinite both;
}

.sf-logo-e {
    position: relative;
    display: block;
    width: 0.516em;
    height: 0.7em;
    margin: 0 0.06em;
}

.sf-logo-e > i {
    position: absolute;
    left: 0;
    bottom: calc(var(--k) * 0.2815em);
    width: 0.516em;
    height: 0.126em;
    transform-origin: left;
    background: var(--sf-logo-red);
    --sf-logo-bar-width: 0.72;
    animation: sf-logo-bar-loop var(--sf-logo-cycle) ease-in-out calc(0.5s + var(--k) * 0.08s) infinite both;
}

.sf-logo-e > i:nth-child(even) {
    width: 0.382em;
    --sf-logo-bar-width: 1.35;
}

.sf-logo-w {
    position: absolute;
    top: -0.803em;
    right: calc(100% + 0.145em);
    display: block;
    height: 0.7em;
    line-height: 0.7em;
    font-size: 0.69em;
    color: var(--sf-slate-900);
    animation: sf-logo-w-loop var(--sf-logo-cycle) ease-out 1s infinite both;
}

@keyframes sf-logo-letter-loop {
    0% { clip-path: inset(0 0 100% 0); transform: translateY(0.3em); }
    10%, 88% { clip-path: inset(-0.2em -0.1em -0.2em -0.1em); transform: none; }
    97%, 100% { clip-path: inset(0 0 100% 0); transform: translateY(0.3em); }
}

@keyframes sf-logo-bar-loop {
    0% { opacity: 0; transform: translateY(-0.6em); animation-timing-function: cubic-bezier(0.3, 1.3, 0.5, 1); }
    8%, 36% { opacity: 1; transform: none; }
    48% { opacity: 1; transform: scaleX(var(--sf-logo-bar-width)); }
    60%, 78% { opacity: 1; transform: none; animation-timing-function: ease-in; }
    88%, 100% { opacity: 0; transform: translateY(0.5em); }
}

@keyframes sf-logo-w-loop {
    0% { opacity: 0; transform: translateY(-0.4em); }
    8%, 60% { opacity: 1; transform: none; }
    70%, 100% { opacity: 0; transform: translateY(-0.4em); }
}

.sf-header-brand:focus-visible {
    outline: 3px solid var(--sf-logo-red);
    outline-offset: 4px;
    border-radius: 3px;
}

.sf-footer-logo-animation .sf-logo-word {
    font-size: 0.72rem;
}

/* Search Form & Input */
.sf-header-search-form {
    flex: 1;
    min-width: 0;
}

@media (max-width: 767px) {
    .sf-header-search-form {
        order: 3 !important;
        flex: 1 0 100% !important;
        width: 100% !important;
        min-width: 100% !important;
        margin-top: 0.35rem;
    }
}

.sf-search-input {
    width: 100%;
    padding: 0.55rem 1rem 0.55rem 2.5rem;
    background: var(--sf-slate-50);
    border: 1.5px solid var(--sf-slate-200);
    border-radius: var(--sf-radius-full);
    font-size: 0.875rem;
    color: var(--sf-slate-900);
    outline: none;
    transition: all 0.2s ease;
}

.sf-search-input:focus {
    background: #ffffff;
    border-color: var(--sf-brand-600);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.16);
}

/* Navigation Links */
.sf-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.75rem;
    border-radius: var(--sf-radius-md);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--sf-slate-700);
    text-decoration: none;
    transition: all 0.18s ease;
}

@media (max-width: 767px) {
    .sf-nav-link.hidden,
    .hidden.md\:flex,
    .hidden.md\:block,
    .md\:hidden.hidden {
        display: none !important;
    }
}

.sf-nav-link:hover {
    color: var(--sf-brand-700);
    background: var(--sf-brand-50);
}

/* Mega Menu Dropdown */
.sf-mega-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid var(--sf-slate-200);
    border-radius: var(--sf-radius-2xl);
    box-shadow: var(--sf-shadow-xl);
    padding: 1.5rem;
    margin-top: 0.5rem;
    z-index: var(--sf-z-dropdown);
}

.sf-mega-panel.is-open {
    display: block;
}

.sf-mega-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    border-radius: var(--sf-radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--sf-slate-700);
    text-decoration: none;
    transition: all 0.15s ease;
}

.sf-mega-link:hover {
    background: var(--sf-brand-50);
    color: var(--sf-brand-700);
}

.sf-mega-count {
    font-size: 0.75rem;
    color: var(--sf-slate-400);
    font-weight: 700;
}

/* Skip Link */
.sf-skip-link {
    position: absolute;
    top: -9999px;
    left: 1rem;
    background: var(--sf-brand-600);
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: var(--sf-radius-md);
    z-index: 1000;
    text-decoration: none;
    font-weight: 700;
}

.sf-skip-link:focus {
    top: 1rem;
}

/* Announcement Bar */
.sf-promo-bar {
    background: linear-gradient(90deg, #1e293b, #0f172a);
    color: #ffffff;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    text-align: center;
}

/* Mobile Bottom Navigation */
.sf-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--sf-bottom-nav-h);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--sf-slate-200);
    z-index: var(--sf-z-sticky);
    align-items: center;
    justify-content: space-around;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (min-width: 1024px) {
    .sf-bottom-nav {
        display: none;
    }
}

/* Product Detail - Mobile Sticky CTA Bar (above bottom nav) */
.sf-pd-sticky-bar {
    bottom: calc(var(--sf-bottom-nav-h, 56px) + env(safe-area-inset-bottom, 0px));
    /* Keep the bar inside the viewport and reserve room for the iOS home indicator */
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
    overflow: hidden;
}

.sf-pd-sticky-inner {
    min-width: 0;
    width: 100%;
}

.sf-pd-sticky-price {
    flex-shrink: 0;
    min-width: 0;
    max-width: 36%;
    line-height: 1.15;
}

.sf-pd-sticky-mrp {
    flex-shrink: 0;
}

.sf-pd-sticky-save {
    line-height: 1.2;
    margin-top: 1px;
}

.sf-pd-sticky-actions {
    min-width: 0;
}

.sf-pd-sticky-btn {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    border-radius: 0.875rem !important;
}

/* Compact phones: tighten so price + MRP + Save + 2 CTAs always fit in one row */
@media (max-width: 420px) {
    .sf-pd-sticky-bar {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    .sf-pd-sticky-inner {
        gap: 0.375rem !important;
    }
    .sf-pd-sticky-actions {
        gap: 0.375rem !important;
    }
    .sf-pd-sticky-price {
        max-width: 33%;
    }
    .sf-pd-sticky-mrp {
        font-size: 10px !important;
    }
    .sf-pd-sticky-btn {
        gap: 0.25rem !important;
    }
    .sf-pd-sticky-btn-icon {
        display: none;
    }
}

/* Very small phones (~320-360px): keep MRP + Save visible but ultra-compact */
@media (max-width: 380px) {
    .sf-pd-sticky-price {
        max-width: 31%;
    }
    .sf-pd-sticky-mrp {
        font-size: 9px !important;
    }
    .sf-pd-sticky-save {
        font-size: 8px !important;
    }
}

/* Reserve page space so footer/content is never hidden behind fixed bars */
@media (max-width: 1023px) {
    body.has-pd-sticky-bar {
        padding-bottom: calc(var(--sf-bottom-nav-h, 56px) + env(safe-area-inset-bottom, 0px) + var(--sf-pd-sticky-h, 76px) + 1px);
    }
}

@media (min-width: 1024px) {
    .sf-pd-sticky-bar {
        display: none;
    }
}


.sf-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--sf-slate-500);
    text-decoration: none;
    gap: 0.2rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: color 0.15s ease;
}

.sf-bottom-nav-item.is-active,
.sf-bottom-nav-item:hover {
    color: var(--sf-brand-600);
}

/* Scroll To Top Button */
.sf-scroll-top {
    position: fixed;
    bottom: calc(var(--sf-bottom-nav-h, 56px) + 1.25rem);
    right: 1.25rem;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: var(--sf-radius-full);
    background: #ffffff;
    border: 1px solid var(--sf-slate-200);
    box-shadow: var(--sf-shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sf-slate-700);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: all 0.25s ease;
    z-index: 55;
}

@media (max-width: 1023px) {
    .sf-scroll-top {
        bottom: calc(var(--sf-bottom-nav-h, 56px) + env(safe-area-inset-bottom, 0px) + 1rem);
        right: 0.875rem;
        width: 2.5rem;
        height: 2.5rem;
    }

    /* Lift above sticky bar and compare tray on product detail page */
    body.has-pd-sticky-bar .sf-scroll-top,
    body:has(.sf-pd-sticky-bar) .sf-scroll-top {
        bottom: calc(var(--sf-bottom-nav-h, 56px) + env(safe-area-inset-bottom, 0px) + var(--sf-pd-sticky-h, 76px) + 3.75rem);
    }

    /* On catalog pages with mobile filter action buttons, hide scroll-to-top as 'Back to top' is already present */
    body.has-mobile-filter-bar .sf-scroll-top,
    body:has([aria-controls="product-filter-dialog"]) .sf-scroll-top {
        display: none !important;
    }
}

.sf-scroll-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.sf-scroll-top:hover {
    color: var(--sf-brand-600);
    border-color: var(--sf-brand-200);
    box-shadow: 0 8px 24px rgba(47, 143, 78, 0.20);
}

/* ==========================================================================
   6. ACCOUNT & PROFILE SYSTEM
   ========================================================================== */
/* Profile Details & Information Rows */
.profile-bg {
    background: linear-gradient(180deg, #f0f7f2 0%, #ffffff 100%);
    min-height: calc(100vh - 120px);
}

.profile-shell {
    max-width: var(--sf-page-max-w);
    margin: 0 auto;
}

.section-divider {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--sf-slate-200);
}

.section-divider h2 {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--sf-slate-900);
    margin: 0;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--sf-slate-100);
}

.info-row:last-child {
    border-bottom: none;
}

.info-icon,
.addr-section-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--sf-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Semantic Icon Color Utilities (Clean replacements for inline gradient styles) */
.info-icon-indigo,
.addr-icon-indigo {
    background: linear-gradient(135deg, #e0e7ff, #ede9fe);
    color: #4f46e5;
}

.info-icon-blue,
.addr-icon-blue {
    background: linear-gradient(135deg, #dbeafe, #eff6ff);
    color: #2563eb;
}

.info-icon-emerald,
.addr-icon-emerald {
    background: linear-gradient(135deg, #d1fae5, #ecfdf5);
    color: #059669;
}

.info-icon-pink,
.addr-icon-pink {
    background: linear-gradient(135deg, #fce7f3, #fdf2f8);
    color: #db2777;
}

/* Address Form Elements */
.addr-form-section {
    margin-bottom: 1.25rem;
}

.addr-section-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
}

.addr-section-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--sf-slate-800);
}

.addr-section-subtitle {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--sf-slate-400);
}

.addr-field-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--sf-slate-700);
    margin-bottom: 0.35rem;
}

.addr-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border: 1px solid var(--sf-slate-200);
    border-radius: var(--sf-radius-xl);
    cursor: pointer;
    background: var(--sf-slate-50);
    margin: 1rem 0;
}

.addr-toggle-label {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--sf-slate-800);
}

.addr-toggle-label small {
    display: block;
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--sf-slate-500);
}

.toggle-pill {
    width: 2.75rem;
    height: 1.5rem;
    background: var(--sf-slate-300);
    border-radius: var(--sf-radius-full);
    position: relative;
    transition: background-color 0.2s ease;
}

.toggle-pill::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 1.25rem;
    height: 1.25rem;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

input[type="checkbox"]:checked + label .toggle-pill {
    background: var(--sf-brand-500);
}

input[type="checkbox"]:checked + label .toggle-pill::after {
    transform: translateX(1.25rem);
}

/* ==========================================================================
   7. ORDER MANAGEMENT & SHIPROCKET TRACKING
   ========================================================================== */
.order-track-card {
    background: #ffffff;
    border: 1px solid var(--sf-slate-200);
    border-radius: var(--sf-radius-2xl);
    box-shadow: var(--sf-shadow-sm);
}

.order-card {
    background: #ffffff;
    border: 1px solid var(--sf-slate-200);
    border-radius: var(--sf-radius-2xl);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.order-card:hover {
    border-color: var(--sf-brand-300);
    box-shadow: var(--sf-shadow-md);
}

.order-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-track {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    border-radius: var(--sf-radius-lg);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--sf-brand-700);
    background: var(--sf-brand-50);
    border: 1px solid var(--sf-brand-200);
    text-decoration: none;
    transition: all 0.18s ease;
}

.btn-track:hover {
    background: var(--sf-brand-600);
    color: #ffffff;
    border-color: var(--sf-brand-600);
}

.btn-invoice {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    border-radius: var(--sf-radius-lg);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--sf-slate-700);
    background: #ffffff;
    border: 1px solid var(--sf-slate-300);
    text-decoration: none;
    transition: all 0.18s ease;
}

.btn-invoice:hover {
    color: var(--sf-brand-700);
    border-color: var(--sf-brand-300);
    background: var(--sf-brand-50);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: var(--sf-radius-full);
    font-size: 0.6875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.order-meta-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .order-meta-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.order-meta-pill {
    background: var(--sf-slate-50);
    border: 1px solid var(--sf-slate-200);
    border-radius: var(--sf-radius-xl);
    padding: 0.75rem 1rem;
}

/* Order Track Timeline Steps */
.ot-step-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: var(--sf-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.ot-step-completed {
    background: var(--sf-brand-500);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(47, 143, 78, 0.25);
}

.ot-step-current {
    background: var(--sf-brand-600);
    color: #ffffff;
    box-shadow: 0 0 0 4px rgba(47, 143, 78, 0.20);
    animation: otPulse 2s infinite;
}

.ot-step-pending {
    background: var(--sf-slate-100);
    color: var(--sf-slate-400);
    border: 2px solid var(--sf-slate-200);
}

.ot-progress-bar {
    height: 4px;
    background: var(--sf-slate-200);
    border-radius: var(--sf-radius-full);
    overflow: hidden;
}

.ot-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--sf-brand-500), var(--sf-brand-400));
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.ot-progress-fill-1 { width: 0%; }
.ot-progress-fill-2 { width: 33%; }
.ot-progress-fill-3 { width: 66%; }
.ot-progress-fill-4 { width: 100%; }

@keyframes otPulse {
    0%   { box-shadow: 0 0 0 0 rgba(47, 143, 78, 0.4); }
    70%  { box-shadow: 0 0 0 10px rgba(47, 143, 78, 0); }
    100% { box-shadow: 0 0 0 0 rgba(47, 143, 78, 0); }
}

/* Empty State */
.empty-icon {
    width: 4rem;
    height: 4rem;
    border-radius: var(--sf-radius-full);
    background: var(--sf-brand-50);
    color: var(--sf-brand-600);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

/* ==========================================================================
   8. PRODUCT DETAIL & GALLERY COMPONENTS (MIGRATED FROM INLINE)
   ========================================================================== */
.pd-thumb-active {
    border-color: var(--sf-brand-500) !important;
    box-shadow: 0 0 0 3px rgba(47, 143, 78, 0.20);
}

.pd-gallery-zoom img {
    transform-origin: center;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (hover: hover) {
    .pd-gallery-zoom:hover img {
        transform: scale(1.04);
    }
}

.pd-mobile-actions {
    display: none;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
}

.pd-mobile-action {
    min-height: 42px;
    padding: 0.55rem 0.35rem !important;
    border-radius: 0.875rem !important;
    font-size: 11px !important;
    line-height: 1.1;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06) !important;
}

@media (max-width: 640px) {
    .pd-mobile-actions {
        display: grid;
    }
}

@media (max-width: 360px) {
    .pd-mobile-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .pd-mobile-action {
        min-height: 40px;
    }
}

@media (max-width: 640px) {
    .pd-description-box {
        padding: 0.85rem 1rem;
        border-radius: 1rem;
    }
    .pd-description-box summary {
        font-size: 13px;
    }
    .pd-description-box p {
        font-size: 13px;
        line-height: 1.55;
    }
}

/* Product Detail — main price box: keep one tidy row on mobile, no overflow */
.pd-price-box {
    min-width: 0;
    overflow: hidden;
}
.pd-price-row {
    min-width: 0;
}
.pd-price-current,
.pd-price-old,
.pd-price-save {
    min-width: 0;
    max-width: 100%;
}
@media (max-width: 420px) {
    .pd-price-box {
        padding: 0.75rem 0.875rem;
        border-radius: 1rem;
    }
    .pd-price-current {
        font-size: 1.35rem !important;
        line-height: 1.2;
    }
    .pd-price-old {
        font-size: 0.85rem !important;
    }
    .pd-price-save {
        font-size: 10px !important;
        padding: 0.25rem 0.6rem !important;
    }
}
@media (max-width: 340px) {
    .pd-price-current {
        font-size: 1.2rem !important;
    }
    .pd-price-row {
        gap-column: 0.5rem;
    }
}

/* ==========================================================================
   9. TOASTS, DIALOGS & MICRO-INTERACTIONS
   ========================================================================== */
.sf-toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    border-radius: var(--sf-radius-xl);
    box-shadow: var(--sf-shadow-lg);
    background: #ffffff;
    border: 1px solid var(--sf-slate-200);
    margin-bottom: 0.5rem;
    color: var(--sf-slate-800);
    animation: sfSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sf-toast-success {
    border-left: 4px solid var(--sf-brand-500);
    color: var(--sf-brand-900);
}

.sf-toast-error {
    border-left: 4px solid var(--sf-accent-rose);
    color: #9f1239;
}

.sf-toast-warning {
    border-left: 4px solid var(--sf-accent-yellow);
    color: #92400e;
}

.sf-toast-host {
    position: fixed;
    bottom: calc(var(--sf-bottom-nav-h, 56px) + 1rem);
    right: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: var(--sf-z-toast);
    pointer-events: none;
}

@media (max-width: 1023px) {
    body.has-pd-sticky-bar .sf-toast-host,
    body:has(.sf-pd-sticky-bar) .sf-toast-host {
        bottom: calc(var(--sf-bottom-nav-h, 56px) + env(safe-area-inset-bottom, 0px) + var(--sf-pd-sticky-h, 76px) + 1.25rem);
    }
}

.sf-toast-animated {
    animation: sfSlideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Confirmation Dialog */
.sf-confirm-dialog {
    border: none;
    border-radius: var(--sf-radius-2xl);
    padding: 1.5rem;
    background: #ffffff;
    box-shadow: var(--sf-shadow-xl);
    max-width: 420px;
    width: 90vw;
    margin: auto;
}

.sf-confirm-dialog::backdrop {
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
}

.sf-confirm-dialog__content {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.sf-confirm-dialog__icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--sf-radius-full);
    background: #fee2e2;
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.sf-confirm-dialog__title {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--sf-slate-900);
    margin: 0 0 0.25rem;
}

.sf-confirm-dialog__description {
    font-size: 0.875rem;
    color: var(--sf-slate-500);
    margin: 0;
}

.sf-confirm-dialog__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Animations */
@keyframes sfSlideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes sfSlideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.6; }
    50%      { opacity: 1; }
}

@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.blob-animate {
    animation: float 6s ease-in-out infinite;
}

.blob-animate-slow {
    animation: float 9s ease-in-out infinite reverse;
}

/* Custom Scrollbars */
.sf-scrollbar-none {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.sf-scrollbar-none::-webkit-scrollbar {
    display: none;
}



/* ============================================================================
   ACCOUNT CENTER & SVG ICON SAFETY CONSTRAINTS
   ========================================================================= */
svg:not([width]):not([class*="w-"]):not([class*="h-"]) {
    width: 1.25rem;
    height: 1.25rem;
}
.account-page svg {
    max-width: 100%;
}
.account-page .info-icon svg,
.account-page .addr-section-icon svg,
.account-page .account-order-icon svg {
    width: 20px !important;
    height: 20px !important;
    display: inline-block;
}


/* Account center: shared tokens, responsive sections, and restrained interactions. */
/* Keep any wide account-page child inside the viewport; the account rails below
   provide their own horizontal scrolling where it is intentional. */
html:has(#account-page), body:has(#account-page) { overflow-x: clip; }
.account-page {
    --account-ink: #1b2b20;
    --account-muted: #65736a;
    --account-soft: #eff7f0;
    --account-border: #e2ebe4;
    --account-green: #2f8f4e;
    --account-green-dark: #247640;
    min-height: 70vh;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
    padding: clamp(1.25rem, 3vw, 2.75rem) 1rem 4rem;
    color: var(--account-ink);
    background: #f6f9f6;
}
.account-container { width: min(100%, 1440px); margin: 0 auto; }
.account-overview > *, .account-layout > *, .account-content-grid > *, .account-stats > * { min-width: 0; }
.account-overview {
    display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(290px, .85fr); gap: 1.25rem;
    align-items: stretch; margin-bottom: 1.25rem;
}
.account-intro, .account-stat, .account-sidebar, .account-shortcuts, .account-page .glass-card {
    border: 1px solid var(--account-border); border-radius: 1.2rem; background: #fff;
    box-shadow: 0 8px 24px rgba(24, 45, 29, .055);
}
.account-intro { display: flex; align-items: center; gap: 1.2rem; min-width: 0; padding: clamp(1.25rem, 3vw, 2rem); }
.account-avatar { display: grid; place-items: center; flex: 0 0 68px; width: 68px; height: 68px; border-radius: 20px; color: #fff; background: linear-gradient(145deg, var(--account-green), var(--account-green-dark)); font-size: 1.65rem; font-weight: 800; }
.account-intro-copy { min-width: 0; }
.account-eyebrow, .account-nav-label { margin: 0; color: var(--account-green-dark); font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.account-intro h1 { margin: .25rem 0 0; color: var(--account-ink); font-size: clamp(1.55rem, 3vw, 2.2rem); font-weight: 780; line-height: 1.15; letter-spacing: -.035em; }
.account-email { margin: .45rem 0 0; color: var(--account-muted); font-size: .9rem; overflow-wrap: anywhere; }
.account-description { max-width: 620px; margin: .55rem 0 0; color: var(--account-muted); font-size: .9rem; line-height: 1.6; }
.account-delivery { display: flex; gap: .45rem; align-items: center; flex-wrap: wrap; width: fit-content; max-width: 100%; margin: .85rem 0 0; padding: .38rem .7rem; border-radius: 999px; background: var(--account-soft); color: var(--account-muted); font-size: .75rem; }
.account-delivery span { color: var(--account-green); font-size: .55rem; }
.account-delivery strong { color: var(--account-ink); }
.account-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.account-stat { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 1.1rem; }
.account-stat > span { color: var(--account-muted); font-size: .72rem; font-weight: 700; }
.account-stat strong { margin-top: .25rem; color: var(--account-ink); font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.1; }
.account-stat small { margin-top: .3rem; color: #829087; font-size: .72rem; }
.account-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.account-sidebar { position: sticky; top: 1rem; padding: 1rem; }
.account-sidebar-title { display: flex; align-items: center; gap: .75rem; padding: .25rem .25rem 1rem; border-bottom: 1px solid var(--account-border); }
.account-sidebar-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: var(--account-green-dark); background: var(--account-soft); font-weight: 900; }
.account-sidebar-title strong, .account-sidebar-title small { display: block; }
.account-sidebar-title strong { font-size: .9rem; }
.account-sidebar-title small { margin-top: .15rem; color: var(--account-muted); font-size: .72rem; }
.account-nav { display: grid; gap: .25rem; padding: .7rem 0; }
.account-nav-label { padding: .7rem .55rem .25rem; color: #839087; font-size: .62rem; letter-spacing: .1em; }
.account-nav-link { display: flex; align-items: center; gap: .7rem; min-height: 42px; padding: .55rem .65rem; border: 1px solid transparent; border-radius: .7rem; color: #48574d; font-size: .82rem; font-weight: 650; text-decoration: none; transition: color .16s ease, background-color .16s ease, border-color .16s ease; }
.account-nav-link:hover, .account-nav-link.is-current { border-color: #d8ebdc; background: var(--account-soft); color: var(--account-green-dark); }
.account-nav-icon { display: inline-grid; place-items: center; width: 22px; color: var(--account-green-dark); font-size: 1rem; }
.account-nav-count { margin-left: auto; min-width: 22px; padding: .12rem .4rem; border-radius: 99px; background: #e2f1e5; color: var(--account-green-dark); text-align: center; font-size: .68rem; }
.account-signout { padding-top: .75rem; border-top: 1px solid var(--account-border); }
.account-signout button { display: flex; align-items: center; gap: .7rem; width: 100%; min-height: 40px; padding: .5rem .65rem; border: 0; border-radius: .7rem; background: transparent; color: var(--account-green-dark); font: inherit; font-size: .82rem; font-weight: 700; text-align: left; cursor: pointer; }
.account-signout button:hover { background: var(--account-soft); }
.account-content { min-width: 0; }
.account-shortcuts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .55rem; margin-bottom: 1.25rem; padding: .65rem; }
.account-shortcut { display: flex; align-items: center; gap: .65rem; min-width: 0; padding: .75rem; border: 1px solid transparent; border-radius: .85rem; color: var(--account-ink); text-decoration: none; transition: background-color .16s ease, border-color .16s ease, transform .16s ease; }
.account-shortcut:hover { transform: translateY(-2px); border-color: var(--account-border); background: #f8fbf8; }
.account-shortcut > span:first-child { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 11px; background: var(--account-soft); color: var(--account-green-dark); font-size: 1.1rem; }
.account-shortcut strong, .account-shortcut small { display: block; }
.account-shortcut strong { font-size: .8rem; }
.account-shortcut small { margin-top: .18rem; color: var(--account-muted); font-size: .67rem; line-height: 1.3; }
.account-shortcut b { margin-left: auto; color: #91a197; font-size: .85rem; }
.account-content-grid { display: grid; grid-template-columns: minmax(270px, .8fr) minmax(0, 1.5fr); gap: 1.25rem; align-items: start; }
.account-details-column { display: grid; gap: 1.25rem; min-width: 0; }
.account-orders-column { min-width: 0; }
.account-page .glass-card { padding: 1.25rem; border-radius: 1rem; color: var(--account-ink); backdrop-filter: none; -webkit-backdrop-filter: none; transition: border-color .16s ease, box-shadow .16s ease; }
.account-page .glass-card:hover { border-color: #c9e3ce; box-shadow: 0 10px 28px rgba(24, 45, 29, .08); }
.account-page .section-divider { display: flex; align-items: center; gap: .65rem; margin: 0 0 1rem; }
.account-page .section-divider h2 { margin: 0; color: var(--account-ink); background: none; -webkit-text-fill-color: currentColor; font-size: 1rem; font-weight: 750; white-space: nowrap; }
.account-page .section-divider::after { height: 1px; background: var(--account-border); }
.account-page .info-row { display: flex; align-items: center; gap: .75rem; padding: .8rem 0; border-bottom: 1px solid #edf1ed; }
.account-page .info-row:last-child { border: 0; }
.account-page .info-icon, .account-page .addr-section-icon { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 11px; background: var(--account-soft) !important; color: var(--account-green-dark) !important; }
.account-page .info-icon svg, .account-page .addr-section-icon svg { color: currentColor !important; }
.account-page .addr-form-section, .account-page .order-meta-pill { border: 1px solid var(--account-border); border-radius: .85rem; background: #f8fbf8; }
.account-page .addr-field-label, .account-page .addr-section-title { color: #4f5f54; }
.account-page #address-form-inner input, .account-page #address-form-inner textarea, .account-page #address-form-inner select { min-height: 42px; padding: .65rem .8rem; border: 1px solid #d7e1d9; border-radius: .7rem; background: #fff; color: var(--account-ink); font-size: .84rem; line-height: 1.35; }
.account-page #address-form-inner input:focus, .account-page #address-form-inner textarea:focus, .account-page #address-form-inner select:focus { border-color: var(--account-green); outline: 3px solid rgba(47, 143, 78, .14); }
.account-page .order-card, .account-page .order-card > div.rounded-2xl { border: 1px solid var(--account-border); background: #fff; }
.account-page .order-card { padding: 1rem; border-radius: 1rem; }
.account-page .order-card + .order-card { margin-top: .75rem; }
.account-page .order-meta-pill { padding: .75rem; }
.account-page .btn-track { border-color: #c5e2cb; background: var(--account-soft); color: var(--account-green-dark); }
.account-page .btn-track:hover { border-color: var(--account-green-dark); background: var(--account-green-dark); color: #fff; }
.account-page .btn-invoice { border-color: #d5dfd7; background: #fff; color: #45554a; }
.account-page .btn-invoice:hover { border-color: #b3d9bc; background: #f5faf6; color: var(--account-green-dark); }
.account-page a, .account-page button { -webkit-tap-highlight-color: transparent; }
.account-page a:focus-visible, .account-page button:focus-visible, .account-page input:focus-visible, .account-page select:focus-visible, .account-page textarea:focus-visible { outline: 3px solid rgba(47, 143, 78, .38); outline-offset: 2px; }
.account-page .empty-icon svg { color: var(--account-green-dark); }
#address-form[hidden] { display: none !important; }
@media (max-width: 1100px) {
    .account-overview { grid-template-columns: 1fr; }
    .account-stats { min-height: 105px; }
    .account-content-grid { grid-template-columns: minmax(250px, .85fr) minmax(0, 1.4fr); }
    .account-shortcut small { display: none; }
}
@media (max-width: 820px) {
    .account-layout { grid-template-columns: 1fr; }
    .account-sidebar { position: static; padding: .85rem; }
    .account-sidebar-title, .account-signout { display: none; }
    .account-nav { display: flex; flex-wrap: nowrap; gap: .4rem; overflow-x: auto; overflow-y: hidden; padding: 0 0 .35rem; scroll-snap-type: x mandatory; scroll-padding-inline: .1rem; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .account-nav-label { display: none; }
    .account-nav-link { flex: 0 0 auto; min-height: 44px; white-space: nowrap; scroll-snap-align: start; }
}
@media (max-width: 900px) {
    /* Keep account details and long order cards readable on tablets. */
    .account-content-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
    .account-page { padding: 1rem .75rem 2.5rem; }
    .account-overview { gap: .75rem; margin-bottom: .75rem; }
    .account-intro { align-items: flex-start; gap: .8rem; padding: 1rem; }
    .account-avatar { flex-basis: 48px; width: 48px; height: 48px; border-radius: 14px; font-size: 1.2rem; }
    .account-description { font-size: .82rem; }
    .account-stats { gap: .45rem; }
    .account-stat { padding: .7rem .6rem; }
    .account-stat > span, .account-stat small { font-size: .62rem; }
    .account-stat strong { font-size: 1.35rem; }
    .account-layout, .account-content-grid { gap: .75rem; }
    .account-shortcuts { display: flex; flex-wrap: nowrap; gap: .4rem; overflow-x: auto; overflow-y: hidden; margin-bottom: .75rem; padding: .4rem .4rem .55rem; scroll-snap-type: x mandatory; scroll-padding-inline: .4rem; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .account-shortcut { flex: 0 0 auto; min-width: 8.75rem; min-height: 3.25rem; padding: .55rem .5rem; scroll-snap-align: start; }
    .account-shortcut > span:first-child { flex-basis: 32px; width: 32px; height: 32px; }
    .account-shortcut b { display: none; }
    .account-page .glass-card { padding: 1rem; border-radius: .9rem; }
    .account-nav-link { min-height: 44px; padding: .45rem .6rem; font-size: .75rem; }
    .account-nav-count { display: none; }
    .account-page .order-meta-grid { grid-template-columns: 1fr; }
    .account-page .order-actions { justify-content: stretch; }
    .account-page .order-actions a { flex: 1; text-align: center; }
}
@media (max-width: 380px) {
    .account-page { padding-inline: .55rem; }
    .account-stat { padding-inline: .45rem; }
    .account-stat > span, .account-stat small { font-size: .58rem; }
    .account-shortcuts { gap: .3rem; }
    .account-shortcut { min-width: 8.25rem; gap: .4rem; padding-inline: .35rem; }
    .account-shortcut strong { font-size: .72rem; }
    .account-page .glass-card { padding: .85rem; }
}
@media (prefers-reduced-motion: reduce) {
    .account-page *, .account-page *::before, .account-page *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (max-width: 820px) {
    .account-nav::-webkit-scrollbar,
    .account-shortcuts::-webkit-scrollbar { display: none; }
}
.account-page .text-indigo-500, .account-page .text-indigo-600, .account-page .text-indigo-700, .account-page .text-indigo-800 { color: var(--account-green-dark) !important; }
.account-page .bg-indigo-50, .account-page .bg-indigo-50\/30, .account-page .bg-indigo-50\/40 { background-color: #eff8f1 !important; }
.account-page .bg-indigo-600 { background-color: var(--account-green-dark) !important; }
.account-page .border-indigo-200, .account-page .border-indigo-400 { border-color: #b8dfc2 !important; }
.account-page .account-order-count { width: fit-content; padding: .35rem .7rem; border-radius: 999px; background: #eff8f1; color: var(--account-green-dark); font-size: .72rem; font-weight: 700; }
.account-page .account-order-icon { padding: .4rem; border-radius: .6rem; background: var(--account-soft); color: var(--account-green-dark); }
.account-page .account-order-icon svg { color: currentColor !important; }
.account-page .account-show-more { display: inline-flex; align-items: center; gap: .5rem; border: 1px solid #c5e2cb; border-radius: .65rem; padding: .45rem .8rem; background: var(--account-soft) !important; color: var(--account-green-dark) !important; box-shadow: none !important; font-size: .75rem; font-weight: 700; text-decoration: none; }
.account-page .account-show-more:hover { background: #e1f1e4 !important; }
.account-page .rounded-xl.bg-slate-50 button[class*="bg-slate-950"] { background: var(--account-green-dark); }
.account-nav-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 820px) {
    .account-signout { display: block; padding: .55rem 0 0; border-top: 0; text-align: right; }
    .account-signout button { justify-content: flex-end; width: auto; min-height: 34px; margin-left: auto; padding: .35rem .6rem; font-size: .75rem; }
}

.account-page .order-card:hover { border-color: #b8dfc2; box-shadow: 0 8px 20px rgba(24, 45, 29, .06); }
.account-page .addr-toggle-row:hover { border-color: #b8dfc2; background: #f3f9f4; }
.account-page .addr-toggle-label span { color: var(--account-ink); }
.account-page .addr-toggle-label small { color: var(--account-muted); }
.account-page #id_is_default:checked + label .toggle-pill { background: var(--account-green) !important; }
.account-page .addr-section-header { display: flex; align-items: center; gap: .6rem; margin-bottom: .75rem; padding-bottom: .6rem; border-bottom: 1px solid var(--account-border); }
.account-page .addr-section-icon { flex-basis: 30px; width: 30px; height: 30px; border-radius: .6rem; }
.account-page .addr-section-title { font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.account-page .addr-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.account-page .addr-field-grid.full { grid-template-columns: minmax(0, 1fr); }
.account-page .addr-field-label { display: block; margin-bottom: .3rem; color: #4f5f54; font-size: .68rem; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.account-page .addr-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .8rem 1rem; border: 1px solid var(--account-border); border-radius: .75rem; background: #f8fbf8; cursor: pointer; }
.account-page .addr-toggle-label { display: flex; align-items: center; gap: .55rem; }
.account-page .addr-toggle-label > span { font-size: .8rem; font-weight: 700; }
.account-page .addr-toggle-label small { display: block; margin-top: .15rem; font-size: .68rem; font-weight: 500; }
.account-page #id_is_default { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.account-page #id_is_default:focus-visible + label { outline: 3px solid rgba(47, 143, 78, .38); outline-offset: 3px; }
.account-page .toggle-pill { position: relative; flex: 0 0 40px; width: 40px; height: 22px; border-radius: 999px; background: #cdd8cf; transition: background-color .16s ease; }
.account-page .toggle-pill::after { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: white; box-shadow: 0 1px 3px rgba(0,0,0,.18); content: ''; transition: transform .16s ease; }
.account-page #id_is_default:checked + label .toggle-pill::after { transform: translateX(18px); }
.account-page .order-meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin-top: .85rem; }
.account-page .order-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .5rem; }
.account-page .btn-track, .account-page .btn-invoice { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: .45rem .8rem; border: 1px solid; border-radius: .65rem; font-size: .75rem; font-weight: 750; text-decoration: none; white-space: nowrap; transition: color .16s ease, background-color .16s ease, border-color .16s ease; }
.account-page .btn-glass-primary { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: .65rem 1rem; border: 0; border-radius: .7rem; background: var(--account-green); color: white; font-size: .85rem; font-weight: 750; cursor: pointer; }
.account-page .btn-glass-primary:hover { background: var(--account-green-dark); }
.account-page .status-badge { display: inline-flex; align-items: center; width: fit-content; padding: .3rem .7rem; border-radius: 999px; font-size: .68rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.account-page .empty-state { display: flex; flex-direction: column; align-items: center; gap: .7rem; padding: 2.75rem 1rem; text-align: center; }
.account-page .empty-icon { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: .2rem; border-radius: 1.1rem; background: var(--account-soft); color: var(--account-green-dark); }
@media (max-width: 640px) {
    .account-page .addr-field-grid { grid-template-columns: minmax(0, 1fr); }
    .account-page .order-meta-grid { grid-template-columns: minmax(0, 1fr); }
    .account-page .order-actions { justify-content: stretch; }
    .account-page .order-actions a { flex: 1; }
}
.account-page #address-form-inner input::placeholder, .account-page #address-form-inner textarea::placeholder { color: #89978d; opacity: 1; }
.account-shortcut > span:first-child svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.account-shortcut b svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* main.css is unlayered after Tailwind; repeat reduced-motion handling here so
   it wins over component and utility transitions without hiding revealed content. */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto !important; }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }
    .sf-js .sf-reveal,
    .sf-js .sf-reveal-stagger > * {
        opacity: 1 !important;
        transform: none !important;
        translate: none !important;
    }
}

/* Shared product collection cards: keep catalog, wishlist and related items
   in a real responsive grid instead of letting the first image fill the row. */
.sf-product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: clamp(.75rem, 1.5vw, 1.25rem);
}
.sf-product-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--sf-border-subtle);
    border-radius: var(--sf-radius-xl);
    background: #fff;
    box-shadow: var(--sf-shadow-sm);
    transition: transform .2s cubic-bezier(.2,.7,.2,1), box-shadow .2s ease, border-color .2s ease;
}
.sf-product-card:focus-within {
    border-color: var(--sf-brand-300);
    box-shadow: 0 0 0 3px rgba(47, 143, 78, .14), var(--sf-shadow-md);
}
.sf-product-media {
    width: 100%;
    flex: 0 0 auto;
}
.sf-product-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sf-price { color: var(--sf-slate-900); }
.sf-category-chip {
    display: inline-flex;
    min-height: 44px;
    flex: 0 0 auto;
    align-items: center;
    gap: .5rem;
    padding: .55rem 1rem;
    border: 1px solid var(--sf-border-subtle);
    border-radius: var(--sf-radius-full);
    background: #fff;
    color: var(--sf-text-primary);
    font-size: .8125rem;
    font-weight: 800;
    line-height: 1.25;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: var(--sf-shadow-xs);
    transition: color .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.sf-category-chip span {
    display: inline-flex;
    min-width: 1.25rem;
    min-height: 1.25rem;
    align-items: center;
    justify-content: center;
    padding-inline: .35rem;
    border-radius: var(--sf-radius-full);
    background: var(--sf-bg-muted);
    color: var(--sf-text-muted);
    font-size: .65rem;
    font-weight: 800;
}
.sf-category-chip.is-active {
    border-color: var(--sf-brand-600);
    background: linear-gradient(110deg, var(--sf-brand-600), var(--sf-brand-700));
    color: #fff;
    box-shadow: 0 5px 14px rgba(36, 118, 64, .2);
}
.sf-category-chip.is-active span { background: rgba(255,255,255,.18); color: #fff; }
.sf-category-chip:focus-visible { outline: 3px solid rgba(47, 143, 78, .35); outline-offset: 2px; }

.sf-mobile-category-nav {
    position: sticky;
    top: var(--sf-header-h, 72px);
    z-index: 45;
    border-bottom: 1px solid var(--sf-border-subtle);
    background: rgba(255, 255, 255, .96);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}
.sf-mobile-category-scroll {
    display: flex;
    align-items: center;
    gap: .5rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding-block: .4rem;
    scroll-padding-inline: 1rem;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.sf-mobile-category-scroll::-webkit-scrollbar { display: none; }
.sf-mobile-category-scroll > a { flex: 0 0 auto; white-space: nowrap; scroll-snap-align: start; }
@media (hover: hover) and (pointer: fine) {
    .sf-category-chip:not(.is-active):hover {
        border-color: var(--sf-brand-300);
        color: var(--sf-brand-700);
        box-shadow: var(--sf-shadow-sm);
    }
}
@media (hover: hover) and (pointer: fine) {
    .sf-product-card:hover {
        transform: translateY(-3px);
        border-color: var(--sf-brand-200);
        box-shadow: var(--sf-shadow-md);
    }
}

/* Enforce 2 columns on all mobile screens */
.sf-product-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch;
    gap: 0.625rem;
}

@media (max-width: 360px) {
    .sf-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.375rem;
    }
}

@media (min-width: 640px) {
    .sf-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)) !important;
        gap: 1rem;
    }
}

@media (min-width: 1024px) {
    .sf-product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 1.25rem;
    }
}

/* ==========================================================================
   10. BUTTON ALIASES & COMPONENT ENHANCEMENTS
   ========================================================================== */
.sf-btn-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--sf-radius-xl);
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #ffffff !important;
    background: linear-gradient(135deg, var(--sf-brand-700), var(--sf-brand-800));
    border: 1px solid transparent;
    box-shadow: 0 4px 14px rgba(21, 128, 61, 0.28);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.sf-btn-brand:hover {
    background: linear-gradient(135deg, var(--sf-brand-800), var(--sf-brand-900));
    box-shadow: 0 8px 24px rgba(21, 128, 61, 0.38);
    transform: translateY(-1px);
    color: #ffffff !important;
}

.sf-btn-brand:active {
    transform: translateY(0);
}

/* User Avatar */
.sf-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--sf-radius-full);
    background: linear-gradient(135deg, var(--sf-brand-600), var(--sf-brand-700));
    color: #ffffff;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(21, 128, 61, 0.2);
}

/* ==========================================================================
   11. BADGE SYSTEM
   ========================================================================== */
.sf-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.6875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.6rem;
    border-radius: var(--sf-radius-full);
    line-height: 1;
}

.sf-badge--brand {
    background: var(--sf-brand-50);
    color: var(--sf-brand-700);
    border: 1px solid var(--sf-brand-200);
}

.sf-badge--neutral {
    background: var(--sf-slate-100);
    color: var(--sf-slate-700);
    border: 1px solid var(--sf-slate-200);
}

.sf-badge-pulse-rose {
    animation: pulseGlowRose 2s infinite;
}

.sf-badge-pulse-orange {
    animation: pulseGlowOrange 2s infinite;
}

.sf-stock-out {
    background: rgba(15, 23, 42, 0.88);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    font-weight: 800;
}

@keyframes pulseGlowRose {
    0%, 100% { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.4); }
    50%      { box-shadow: 0 0 0 6px rgba(225, 29, 72, 0); }
}

@keyframes pulseGlowOrange {
    0%, 100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.4); }
    50%      { box-shadow: 0 0 0 6px rgba(249, 115, 22, 0); }
}

/* ==========================================================================
   12. SECTION HEADERS & VISUAL ACCENTS
   ========================================================================== */
.sf-section-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .sf-section-header {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
    }
}

.sf-left-accent {
    position: relative;
    padding-left: 1rem;
    border-left: 3.5px solid var(--sf-brand-600);
}

.sf-section-title {
    font-size: clamp(1.35rem, 2.5vw, 1.85rem);
    font-weight: 900;
    color: var(--sf-slate-900);
    letter-spacing: -0.025em;
    margin: 0.25rem 0 0;
    line-height: 1.2;
}

.sf-section-subtitle {
    font-size: 0.875rem;
    color: var(--sf-slate-500);
    margin: 0.35rem 0 0;
    font-weight: 500;
    line-height: 1.45;
}

.sf-eyebrow {
    font-size: 0.6875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--sf-brand-700);
    margin: 0;
}

/* ==========================================================================
   13. PRODUCT CARD DETAILS & QUICK ACTIONS
   ========================================================================== */
.sf-product-media {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #fafdfa;
    border-bottom: 1px solid var(--sf-border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sf-product-title {
    font-size: 0.875rem;
    font-weight: 800;
    line-height: 1.35;
    color: var(--sf-slate-900);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.35rem;
}

.sf-product-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.18s ease;
}

.sf-product-title a:hover {
    color: var(--sf-brand-700);
}

.sf-price-sale {
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--sf-brand-700);
}

.sf-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--sf-slate-800);
    background: var(--sf-slate-50);
    border: 1px solid var(--sf-slate-200);
    padding: 0.15rem 0.45rem;
    border-radius: var(--sf-radius-full);
}

.sf-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    z-index: 25;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
    .sf-quick-actions {
        opacity: 0;
        transform: translateY(-4px);
    }
    .sf-product-card:hover .sf-quick-actions,
    .sf-product-card:focus-within .sf-quick-actions {
        opacity: 1;
        transform: translateY(0);
    }
}

.sf-card-icon-btn {
    width: 2rem;
    height: 2rem;
    border-radius: var(--sf-radius-full);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--sf-slate-200);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sf-slate-700);
    box-shadow: var(--sf-shadow-xs);
    cursor: pointer;
    transition: all 0.18s ease;
}

@media (max-width: 640px) {
    .sf-quick-actions {
        top: 0.35rem;
        right: 0.35rem;
        gap: 0.25rem;
    }
    .sf-card-icon-btn {
        width: 1.65rem;
        height: 1.65rem;
    }
    .sf-card-icon-btn svg {
        width: 0.8rem;
        height: 0.8rem;
    }
    .sf-product-card {
        border-radius: var(--sf-radius-lg);
    }
    .sf-product-title {
        font-size: 0.8125rem !important;
        line-height: 1.25 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        min-height: 2.05rem !important;
        height: 2.05rem !important;
    }
}


.sf-card-icon-btn:hover {
    background: #ffffff;
    color: var(--sf-brand-700);
    border-color: var(--sf-brand-300);
    transform: scale(1.08);
    box-shadow: var(--sf-shadow-sm);
}

/* ==========================================================================
   UNIFORM PRODUCT CARD SYSTEM & MOBILE OPTIMIZATION
   ========================================================================== */
.sf-product-card {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-width: 0 !important;
    overflow: hidden;
    border: 1px solid var(--sf-border-subtle);
    border-radius: var(--sf-radius-xl);
    background: #ffffff;
    box-shadow: var(--sf-shadow-sm);
    transition: transform 0.2s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.sf-product-body {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    width: 100% !important;
}

.sf-product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-height: 1.25rem;
}

.sf-product-title {
    font-size: 0.875rem;
    font-weight: 800;
    line-height: 1.35;
    color: var(--sf-slate-900);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.36rem;
    height: 2.36rem;
}

.sf-product-pricing {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    align-content: flex-start;
    gap: 0.2rem 0.45rem;
    min-height: 2.25rem;
}

.sf-product-stock {
    min-height: 1.25rem;
    display: flex;
    align-items: center;
}

/* Card Actions Container - Pinned to bottom of card uniformly */
.sf-card-actions {
    margin-top: auto !important;
    width: 100% !important;
}

.sf-card-actions-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.375rem !important;
    width: 100% !important;
    align-items: stretch !important;
}

.sf-card-form {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Base style for both buttons to guarantee absolute uniformity */
.sf-card-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.35rem !important;
    width: 100% !important;
    height: 2.25rem !important; /* exactly 36px on mobile */
    min-height: 2.25rem !important;
    max-height: 2.25rem !important;
    padding: 0 0.5rem !important;
    border-radius: 0.75rem !important; /* 12px */
    font-size: 0.75rem !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    user-select: none !important;
}

@media (min-width: 640px) {
    .sf-card-btn {
        height: 2.5rem !important; /* 40px on tablet/desktop */
        min-height: 2.5rem !important;
        max-height: 2.5rem !important;
        padding: 0 0.75rem !important;
        font-size: 0.8125rem !important;
        gap: 0.45rem !important;
    }
}

/* Add to Cart button (Clean white luxury with emerald accents) */
.sf-card-btn-cart {
    background: #ffffff !important;
    color: #065f46 !important;
    border: 1.5px solid #a7f3d0 !important;
    box-shadow: 0 1px 3px rgba(6, 95, 70, 0.08) !important;
}

.sf-card-btn-cart:hover {
    background: #ecfdf5 !important;
    color: #047857 !important;
    border-color: #34d399 !important;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.18) !important;
    transform: translateY(-1px) !important;
}

.sf-card-btn-cart:active {
    transform: translateY(0) !important;
    box-shadow: 0 1px 2px rgba(6, 95, 70, 0.12) !important;
}

/* Buy Now button (Deep emerald vibrant gradient) */
.sf-card-btn-buy {
    background: linear-gradient(135deg, #059669 0%, #047857 50%, #064e3b 100%) !important;
    color: #ffffff !important;
    border: 1.5px solid rgba(52, 211, 153, 0.4) !important;
    box-shadow: 0 3px 10px rgba(4, 120, 87, 0.28) !important;
}

.sf-card-btn-buy:hover {
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%) !important;
    color: #ffffff !important;
    border-color: rgba(110, 231, 183, 0.6) !important;
    box-shadow: 0 6px 16px rgba(4, 120, 87, 0.4) !important;
    transform: translateY(-1px) !important;
}

.sf-card-btn-buy:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 6px rgba(4, 120, 87, 0.2) !important;
}

/* Uniform button icons */
.sf-card-btn-icon {
    width: 0.9375rem !important; /* 15px */
    height: 0.9375rem !important;
    flex-shrink: 0 !important;
    stroke-width: 2.5 !important;
}

/* Uniform button text */
.sf-card-btn-text {
    display: inline-flex !important;
    align-items: center !important;
    font-weight: 800 !important;
    letter-spacing: -0.01em !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Out of stock disabled button */
.sf-card-btn-disabled {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.4rem !important;
    width: 100% !important;
    height: 2.25rem !important;
    min-height: 2.25rem !important;
    max-height: 2.25rem !important;
    padding: 0 0.5rem !important;
    border-radius: 0.75rem !important;
    background: #f1f5f9 !important;
    color: #94a3b8 !important;
    border: 1.5px solid #e2e8f0 !important;
    font-size: 0.75rem !important;
    font-weight: 800 !important;
    cursor: not-allowed !important;
    box-sizing: border-box !important;
}

@media (max-width: 640px) {
    .sf-card-actions {
        padding-top: 0.5rem !important;
    }
}

@media (max-width: 360px) {
    .sf-card-actions-grid {
        gap: 0.25rem !important;
    }
    .sf-card-btn {
        padding: 0 0.35rem !important;
        gap: 0.2rem !important;
        font-size: 0.6875rem !important;
    }
    .sf-card-btn-icon {
        width: 0.85rem !important;
        height: 0.85rem !important;
    }
}

/* ==========================================================================
   14. FOOTER COMPONENT (PREMIUM LUXURY EMERALD UI)
   ========================================================================== */
.sf-footer {
    position: relative;
    background: radial-gradient(120% 120% at 50% 0%, #0d2818 0%, #06150d 50%, #020704 100%);
    color: #ffffff;
    border-top: 1px solid rgba(34, 197, 94, 0.22);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.35);
    margin-top: auto;
    overflow: hidden;
}

.sf-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(74, 222, 128, 0.5), transparent);
    pointer-events: none;
}

.sf-footer-heading {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #4ade80;
    margin-bottom: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sf-footer-link {
    font-size: 0.85rem;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-block;
}

.sf-footer-link:hover {
    color: #ffffff;
    transform: translateX(3px);
    text-shadow: 0 0 12px rgba(74, 222, 128, 0.4);
}

.sf-footer-brand {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: var(--sf-radius-xl);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.sf-footer-brand:hover {
    border-color: rgba(74, 222, 128, 0.4);
    transform: translateY(-1px);
}

/* ==========================================================================
   14B. NEWSLETTER COMPONENT (PREMIUM EMERALD BANNER)
   ========================================================================== */
.sf-newsletter-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--sf-radius-2xl);
    background: radial-gradient(120% 120% at 20% 20%, #0d381e 0%, #072312 60%, #021108 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 16px 40px -10px rgba(7, 35, 18, 0.55);
    border: 1px solid rgba(52, 211, 153, 0.28);
    padding: 2rem;
}

@media (min-width: 640px) {
    .sf-newsletter-card {
        padding: 2.75rem;
    }
}

.sf-newsletter-card h2 {
    color: #ffffff !important;
    font-weight: 900;
}

.sf-newsletter-card p {
    color: #d1fae5 !important;
}

.sf-newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--sf-radius-2xl);
    padding: 0.375rem;
    backdrop-filter: blur(8px);
}

@media (min-width: 640px) {
    .sf-newsletter-form {
        flex-direction: row;
        align-items: center;
    }
}

.sf-newsletter-input {
    min-width: 0;
    width: 100%;
    background: transparent !important;
    color: #ffffff !important;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
    border: none !important;
    outline: none !important;
}

.sf-newsletter-input::placeholder {
    color: rgba(209, 250, 229, 0.75) !important;
}

.sf-newsletter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff !important;
    color: #064e3b !important;
    font-size: 0.875rem;
    font-weight: 800;
    border-radius: var(--sf-radius-xl);
    padding: 0.75rem 1.75rem;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.sf-newsletter-btn:hover {
    background: #f0fdf4 !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}


/* ==========================================================================
   15. FILTERS & MOBILE NAVIGATION CONTROLS
   ========================================================================== */
.sf-filter-sheet {
    max-height: 82vh;
    background: #ffffff;
    border-top-left-radius: 1.5rem;
    border-top-right-radius: 1.5rem;
}

.sf-mobile-shop-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.65rem 1rem;
    border-radius: var(--sf-radius-full);
    font-size: 0.8125rem;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
    transition: all 0.18s ease;
}

.sf-mobile-shop-action--primary {
    background: var(--sf-brand-700);
    color: #ffffff;
    border: 1px solid var(--sf-brand-800);
}

.sf-mobile-shop-action--ghost {
    background: #ffffff;
    color: var(--sf-slate-800);
    border: 1px solid var(--sf-slate-200);
}

/* ==========================================================================
   16. SKELETON LOADING & EMPTY STATES
   ========================================================================== */
.sf-product-skeleton {
    border-radius: var(--sf-radius-xl);
    border: 1px solid var(--sf-slate-200);
    background: #ffffff;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.sf-product-skeleton > div {
    aspect-ratio: 1 / 1;
    border-radius: var(--sf-radius-lg);
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.sf-product-skeleton > span {
    height: 0.75rem;
    border-radius: 0.25rem;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.sf-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3.5rem 1.5rem;
    border: 1px dashed var(--sf-border-subtle);
    border-radius: var(--sf-radius-2xl);
    background: var(--sf-bg-subtle);
}

.sf-empty-state h2 {
    color: var(--sf-slate-900) !important;
}

.sf-empty-icon {
    display: grid;
    place-items: center;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: var(--sf-radius-full);
    background: var(--sf-brand-50);
    color: var(--sf-brand-700);
    margin-bottom: 1.25rem;
    border: 1px solid var(--sf-brand-200);
}

.sf-muted {
    color: var(--sf-slate-500);
    font-size: 0.875rem;
}

/* ==========================================================================
   17. PAGINATION
   ========================================================================== */
.sf-pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0.5rem 1rem;
    border-radius: var(--sf-radius-lg);
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--sf-slate-700);
    background: #ffffff;
    border: 1px solid var(--sf-slate-200);
    text-decoration: none;
    transition: all 0.18s ease;
}

.sf-pagination-link:hover {
    border-color: var(--sf-brand-500);
    color: var(--sf-brand-700);
    background: var(--sf-brand-50);
}

.sf-pagination-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0.5rem 1rem;
    border-radius: var(--sf-radius-lg);
    font-size: 0.8125rem;
    font-weight: 800;
    color: var(--sf-brand-900);
    background: var(--sf-brand-50);
    border: 1px solid var(--sf-brand-200);
}

/* ==========================================================================
   18. HOMEPAGE SECTIONS & PROMO CARDS
   ========================================================================== */
.sf-home-category-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    border: 1px solid var(--sf-border-subtle);
    border-radius: var(--sf-radius-2xl);
    background: #ffffff;
    padding: 1.25rem;
    text-decoration: none;
    box-shadow: var(--sf-shadow-xs);
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.sf-home-category-card:hover {
    transform: translateY(-3px);
    border-color: var(--sf-brand-300);
    box-shadow: var(--sf-shadow-md);
}

.sf-home-category-card h3 {
    color: var(--sf-slate-900) !important;
}

.sf-home-category-card p {
    color: var(--sf-slate-500) !important;
}

.sf-offer-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--sf-radius-2xl);
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--sf-brand-800), var(--sf-brand-900));
    color: #ffffff;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--sf-shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sf-offer-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--sf-shadow-xl);
}

.sf-trust-card {
    border: 1px solid var(--sf-border-subtle);
    border-radius: var(--sf-radius-2xl);
    background: #ffffff;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--sf-shadow-xs);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.sf-trust-card:hover {
    transform: translateY(-2px);
    border-color: var(--sf-brand-200);
    box-shadow: var(--sf-shadow-sm);
}

.sf-trust-card strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--sf-slate-900);
    margin-top: 0.5rem;
}

.sf-trust-card span {
    display: block;
    font-size: 0.75rem;
    color: var(--sf-slate-500);
    margin-top: 0.2rem;
}

.sf-ad-banner {
    position: relative;
    overflow: hidden;
    border-radius: var(--sf-radius-2xl);
    padding: 1.5rem;
    background: linear-gradient(135deg, #14532d, #15803d);
    color: #ffffff;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    text-decoration: none;
    box-shadow: var(--sf-shadow-sm);
    transition: transform 0.2s ease;
}

.sf-ad-banner:hover {
    transform: translateY(-2px);
}

.sf-wide-ad {
    position: relative;
    overflow: hidden;
    border-radius: var(--sf-radius-2xl);
    padding: 2rem;
    background: linear-gradient(135deg, #052e16, #14532d);
    color: #ffffff;
    min-height: 180px;
    display: flex;
    align-items: center;
    text-decoration: none;
    box-shadow: var(--sf-shadow-md);
    transition: transform 0.2s ease;
}

.sf-wide-ad:hover {
    transform: translateY(-2px);
}

.sf-review-card {
    border: 1px solid var(--sf-border-subtle);
    border-radius: var(--sf-radius-2xl);
    background: #ffffff;
    padding: 1.5rem;
    box-shadow: var(--sf-shadow-xs);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sf-review-card:hover {
    border-color: var(--sf-brand-200);
    box-shadow: var(--sf-shadow-md);
}

.sf-review-card p {
    color: var(--sf-slate-600) !important;
}

.sf-review-product {
    color: var(--sf-brand-700);
    text-decoration: none;
}

.sf-newsletter-glow {
    box-shadow: 0 0 25px rgba(34, 197, 94, 0.25);
}

/* ==========================================================================
   19. QUICK VIEW MODAL DIALOG
   ========================================================================== */
.sf-quick-view {
    border: none;
    border-radius: var(--sf-radius-2xl);
    padding: 0;
    background: #ffffff;
    box-shadow: var(--sf-shadow-xl);
    max-width: 680px;
    width: 92vw;
    margin: auto;
    overflow: hidden;
}

.sf-quick-view::backdrop {
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.sf-quick-view-layout {
    display: grid;
    grid-template-columns: 1fr;
}

@media (min-width: 600px) {
    .sf-quick-view-layout {
        grid-template-columns: 280px 1fr;
    }
}

.sf-quick-view-image {
    width: 100%;
    height: 100%;
    min-height: 240px;
    object-fit: cover;
    background: #fafdfa;
}

.sf-quick-view-content {
    position: relative;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.sf-quick-view-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2rem;
    height: 2rem;
    border-radius: var(--sf-radius-full);
    border: 1px solid var(--sf-slate-200);
    background: #ffffff;
    display: grid;
    place-items: center;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--sf-slate-500);
    transition: all 0.15s ease;
}

.sf-quick-view-close:hover {
    color: var(--sf-slate-900);
    background: var(--sf-slate-100);
}

.sf-quick-view-category {
    font-size: 0.6875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--sf-brand-700);
    margin: 0 0 0.35rem;
}

.sf-quick-view-title {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--sf-slate-900);
    margin: 0 0 0.5rem;
    line-height: 1.25;
}

.sf-quick-view-price {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--sf-brand-700);
    margin: 0.5rem 0;
}

.sf-quick-view-old-price {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--sf-slate-400);
    text-decoration: line-through;
    margin-left: 0.5rem;
}

.sf-quick-view-stock {
    font-size: 0.75rem;
    font-weight: 700;
    color: #dc2626;
    margin: 0.25rem 0 1rem;
}

.sf-quick-view-stock.is-in-stock {
    color: var(--sf-brand-700);
}

.sf-quick-view-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 1rem;
}

/* ==========================================================================
   20. COMPARE TRAY & COMPARE PAGE SYSTEM
   ========================================================================== */

/* Floating Compare Tray (Luxury Emerald Glass Pill) */
.sf-compare-tray {
    position: fixed;
    bottom: calc(var(--sf-bottom-nav-h, 56px) + env(safe-area-inset-bottom, 0px) + 1.25rem);
    left: 50%;
    transform: translateX(-50%);
    z-index: 60;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.65rem 0.45rem 0.9rem;
    background: linear-gradient(135deg, #072312 0%, #0d381e 60%, #042514 100%);
    border: 1.5px solid rgba(52, 211, 153, 0.45);
    border-radius: 9999px;
    box-shadow: 0 16px 36px -6px rgba(2, 17, 8, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: #ffffff;
    max-width: calc(100vw - 2rem);
    white-space: nowrap;
    transition: bottom 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s ease, opacity 0.2s ease;
    animation: sfCompareTrayIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes sfCompareTrayIn {
    from {
        opacity: 0;
        transform: translate(-50%, 14px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0) scale(1);
    }
}

/* On desktop, no mobile bottom nav */
@media (min-width: 1024px) {
    .sf-compare-tray {
        bottom: 2rem;
        padding: 0.55rem 0.85rem 0.55rem 1.15rem;
    }
}

/* On mobile pages with floating filters or sticky product detail CTA bar */
@media (max-width: 1023px) {
    body.has-mobile-filter-bar .sf-compare-tray,
    body:has([aria-controls="category-filter-sheet"]) .sf-compare-tray,
    body:has([aria-controls="product-filter-dialog"]) .sf-compare-tray {
        bottom: calc(var(--sf-bottom-nav-h, 56px) + env(safe-area-inset-bottom, 0px) + 4.75rem);
    }

    body.has-pd-sticky-bar .sf-compare-tray,
    body:has(.sf-pd-sticky-bar) .sf-compare-tray {
        bottom: calc(var(--sf-bottom-nav-h, 56px) + env(safe-area-inset-bottom, 0px) + var(--sf-pd-sticky-h, 76px) + 1.25rem);
    }
}

.sf-compare-tray[hidden] {
    display: none !important;
}

.sf-compare-tray-main {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: #ffffff !important;
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    cursor: pointer;
}

.sf-compare-tray-main:hover .sf-compare-tray-label {
    color: #6ee7b7;
}

.sf-compare-tray-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #34d399;
}

.sf-compare-tray-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.35rem;
    border-radius: 9999px;
    background: #10b981;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
}

.sf-compare-tray-label {
    white-space: nowrap;
    transition: color 0.15s ease;
}

.sf-compare-tray-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.18s ease;
    margin-left: 0.25rem;
}

.sf-compare-tray-close:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fca5a5;
    transform: scale(1.08);
}

/* ==========================================================================
   COMPARE PRODUCTS PAGE STYLING
   ========================================================================== */
.sf-compare-card-container {
    background: #ffffff;
    border: 1px solid var(--sf-border-subtle);
    border-radius: var(--sf-radius-2xl);
    box-shadow: var(--sf-shadow-md);
    overflow: hidden;
}

.sf-compare-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--sf-brand-300) transparent;
}

.sf-compare-scroll::-webkit-scrollbar {
    height: 6px;
}

.sf-compare-scroll::-webkit-scrollbar-thumb {
    background: var(--sf-brand-300);
    border-radius: 9999px;
}

.sf-compare-table {
    width: 100%;
    min-width: 580px;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
}

/* Label column (Feature names) - Sticky on left for mobile & desktop */
.sf-compare-label-col {
    width: 130px;
    min-width: 130px;
    max-width: 150px;
    background: #f8fafc;
    border-right: 2px solid #e2e8f0;
    position: sticky;
    left: 0;
    z-index: 10;
}

.sf-compare-label-cell {
    width: 130px;
    min-width: 130px;
    max-width: 150px;
    padding: 1rem 1.15rem;
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--sf-slate-600);
    background: #f8fafc;
    border-right: 2px solid #e2e8f0;
    border-bottom: 1px solid var(--sf-slate-100);
    position: sticky;
    left: 0;
    z-index: 10;
    vertical-align: middle;
}

/* Product columns */
.sf-compare-product-col {
    min-width: 220px;
    width: 240px;
    padding: 1.25rem 1rem;
    vertical-align: top;
    border-right: 1px solid var(--sf-slate-100);
}

.sf-compare-head-cell {
    padding: 1.25rem 1rem;
    background: #ffffff;
    border-bottom: 2px solid #e2e8f0;
    vertical-align: top;
}

.sf-compare-product-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    gap: 0.5rem;
}

.sf-compare-remove-btn {
    align-self: flex-end;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 800;
    color: var(--sf-slate-500);
    background: var(--sf-slate-100);
    border: 1px solid var(--sf-slate-200);
    cursor: pointer;
    transition: all 0.15s ease;
}

.sf-compare-remove-btn:hover {
    background: #fee2e2;
    color: #ef4444;
    border-color: #fca5a5;
    transform: translateY(-1px);
}

.sf-compare-img-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 110px;
    height: 110px;
    border-radius: var(--sf-radius-xl);
    background: #fafdfa;
    border: 1px solid var(--sf-border-subtle);
    overflow: hidden;
    padding: 0.5rem;
    margin-block: 0.35rem;
    transition: transform 0.2s ease;
}

.sf-compare-img-wrap:hover {
    transform: scale(1.04);
}

.sf-compare-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sf-compare-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--sf-brand-300);
    background: #ecfdf5;
    border-radius: var(--sf-radius-lg);
}

.sf-compare-cat {
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--sf-brand-700);
}

.sf-compare-title {
    font-size: 0.875rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--sf-slate-900);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.25rem;
    transition: color 0.15s ease;
}

.sf-compare-title:hover {
    color: var(--sf-brand-700);
}

.sf-compare-sku-chip {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--sf-slate-400);
}

/* Data cells in rows */
.sf-compare-data-cell {
    padding: 1rem;
    border-bottom: 1px solid var(--sf-slate-100);
    border-right: 1px solid var(--sf-slate-100);
    vertical-align: middle;
    background: #ffffff;
}

.sf-compare-row:nth-child(even) .sf-compare-data-cell {
    background: #fafcfb;
}

.sf-compare-row:nth-child(even) .sf-compare-label-cell {
    background: #f1f5f9;
}

.sf-compare-price-val {
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--sf-brand-800);
    letter-spacing: -0.02em;
}

.sf-compare-was-val {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--sf-slate-400);
    text-decoration: line-through;
}

.sf-compare-save-chip {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 850;
    color: #059669;
}

.sf-compare-stock-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 800;
}

.sf-compare-stock-pill.in-stock {
    color: #047857;
}

.sf-compare-stock-pill.out-of-stock {
    color: #e11d48;
}

.sf-compare-desc-text {
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--sf-slate-600);
    font-weight: 500;
}

.sf-compare-action-row .sf-compare-data-cell {
    padding: 1.25rem 1rem;
    background: #fdfefe;
}

/* Empty State */
.sf-compare-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 1.5rem;
    border-radius: var(--sf-radius-2xl);
    background: #ffffff;
    border: 1px solid var(--sf-border-subtle);
    box-shadow: var(--sf-shadow-sm);
}

.sf-compare-empty-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 1.5rem;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid #a7f3d0;
    box-shadow: 0 8px 24px rgba(5, 150, 105, 0.12);
}

.sf-btn--danger-soft {
    color: #e11d48 !important;
    border-color: #fecdd3 !important;
}

.sf-btn--danger-soft:hover {
    background: #fff1f2 !important;
    color: #be123c !important;
    border-color: #fda4af !important;
}

/* Promo announcement bar */
.sf-promo-bar {
    background: linear-gradient(90deg, #072312 0%, #0d381e 50%, #064e3b 100%);
    color: #ffffff;
    font-size: 0.8125rem;
    font-weight: 700;
    padding: 0.45rem 1rem;
    text-align: center;
    position: relative;
    z-index: 50;
    border-bottom: 1px solid rgba(52, 211, 153, 0.2);
}

.sf-promo-bar a {
    color: #6ee7b7;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 800;
}

.sf-promo-bar a:hover {
    color: #ffffff;
}

/* ==========================================================================
   21. SCROLL REVEAL ANIMATIONS
   ========================================================================== */
.sf-reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.sf-js .sf-reveal,
.sf-reveal:not(.is-visible):not(.is-revealed) {
    opacity: 0;
    transform: translateY(16px);
}

.sf-js .sf-reveal.is-revealed,
.sf-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.sf-reveal-stagger > * {
    opacity: 1;
    transform: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.sf-js .sf-reveal-stagger > *,
.sf-reveal-stagger:not(.is-visible):not(.is-revealed) > * {
    opacity: 0;
    transform: translateY(12px);
}

.sf-js .sf-reveal-stagger.is-revealed > *,
.sf-reveal-stagger.is-visible > * {
    opacity: 1;
    transform: translateY(0);
}

.sf-js .sf-reveal-stagger.is-revealed > *:nth-child(1),
.sf-reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0.04s; }
.sf-js .sf-reveal-stagger.is-revealed > *:nth-child(2),
.sf-reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.08s; }
.sf-js .sf-reveal-stagger.is-revealed > *:nth-child(3),
.sf-reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.12s; }
.sf-js .sf-reveal-stagger.is-revealed > *:nth-child(4),
.sf-reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.16s; }
.sf-js .sf-reveal-stagger.is-revealed > *:nth-child(5),
.sf-reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.20s; }
.sf-js .sf-reveal-stagger.is-revealed > *:nth-child(6),
.sf-reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.24s; }

/* SVG Network Graphic in Hero */
.sf-hero-network-line {
    stroke: var(--sf-brand-400);
    stroke-width: 2;
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
}

.sf-hero-network-node {
    fill: var(--sf-brand-500);
}

/* Primary Brand Button */
.sf-btn-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #059669 0%, #047857 50%, #064e3b 100%);
    color: #ffffff !important;
    font-size: 0.875rem;
    font-weight: 800;
    line-height: 1.25;
    padding: 0.875rem 1.5rem;
    border-radius: var(--sf-radius-xl);
    border: 1px solid rgba(52, 211, 153, 0.35);
    box-shadow: 0 4px 14px rgba(6, 78, 59, 0.35);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.sf-btn-brand:hover {
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
    color: #ffffff !important;
    transform: translateY(-1.5px);
    border-color: rgba(110, 231, 183, 0.55);
    box-shadow: 0 8px 24px rgba(5, 150, 105, 0.42);
}

/* ==========================================================================
   21. AUTHENTICATION PAGES (LOGIN & REGISTER LUXURY UI)
   ========================================================================== */
.sf-auth-shell {
    position: relative;
    max-width: 62rem;
    margin-left: auto;
    margin-right: auto;
    border-radius: var(--sf-radius-2xl);
    background: #ffffff;
    border: 1px solid rgba(34, 197, 94, 0.18);
    box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(34, 197, 94, 0.08);
    overflow: hidden;
}

.sf-auth-showcase {
    display: none;
    position: relative;
    overflow: hidden;
    background: radial-gradient(120% 120% at 20% 20%, #0d381e 0%, #072312 60%, #021108 100%);
    color: #ffffff;
    padding: 2.25rem;
    flex-direction: column;
    justify-content: space-between;
}

@media (min-width: 1024px) {
    .sf-auth-shell {
        display: grid;
        grid-template-columns: 0.92fr 1.08fr;
        align-items: stretch;
    }

    .sf-auth-showcase {
        display: flex;
        padding: 3rem;
    }
}

.sf-auth-showcase::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(74, 222, 128, 0.35) 0%, transparent 70%);
    filter: blur(40px);
    pointer-events: none;
}

.sf-auth-showcase::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -40px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.22) 0%, transparent 70%);
    filter: blur(50px);
    pointer-events: none;
}

.sf-auth-perk-list {
    display: grid;
    gap: 0.85rem;
    margin-top: 2rem;
    position: relative;
    z-index: 2;
}

.sf-auth-perk-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1.1rem;
    border-radius: var(--sf-radius-xl);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.sf-auth-perk-item:hover {
    transform: translateX(4px);
    border-color: rgba(74, 222, 128, 0.4);
    background: rgba(255, 255, 255, 0.09);
}

.sf-auth-perk-icon {
    display: inline-grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--sf-radius-lg);
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.25), rgba(34, 197, 94, 0.1));
    border: 1px solid rgba(74, 222, 128, 0.35);
    color: #4ade80;
    flex-shrink: 0;
}

.sf-auth-form-wrap {
    padding: 2.25rem 2rem;
    background: #ffffff;
}

@media (min-width: 640px) {
    .sf-auth-form-wrap {
        padding: 3rem 2.75rem;
    }
}

.sf-input-field {
    width: 100%;
    border-radius: var(--sf-radius-xl);
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    padding: 0.8rem 1rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #0f172a;
    transition: all 0.2s ease;
    outline: none;
}

.sf-input-field:focus {
    border-color: #059669;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.16);
}

.sf-input-field::placeholder {
    color: #94a3b8;
}

.sf-input--invalid {
    border-color: #ef4444 !important;
    background: #fef2f2 !important;
}

.sf-input--invalid:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15) !important;
}



/* Django admin login and shared admin styles */
:root {
    --sf-admin-radius: 14px;
    --sf-admin-border: #e2e8f0;
    --sf-admin-focus: #247640;
}
body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body.login {
    min-height: 100vh;
    background: radial-gradient(ellipse at 50% 0%, rgba(217, 239, 222, 0.58), transparent 46%), #f7faf7;
}
body.login #content-main {
    box-sizing: border-box;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border: 1px solid #e2eee5;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 24px 64px rgba(21, 62, 39, 0.10);
}
body.login #content {
    padding: 1rem;
}
body.login input[type="text"],
body.login input[type="email"],
body.login input[type="password"] {
    min-height: 46px;
    border: 1px solid #dce8df !important;
    background: #fbfdfb;
}
body.login input[type="text"]:focus,
body.login input[type="email"]:focus,
body.login input[type="password"]:focus {
    border-color: #247640 !important;
    background: #fff;
}
body.login button[type="submit"],
body.login input[type="submit"],
body.login .submit-row input {
    min-height: 46px;
    border: 0 !important;
    border-radius: 10px !important;
    background: #247640 !important;
    color: #fff !important;
    font-weight: 800 !important;
    transition: background-color 0.15s ease, transform 0.15s ease;
}
body.login button[type="submit"]:hover,
body.login input[type="submit"]:hover,
body.login .submit-row input:hover {
    background: #1d5f35 !important;
    transform: translateY(-1px);
}
body.login a,
body[class*="app-"] a,
.sf-admin-dashboard a { color: #247640; }
body.login a:hover,
body[class*="app-"] a:hover,
.sf-admin-dashboard a:hover { color: #1d5f35; }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(36, 118, 64, 0.22) !important;
    outline-offset: 2px !important;
}
#changelist table thead th,
.results table thead th {
    position: sticky;
    top: 0;
    z-index: 5;
    backdrop-filter: blur(12px);
}
#changelist .results,
.results {
    border-radius: var(--sf-admin-radius);
    overflow: auto;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}
.change-list .filtered #changelist-form,
#changelist-form {
    min-width: 0;
}
.module,
.inline-group,
fieldset.module,
.submit-row {
    border-radius: var(--sf-admin-radius) !important;
}
.form-row,
.aligned .form-row {
    padding-block: 0.9rem !important;
}
.required label,
label.required {
    font-weight: 800 !important;
}
.required label:after,
label.required:after {
    content: " *";
    color: #dc2626;
}
input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="url"],
textarea,
select {
    border-radius: 10px !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
input:focus,
textarea:focus,
select:focus {
    border-color: var(--sf-admin-focus) !important;
    box-shadow: 0 0 0 4px rgba(36, 118, 64, 0.12) !important;
}
.help,
.helptext {
    color: #64748b !important;
    line-height: 1.5 !important;
}
.messagelist,
.messages {
    position: sticky;
    top: 0.75rem;
    z-index: 80;
}
.messagelist li,
.messages li {
    border-radius: 12px !important;
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.12) !important;
}
.sf-image-preview {
    display: block;
    width: 112px;
    height: 112px;
    object-fit: cover;
    margin-top: 0.75rem;
    border-radius: 14px;
    border: 1px solid var(--sf-admin-border);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}
.sf-loading-bar {
    position: fixed;
    inset: 0 auto auto 0;
    height: 3px;
    width: 0;
    z-index: 9999;
    background: linear-gradient(90deg, #2f8f4e, #247640);
    transition: width 0.25s ease, opacity 0.25s ease;
}
.sf-loading-bar.is-active { width: 75%; opacity: 1; }
.sf-loading-bar.is-done { width: 100%; opacity: 0; }
@media (max-width: 900px) {
    #changelist .results table,
    .results table { min-width: 760px; }
    .submit-row {
        position: sticky;
        bottom: 0;
        z-index: 20;
        box-shadow: 0 -10px 28px rgba(15, 23, 42, 0.08);
    }
}
@media (max-width: 600px) {
    body.login #content-main { padding: 1.25rem; border-radius: 16px; }
    body.login #content { padding: 0.5rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
.sf-admin-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0.18rem 0.65rem;
    border-radius: 999px;
    background: #e2e8f0;
    color: #334155;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}
.sf-admin-badge-success { background: #dcfce7; color: #166534; }
.sf-admin-badge-warning { background: #fef3c7; color: #92400e; }
.sf-admin-badge-danger { background: #fee2e2; color: #991b1b; }
.sf-admin-badge-info { background: #eff8f1; color: #1d5f35; }

/* Django admin dashboard styles */
.sf-admin-dashboard {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.sf-admin-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.25rem;
    align-items: center;
    padding: 1.5rem;
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: 1.25rem;
    background: linear-gradient(135deg, #fff, #f1f8f3 72%);
    color: #262329;
    box-shadow: 0 12px 34px rgba(21, 62, 39, 0.08);
    border-color: #d7e9dc;
}
.sf-admin-hero h1 {
    margin: 0.25rem 0 0;
    font-size: clamp(1.7rem, 3vw, 2.7rem);
    font-weight: 900;
    letter-spacing: -0.02em;
}
.sf-admin-hero p:not(.sf-admin-eyebrow) {
    margin: 0.65rem 0 0;
    max-width: 42rem;
    color: #625d65;
    line-height: 1.6;
}
.sf-admin-eyebrow {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #247640;
}
.sf-admin-hero .sf-admin-eyebrow { color: #247640; }
.sf-admin-hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    min-width: 330px;
}
.sf-admin-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.7rem 0.9rem;
    border-radius: 0.85rem;
    background: #fff;
    color: #1d5f35 !important;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 800;
    border: 1px solid #cfe3d4;
    transition: transform 0.2s ease, background 0.2s ease;
}
.sf-admin-action:hover { transform: translateY(-1px); background: #eff8f1; border-color: #9bc9a7; }
.sf-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.85rem;
}
.sf-kpi-card,
.sf-panel,
.sf-admin-apps {
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 1.15rem;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 14px 42px rgba(15, 23, 42, 0.07);
}
.sf-kpi-card {
    padding: 1rem;
    min-height: 132px;
}
.sf-kpi-card .material-symbols-outlined {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 0.85rem;
    color: #247640;
    background: #eaf5ed;
}
.sf-kpi-card p {
    margin: 0.8rem 0 0.25rem;
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.sf-kpi-card strong {
    display: block;
    color: #0f172a;
    font-size: clamp(1.25rem, 2vw, 1.85rem);
    font-weight: 950;
    letter-spacing: -0.03em;
}
.sf-kpi-card-strong .material-symbols-outlined { color: #047857; background: #d1fae5; }
.sf-kpi-warning .material-symbols-outlined { color: #b45309; background: #fef3c7; }
.sf-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.75fr);
    gap: 1rem;
}
.sf-dashboard-grid-bottom {
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.7fr) minmax(260px, 0.7fr);
}
.sf-panel,
.sf-admin-apps { padding: 1.15rem; }
.sf-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}
.sf-panel-header h2 {
    margin: 0.2rem 0 0;
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: -0.02em;
}
.sf-panel-header span,
.sf-panel-header a {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 800;
    text-decoration: none;
}
.sf-chart-wrap { position: relative; height: 320px; }
.sf-chart-donut { height: 285px; }
.sf-activity-list,
.sf-task-list { display: flex; flex-direction: column; gap: 0.65rem; }
.sf-activity-item,
.sf-task-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.9rem;
    background: #f8fafc;
    border: 1px solid #eef2f7;
    text-decoration: none;
    color: #0f172a !important;
}
.sf-activity-item:hover,
.sf-task-item:hover { background: #eff8f1; border-color: #c9e3cf; }
.sf-activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 0.8rem;
    color: #247640;
    background: #eaf5ed;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sf-activity-item span:not(.material-symbols-outlined) { min-width: 0; flex: 1; }
.sf-activity-item strong,
.sf-task-item span { display: block; font-size: 0.86rem; font-weight: 850; }
.sf-activity-item small { display: block; margin-top: 0.15rem; color: #64748b; font-size: 0.75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sf-activity-item b,
.sf-task-item strong { margin-left: auto; color: #247640; font-weight: 950; }
.sf-empty-note { color: #64748b; font-size: 0.88rem; margin: 0; }
.sf-content-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 0.32fr); gap: 1rem; }
@media (max-width: 1200px) {
    .sf-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sf-dashboard-grid,
    .sf-dashboard-grid-bottom,
    .sf-content-row { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
    .sf-admin-hero { grid-template-columns: 1fr; padding: 1.1rem; }
    .sf-admin-hero-actions { min-width: 0; grid-template-columns: 1fr; }
    .sf-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sf-chart-wrap { height: 260px; }
}
@media (max-width: 520px) {
    .sf-kpi-grid { grid-template-columns: 1fr; }
}

