/* =============================================
 * Cascade layer order (lowest → highest precedence within layers).
 * Anything UNLAYERED still beats all layered rules — keep critical
 * overrides outside layers, and migrate ordinary rules into layers
 * over time so we can drop !important.
 * ============================================= */
@layer reset, base, components, utilities;

/* ===== منع overflow أفقي ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

/* ===== Accessibility: focus-visible ===== */
:focus:not(:focus-visible) { outline: none; }
:focus-visible {
    outline: 2px solid #54a405;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== Product image aspect ratio ===== */
.product-card img,
.product-image img,
.product-thumb,
img.product-img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

html, body {
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    width: 100%;
}

/* ===== Header ===== */
.main-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: white;
    border-bottom: 1px solid #f0f0f0;
}

.header-inner,
.header-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    max-width: 100%;
    position: relative;
}

.header-desktop {
    display: none;
}

.hd-topbar {
    display: none;
}

.header-menu-btn {
    background: none;
    border: none;
    font-size: 22px;
    color: #2d3436;
    cursor: pointer;
    padding: 6px;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-center {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.header-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    mix-blend-mode: multiply;
    border-radius: 6px;
}

.header-brand {
    font-size: 1.15rem;
    font-weight: 700;
    color: #54a405;
    /* The brand sits in an absolutely-centered .header-center between
     * the menu button and the cart button. The English name
     * "Dhelal Al-Zaytoon" is long, so we lock it to a single line and
     * fall back to ellipsis if a viewport is too narrow even after
     * the responsive font-size shrinks below. */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Constrain the absolutely-positioned header-center so the brand text
 * can never overflow under the menu/cart buttons (each ~40-44px wide
 * plus container padding). 110px reserved on each side covers them. */
.header-center {
    max-width: calc(100vw - 120px);
}

.header-cart-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #2d3436;
    cursor: pointer;
    padding: 6px;
    position: relative;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-cart-count {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #54a405;
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

@media (min-width: 769px) {
    .header-mobile {
        display: none;
    }
    .hd-topbar {
        display: block;
        background: linear-gradient(135deg, #2d6b00, #54a405);
        overflow: hidden;
    }
    .hd-marquee-wrap {
        overflow: hidden;
        -webkit-mask-image: linear-gradient(to right, transparent, black 40px, black calc(100% - 40px), transparent);
        mask-image: linear-gradient(to right, transparent, black 40px, black calc(100% - 40px), transparent);
    }
    .hd-marquee-track {
        display: flex;
        width: max-content;
        animation: hdMarquee 35s linear infinite;
    }
    .hd-marquee-group {
        display: flex;
        align-items: center;
        flex-shrink: 0;
    }
    .hd-marquee-item {
        font-size: 0.72rem;
        color: rgba(255,255,255,0.9);
        padding: 7px 16px;
        white-space: nowrap;
    }
    .hd-marquee-dot {
        color: rgba(255,255,255,0.3);
        font-size: 8px;
        padding: 0 4px;
    }
    .header-desktop {
        display: flex;
        align-items: center;
        padding: 12px 30px;
        gap: 16px;
    }
    .header-logo {
        width: 40px;
        height: 40px;
    }
    .header-brand {
        font-size: 1.1rem;
    }
}

@keyframes hdMarquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes hdMarqueeRTL {
    0% { transform: translateX(0); }
    100% { transform: translateX(50%); }
}

[dir="rtl"] .hd-marquee-track,
html[dir="rtl"] .hd-marquee-track,
body[dir="rtl"] .hd-marquee-track {
    animation-name: hdMarqueeRTL;
}

@media (max-width: 768px) {
    .header-desktop,
    .hd-topbar {
        display: none;
    }
}

/* =============================================
 * Mobile header brand sizing — keeps "Dhelal Al-Zaytoon"
 * on a single line across all phone widths (320–480px).
 * Each step shrinks the font enough to fit the
 * ~200–280px central area between the menu and cart buttons.
 * ============================================= */
@media (max-width: 480px) {
    .header-brand { font-size: 1.05rem; }
    .header-center { max-width: calc(100vw - 110px); }
}

@media (max-width: 430px) {
    .header-brand { font-size: 1rem; }
}

@media (max-width: 380px) {
    .header-mobile {
        padding: 8px 12px;
    }
    .header-logo {
        width: 36px;
        height: 36px;
    }
    .header-brand {
        font-size: 0.92rem;
    }
    .header-center { max-width: calc(100vw - 100px); }
}

@media (max-width: 340px) {
    .header-brand { font-size: 0.85rem; }
    .header-logo  { width: 32px; height: 32px; }
    .header-center { max-width: calc(100vw - 90px); }
}

/* ===== Desktop Header Elements ===== */
.hd-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    flex-shrink: 0;
}

.hd-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: 20px;
    flex-shrink: 0;
}

.hd-nav-item {
    padding: 8px 14px;
    font-size: 0.88rem;
    font-weight: 500;
    color: #2d3436;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.15s;
    text-decoration: none;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
}

.hd-nav-item:hover {
    background: #f8f9fa;
}

.hd-lang {
    color: #999 !important;
    font-size: 0.82rem !important;
}

.hd-chevron {
    font-size: 10px;
    color: #999;
    transition: transform 0.2s;
}

.hd-dropdown-wrap {
    position: relative;
}

.hd-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 14px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.12);
    padding: 8px 0;
    min-width: 220px;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
}

body[dir="ltr"] .hd-dropdown {
    right: auto;
    left: 0;
}

.hd-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(4px);
}

.hd-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    font-size: 0.85rem;
    color: #2d3436;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.1s;
}

.hd-dropdown-item:hover {
    background: #f8f9fa;
}

.hd-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-right: auto;
    flex-shrink: 0;
}

body[dir="ltr"] .hd-actions {
    margin-right: 0;
    margin-left: auto;
}

.hd-search {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    width: 240px;
    transition: border-color 0.2s;
}

.hd-search:focus-within {
    border-color: #54a405;
    background: white;
}

.hd-search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 14px;
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    color: #2d3436;
}

.hd-search-input::placeholder {
    color: #6b7280;
}

.hd-search-icon {
    padding: 0 14px;
    color: #999;
    font-size: 14px;
}

.hd-cart {
    background: none;
    border: none;
    font-size: 20px;
    color: #2d3436;
    cursor: pointer;
    position: relative;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hd-cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #54a405;
    color: white;
    font-size: 12px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

@media (min-width: 1200px) {
    .header-desktop {
        padding: 14px 50px;
    }
    .hd-marquee-item {
        font-size: 0.76rem;
        padding: 8px 20px;
    }
    .hd-search {
        width: 350px;
    }
    .hd-nav-item {
        font-size: 0.92rem;
        padding: 8px 16px;
    }
}

        /* ===== ZAYTOON LOGO STYLES ===== */
.zaytoon-logo-container {
    transition: all 0.3s ease;
}

.zaytoon-logo-container:hover .zaytoon-logo-icon {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(84,164,5,0.25);
}

.zaytoon-logo-icon {
    transition: all 0.3s ease;
}

.zaytoon-logo-svg {
    transition: all 0.3s ease;
}

/* للشاشات الصغيرة */
@media (max-width: 768px) {
    .zaytoon-logo-container {
        gap: 8px;
    }
    
    .main-website .zaytoon-logo-icon,
    .auth-container .zaytoon-logo-icon {
        width: 45px;
        height: 45px;
    }

    .main-website .zaytoon-logo-text span:first-child,
    .auth-container .zaytoon-logo-text span:first-child {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .main-website .zaytoon-logo-icon,
    .auth-container .zaytoon-logo-icon {
        width: 40px;
        height: 40px;
    }

    .main-website .zaytoon-logo-text span:first-child,
    .auth-container .zaytoon-logo-text span:first-child {
        font-size: 1.3rem;
    }

    .main-website .zaytoon-logo-text span:last-child,
    .auth-container .zaytoon-logo-text span:last-child {
        font-size: 0.75rem;
    }
}
        /* ===== CSS STYLING - محسن بالكامل لجميع أجهزة iPhone و Samsung ===== */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
        }

        :root {
            /* =============================================
             * Color System — Zaytoon Brand
             * Source: logo.js → ZaytoonLogo.LOGO_COLORS
             * -----------------------------------------
             * --primary:   #54a405 — الأخضر الرئيسي (زيتون) — مطابق للشعار
             * --secondary: #006ef9 — الأزرق — مطابق للشعار
             * --accent:    #e44d4d — الأحمر (تنبيهات وعروض)
             * Logo background: white
             * Logo gradient: linear-gradient(135deg, #54a405, #65b818)
             * ============================================= */

            /* === Brand Colors === */
            --primary: #54a405;
            --primary-light: #65b818;
            --primary-dark: #3d7a04; /* unused — kept for future use */
            --secondary: #006ef9;
            --secondary-light: #3389ff; /* unused — kept for future use */

            /* === Accent === */
            --accent: #e44d4d;

            /* === Status Colors === */
            --success: #10b981; /* unused in CSS — used by JS inline styles */
            --error: #ef4444; /* unused in CSS — used by JS inline styles */
            --warning: #f59e0b; /* unused in CSS — used by JS inline styles */
            --info: #3b82f6; /* unused in CSS — used by JS inline styles */

            /* === UI Colors === */
            --dark: #1e1e1e;
            --light: #f9fafb; /* unused — kept for future use */
            --gray: #6b7280;
            --gray-light: #f3f4f6;
            --border: #e5e7eb;

            /* === Gradients === */
            --gradient-primary: linear-gradient(135deg, #54a405 0%, #65b818 50%, #54a405 100%);
            --gradient-accent: linear-gradient(135deg, #006ef9 0%, #3389ff 50%, #006ef9 100%); /* unused — kept for future use */
            --gradient-hero: linear-gradient(135deg, #54a405 0%, #65b818 100%); /* unused — kept for future use */
            --gradient-card: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(84,164,5,0.03) 100%); /* unused — kept for future use */

            /* === Shadows === */
            --shadow-sm: 0 2px 8px rgba(84, 164, 5, 0.08);
            --shadow: 0 4px 20px rgba(84, 164, 5, 0.12);
            --shadow-lg: 0 10px 40px rgba(84, 164, 5, 0.15);
            --shadow-glow: 0 0 20px rgba(0, 110, 249, 0.25); /* unused — kept for future use */

            /* === Border Radius === */
            --radius-xs: 6px;
            --radius-sm: 12px;
            --radius-md: 16px;
            --radius: 20px;
            --radius-lg: 24px;
            --radius-xl: 32px;
            --radius-full: 9999px;

            /* === Spacing scale (4px base) === */
            --space-0: 0;
            --space-1: 4px;
            --space-2: 8px;
            --space-3: 12px;
            --space-4: 16px;
            --space-5: 20px;
            --space-6: 24px;
            --space-8: 32px;
            --space-10: 40px;
            --space-12: 48px;
            --space-16: 64px;

            /* === Typography scale === */
            --fs-xs: 0.72rem;
            --fs-sm: 0.82rem;
            --fs-base: 0.95rem;
            --fs-md: 1rem;
            --fs-lg: 1.15rem;
            --fs-xl: 1.35rem;
            --fs-2xl: 1.6rem;
            --fs-3xl: 2rem;
            --fs-4xl: 2.5rem;

            --fw-regular: 400;
            --fw-medium: 500;
            --fw-semibold: 600;
            --fw-bold: 700;
            --fw-extrabold: 800;

            --lh-tight: 1.2;
            --lh-snug: 1.35;
            --lh-normal: 1.5;
            --lh-relaxed: 1.7;

            /* === Transitions === */
            --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55); /* unused — kept for future use */

            /* === Safe Area (iPhone notch) === */
            --safe-area-inset-top: env(safe-area-inset-top, 0px);
            --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
            --safe-area-inset-left: env(safe-area-inset-left, 0px); /* unused */
            --safe-area-inset-right: env(safe-area-inset-right, 0px); /* unused */
        }

        body {
            font-family: 'Cairo', sans-serif;
            background-color: #f3f6f9;
            color: #2d3e50;
            line-height: 1.6;
            padding-top: var(--safe-area-inset-top);
            padding-bottom: var(--safe-area-inset-bottom);
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        body.english {
            direction: ltr;
            font-family: 'Inter', 'Cairo', sans-serif;
        }

        .container {
            max-width: 100%;
            width: 100%;
            padding-left: 0;
            padding-right: 0;
            margin: 0;
            overflow-x: hidden;
            box-sizing: border-box;
        }

        /* =============================================
         * PAGE D'AUTHENTIFICATION — ALL DELETED.
         * The auth page is now defined entirely in
         * public/index.html via the inline <style id="auth-styles">
         * block, scoped under #authPage to avoid any conflict
         * with this stylesheet.
         * ============================================= */

        /* ===== MAIN WEBSITE ===== */
        .main-website {
            display: none;
            min-height: 100vh;
            background-color: #f3f6f9;
        }

        .main-website.active {
            display: block;
        }

        /* ===== HEADER ===== */
        header {
            background: linear-gradient(145deg, #ffffff, #f8fafc);
            box-shadow: var(--shadow-sm);
            position: sticky;
            top: 0;
            z-index: 1000;
            padding: 15px 0;
            border-bottom: 3px solid var(--primary);
            padding-top: calc(15px + var(--safe-area-inset-top));
            transition: box-shadow var(--transition-smooth), background var(--transition-smooth);
        }
        header.scrolled {
            box-shadow: var(--shadow);
            background: rgba(255, 255, 255, 0.98);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
        }

        .header-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        @media (max-width: 992px) {
            .header-content {
                flex-wrap: wrap;
                justify-content: center;
                gap: 15px;
            }
        }

        .logo h1 {
            font-size: 1.9rem;
            font-weight: 700;
            color: var(--primary);
            letter-spacing: -1px;
        }

        .logo span {
            color: var(--secondary);
            font-size: 0.9rem;
            display: block;
            font-weight: 500;
        }

        .nav-controls {
            display: flex;
            align-items: center;
            gap: 20px;
        }

        @media (max-width: 992px) {
            .nav-controls {
                width: 100%;
                justify-content: center;
                flex-wrap: wrap;
            }
        }

        .user-info {
            display: flex;
            align-items: center;
            gap: 12px;
            background: var(--gray-light);
            padding: 6px 16px 6px 12px;
            border-radius: 50px;
        }

        .user-avatar {
            width: 40px;
            height: 40px;
            background: var(--primary);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: 700;
            font-size: 1.2rem;
        }

        .logout-btn {
            background: none;
            border: 1px solid var(--border);
            padding: 8px 20px;
            border-radius: 50px;
            color: var(--gray);
            cursor: pointer;
            transition: var(--transition);
            display: flex;
            align-items: center;
            gap: 8px;
            font-weight: 600;
            touch-action: manipulation;
            min-height: 44px;
        }

        .logout-btn:hover {
            background: #fee2e2;
            border-color: var(--accent);
            color: var(--accent);
        }

        .cart-icon {
            position: relative;
            font-size: 1.5rem;
            color: var(--dark);
            cursor: pointer;
            transition: var(--transition);
            padding: 8px;
            touch-action: manipulation;
        }

        .cart-icon:hover {
            color: var(--primary);
        }

        .cart-count {
            position: absolute;
            top: -8px;
            right: -8px;
            background: var(--secondary);
            color: white;
            border-radius: 50%;
            padding: 2px 8px;
            font-size: 0.8rem;
            font-weight: 600;
            min-width: 22px;
            text-align: center;
        }

        body.english .cart-count {
            right: auto;
            left: -8px;
        }

        .lang-switch {
            display: flex;
            gap: 5px;
        }

        .lang-btn {
            background: transparent;
            border: 1px solid var(--border);
            padding: 6px 14px;
            border-radius: 30px;
            font-weight: 600;
            cursor: pointer;
            transition: var(--transition);
            color: var(--dark);
            touch-action: manipulation;
            min-height: 40px;
        }

        .lang-btn.active {
            background: var(--primary);
            color: white;
            border-color: var(--primary);
        }

        /* ===== SLIDER ===== */
        .slider-container {
            position: relative;
            margin: 20px 0 40px;
            border-radius: var(--radius);
            overflow: hidden;
            box-shadow: var(--shadow-lg);
        }

        .slider {
            display: flex;
            transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
        }

        .slide {
            min-width: 100%;
            height: 450px;
            background-size: cover;
            background-position: center;
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
        }

        @media (max-width: 768px) {
            .slide {
                height: 350px;
            }
        }

        @media (max-width: 480px) {
            .slide {
                height: 300px;
            }
        }

        .slide-content {
            background: rgba(255,255,255,0.9);
            padding: 40px 60px;
            border-radius: 10px;
            backdrop-filter: blur(5px);
            max-width: 80%;
        }

        @media (max-width: 768px) {
            .slide-content {
                padding: 30px 40px;
                max-width: 90%;
            }
        }

        @media (max-width: 480px) {
            .slide-content {
                padding: 20px 25px;
            }
        }

        .slide-content h2 {
            font-size: 2.5rem;
            color: var(--primary);
            margin-bottom: 15px;
        }

        @media (max-width: 768px) {
            .slide-content h2 {
                font-size: 1.6rem;
            }
        }

        .slider-btn {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(255,255,255,0.7);
            border: none;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            font-size: 1.5rem;
            cursor: pointer;
            color: var(--dark);
            transition: var(--transition);
            display: flex;
            align-items: center;
            justify-content: center;
            touch-action: manipulation;
        }

        .prev { left: 20px; }
        .next { right: 20px; }

        /* ===== SECTIONS ===== */
        .section-title {
            font-size: 2rem;
            font-weight: 700;
            color: var(--primary);
            margin-bottom: 30px;
            position: relative;
            padding-bottom: 15px;
            cursor: pointer;
            display: inline-block;
        }

        .section-title::after {
            content: '';
            position: absolute;
            bottom: 0;
            right: 0;
            width: 80px;
            height: 4px;
            background: var(--secondary);
            border-radius: 2px;
        }

        body.english .section-title::after {
            right: auto;
            left: 0;
        }

/* ===== Product Slider ===== */
.product-slider-wrap {
    padding: 0 12px;
    margin-top: 8px;
    margin-bottom: 20px;
}

.product-slider {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-radius: 16px;
}

.product-slider-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.product-slider-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.product-slider-slide.active {
    opacity: 1;
    z-index: 1;
}

.product-slider-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-slider-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 14px 12px;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
    color: white;
    text-align: center;
}

.product-slider-title {
    font-size: 0.95rem;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.product-slider-desc {
    font-size: 0.72rem;
    opacity: 0.9;
    margin-top: 2px;
}

.product-slider-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 5;
}

.product-slider-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.2s;
}

.product-slider-dot.active {
    background: white;
    width: 18px;
    border-radius: 4px;
}

@media (min-width: 769px) {
    .product-slider-wrap {
        max-width: 1400px;
        margin: 0 auto 28px;
        padding: 0 40px;
    }
    .product-slider {
        height: 320px;
        border-radius: 20px;
    }
    .product-slider-title {
        font-size: 1.3rem;
    }
    .product-slider-desc {
        font-size: 0.85rem;
    }
}

@media (min-width: 1200px) {
    .product-slider {
        height: 380px;
    }
}

@media (max-width: 768px) {
    .product-slider-wrap {
        margin-top: 4px;
        margin-bottom: 16px;
    }
    .product-slider {
        height: 180px;
    }
}

@media (max-width: 380px) {
    .product-slider {
        height: 150px;
        border-radius: 12px;
    }
}

      /* ===== Category Cards — Gradient Style ===== */
.categories-grid-new {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 12px;
    margin-bottom: 40px;
}

.cat-card-new {
    background: white;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.15s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.cat-card-new:active {
    transform: scale(0.97);
}

.cat-card-bg {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cat-card-icon {
    font-size: 30px;
    color: white;
    opacity: 0.9;
}

.cat-card-info {
    padding: 10px 12px;
    text-align: center;
}

.cat-card-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 2px;
}

.cat-card-count {
    font-size: 0.75rem;
    font-weight: 500;
}

/* ===== Category Cards — Desktop ===== */
@media (min-width: 769px) {
    .categories-grid-new {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 20px;
        padding: 0 40px;
        max-width: 100%;
        margin: 0 auto;
    }
    .cat-card-bg {
        height: 160px;
    }
    .cat-card-icon {
        font-size: 38px;
    }
    .cat-card-name {
        font-size: 1rem;
    }
    .cat-card-count {
        font-size: 0.82rem;
    }
    .cat-card-info {
        padding: 12px 14px;
    }
}

@media (min-width: 1200px) {
    .categories-grid-new {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        max-width: 100%;
        padding: 0 60px;
        gap: 24px;
    }
    .cat-card-bg {
        height: 160px;
    }
    .cat-card-icon {
        font-size: 42px;
    }
}

/* Small mobile */
@media (max-width: 380px) {
    .categories-grid-new {
        gap: 8px;
        padding: 0 8px;
    }
    .cat-card-bg {
        height: 65px;
    }
    .cat-card-icon {
        font-size: 24px;
    }
    .cat-card-name {
        font-size: 0.8rem;
    }
}
/* ===== Promo: Offers Banner ===== */
.promo-offers-banner {
    background: linear-gradient(135deg, #54a405, #2d6b00);
    border-radius: 18px;
    padding: 22px 20px;
    color: white;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 120px;
    margin-bottom: 12px;
    transition: transform 0.15s;
}

.promo-offers-banner:active {
    transform: scale(0.98);
}

.promo-offers-content {
    flex: 1;
    position: relative;
    z-index: 2;
}

.promo-offers-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.promo-offers-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 4px;
}

.promo-offers-desc {
    font-size: 0.75rem;
    opacity: 0.85;
    line-height: 1.5;
    margin-bottom: 12px;
}

.promo-offers-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: white;
    color: #54a405;
    padding: 7px 16px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
}

.promo-offers-deco {
    position: absolute;
    left: 16px;
    bottom: 16px;
    width: 55px;
    height: 55px;
    background: rgba(255,255,255,0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

body[dir="ltr"] .promo-offers-deco {
    left: auto;
    right: 16px;
}

.promo-offers-deco i {
    font-size: 24px;
    color: rgba(255,255,255,0.5);
}

/* ===== Promo: Two Small Cards ===== */
.promo-two-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.promo-small-card {
    border-radius: 16px;
    padding: 18px 14px;
    color: white;
    text-align: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.15s;
    min-height: 110px;
}

.promo-small-card:active {
    transform: scale(0.97);
}

.promo-new {
    background: linear-gradient(135deg, #1e40af, #1e3a8a);
}

.promo-special {
    background: linear-gradient(135deg, #0d9488, #065f46);
}

.promo-small-icon {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
}

.promo-small-icon i {
    font-size: 18px;
    color: rgba(255,255,255,0.85);
}

.promo-small-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.6rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.promo-small-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 3px;
}

.promo-small-desc {
    font-size: 0.7rem;
    opacity: 0.8;
}

/* Desktop */
@media (min-width: 769px) {
    .promo-offers-banner {
        max-width: 1400px;
        margin: 0 auto 18px;
        min-height: 180px;
        padding: 36px 50px;
        border-radius: 22px;
    }
    .promo-offers-title {
        font-size: 1.5rem;
    }
    .promo-offers-desc {
        font-size: 0.95rem;
    }
    .promo-offers-btn {
        padding: 10px 22px;
        font-size: 0.85rem;
    }
    .promo-offers-deco {
        width: 70px;
        height: 70px;
    }
    .promo-offers-deco i {
        font-size: 30px;
    }
    .promo-two-grid {
        max-width: 1400px;
        margin: 0 auto;
        gap: 20px;
    }
    .promo-small-card {
        min-height: 160px;
        padding: 26px 22px;
        border-radius: 20px;
    }
    .promo-small-title {
        font-size: 1.15rem;
    }
    .promo-small-desc {
        font-size: 0.8rem;
    }
    .promo-small-icon {
        width: 56px;
        height: 56px;
    }
    .promo-small-icon i {
        font-size: 24px;
    }
}

/* Small mobile */
@media (max-width: 380px) {
    .promo-offers-banner {
        min-height: 100px;
        padding: 16px 14px;
        border-radius: 14px;
    }
    .promo-offers-title {
        font-size: 1rem;
    }
    .promo-offers-deco {
        width: 40px;
        height: 40px;
    }
    .promo-small-card {
        min-height: 95px;
        padding: 14px 10px;
        border-radius: 12px;
    }
    .promo-small-title {
        font-size: 0.85rem;
    }
}

/* ===== Featured Products ===== */
.featured-main {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    margin-bottom: 10px;
    border: 0.5px solid #e5e7eb;
    transition: transform 0.15s;
}

.featured-main:active {
    transform: scale(0.98);
}

.featured-main-img {
    width: 100%;
    height: 180px;
    background: #f0f2f5;
    position: relative;
    overflow: hidden;
}

.featured-main-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.featured-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #54a405;
    color: white;
    font-size: 0.65rem;
    padding: 3px 10px;
    border-radius: 6px;
    font-weight: 600;
}

.featured-offer {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    padding: 3px 10px;
    border-radius: 6px;
    font-weight: 600;
}

.featured-main-info {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.featured-main-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2d3436;
}

.featured-main-desc {
    font-size: 0.75rem;
    color: #999;
    margin-top: 3px;
}

.featured-main-price-wrap {
    text-align: left;
    flex-shrink: 0;
    margin-right: 12px;
}

.featured-main-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #54a405;
}

.featured-main-old {
    font-size: 0.7rem;
    color: #999;
    text-decoration: line-through;
}

.featured-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.featured-small {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    text-align: center;
    border: 0.5px solid #e5e7eb;
    transition: transform 0.15s;
}

.featured-small:active {
    transform: scale(0.97);
}

.featured-small-img {
    height: 70px;
    background: #f0f2f5;
    overflow: hidden;
}

.featured-small-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.featured-small-name {
    font-size: 0.72rem;
    font-weight: 500;
    color: #2d3436;
    padding: 6px 6px 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.featured-small-price {
    font-size: 0.78rem;
    font-weight: 600;
    color: #54a405;
    padding: 0 6px 8px;
}

@media (min-width: 769px) {
    .featured-main-img {
        height: 350px;
    }
    .featured-main-info {
        padding: 18px 24px;
    }
    .featured-main-name {
        font-size: 1.2rem;
    }
    .featured-main-desc {
        font-size: 0.88rem;
    }
    .featured-main-price {
        font-size: 1.5rem;
    }
    .featured-row {
        gap: 16px;
    }
    .featured-small-img {
        height: 120px;
    }
    .featured-small-name {
        font-size: 0.9rem;
        padding: 8px 8px 3px;
    }
    .featured-small-price {
        font-size: 0.88rem;
    }
}

@media (max-width: 380px) {
    .featured-main-img {
        height: 150px;
    }
    .featured-small-img {
        height: 55px;
    }
    .featured-small-name {
        font-size: 0.68rem;
    }
}

       /* ===== PRODUCTS - منتجين في كل صف على الموبايل ===== */
/* ===== Talabat-Style Product Grid — mobile-first ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 12px;
    margin-bottom: 20px;
}

@media (min-width: 769px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 18px;
        padding: 0 40px;
        margin-bottom: 30px;
        max-width: 1400px;
        margin: 0 auto;
    }
}

@media (min-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        max-width: 1400px;
        padding: 0 60px;
    }
    .product-img {
        height: 220px;
    }
}

@media (min-width: 769px) {
    .section-title {
        font-size: 1.5rem;
        padding: 0 40px;
        max-width: 1400px;
        margin-left: auto;
        margin-right: auto;
    }
    .featured-main,
    .featured-row {
        max-width: 1400px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 380px) {
    .products-grid {
        gap: 8px;
        padding: 0 6px;
    }
}

        .product-card {
            background: white;
            border-radius: 16px;
            overflow: hidden;
            box-shadow: 0 1px 6px rgba(0,0,0,0.06);
            transition: transform 0.15s;
            position: relative;
            display: flex;
            flex-direction: column;
            height: 100%;
            touch-action: manipulation;
            animation: fadeInUp 0.4s ease-out both;
            cursor: pointer;
        }
        .product-card::after {
            display: none;
        }
        .product-card:hover {
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        .product-card:active {
            transform: scale(0.97);
        }
        @media (min-width: 769px) {
            .product-card:hover {
                transform: translateY(-3px);
                box-shadow: 0 4px 12px rgba(0,0,0,0.1);
            }
        }
        .product-card:nth-child(1) { animation-delay: 0.05s; }
        .product-card:nth-child(2) { animation-delay: 0.1s; }
        .product-card:nth-child(3) { animation-delay: 0.15s; }
        .product-card:nth-child(4) { animation-delay: 0.2s; }
        .product-card:nth-child(5) { animation-delay: 0.25s; }
        .product-card:nth-child(6) { animation-delay: 0.3s; }
        .product-card:nth-child(7) { animation-delay: 0.35s; }
        .product-card:nth-child(8) { animation-delay: 0.4s; }

        .product-badge {
            position: absolute;
            top: 10px;
            right: 10px;
            background: var(--secondary);
            color: white;
            padding: 3px 8px;
            border-radius: 8px;
            font-size: 0.65rem;
            font-weight: 700;
            z-index: 2;
        }
        @media (min-width: 769px) {
            .product-badge {
                padding: 4px 10px;
                font-size: 0.75rem;
            }
        }

        body.english .product-badge {
            right: auto;
            left: 10px;
        }

        .product-offer {
            background: var(--accent);
            left: 10px;
            right: auto;
        }

        body.english .product-offer {
            left: auto;
            right: 10px;
        }

        .product-img {
            width: 100%;
            height: 150px;
            object-fit: cover;
            display: block;
            background: #f0f2f5;
        }
        @media (min-width: 769px) {
            .product-img {
                height: 200px;
            }
        }
        @media (max-width: 380px) {
            .product-img {
                height: 120px;
            }
        }

        .product-info {
            padding: 10px 12px 0;
            flex-grow: 1;
            display: flex;
            flex-direction: column;
        }
        @media (min-width: 769px) {
            .product-info {
                padding: 12px 14px 0;
            }
        }

        .product-title {
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--dark);
            margin-bottom: 4px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            line-height: 1.3;
            text-align: center;
        }
        @media (min-width: 769px) {
            .product-title {
                font-size: 0.95rem;
                margin-bottom: 6px;
            }
        }

        .product-desc {
            display: none;
        }
        @media (min-width: 769px) {
            .product-desc {
                display: block;
                color: var(--gray);
                font-size: 0.8rem;
                margin-bottom: 6px;
                line-height: 1.4;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
                text-align: center;
            }
        }

        .product-price {
            font-size: 1rem;
            font-weight: 800;
            color: var(--primary);
            margin-bottom: 8px;
            text-align: center;
        }
        @media (min-width: 769px) {
            .product-price {
                font-size: 1.05rem;
                margin-bottom: 10px;
            }
        }

        .old-price {
            font-size: 0.7rem;
            color: var(--gray);
            text-decoration: line-through;
            margin-right: 4px;
            font-weight: 400;
        }
        @media (min-width: 769px) {
            .old-price {
                font-size: 0.8rem;
                margin-right: 6px;
            }
        }

        body.english .old-price {
            margin-right: 0;
            margin-left: 4px;
        }

        .add-to-cart {
            background: var(--gradient-primary);
            color: white;
            border: none;
            padding: 10px 0;
            border-radius: 10px;
            font-weight: 700;
            font-size: 0.85rem;
            cursor: pointer;
            transition: all 0.15s;
            margin: 0 8px 10px;
            display: block;
            width: calc(100% - 16px);
            text-align: center;
            touch-action: manipulation;
            min-height: 38px;
            position: relative;
            overflow: hidden;
            font-family: inherit;
        }
        .add-to-cart:active {
            opacity: 0.85;
        }
        @media (min-width: 769px) {
            .add-to-cart {
                padding: 10px 0;
                font-size: 0.88rem;
                min-height: 42px;
            }
        }
        .cart-add-btn {
            display: block;
            width: calc(100% - 16px);
            margin: 0 8px 10px;
            padding: 10px 0;
            background: #54a405;
            color: white;
            border: none;
            border-radius: 10px;
            font-size: 0.85rem;
            font-weight: 700;
            cursor: pointer;
            font-family: inherit;
            text-align: center;
            margin-top: auto;
        }
        .cart-add-btn:active {
            opacity: 0.85;
        }
        .add-to-cart::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            background: rgba(255,255,255,0.2);
            border-radius: 50%;
            transform: translate(-50%, -50%);
            transition: width 0.6s, height 0.6s;
        }
        .add-to-cart:hover::before {
            width: 300px;
            height: 300px;
        }
        .add-to-cart:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow);
        }
        .add-to-cart:active {
            transform: translateY(0) scale(0.98);
        }

        /* ===== OFFERS BANNER ===== */
        .offers-banner {
            background: linear-gradient(135deg, var(--primary), #65b818);
            border-radius: var(--radius);
            padding: 40px;
            color: white;
            margin: 40px 0;
            text-align: center;
            cursor: pointer;
        }

        /* ===== CONTACT SECTION ===== */
        .contact-section {
            background: white;
            border-radius: var(--radius);
            padding: 25px 15px !important;
            margin: 30px 0;
            box-shadow: var(--shadow-lg);
        }
        .contact-section h2 {
            font-size: 1.3rem !important;
            margin-bottom: 15px !important;
        }
        .contact-section input,
        .contact-section textarea {
            padding: 10px 15px !important;
            font-size: 14px !important;
            border-radius: 12px !important;
        }
        .contact-section textarea {
            min-height: 70px !important;
        }
        .contact-section button[type="submit"] {
            padding: 12px 30px !important;
            font-size: 14px !important;
        }
        .contact-section form {
            display: grid !important;
            grid-template-columns: 1fr 1fr !important;
            gap: 10px !important;
        }
        .contact-section form .form-group:last-of-type,
        .contact-section form button {
            grid-column: span 2 !important;
        }

        @media (max-width: 768px) {
            .contact-section form {
                grid-template-columns: 1fr !important;
            }
            .contact-section form .form-group:last-of-type,
            .contact-section form button {
                grid-column: span 1 !important;
            }
        }

        .contact-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 30px;
        }

        @media (max-width: 992px) {
            .contact-grid {
                grid-template-columns: 1fr;
            }
        }

        /* ===== Payment & Shipping — Desktop ===== */
        @media (min-width: 769px) {
            .payment-grid {
                display: flex !important;
                flex-direction: row !important;
                justify-content: center;
                align-items: flex-start;
                gap: 40px;
                max-width: 1400px;
                margin: 0 auto;
                padding: 30px 40px;
                text-align: center;
            }
            .payment-grid > div,
            .payment-grid > a {
                flex: 1;
                display: flex;
                flex-direction: column;
                align-items: center;
                text-align: center;
            }
            .payment-grid .method-card {
                flex-direction: column !important;
                text-align: center;
                border-bottom: none !important;
                padding: 20px !important;
            }
            .payment-grid .method-card i {
                font-size: 2rem !important;
                margin-bottom: 10px;
            }
            .payment-grid .method-card div {
                text-align: center;
            }
        }

        /* ===== Contact Section — Desktop ===== */
        @media (min-width: 769px) {
            .contact-section {
                max-width: 1400px !important;
                margin: 0 auto !important;
                padding: 50px 60px !important;
            }
            .contact-section h2,
            .contact-section h3 {
                text-align: center !important;
                font-size: 1.5rem !important;
                margin-bottom: 30px !important;
            }
            .contact-section form {
                max-width: 100%;
                margin: 0 auto;
                width: 100%;
            }
            .contact-section input,
            .contact-section textarea {
                width: 100% !important;
                padding: 14px 18px !important;
                font-size: 15px !important;
                border-radius: 10px !important;
                border: 1.5px solid #e5e7eb !important;
                box-sizing: border-box !important;
            }
            .contact-section input:focus,
            .contact-section textarea:focus {
                border-color: #54a405 !important;
                outline: none !important;
            }
            .contact-section textarea {
                min-height: 150px !important;
                resize: vertical !important;
            }
            .contact-section button[type="submit"],
            .contact-section .btn-primary,
            .contact-section .btn {
                width: 100% !important;
                max-width: 100% !important;
                margin: 10px 0 0 !important;
                display: flex !important;
                justify-content: center !important;
                padding: 16px !important;
                font-size: 16px !important;
                border-radius: 10px !important;
            }
            .contact-section .form-row {
                display: grid;
                grid-template-columns: 1fr 1fr;
                gap: 16px;
            }
        }

        /* ===== Footer — Desktop ===== */
        @media (min-width: 769px) {
            .footer-container {
                max-width: 900px !important;
            }
            .footer-contact-grid {
                display: grid;
                grid-template-columns: 1fr 1fr;
                gap: 16px 40px;
                max-width: 700px;
                margin: 20px auto;
            }
        }

        /* ===== METHODS SECTION ===== */
        .methods-section {
            padding: 20px 15px !important;
        }
        .methods-section h2 {
            font-size: 1.3rem !important;
            margin-bottom: 15px !important;
        }
        .method-card {
            padding: 12px !important;
            border-radius: 12px !important;
        }
        .method-card i {
            font-size: 1.5rem !important;
        }
        .method-card h3 {
            font-size: 0.85rem !important;
            margin: 5px 0 3px !important;
        }
        .method-card p {
            font-size: 0.75rem !important;
            color: var(--gray) !important;
        }

        /* ===== MAP SECTION ===== */
        @media (max-width: 768px) {
            .map-section iframe {
                height: 250px !important;
            }
            .map-section [style*="padding: 15px 20px"] {
                flex-direction: column !important;
                text-align: center !important;
            }
            .map-section a[href*="google.com/maps"] {
                width: 100% !important;
                justify-content: center !important;
            }
        }
        @media (max-width: 380px) {
            .map-section iframe {
                height: 220px !important;
            }
        }

        .submit-btn {
            background: var(--primary);
            color: white;
            border: none;
            padding: 12px 30px;
            border-radius: 12px;
            font-weight: 700;
            cursor: pointer;
            transition: var(--transition);
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 14px;
            touch-action: manipulation;
            min-height: 44px;
        }

        /* ===== CART PAGE ===== */
        .cart-page {
            background: white;
            border-radius: var(--radius);
            padding: 30px;
            margin: 30px 0;
            box-shadow: var(--shadow-lg);
        }

        .cart-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 30px;
            padding-bottom: 20px;
            border-bottom: 2px solid var(--border);
        }

        .cart-header h2 {
            color: var(--primary);
            font-size: 1.8rem;
        }

        .close-cart {
            background: none;
            border: none;
            font-size: 1.5rem;
            color: var(--gray);
            cursor: pointer;
            padding: 10px;
            touch-action: manipulation;
        }

        .cart-items {
            display: flex;
            flex-direction: column;
            gap: 20px;
            margin-bottom: 30px;
        }

        .cart-item {
            display: flex;
            align-items: center;
            gap: 20px;
            padding: 20px;
            background: var(--gray-light);
            border-radius: var(--radius-sm);
            position: relative;
        }

        @media (max-width: 480px) {
            .cart-item {
                flex-direction: column;
                align-items: flex-start;
            }
        }

        .cart-item-img {
            width: 100px;
            height: 100px;
            object-fit: cover;
            border-radius: var(--radius-sm);
        }

        .cart-item-info {
            flex: 1;
        }

        .cart-item-title {
            font-size: 1.2rem;
            font-weight: 700;
            color: var(--dark);
            margin-bottom: 5px;
        }

        .cart-item-price {
            font-size: 1.3rem;
            font-weight: 800;
            color: var(--primary);
        }

        .cart-item-quantity {
            display: flex;
            align-items: center;
            gap: 15px;
            margin-top: 10px;
        }

        .quantity-btn {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            border: 1px solid var(--border);
            background: white;
            color: var(--dark);
            font-size: 1.2rem;
            font-weight: 700;
            cursor: pointer;
            touch-action: manipulation;
        }

        .quantity-btn:active {
            background: var(--primary);
            color: white;
        }

        .quantity-value {
            font-size: 1.1rem;
            font-weight: 600;
            min-width: 30px;
            text-align: center;
        }

        .remove-item {
            position: absolute;
            top: 10px;
            left: 10px;
            background: none;
            border: none;
            color: var(--accent);
            font-size: 1.2rem;
            cursor: pointer;
            padding: 8px;
            touch-action: manipulation;
        }

        body.english .remove-item {
            left: auto;
            right: 10px;
        }

        .cart-summary {
            background: var(--primary);
            color: white;
            padding: 25px;
            border-radius: var(--radius-sm);
            margin-top: 20px;
        }

        .cart-total {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 1.3rem;
            font-weight: 700;
            margin-bottom: 20px;
        }

        .checkout-btn {
            width: 100%;
            background: var(--secondary);
            color: white;
            border: none;
            padding: 16px;
            border-radius: 50px;
            font-size: 1.1rem;
            font-weight: 700;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            cursor: pointer;
            transition: var(--transition);
            touch-action: manipulation;
        }

        .empty-cart {
            text-align: center;
            padding: 50px;
            color: var(--gray);
        }

        .empty-cart i {
            font-size: 4rem;
            margin-bottom: 20px;
            color: var(--border);
        }

        /* ===== CATEGORY PAGE ===== */
        .category-page {
            background: white;
            border-radius: var(--radius);
            padding: 30px;
            margin: 30px 0;
            box-shadow: var(--shadow-lg);
        }

        .category-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 30px;
            padding-bottom: 20px;
            border-bottom: 2px solid var(--border);
        }

        .category-header h2 {
            color: var(--primary);
            font-size: 1.8rem;
        }

        .close-category {
            background: none;
            border: none;
            font-size: 1.5rem;
            color: var(--gray);
            cursor: pointer;
            padding: 10px;
            touch-action: manipulation;
        }

        .category-products {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
            padding: 0 10px;
        }
        @media (min-width: 769px) {
            .category-products {
                grid-template-columns: repeat(4, 1fr);
                gap: 14px;
                padding: 0 15px;
            }
        }
        @media (min-width: 1200px) {
            .category-products {
                grid-template-columns: repeat(4, 1fr);
            }
        }

        .back-btn {
            background: var(--gray-light);
            border: 1px solid var(--border);
            padding: 12px 25px;
            border-radius: 50px;
            color: var(--dark);
            font-weight: 600;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 20px;
            touch-action: manipulation;
        }

        /* ===== PRODUCT DETAILS PAGE ===== */
.product-details-page {
    background: white;
    border-radius: var(--radius);
    padding: 40px;
    margin: 30px 0;
    box-shadow: var(--shadow-lg);
}

.product-details-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
}

@media (max-width: 992px) {
    .product-details-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

.product-details-image {
    width: 100%;
    border-radius: 24px;
    overflow: hidden;
    background: var(--gray-light);
    box-shadow: var(--shadow);
}

.product-details-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: var(--transition);
}

.product-details-image img:hover {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .product-details-image img {
        height: 300px;
    }
}

.product-details-info {
    padding: 20px 0;
}

.product-details-badge {
    display: inline-block;
    background: var(--secondary);
    color: white;
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.product-details-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 20px;
    line-height: 1.3;
}

@media (max-width: 768px) {
    .product-details-title {
        font-size: 1.8rem;
    }
}

.product-details-price {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.product-details-price .old-price {
    font-size: 1.3rem;
    color: var(--gray);
}

.product-details-offer {
    background: var(--accent);
    color: white;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
}

.product-details-description {
    margin-bottom: 30px;
}

.product-details-description h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 15px;
}

.product-details-description p {
    font-size: 1.1rem;
    color: var(--gray);
    line-height: 1.8;
}

.product-details-features {
    margin-bottom: 30px;
    background: var(--gray-light);
    padding: 25px;
    border-radius: 20px;
}

.product-details-features h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 15px;
}

.product-details-features ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

@media (max-width: 480px) {
    .product-details-features ul {
        grid-template-columns: 1fr;
    }
}

.product-details-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--dark);
    font-size: 1rem;
}

.product-details-features li i {
    color: var(--primary);
    font-size: 1.2rem;
}

.product-details-actions {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.add-to-cart-btn {
    flex: 1;
    background: var(--primary);
    color: white;
    border: none;
    padding: 16px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition);
    min-width: 200px;
}

.add-to-cart-btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

.pdf-btn {
    flex: 1;
    background: var(--accent);
    color: white;
    border: none;
    padding: 16px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition);
    min-width: 200px;
}

.pdf-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.pdf-btn i {
    font-size: 1.2rem;
}

.product-details-meta {
    background: white;
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: 16px;
}

.product-details-meta p {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    color: var(--gray);
    font-size: 1rem;
}

.product-details-meta p:last-child {
    margin-bottom: 0;
}

.product-details-meta i {
    color: var(--primary);
    width: 20px;
}

.related-products {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid var(--border);
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 992px) {
    .related-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .related-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .related-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 320px) {
    .related-products-grid {
        grid-template-columns: 1fr;
    }
}

.related-products .product-card {
    cursor: pointer;
}

        /* ===== FOOTER ===== */
        footer {
            border-radius: 20px 20px 0 0;
        }

        /* ===== FOOTER RESPONSIVE ===== */
        @media (max-width: 768px) {
            .footer-grid {
                grid-template-columns: 1fr 1fr !important;
                gap: 20px !important;
            }
            footer [style*="border-top"] {
                flex-direction: column !important;
                text-align: center !important;
            }
        }

        @media (max-width: 480px) {
            .footer-grid {
                grid-template-columns: 1fr !important;
                gap: 20px !important;
                text-align: center !important;
            }
            .footer-grid > div:first-child > div:first-child {
                justify-content: center !important;
            }
            .footer-grid a[href*="wa.me"] {
                width: 100% !important;
                justify-content: center !important;
            }
            .footer-grid div[style*="gap:8px"][style*="flex-wrap"] {
                justify-content: center !important;
            }
        }


        .footer-info h3 {
            color: white;
            margin-bottom: 18px;
        }

        .footer-info p {
            margin-bottom: 10px;
            color: rgba(255,255,255,0.8);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .social-links {
            display: flex;
            gap: 20px;
            font-size: 1.6rem;
        }

        .social-links i {
            color: white;
            transition: var(--transition);
            cursor: pointer;
            touch-action: manipulation;
        }

        .copyright {
            text-align: center;
            margin-top: 50px;
            padding-top: 30px;
            border-top: 1px solid rgba(255,255,255,0.1);
            color: rgba(255,255,255,0.6);
        }

        /* ===== NOTIFICATION ===== */
        @keyframes slideIn {
            from { transform: translateX(100px); opacity: 0; }
            to { transform: translateX(0); opacity: 1; }
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* ===== ENHANCED ANIMATIONS ===== */
        @keyframes fadeInUp {
            from { opacity: 0; transform: translateY(30px); }
            to { opacity: 1; transform: translateY(0); }
        }
        @keyframes fadeInScale {
            from { opacity: 0; transform: scale(0.9); }
            to { opacity: 1; transform: scale(1); }
        }
        @keyframes slideInRight {
            from { opacity: 0; transform: translateX(30px); }
            to { opacity: 1; transform: translateX(0); }
        }
        @keyframes slideOutRight {
            to { opacity: 0; transform: translateX(100px); }
        }
        @keyframes shimmer {
            0% { background-position: -1000px 0; }
            100% { background-position: 1000px 0; }
        }
        @keyframes pulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.05); }
        }
        @keyframes heartBeat {
            0% { transform: scale(1); }
            15% { transform: scale(1.3); }
            30% { transform: scale(1); }
            45% { transform: scale(1.15); }
            60% { transform: scale(1); }
        }
        @keyframes cartBounce {
            0% { transform: scale(1); }
            25% { transform: scale(1.2) rotate(-10deg); }
            50% { transform: scale(0.9) rotate(5deg); }
            75% { transform: scale(1.1); }
            100% { transform: scale(1); }
        }
        @keyframes badgePop {
            0% { transform: scale(0); }
            50% { transform: scale(1.4); }
            100% { transform: scale(1); }
        }
        @keyframes successCheck {
            0% { transform: scale(0) rotate(45deg); opacity: 0; }
            50% { transform: scale(1.2) rotate(0deg); opacity: 1; }
            100% { transform: scale(1) rotate(0deg); opacity: 1; }
        }
        @keyframes rippleEffect {
            to { transform: scale(4); opacity: 0; }
        }

        /* شارة العدد */
        .cart-count.pop {
            animation: badgePop 0.4s ease-out;
        }

        /* إشعار محسّن */
        .zaytoon-notif {
            animation: slideInRight 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
        }

        /* شارة العرض */
        .product-badge {
            animation: fadeInScale 0.3s ease-out;
            backdrop-filter: blur(4px);
        }
        .product-offer {
            background: linear-gradient(135deg, #ef4444, #dc2626) !important;
            animation: pulse 2s infinite;
        }

        /* تحميل skeleton */
        .product-card.loading {
            background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
            background-size: 2000px 100%;
            animation: shimmer 1.5s infinite linear;
        }

        /* Ripple effect */
        .ripple {
            position: absolute;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.3);
            transform: scale(0);
            animation: rippleEffect 0.6s linear;
            pointer-events: none;
        }
        .btn-primary, .admin-btn, .feature-btn, .submit-btn, .checkout-btn, .add-to-cart-btn {
            position: relative;
            overflow: hidden;
        }

        /* تحسين حقول الإدخال */
        input:focus, textarea:focus, select:focus {
            border-color: var(--primary) !important;
            box-shadow: 0 0 0 3px rgba(84, 164, 5, 0.1);
            outline: none;
            transition: all var(--transition-fast);
        }

        /* تحسين offers banner */
        .offers-banner {
            transition: all var(--transition-smooth);
        }
        .offers-banner:hover {
            transform: translateY(-3px);
            box-shadow: var(--shadow-lg);
        }


        /* ===== SEARCH BAR ===== */
        #mainSearchInput:focus {
            border-color: var(--primary) !important;
            box-shadow: 0 0 0 3px rgba(84, 164, 5, 0.1);
            background: white !important;
        }
        #searchDropdown {
            animation: fadeInUp 0.2s ease-out;
        }
        @media (max-width: 768px) {
            #searchContainer {
                order: 10;
                max-width: 100% !important;
                min-width: 100% !important;
            }
        }

        /* ===== UTILITY CLASSES ===== */
        .hidden {
            display: none !important;
        }

        /* ===== SOCIAL MEDIA ICONS - نسخة ظلال الزيتون ===== */
.social-links-container {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    margin-top: 15px;
    justify-content: center;
}

.social-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease-in-out;
    color: white;
    font-size: 2.2rem;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.social-icon:hover {
    transform: scale(1.15);
    box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}

.social-icon.facebook { background: #1877f2; }
.social-icon.instagram { background: linear-gradient(45deg, #f09433, #d62976, #962fbf, #4f5bd5); }
.social-icon.tiktok { background: #000000; }
.social-icon.whatsapp { background: #25d366; }
.social-icon.telegram { background: #0088cc; }
.social-icon.youtube { background: #ff0000; }

@media (max-width: 992px) {
    .social-icon {
        width: 65px;
        height: 65px;
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .social-links-container {
        gap: 20px;
    }
    .social-icon {
        width: 60px;
        height: 60px;
        font-size: 1.9rem;
    }
}

@media (max-width: 480px) {
    .social-links-container {
        gap: 18px;
    }
    .social-icon {
        width: 55px;
        height: 55px;
        font-size: 1.8rem;
    }
}

@media (max-width: 380px) {
    .social-icon {
        width: 50px;
        height: 50px;
        font-size: 1.6rem;
    }
}

        /* ===== ADMIN DASHBOARD STYLES ===== */
        .admin-dashboard {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: #f0f2f5;
            z-index: 10000;
            overflow: hidden;
            font-family: 'Cairo', sans-serif;
        }

        .admin-container {
            display: flex;
            height: 100vh;
        }

        /* الشريط الجانبي */
        .admin-sidebar {
            width: 280px;
            background: linear-gradient(180deg, #54a405 0%, #65b818 100%);
            color: white;
            padding: 20px 0;
            display: flex;
            flex-direction: column;
            overflow-y: auto;
        }

        .admin-logo {
            padding: 20px;
            text-align: center;
            border-bottom: 1px solid rgba(255,255,255,0.1);
            margin-bottom: 20px;
        }

        .admin-logo i {
            font-size: 2.5rem;
            color: #006ef9;
            margin-bottom: 10px;
        }

        .admin-logo h3 {
            font-size: 1.3rem;
            font-weight: 700;
        }

        .admin-menu {
            list-style: none;
            padding: 0;
            margin: 0;
            flex: 1;
        }

        .admin-menu li {
            padding: 15px 25px;
            margin: 5px 10px;
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 15px;
            font-weight: 600;
        }

        .admin-menu li i {
            width: 24px;
            font-size: 1.2rem;
        }

        .admin-menu li:hover {
            background: rgba(255,255,255,0.1);
        }

        .admin-menu li.active {
            background: #006ef9;
            color: white;
            box-shadow: 0 5px 15px rgba(199,154,62,0.3);
        }

        .admin-menu li.logout-admin {
            margin-top: auto;
            border-top: 1px solid rgba(255,255,255,0.1);
            color: #ff6b6b;
        }

        .admin-menu li.logout-admin:hover {
            background: rgba(255,107,107,0.2);
        }

        /* المحتوى الرئيسي */
        .admin-content {
            flex: 1;
            background: #f8fafc;
            overflow-y: auto;
            padding: 20px 30px;
        }

        .admin-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 30px;
            padding-bottom: 20px;
            border-bottom: 2px solid #e5e7eb;
        }

        .admin-header h2 {
            color: #54a405;
            font-size: 1.8rem;
            font-weight: 700;
        }

        .admin-user {
            display: flex;
            align-items: center;
            gap: 15px;
            background: white;
            padding: 8px 20px 8px 15px;
            border-radius: 50px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
        }

        .admin-avatar {
            width: 45px;
            height: 45px;
            background: #54a405;
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 1.2rem;
        }

        /* الأقسام */
        .admin-sections {
            position: relative;
        }

        .admin-section {
            display: none;
            animation: fadeIn 0.4s ease;
        }

        .admin-section.active {
            display: block;
        }

        /* رأس القسم */
        .section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 25px;
            flex-wrap: wrap;
            gap: 15px;
        }

        .section-header h3 {
            font-size: 1.4rem;
            color: #1e1e1e;
            font-weight: 700;
        }

        /* بطاقات الإحصائيات */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
            gap: 20px;
            margin-bottom: 40px;
        }

        .stat-card {
            background: white;
            border-radius: 20px;
            padding: 25px;
            display: flex;
            align-items: center;
            gap: 20px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.05);
            transition: all 0.3s ease;
        }

        .stat-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgba(0,0,0,0.1);
        }

        .stat-card i {
            font-size: 2.5rem;
            color: #54a405;
            background: rgba(84,164,5,0.1);
            padding: 15px;
            border-radius: 16px;
        }

        .stat-info h3 {
            font-size: 1.8rem;
            font-weight: 800;
            color: #1e1e1e;
            margin-bottom: 5px;
        }

        .stat-info p {
            color: #6b7280;
            font-size: 0.9rem;
        }

        /* الجداول */
        .admin-table {
            width: 100%;
            background: white;
            border-radius: 16px;
            overflow: hidden;
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
            border-collapse: collapse;
        }

        .admin-table th {
            background: #f3f4f6;
            color: #1e1e1e;
            font-weight: 700;
            padding: 15px;
            text-align: right;
            font-size: 0.9rem;
        }

        .admin-table td {
            padding: 15px;
            border-bottom: 1px solid #e5e7eb;
            color: #4b5563;
        }

        .admin-table tr:last-child td {
            border-bottom: none;
        }

        .admin-table tr:hover td {
            background: #f9fafb;
        }

        /* أزرار التحكم */
        .admin-btn {
            padding: 12px 24px;
            border: none;
            border-radius: 50px;
            font-weight: 600;
            font-size: 0.95rem;
            cursor: pointer;
            transition: all 0.3s ease;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            touch-action: manipulation;
        }

        .admin-btn.primary {
            background: #54a405;
            color: white;
        }

        .admin-btn.primary:hover {
            background: #65b818;
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(84,164,5,0.3);
        }

        .admin-btn.secondary {
            background: #006ef9;
            color: white;
        }

        .admin-btn.danger {
            background: #e44d4d;
            color: white;
        }

        .admin-btn.small {
            padding: 8px 16px;
            font-size: 0.85rem;
        }

        /* أزرار داخل الجدول */
        .action-buttons {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        .action-btn {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            border: none;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s ease;
            font-size: 1rem;
        }

        .action-btn.edit {
            background: #54a405;
            color: white;
        }

        .action-btn.delete {
            background: #fee2e2;
            color: #e44d4d;
        }

        .action-btn.view {
            background: #006ef9;
            color: white;
        }

        /* نموذج الإضافة/التعديل (Modal) */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.5);
            z-index: 11000;
            align-items: center;
            justify-content: center;
            animation: fadeIn 0.3s ease;
        }

        .modal.active {
            display: flex;
        }

        .modal-content {
            background: white;
            border-radius: 30px;
            padding: 40px;
            max-width: 600px;
            width: 90%;
            max-height: 80vh;
            overflow-y: auto;
            animation: slideUp 0.3s ease;
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 30px;
            padding-bottom: 20px;
            border-bottom: 2px solid #e5e7eb;
        }

        .modal-header h3 {
            font-size: 1.5rem;
            color: #54a405;
            font-weight: 700;
        }

        .close-modal {
            background: none;
            border: none;
            font-size: 1.5rem;
            color: #6b7280;
            cursor: pointer;
            padding: 10px;
        }

        /* حقول الإدخال */
        .admin-input {
            width: 100%;
            padding: 12px 20px;
            border: 1px solid #e5e7eb;
            border-radius: 50px;
            font-size: 1rem;
            font-family: inherit;
            transition: all 0.3s ease;
        }

        .admin-input:focus {
            outline: none;
            border-color: #54a405;
            box-shadow: 0 0 0 3px rgba(84,164,5,0.1);
        }

        .admin-color-input {
            width: 100%;
            height: 50px;
            padding: 5px;
            border: 1px solid #e5e7eb;
            border-radius: 12px;
            cursor: pointer;
        }

        /* شبكة الإعدادات */
        .settings-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 25px;
            margin-bottom: 30px;
        }

        .setting-card {
            background: white;
            border-radius: 20px;
            padding: 25px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.05);
        }

        .setting-card h4 {
            color: #54a405;
            margin-bottom: 20px;
            font-size: 1.2rem;
            font-weight: 700;
            padding-bottom: 10px;
            border-bottom: 2px solid #f3f4f6;
        }

        /* معاينة الشعار */
        .appearance-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 25px;
        }

        .appearance-card {
            background: white;
            border-radius: 20px;
            padding: 25px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.05);
        }

        .logo-preview {
            background: #f8fafc;
            border-radius: 16px;
            padding: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 200px;
            border: 2px dashed #e5e7eb;
        }

        /* تحميل الصور */
        .image-upload {
            border: 2px dashed #e5e7eb;
            border-radius: 16px;
            padding: 30px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .image-upload:hover {
            border-color: #54a405;
            background: rgba(84,164,5,0.02);
        }

        .image-upload i {
            font-size: 2.5rem;
            color: #54a405;
            margin-bottom: 10px;
        }

        .image-preview {
            max-width: 100%;
            max-height: 200px;
            border-radius: 12px;
            margin-top: 15px;
        }

        /* التبويبات */
        .admin-tabs {
            display: flex;
            gap: 10px;
            margin-bottom: 25px;
            background: #f3f4f6;
            padding: 5px;
            border-radius: 50px;
            flex-wrap: wrap;
        }

        .admin-tab {
            padding: 10px 25px;
            border: none;
            background: transparent;
            border-radius: 50px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            color: #4b5563;
        }

        .admin-tab.active {
            background: #54a405;
            color: white;
        }

        /* رسائل النجاح والخطأ */
        .admin-alert {
            padding: 15px 25px;
            border-radius: 50px;
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            gap: 12px;
            font-weight: 600;
            animation: slideIn 0.3s ease;
        }

        .admin-alert.success {
            background: #d1fae5;
            color: #065f46;
        }

        .admin-alert.error {
            background: #fee2e2;
            color: #991b1b;
        }

        .admin-alert i {
            font-size: 1.2rem;
        }

        /* الترقيم (Pagination) */
        .pagination {
            display: flex;
            justify-content: center;
            gap: 10px;
            margin-top: 30px;
        }

        .page-btn {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            border: 1px solid #e5e7eb;
            background: white;
            color: #4b5563;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
        }

        .page-btn.active {
            background: #54a405;
            color: white;
            border-color: #54a405;
        }

        /* شارة الحالة */
        .status-badge {
            padding: 4px 12px;
            border-radius: 50px;
            font-size: 0.85rem;
            font-weight: 600;
            display: inline-block;
        }

        .status-badge.pending {
            background: #fef3c7;
            color: #92400e;
        }

        .status-badge.completed {
            background: #d1fae5;
            color: #065f46;
        }

        .status-badge.cancelled {
            background: #fee2e2;
            color: #991b1b;
        }

        /* للشاشات الصغيرة */
        @media (max-width: 992px) {
            .admin-sidebar {
                width: 80px;
            }
            
            .admin-menu li span {
                display: none;
            }
            
            .admin-menu li i {
                font-size: 1.4rem;
            }
            
            .admin-logo h3 {
                display: none;
            }
        }

        @media (max-width: 768px) {
            .admin-container {
                flex-direction: column;
            }
            
            .admin-sidebar {
                width: 100%;
                height: auto;
                padding: 10px;
            }
            
            .admin-menu {
                display: flex;
                overflow-x: auto;
            }
            
            .admin-menu li {
                white-space: nowrap;
            }
            
            .stats-grid {
                grid-template-columns: 1fr;
            }
            
            .appearance-grid {
                grid-template-columns: 1fr;
            }
        }

/* ===== Admin Utility Classes ===== */
.admin-card {
    background: var(--gray-light);
    padding: 20px;
    border-radius: var(--radius-sm);
}

.admin-input-field {
    width: 100%;
    padding: 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
}

.admin-input-field:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(84,164,5,0.1);
}

.admin-btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 16px 30px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
}

.admin-btn-primary:hover {
    background: var(--primary-light);
}

.admin-btn-outline {
    background: white;
    color: var(--dark);
    border: 1px solid var(--border);
    padding: 16px 30px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.coupon-section {
    background: var(--gray-light);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
}

.coupon-input-group {
    display: flex;
    gap: 10px;
}

.coupon-input-group input {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 16px;
    font-family: inherit;
}

.coupon-input-group button {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
}

.coupon-message {
    margin-top: 10px;
    padding: 8px 15px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
}

.coupon-message.success {
    background: #d1fae5;
    color: #065f46;
}

.coupon-message.error {
    background: var(--error-bg, #fee2e2);
    color: var(--error-text, #991b1b);
}

.wishlist-btn {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid #e5e5e5;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 3;
    color: #999;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body.english .wishlist-btn {
    left: auto;
    right: 8px;
}

.wishlist-btn.active {
    background: #54a405;
    border-color: #54a405;
    color: #fff;
}

.wishlist-btn:hover {
    border-color: #54a405;
    color: #54a405;
    transform: scale(1.08);
}

.wishlist-btn.active:hover {
    color: #fff;
}

.wishlist-btn:active {
    transform: scale(0.92);
}

@keyframes wlPop {
    0% { transform: scale(1); }
    40% { transform: scale(1.25); }
    100% { transform: scale(1); }
}

.data-management {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.data-management button {
    flex: 1;
    min-width: 200px;
}

/* =============================================
   COMPREHENSIVE RESPONSIVE — كل أحجام الشاشات
   ============================================= */

/* منع overflow أفقي */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}
img {
    max-width: 100%;
}

/* Safe Area — iPhone notch */
@supports (padding: env(safe-area-inset-top)) {
    header {
        padding-top: calc(15px + env(safe-area-inset-top));
    }
}

/* ===== زر القائمة — يظهر دائماً ===== */
#menuToggleBtn {
    display: flex !important;
}

/* ===== TABLET — 768px ===== */
@media (max-width: 768px) {

    /* الهيدر */
    header {
        padding: 12px 0 !important;
        border-bottom-width: 2px !important;
    }
    .header-content {
        padding: 0 15px !important;
    }
    .header-content img[src*="logo"] {
        width: 38px !important;
        height: 38px !important;
    }
    #menuToggleBtn {
        width: 38px !important;
        height: 38px !important;
        font-size: 1.15rem !important;
    }
    #cartIcon i, .fa-shopping-cart {
        font-size: 1.3rem !important;
    }
    #mainSearchInput {
        padding: 11px 40px 11px 15px !important;
        font-size: 14px !important;
    }
    /* شريط إحصائيات الأدمن */
    [style*="background:var(--primary);color:white;padding:6px"] {
        font-size: 10px !important;
        padding: 3px 8px !important;
    }

    /* السلايدر */
    .slider-container {
        margin: 10px 0 20px;
    }
    .slide {
        height: 250px;
    }
    .slide-content {
        padding: 20px 25px;
    }
    .slide-content h2 {
        font-size: 1.3rem;
    }
    .slide-content p {
        font-size: 0.85rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .slider-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    /* بطاقات المنتجات — Talabat style (base styles handle this now) */
    .product-title {
        font-size: 0.78rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    .product-desc {
        display: none !important;
    }
    .product-price {
        font-size: 0.85rem !important;
    }
    .old-price {
        font-size: 0.7rem !important;
    }
    .product-badge {
        font-size: 0.6rem !important;
        padding: 3px 8px !important;
    }
    .add-to-cart {
        padding: 6px 10px !important;
        font-size: 0.7rem !important;
        min-height: 34px !important;
        gap: 4px !important;
    }
    .add-to-cart i {
        font-size: 0.7rem !important;
    }

    /* تفاصيل المنتج */
    .product-details-page {
        padding: 20px;
    }
    .product-details-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .product-details-image img {
        height: 280px;
    }
    .product-details-title {
        font-size: 1.5rem;
    }
    .product-details-price {
        font-size: 1.8rem;
    }
    .product-details-actions {
        flex-direction: column;
        gap: 10px;
    }
    .product-details-actions button,
    .add-to-cart-btn,
    .pdf-btn {
        width: 100%;
        min-width: unset;
        justify-content: center;
    }

    /* السلة */
    .cart-page, .category-page, .checkout-page {
        padding: 15px;
        margin: 15px 0;
    }
    .cart-item {
        gap: 10px;
        padding: 12px;
    }
    .cart-item-img {
        width: 60px;
        height: 60px;
    }
    .cart-item-title {
        font-size: 0.85rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .quantity-btn {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    /* Checkout */
    .checkout-page input,
    .checkout-page select,
    .checkout-page textarea {
        font-size: 16px; /* يمنع zoom على iOS */
    }

    /* بانر العروض */
    .offers-banner {
        padding: 20px 15px;
        margin: 15px 0;
    }
    .offers-banner h2 {
        font-size: 1.2rem;
    }
    .offers-banner p {
        font-size: 0.85rem;
    }

    /* قسم الاتصال */
    .contact-section {
        padding: 20px;
        margin: 20px 0;
    }

    /* الفوتر */
    footer {
        padding: 20px 15px !important;
    }
    footer .container {
        padding: 0 !important;
    }
    .footer-content {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
        text-align: center !important;
    }
    footer h3, footer h4 {
        font-size: 1rem !important;
        margin-bottom: 8px !important;
    }
    footer p, footer a, footer li {
        font-size: 0.8rem !important;
        line-height: 1.6 !important;
    }
    footer ul {
        padding: 0 !important;
        list-style: none !important;
    }
    footer ul li {
        margin-bottom: 5px !important;
    }
    .footer-links {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 12px !important;
    }
    .social-icons {
        justify-content: center !important;
        gap: 15px !important;
    }
    .social-icons a, .social-icons i {
        font-size: 1.2rem !important;
    }
    footer .footer-bottom, footer [style*="border-top"] {
        padding-top: 12px !important;
        margin-top: 12px !important;
        font-size: 0.75rem !important;
    }
    .social-links-container {
        justify-content: center;
    }
    footer .social-icon {
        width: 36px !important;
        height: 36px !important;
        font-size: 0.9rem !important;
    }
    footer {
        padding-bottom: 80px !important;
    }

    /* Modals */
    .modal-content,
    [id$="Modal"] > div:first-child {
        width: 95vw;
        max-width: 95vw;
        max-height: 90vh;
        margin: 10px;
    }

    /* الإشعارات */
    .zaytoon-notif {
        max-width: calc(100vw - 20px);
        font-size: 0.85rem;
    }

        right: 15px;
    }

    /* section titles */
    .section-title {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }

    /* شوهد مؤخراً */
    #recentlyViewedContainer [style*="min-width:150px"] {
        min-width: 130px;
    }
}

/* ===== SMALL PHONES — 380px ===== */
@media (max-width: 380px) {
    .header-content {
        gap: 4px !important;
        padding: 0 8px !important;
    }
    .lang-btn {
        padding: 2px 6px !important;
        font-size: 0.6rem !important;
    }
    #mainSearchInput {
        font-size: 12px !important;
        height: 32px !important;
    }

    .slide {
        height: 200px;
    }
    .slide-content h2 {
        font-size: 1.1rem;
    }
    .slide-content p {
        font-size: 0.75rem;
    }

    .product-img {
        height: 100px !important;
    }
    .product-info {
        padding: 6px !important;
    }
    .product-title {
        font-size: 0.7rem !important;
    }
    .product-price {
        font-size: 0.8rem !important;
    }
    .add-to-cart {
        padding: 5px 8px !important;
        font-size: 0.65rem !important;
    }

    .promo-banner-image {
        height: 160px !important;
    }
    .promo-banner-text {
        padding: 8px !important;
    }
    .promo-banner-text h3 {
        font-size: 0.7rem !important;
    }

    body {
        font-size: 14px;
    }
    .section-title {
        font-size: 1.1rem;
    }

    .product-details-image img {
        height: 220px;
    }
    .product-details-title {
        font-size: 1.3rem;
    }

    /* فوتر 380px */
    footer {
        padding: 15px 10px !important;
    }
    footer h3, footer h4 {
        font-size: 0.9rem !important;
    }
    footer p, footer a, footer li {
        font-size: 0.75rem !important;
    }
    .social-icons a, .social-icons i {
        font-size: 1rem !important;
    }
}

/* ===== TINY SCREENS — 320px ===== */
@media (max-width: 320px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    .product-img {
        height: 100px;
    }
    .product-info {
        padding: 8px;
    }
}

/* ===== Invoice Mobile Responsive ===== */
@media (max-width: 768px) {
    #invoicePage [style*="max-width:800px"] {
        padding: 0 10px !important;
    }
    #invoiceContent [style*="padding:25px 30px"],
    #invoiceContent [style*="padding:20px 30px"],
    #invoiceContent [style*="padding:20px 25px"],
    #invoiceContent [style*="padding:15px 30px"],
    #invoiceContent [style*="padding:15px 25px"],
    #invoiceContent [style*="padding:0 30px"],
    #invoiceContent [style*="padding:0 25px"] {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    #invoiceContent [style*="grid-template-columns: 1fr 1fr"],
    #invoiceContent [style*="grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    #invoiceContent table {
        font-size: 0.7rem !important;
    }
    #invoiceContent th {
        padding: 8px 5px !important;
        font-size: 0.65rem !important;
    }
    #invoiceContent td {
        padding: 8px 5px !important;
        font-size: 0.7rem !important;
    }
    #invoiceContent td img {
        width: 30px !important;
        height: 30px !important;
    }
    #invoiceContent [style*="font-size:1.2rem"] {
        font-size: 0.95rem !important;
    }
    #invoiceContent [style*="font-size:1.1rem"] {
        font-size: 0.9rem !important;
    }
    #invoiceContent [style*="max-width:300px"],
    #invoiceContent [style*="max-width:280px"] {
        max-width: 100% !important;
    }
}

@media (max-width: 380px) {
    #invoiceContent [style*="padding:20px"],
    #invoiceContent [style*="padding:25px"] {
        padding: 10px !important;
    }
    #invoiceContent table {
        font-size: 0.65rem !important;
    }
    #invoiceContent th, #invoiceContent td {
        padding: 6px 3px !important;
    }
    #invoiceContent [style*="font-size:1.2rem"] {
        font-size: 0.85rem !important;
    }
    #invoiceContent [style*="gap:10px"] {
        gap: 5px !important;
    }
}

/* ===== Qty Control (Talabat style) ===== */
.qty-control {
    animation: fadeInScale 0.2s ease-out;
}
.qty-control button:active {
    opacity: 0.7;
}
@keyframes fadeInScale {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* زر أضف للسلة — حجم مناسب لكل الأجهزة */
.add-to-cart {
    min-height: 44px !important;
    padding: 10px 16px !important;
    font-size: 0.85rem !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
}

/* شريط الكمية */
.qty-control {
    min-height: 44px !important;
    border-radius: 12px !important;
}
.qty-control button {
    min-width: 44px !important;
    min-height: 44px !important;
    font-size: 1.2rem !important;
}
.qty-control span {
    min-width: 35px !important;
    font-size: 1rem !important;
}

@media (max-width: 768px) {
    .add-to-cart {
        min-height: 42px !important;
        padding: 8px 14px !important;
        font-size: 0.8rem !important;
        border-radius: 10px !important;
        width: 100% !important;
    }
    .qty-control {
        min-height: 42px !important;
        width: 100% !important;
        border-radius: 10px !important;
    }
    .qty-control button {
        min-width: 42px !important;
        min-height: 42px !important;
    }
}

@media (max-width: 380px) {
    .add-to-cart {
        min-height: 40px !important;
        padding: 7px 12px !important;
        font-size: 0.75rem !important;
    }
    .qty-control {
        min-height: 40px !important;
    }
    .qty-control button {
        min-width: 40px !important;
        min-height: 40px !important;
    }
}

/* ===== Cart Bottom Bar ===== */
@keyframes slideUpBar {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

#cartBottomBar {
    animation: slideUpBar 0.3s ease-out;
}

body.has-cart-bar {
    padding-bottom: 80px !important;
}

/* ===== Product Cards Mobile Compact ===== */
@media (max-width: 768px) {
    .product-img {
        height: 110px !important;
    }
    .product-info {
        padding: 8px !important;
    }
    .product-title {
        font-size: 0.78rem !important;
    }
    .product-price {
        font-size: 0.8rem !important;
    }
    .old-price {
        font-size: 0.65rem !important;
    }
    .product-badge {
        font-size: 0.55rem !important;
        padding: 2px 6px !important;
    }
    .add-to-cart {
        padding: 7px 10px !important;
        font-size: 0.72rem !important;
        min-height: 36px !important;
    }
    .product-desc {
        display: none !important;
    }
    .product-card > div[style*="background:linear-gradient(135deg,#ef4444"] {
        font-size: 0.6rem !important;
        padding: 3px 6px !important;
    }
}

@media (max-width: 380px) {
    .product-img {
        height: 90px !important;
    }
    .product-info {
        padding: 6px !important;
    }
    .product-title {
        font-size: 0.72rem !important;
    }
    .product-price {
        font-size: 0.75rem !important;
    }
    .add-to-cart {
        padding: 6px 8px !important;
        font-size: 0.68rem !important;
        min-height: 34px !important;
    }
}

/* ===== Product Details Mobile Compact ===== */
@media (max-width: 768px) {
    .product-details-image,
    .product-details-image img {
        max-height: 200px !important;
        border-radius: 12px !important;
    }
    .product-details-name,
    .product-details-info h2,
    .product-details-title {
        font-size: 1.1rem !important;
    }
    .product-details-price,
    .product-details-info [style*="font-size:2"] {
        font-size: 1.3rem !important;
    }
    .product-details-description,
    .product-details-description p {
        font-size: 0.82rem !important;
        line-height: 1.6 !important;
    }
    .product-details-description h3 {
        font-size: 0.9rem !important;
    }
    .product-details-actions {
        flex-direction: column !important;
        gap: 8px !important;
    }
    .product-details-actions button,
    .product-details-actions > div {
        width: 100% !important;
        padding: 10px !important;
        font-size: 0.8rem !important;
        min-height: 42px !important;
        border-radius: 10px !important;
    }
    .product-details-meta {
        font-size: 0.8rem !important;
    }
    .product-details-meta p {
        padding: 6px 0 !important;
        font-size: 0.78rem !important;
    }
    .similar-products-grid {
        gap: 8px !important;
    }
    .product-details-container {
        padding: 10px !important;
        gap: 10px !important;
    }
    .product-details-info {
        padding: 12px !important;
    }
    .product-details-info svg[id*="Barcode"] {
        max-width: 200px !important;
    }
}

@media (max-width: 380px) {
    .product-details-image,
    .product-details-image img {
        max-height: 170px !important;
    }
    .product-details-name,
    .product-details-info h2,
    .product-details-title {
        font-size: 1rem !important;
    }
    .product-details-price {
        font-size: 1.1rem !important;
    }
    .product-details-actions button,
    .product-details-actions > div {
        padding: 8px !important;
        font-size: 0.75rem !important;
    }
}

/* ===== Similar Products ===== */
.similar-products-section {
    padding: 0 15px;
    margin-top: 25px;
    margin-bottom: 20px;
}
.similar-products-title {
    font-size: 16px;
    font-weight: 700;
    color: #2d3436;
    margin: 0 0 12px;
}
.similar-products-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 0 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.similar-products-scroll::-webkit-scrollbar {
    display: none;
}
.similar-products-scroll {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.similar-product-card {
    min-width: 140px;
    max-width: 140px;
    flex-shrink: 0;
    scroll-snap-align: start;
    cursor: pointer;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    transition: transform 0.2s;
}
.similar-product-card:active {
    transform: scale(0.97);
}
.similar-product-img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: block;
    border-radius: 8px 8px 0 0;
}
.similar-product-name {
    font-size: 13px;
    font-weight: 600;
    color: #2d3436;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.similar-product-price {
    font-size: 13px;
    font-weight: 700;
    color: #54a405;
    margin-top: 3px;
}

/* Similar scroll — hide scrollbar */
.similar-scroll::-webkit-scrollbar { display: none; }
.similar-scroll { -ms-overflow-style: none; scrollbar-width: none; }

/* Offers / related section same compact style */
@media (max-width: 768px) {
    .related-products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
}

/* ===== Category Toolbar (Search + Sort) ===== */
.category-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    align-items: center;
    flex-wrap: wrap;
}
.category-search-wrap {
    flex: 1;
    min-width: 180px;
    position: relative;
}
.category-search-wrap i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 0.85rem;
    pointer-events: none;
}
body[dir="ltr"] .category-search-wrap i,
body.english .category-search-wrap i {
    right: auto;
    left: 12px;
}
.category-search-wrap input {
    width: 100%;
    padding: 10px 36px 10px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    transition: border 0.2s;
    box-sizing: border-box;
}
body[dir="ltr"] .category-search-wrap input,
body.english .category-search-wrap input {
    padding: 10px 14px 10px 36px;
}
.category-search-wrap input:focus {
    border-color: #54a405;
}
.category-sort {
    padding: 10px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.82rem;
    font-family: inherit;
    outline: none;
    background: white;
    min-width: 130px;
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 20px 0 10px;
    flex-wrap: wrap;
    direction: ltr;
}
.page-btn {
    width: 36px;
    height: 36px;
    border: 1.5px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    font-family: inherit;
}
.page-btn:hover {
    border-color: #54a405;
    color: #54a405;
}
.page-btn.active {
    background: #54a405;
    color: white;
    border-color: #54a405;
}
.page-dots {
    color: #999;
    font-size: 0.85rem;
    padding: 0 4px;
}
.pagination-info {
    text-align: center;
    font-size: 0.75rem;
    color: #999;
    margin-bottom: 15px;
}
@media (max-width: 380px) {
    .page-btn {
        width: 32px;
        height: 32px;
        font-size: 0.78rem;
    }
    .category-toolbar {
        flex-direction: column;
    }
    .category-sort {
        width: 100%;
    }
}

/* ===== Hero Slider (Dynamic) ===== */
.hero-slider {
    position: relative;
    width: calc(100% - 24px);
    height: 200px;
    overflow: hidden;
    border-radius: 16px;
    margin: 10px 12px 16px;
}
.slider-track {
    position: relative;
    width: 100%;
    height: 100%;
}
.slider-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.slider-slide.active {
    opacity: 1;
    z-index: 1;
}
.slider-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 16px 16px;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
    color: white;
    text-align: center;
}
.slider-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 4px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.slider-desc {
    font-size: 0.8rem;
    margin: 0;
    opacity: 0.9;
}
.slider-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 5;
}
.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.2s;
}
.slider-dot.active {
    background: white;
    width: 20px;
    border-radius: 4px;
}
@media (min-width: 769px) {
    .hero-slider {
        height: 300px;
        border-radius: 20px;
        margin: 15px 20px 20px;
        width: calc(100% - 40px);
    }
    .slider-title { font-size: 1.5rem; }
}
@media (max-width: 380px) {
    .hero-slider {
        height: 160px;
        border-radius: 12px;
        margin: 8px 8px 12px;
        width: calc(100% - 16px);
    }
}

/* ===== Hero Full Width Image ===== */
.hero-fullwidth {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    min-height: 450px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

.hero-text-wrap {
    position: relative;
    z-index: 2;
    padding: 30px 24px;
    max-width: 55%;
    text-align: right;
    margin-right: 0;
    margin-left: auto;
    box-sizing: border-box;
}

.hero-badge-tag {
    display: inline-block;
    background: #f5c518;
    color: #1a1a1a;
    padding: 5px 14px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.hero-big-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    line-height: 1.2;
    margin: 0 0 10px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero-big-desc {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.9);
    line-height: 1.5;
    margin: 0 0 18px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.hero-big-btn {
    display: inline-block;
    background: #1a1a1a;
    color: white;
    padding: 12px 28px;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    letter-spacing: 0.3px;
    transition: all 0.15s;
}

.hero-big-btn:hover {
    background: #333;
}

.hero-big-btn:active {
    transform: scale(0.97);
}

@media (min-width: 769px) {
    .hero-fullwidth {
        min-height: 550px;
        margin-bottom: 24px;
    }
    .hero-text-wrap {
        padding: 60px 80px;
        max-width: 50%;
    }
    .hero-big-title {
        font-size: 3.2rem;
    }
    .hero-big-desc {
        font-size: 1.1rem;
        max-width: 450px;
    }
    .hero-big-btn {
        padding: 16px 40px;
        font-size: 1.05rem;
    }
    .hero-badge-tag {
        font-size: 0.85rem;
        padding: 7px 20px;
        margin-bottom: 16px;
    }
}

@media (min-width: 1200px) {
    .hero-fullwidth {
        min-height: 650px;
        margin-bottom: 30px;
    }
    .hero-big-title {
        font-size: 3.8rem;
    }
    .hero-big-desc {
        font-size: 1.15rem;
    }
}

@media (max-width: 768px) {
    .hero-fullwidth {
        min-height: 400px;
        margin-bottom: 12px;
        width: 100vw;
        margin-left: calc(-50vw + 50%);
    }
    .hero-text-wrap {
        max-width: 100%;
        padding: 24px 20px;
        margin: auto;
        text-align: center;
    }
    .hero-big-title {
        font-size: 1.6rem;
    }
    .hero-big-desc {
        font-size: 0.82rem;
    }
}

@media (max-width: 380px) {
    .hero-fullwidth {
        min-height: 350px;
        margin-bottom: 10px;
    }
    .hero-big-title {
        font-size: 1.3rem;
    }
    .hero-big-btn {
        padding: 10px 20px;
        font-size: 0.8rem;
    }
}

/* ===== Brands Ticker ===== */
.bt-wrap {
    overflow: hidden;
    background: #fafbfc;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    margin-top: 14px;
    margin-bottom: 18px;
    -webkit-mask-image: linear-gradient(to right, transparent, black 30px, black calc(100% - 30px), transparent);
    mask-image: linear-gradient(to right, transparent, black 30px, black calc(100% - 30px), transparent);
}

.bt-track {
    display: flex;
    width: max-content;
    animation: btScroll 40s linear infinite;
}

@keyframes btScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes btScrollRTL {
    0% { transform: translateX(0); }
    100% { transform: translateX(50%); }
}

[dir="rtl"] .bt-track,
html[dir="rtl"] .bt-track,
body[dir="rtl"] .bt-track {
    animation-name: btScrollRTL;
}

.bt-group {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.bt-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    flex-shrink: 0;
}

.bt-icon {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.bt-logo {
    height: 30px;
    max-width: 70px;
    object-fit: contain;
    flex-shrink: 0;
}

.bt-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: #1a1a2e;
    white-space: nowrap;
}

@media (min-width: 769px) {
    .bt-wrap {
        margin-top: 20px;
        margin-bottom: 24px;
        -webkit-mask-image: linear-gradient(to right, transparent, black 50px, black calc(100% - 50px), transparent);
        mask-image: linear-gradient(to right, transparent, black 50px, black calc(100% - 50px), transparent);
    }
    .bt-item {
        padding: 16px 28px;
        gap: 10px;
    }
    .bt-icon {
        width: 36px;
        height: 36px;
        font-size: 15px;
    }
    .bt-logo {
        height: 36px;
        max-width: 90px;
    }
    .bt-name {
        font-size: 0.92rem;
        color: #1a1a2e;
    }
}

@media (min-width: 1200px) {
    .bt-item {
        padding: 18px 34px;
        gap: 12px;
    }
    .bt-icon {
        width: 40px;
        height: 40px;
    }
    .bt-logo {
        height: 40px;
        max-width: 100px;
    }
    .bt-name {
        font-size: 1rem;
        color: #1a1a2e;
    }
}

@media (max-width: 380px) {
    .bt-item {
        padding: 10px 14px;
        gap: 6px;
    }
    .bt-icon {
        width: 24px;
        height: 24px;
        font-size: 11px;
        border-radius: 5px;
    }
    .bt-logo {
        height: 24px;
        max-width: 55px;
    }
    .bt-name {
        font-size: 0.72rem;
        color: #1a1a2e;
    }
}

/* ===== Out of Stock ===== */
.product-card.out-of-stock {
    opacity: 0.6;
}

.product-card.out-of-stock img {
    filter: grayscale(100%);
}

.product-card.out-of-stock .product-title,
.product-card.out-of-stock .product-name {
    color: #9ca3af !important;
}

.product-card.out-of-stock .product-price {
    color: #9ca3af !important;
}

.oos-btn {
    background: #e5e7eb !important;
    color: #9ca3af !important;
    cursor: not-allowed !important;
}

/* ===== Scroll to Top Button =====
 * Positioned ABOVE the WhatsApp floating button.
 * WhatsApp float lives at bottom:20px and is 56px tall, so its top
 * edge sits at 76px from the bottom. We place the scroll-top button
 * at bottom: 88px (12px gap) so the two never visually overlap.
 * They share `left:20px` so they line up vertically.
 */
.scroll-top-btn {
    position: fixed;
    bottom: 88px;            /* above WhatsApp: 20 + 56 + 12 gap */
    left: 26px;              /* centered over 56px WhatsApp btn at left:20 */
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #54a405;
    color: white;
    border: none;
    font-size: 16px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 4001;
}

.scroll-top-btn:active {
    transform: scale(0.92);
}

@media (min-width: 769px) {
    .scroll-top-btn {
        bottom: 90px;
        left: 23px;
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .scroll-top-btn {
        bottom: 86px;
        left: 28px;
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
}

/* ===== Header Search Button ===== */
.header-search-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: #2d3436;
    cursor: pointer;
    padding: 6px;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== Header Search Bar ===== */
.header-search-bar {
    max-height: 0;
    overflow: hidden;
    background: white;
    border-bottom: 1px solid #f0f0f0;
    transition: max-height 0.3s ease;
}

.header-search-bar.open {
    max-height: 200px;
    overflow: visible;
}

.header-search-inner {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    gap: 10px;
}

.header-search-input {
    flex: 1;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.88rem;
    font-family: inherit;
    outline: none;
    background: #f8f9fa;
    transition: border-color 0.2s;
}

.header-search-input:focus {
    border-color: #54a405;
    background: white;
}

.header-search-close {
    background: none;
    border: none;
    font-size: 16px;
    color: #999;
    cursor: pointer;
    padding: 6px;
}

.header-search-dropdown {
    display: none;
    background: white;
    border-top: 1px solid #f0f0f0;
    max-height: 350px;
    overflow-y: auto;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

@media (min-width: 769px) {
    .header-search-btn {
        font-size: 20px;
    }
    .header-search-inner {
        max-width: 600px;
        margin: 0 auto;
        padding: 12px 24px;
    }
    .header-search-input {
        padding: 12px 18px;
        font-size: 0.95rem;
    }
    .header-search-dropdown {
        max-width: 600px;
        margin: 0 auto;
    }
}

/* ===== Policy Pages ===== */
.policy-page {
    padding: 20px 16px;
    max-width: 800px;
    margin: 0 auto;
}

.policy-back {
    background: none;
    border: none;
    color: #54a405;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
}

.policy-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3436;
    margin: 0 0 6px;
}

.policy-date {
    font-size: 0.78rem;
    color: #999;
    margin: 0 0 24px;
}

.policy-page h2 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #54a405;
    margin: 24px 0 8px;
}

.policy-page p {
    font-size: 0.88rem;
    color: #555;
    line-height: 1.8;
    margin: 0 0 12px;
}

@media (min-width: 769px) {
    .policy-page {
        padding: 40px 60px;
    }
    .policy-title {
        font-size: 2rem;
    }
    .policy-page h2 {
        font-size: 1.2rem;
    }
    .policy-page p {
        font-size: 0.95rem;
    }
}

/* ===== Contact + Map side-by-side — Desktop only ===== */
@media (min-width: 769px) {
    .contact-map-wrapper {
        display: flex;
        gap: 30px;
        align-items: stretch;
    }
    .contact-form-side {
        flex: 1;
        min-width: 45%;
        display: flex;
        flex-direction: column;
    }
    .contact-form-side .contact-section {
        flex: 1;
    }
    .map-side {
        flex: 1;
        min-width: 45%;
        display: flex;
        flex-direction: column;
    }
    .map-side iframe {
        width: 100%;
        height: 100%;
        min-height: 300px;
        border-radius: 14px 14px 0 0;
    }
}

/* Mobile — stacked as before */
@media (max-width: 768px) {
    .contact-map-wrapper {
        display: block;
    }
    .map-side {
        margin-bottom: 20px;
    }
}

/* ===== Map + Contact form side-by-side (new layout) ===== */
.map-contact-row {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.map-contact-col {
    flex: 1;
    min-width: 0;
}
@media (min-width: 769px) {
    .map-contact-row {
        flex-direction: row;
        gap: 24px;
        align-items: stretch;
    }
    .map-contact-col {
        flex: 1;
        min-width: 0;
    }
}

/* =============================================
 * Site footer — mobile redesign (≤480px)
 * ----------------------------------------------
 * The footer markup uses heavy inline styles, so we override
 * with !important. Inline styles have specificity 1000 — there
 * is no other way to override them from a stylesheet. This is
 * the documented escape hatch from the phase-2 cleanup notes
 * ("style-attribute overrides" category).
 *
 * Goals on mobile (320–430px):
 *   - one column, comfortable reading width
 *   - tighter, consistent vertical rhythm using --space tokens
 *   - smaller titles via --fs tokens
 *   - social icons in a single equal row, fully centered
 *   - contact rows with aligned icon + text
 *   - newsletter input + button stacked when very narrow
 * ============================================= */
@media (max-width: 480px) {
    .site-footer {
        padding: var(--space-8) 0 0 !important;
        margin-top: var(--space-5) !important;
    }
    .site-footer .sf-container {
        padding: 0 var(--space-4) !important;
    }
    .site-footer .sf-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: var(--space-6) !important;
        padding-bottom: var(--space-6) !important;
    }
    .site-footer .sf-col {
        text-align: start;
    }

    /* Section titles */
    .site-footer .sf-title {
        font-size: var(--fs-base) !important;
        margin: 0 0 var(--space-3) !important;
        padding-bottom: var(--space-2) !important;
    }

    /* About column — center the brand block on mobile */
    .site-footer .sf-col-about > div:first-child {
        justify-content: flex-start !important;
        margin-bottom: var(--space-3) !important;
    }
    .site-footer .sf-col-about p {
        font-size: var(--fs-sm) !important;
        line-height: var(--lh-relaxed) !important;
        margin: 0 0 var(--space-4) !important;
    }

    /* Social row — equal-width icons in a single line */
    .site-footer .sf-social {
        display: flex !important;
        gap: var(--space-3) !important;
        justify-content: flex-start !important;
        flex-wrap: nowrap !important;
    }
    .site-footer .sf-social-link {
        width: 38px !important;
        height: 38px !important;
        flex: 0 0 38px !important;
        font-size: var(--fs-base) !important;
        border-radius: var(--radius-full) !important;
    }

    /* Quick links — slightly looser tap targets */
    .site-footer .sf-links li {
        margin-bottom: var(--space-2) !important;
    }
    .site-footer .sf-links a {
        font-size: var(--fs-sm) !important;
        display: inline-flex !important;
        align-items: center !important;
        padding: var(--space-1) 0 !important;
        min-height: 32px !important;
    }

    /* Contact list — uniform icon column + text alignment */
    .site-footer .sf-contact-list {
        gap: var(--space-3) !important;
    }
    .site-footer .sf-contact-list > * {
        font-size: var(--fs-sm) !important;
        align-items: center !important;
        gap: var(--space-3) !important;
        line-height: var(--lh-snug) !important;
    }
    .site-footer .sf-contact-list i {
        width: 18px !important;
        font-size: var(--fs-base) !important;
        text-align: center !important;
        flex-shrink: 0 !important;
        margin-top: 0 !important;
    }
    /* Address & hours rows wrap text — keep icon centered with first line */
    .site-footer .sf-contact-list > div {
        align-items: flex-start !important;
    }
    .site-footer .sf-contact-list > div i {
        margin-top: 2px !important;
    }

    /* Newsletter — compact */
    .site-footer .sf-col-newsletter .sf-newsletter-desc {
        font-size: var(--fs-xs) !important;
        margin: 0 0 var(--space-2) !important;
    }
    .site-footer .sf-newsletter-form {
        gap: var(--space-2) !important;
        flex-direction: row !important;
    }
    .site-footer .sf-newsletter-input {
        padding: var(--space-2) var(--space-3) !important;
        font-size: var(--fs-sm) !important;
        border-radius: var(--radius-xs) !important;
        min-width: 0 !important;
    }
    .site-footer .sf-newsletter-btn {
        padding: var(--space-2) var(--space-4) !important;
        font-size: var(--fs-sm) !important;
        border-radius: var(--radius-xs) !important;
    }

    /* Bottom bar */
    .site-footer .sf-bottom {
        padding: var(--space-3) 0 var(--space-4) !important;
        gap: var(--space-2) !important;
        justify-content: center !important;
        text-align: center !important;
    }
    .site-footer .sf-bottom > div {
        font-size: var(--fs-xs) !important;
        flex: 1 1 100%;
    }
}

/* =============================================
 * Phase 7 — Product card polish
 * Appended at end so it wins via source order (no !important).
 * Uses design tokens (--space, --fs, --radius, --fw).
 * ============================================= */
.product-card {
    border-radius: var(--radius-md);
    box-shadow: 0 2px 8px rgba(45, 62, 80, 0.06),
                0 1px 3px rgba(45, 62, 80, 0.04);
    border: 1px solid rgba(229, 231, 235, 0.6);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.25s ease;
    will-change: transform;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 14px 32px rgba(45, 62, 80, 0.10),
        0 4px 12px rgba(84, 164, 5, 0.08);
    border-color: rgba(84, 164, 5, 0.25);
}
@media (min-width: 769px) {
    .product-card:hover {
        transform: translateY(-6px);
    }
}
/* Image — rounded top corners, subtle inner accent on hover */
.product-card .product-img,
.product-card img.product-img {
    border-top-left-radius: var(--radius-md);
    border-top-right-radius: var(--radius-md);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.product-card:hover .product-img,
.product-card:hover img.product-img {
    transform: scale(1.04);
}
.product-card {
    overflow: hidden;
}

/* Discount badge — vivid, pill-shaped, top-start corner */
.product-card .product-badge.product-offer {
    background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
    color: #fff;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--fs-xs);
    font-weight: var(--fw-extrabold);
    letter-spacing: 0.3px;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
    display: inline-flex;
    align-items: center;
    gap: 3px;
    z-index: 3;
}
/* Generic badge — primary tone */
.product-card .product-badge:not(.product-offer) {
    background: var(--primary);
    color: #fff;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    box-shadow: 0 3px 10px rgba(84, 164, 5, 0.3);
}

/* Price block — bigger, with tabular figures */
.product-card .product-price {
    font-size: var(--fs-lg);
    font-weight: var(--fw-extrabold);
    color: var(--primary);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.2px;
    margin-bottom: var(--space-3);
}
.product-card .old-price {
    font-size: var(--fs-xs);
    color: var(--gray);
    margin-inline-start: var(--space-2);
}

/* Title — slightly larger, tighter line height */
.product-card .product-title {
    font-size: var(--fs-base);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-snug);
    color: #1f2937;
}

/* Add-to-cart button — gradient + lift */
.product-card .add-to-cart,
.product-card .cart-add-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: var(--space-3) 0;
    font-weight: var(--fw-bold);
    font-size: var(--fs-sm);
    letter-spacing: 0.2px;
    margin: var(--space-1) var(--space-3) var(--space-3);
    width: calc(100% - var(--space-6));
    box-shadow: 0 4px 12px rgba(84, 164, 5, 0.22);
    transition: transform 0.2s ease, box-shadow 0.25s ease, filter 0.2s ease;
}
.product-card .add-to-cart:hover,
.product-card .cart-add-btn:hover {
    filter: brightness(1.06);
    box-shadow: 0 8px 20px rgba(84, 164, 5, 0.32);
    transform: translateY(-1px);
}
.product-card .add-to-cart:active,
.product-card .cart-add-btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(84, 164, 5, 0.25);
}

/* Out-of-stock state */
.product-card.out-of-stock {
    opacity: 0.78;
    filter: saturate(0.7);
}
.product-card.out-of-stock:hover {
    transform: none;
}

/* =============================================
 * Phase 7 — Checkout page polish
 * Scoped to .checkout-page so it can't leak.
 * Some inline styles need !important overrides.
 * ============================================= */
.checkout-page .co-card {
    border-radius: var(--radius-md) !important;
    border: 1px solid rgba(229, 231, 235, 0.6);
    box-shadow:
        0 2px 8px rgba(45, 62, 80, 0.05),
        0 1px 3px rgba(45, 62, 80, 0.03) !important;
    padding: var(--space-5) !important;
}
.checkout-page .co-info {
    position: relative;
}
.checkout-page .co-info::before {
    content: "";
    display: block;
    height: 4px;
    width: 48px;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    margin-bottom: var(--space-4);
}

/* Form labels — slightly bigger, with subtle weight */
.checkout-page .co-info label {
    font-size: var(--fs-xs) !important;
    font-weight: var(--fw-semibold) !important;
    color: #4b5563 !important;
    margin-bottom: var(--space-2) !important;
    display: flex !important;
    align-items: center !important;
    gap: var(--space-2);
}
/* Inject icons before each top-level field label via attribute selectors
 * on the input that follows. We can't easily target labels, so use
 * adjacent inputs by id. */
.checkout-page #labName,
.checkout-page #labPhone,
.checkout-page #labAddress,
.checkout-page #labLandmark,
.checkout-page #couponInput {
    padding: var(--space-3) var(--space-4) !important;
    border-radius: var(--radius-sm) !important;
    border: 1.5px solid var(--border) !important;
    font-size: var(--fs-base) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
    background: #fafbfc !important;
}
.checkout-page #labName:focus,
.checkout-page #labPhone:focus,
.checkout-page #labAddress:focus,
.checkout-page #labLandmark:focus,
.checkout-page #couponInput:focus {
    border-color: var(--primary) !important;
    background: #fff !important;
    box-shadow: 0 0 0 4px rgba(84, 164, 5, 0.12) !important;
}

/* Pseudo-icon hooks via labels — relies on browser supporting :has(). */
.checkout-page .co-info > div {
    margin-bottom: var(--space-4) !important;
}
.checkout-page .co-info > div:has(#labName) > label::before  { content: "\f0fa"; font-family: "Font Awesome 6 Free"; font-weight: 900; color: var(--primary); }
.checkout-page .co-info > div:has(#labPhone) > label::before { content: "\f095"; font-family: "Font Awesome 6 Free"; font-weight: 900; color: var(--primary); }
.checkout-page .co-info > div:has(#labAddress) > label::before { content: "\f3c5"; font-family: "Font Awesome 6 Free"; font-weight: 900; color: var(--primary); }
.checkout-page .co-info > div:has(#labLandmark) > label::before { content: "\f041"; font-family: "Font Awesome 6 Free"; font-weight: 900; color: var(--primary); }
.checkout-page .co-info > div:has(#couponInput) > label::before { content: "\f02b"; font-family: "Font Awesome 6 Free"; font-weight: 900; color: var(--primary); }

/* Section divider becomes a subtle gradient line */
.checkout-page .co-info > div[style*="height:1px"] {
    height: 1px !important;
    background: linear-gradient(90deg, transparent, rgba(84,164,5,0.35), transparent) !important;
    margin: var(--space-5) 0 !important;
}

/* Payment method labels — bigger tap target, smoother transition */
.checkout-page #paymentCash,
.checkout-page #paymentCard,
.checkout-page #paymentZain,
.checkout-page #paymentMaster {
    padding: var(--space-4) var(--space-3) !important;
    border-radius: var(--radius-sm) !important;
    transition: transform 0.15s ease, border-color 0.2s ease, background 0.25s ease !important;
}
.checkout-page #paymentCash:active,
.checkout-page #paymentCard:active {
    transform: scale(0.98);
}

/* Coupon apply button */
.checkout-page button[onclick*="applyCoupon"] {
    border-radius: var(--radius-sm) !important;
    padding: var(--space-3) var(--space-5) !important;
    box-shadow: 0 4px 12px rgba(84, 164, 5, 0.22);
    transition: transform 0.15s ease, box-shadow 0.2s ease !important;
}
.checkout-page button[onclick*="applyCoupon"]:hover {
    transform: translateY(-1px);
}

/* Order summary card */
.checkout-page .co-summary {
    padding: var(--space-5) !important;
}
.checkout-page .co-summary-title {
    color: var(--primary) !important;
    font-size: var(--fs-xs) !important;
    font-weight: var(--fw-extrabold) !important;
    margin-bottom: var(--space-3) !important;
}
.checkout-page .co-summary > div {
    font-variant-numeric: tabular-nums;
}

/* Confirm order button — bold gradient with lift */
.checkout-page #confirmOrderBtn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%) !important;
    border-radius: var(--radius-md) !important;
    padding: var(--space-4) !important;
    box-shadow: 0 8px 24px rgba(84, 164, 5, 0.32) !important;
    transition: transform 0.15s ease, box-shadow 0.25s ease, filter 0.2s ease !important;
    margin-top: var(--space-4) !important;
}
.checkout-page #confirmOrderBtn:hover:not(:disabled) {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 12px 32px rgba(84, 164, 5, 0.4) !important;
}

/* =============================================
 * Phase 7 / 7.1 / 7.2 / 7.3 — Auth page polish: ALL DELETED.
 * The auth page now uses ONLY its original styles defined
 * around line 650 (`.auth-container`, `.tab-buttons`, `.tab-btn`,
 * `.input-icon`, `.auth-btn`, etc.). No overrides here.
 * ============================================= */

/* =============================================
 * Phase 7 — Micro-interactions
 * Page fade-in, ripple effect, cart bounce.
 * Honors prefers-reduced-motion.
 * ============================================= */
@keyframes mi-fade-in {
    from { opacity: 0.95; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes mi-cart-pop {
    0%   { transform: scale(1); }
    30%  { transform: scale(1.25) rotate(-8deg); }
    60%  { transform: scale(0.9) rotate(4deg); }
    100% { transform: scale(1) rotate(0deg); }
}
@keyframes mi-ripple {
    to {
        transform: scale(2.4);
        opacity: 0;
    }
}

/* Page-level fade-in: any direct content of #mainWebsite gets a soft
 * fade up when re-rendered. The class is added by JS after each render. */
.mi-fade-in {
    animation: mi-fade-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Cart icon bounce when an item is added (class added briefly by JS). */
#cartIcon.mi-bounce,
.cart-icon.mi-bounce {
    animation: mi-cart-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: center;
}

/* Generic ripple — anchor inside any button. The button must have
 * position:relative + overflow:hidden which we apply via this class. */
.mi-rippleable {
    position: relative;
    overflow: hidden;
}
.mi-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    pointer-events: none;
    transform: scale(0);
    animation: mi-ripple 0.6s ease-out;
    will-change: transform, opacity;
    mix-blend-mode: overlay;
}

/* Smooth section transitions for inline links/buttons in the storefront */
button, a {
    transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {
    .mi-fade-in,
    #cartIcon.mi-bounce,
    .cart-icon.mi-bounce,
    .mi-ripple {
        animation: none !important;
    }
}

/* Phase 7.1 — Auth page mobile fix: ALL DELETED. Auth page reverted. */

/* Very small phones (≤360px — iPhone SE 1st gen, old Samsungs):
 * stack the newsletter form and shrink social icons further so
 * nothing horizontally overflows. */
@media (max-width: 360px) {
    .site-footer .sf-container {
        padding: 0 var(--space-3) !important;
    }
    .site-footer .sf-newsletter-form {
        flex-direction: column !important;
    }
    .site-footer .sf-newsletter-btn {
        width: 100% !important;
    }
    .site-footer .sf-social-link {
        width: 36px !important;
        height: 36px !important;
        flex-basis: 36px !important;
    }
    .site-footer .sf-social {
        gap: var(--space-2) !important;
    }
}

/* =============================================
 * Status & utility classes
 * Use these instead of raw hex in JS inline styles.
 * Source of truth for status colors: :root --success/--error/--warning/--info
 * ============================================= */
.text-success { color: var(--success); }
.text-error   { color: var(--error); }
.text-warning { color: var(--warning); }
.text-info    { color: var(--info); }
.text-accent  { color: var(--accent); }
.text-primary { color: var(--primary); }
.text-muted   { color: var(--gray); }

.bg-success { background-color: var(--success); color: #fff; }
.bg-error   { background-color: var(--error);   color: #fff; }
.bg-warning { background-color: var(--warning); color: #fff; }
.bg-info    { background-color: var(--info);    color: #fff; }

.badge-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-snug);
}

/* Stock indicator helper (replaces inline ternary hex in admin) */
.stock-ok  { color: var(--success); font-weight: var(--fw-bold); }
.stock-low { color: var(--accent);  font-weight: var(--fw-bold); }

/* =============================================
 * Breadcrumbs
 * ============================================= */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 14px;
    margin: 0 0 12px;
    background: #fff;
    border-radius: var(--radius-sm);
    font-size: var(--fs-xs);
    color: var(--gray);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    font-weight: var(--fw-semibold);
    cursor: pointer;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .crumb-sep {
    color: var(--border);
    margin: 0 2px;
    font-size: 0.75rem;
}
.breadcrumb .crumb-current {
    color: var(--text, #2d3e50);
    font-weight: var(--fw-semibold);
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =============================================
 * Unified button loading state (disabled + spinner)
 * Usage: btn.classList.add('is-loading'); btn.disabled = true;
 * Or call setBtnLoading(btn, true) from JS.
 * ============================================= */
.btn-loading,
button.is-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
    cursor: not-allowed;
}
.btn-loading::after,
button.is-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btn-spin 0.7s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }
button:disabled:not(.is-loading) { opacity: 0.6; cursor: not-allowed; }

/* =============================================
 * Toast notifications (unified)
 * Replaces ad-hoc notif styling in JS.
 * ============================================= */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    width: min(92%, 420px);
}
.toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text, #2d3e50);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-inline-start: 4px solid var(--gray);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    animation: toast-in 0.25s ease-out;
}
.toast.toast-success { border-inline-start-color: var(--success); }
.toast.toast-error   { border-inline-start-color: var(--error); }
.toast.toast-warning { border-inline-start-color: var(--warning); }
.toast.toast-info    { border-inline-start-color: var(--info); }
.toast .toast-icon { font-size: 1.1rem; flex-shrink: 0; }
.toast.toast-success .toast-icon { color: var(--success); }
.toast.toast-error   .toast-icon { color: var(--error); }
.toast.toast-warning .toast-icon { color: var(--warning); }
.toast.toast-info    .toast-icon { color: var(--info); }
.toast .toast-msg { flex: 1; line-height: 1.4; }
.toast.toast-out { animation: toast-out 0.25s ease-in forwards; }
@keyframes toast-in  { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-out { to   { opacity: 0; transform: translateY(-12px); } }
@media (prefers-reduced-motion: reduce) {
    .toast, .toast.toast-out { animation: none; }
}

/* =============================================
 * Password show/hide toggle
 * ============================================= */
.password-wrap { position: relative; }
.password-wrap input { padding-inline-end: 44px !important; }
.password-toggle {
    position: absolute;
    top: 50%;
    inset-inline-end: 12px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    font-size: 1rem;
    padding: 6px;
    line-height: 1;
    min-width: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.password-toggle:hover { color: var(--primary); }

/* =============================================
 * Blur-up image placeholders (LQIP-style)
 * Wrap an <img> in <span class="img-blur-up"> and the
 * image starts hidden over a shimmery blurred background.
 * Once it loads, JS adds .is-loaded which fades it in.
 * Use with the renderBlurUpImage() helper in store-core.js.
 * ============================================= */
.img-blur-up {
    position: relative;
    display: block;
    overflow: hidden;
    background:
        linear-gradient(135deg,
            rgba(84, 164, 5, 0.08) 0%,
            rgba(101, 184, 24, 0.04) 50%,
            rgba(84, 164, 5, 0.08) 100%);
    background-size: 200% 200%;
    animation: blur-up-shimmer 1.6s ease-in-out infinite;
}
.img-blur-up > img,
.img-blur-up > picture > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.04);
    filter: blur(8px);
    transition: opacity 0.45s ease, filter 0.6s ease, transform 0.6s ease;
}
.img-blur-up.is-loaded {
    background: transparent;
    animation: none;
}
.img-blur-up.is-loaded > img,
.img-blur-up.is-loaded > picture > img {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
}
.img-blur-up.is-error {
    background: var(--gray-light, #f3f4f6);
    animation: none;
}
.img-blur-up.is-error > img,
.img-blur-up.is-error > picture > img { opacity: 0; }
@keyframes blur-up-shimmer {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}
@media (prefers-reduced-motion: reduce) {
    .img-blur-up { animation: none; }
    .img-blur-up > img,
    .img-blur-up > picture > img { transition: opacity 0.2s ease; transform: none; filter: none; }
}

/* =============================================
 * Skeleton screens for product cards.
 * Used while products are loading instead of a
 * spinner — preserves layout and reduces CLS.
 * ============================================= */
@keyframes skeleton-shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

.product-skeleton {
    background: #fff;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
}

.skeleton-shimmer {
    background: linear-gradient(90deg, #eef0f3 0%, #f7f8fa 50%, #eef0f3 100%);
    background-size: 800px 100%;
    animation: skeleton-shimmer 1.4s linear infinite;
}

.product-skeleton .sk-img {
    width: 100%;
    aspect-ratio: 1 / 1;
}
.product-skeleton .sk-body { padding: var(--space-3); }
.product-skeleton .sk-line {
    height: 12px;
    border-radius: 6px;
    margin-bottom: 8px;
}
.product-skeleton .sk-line.sk-title { width: 80%; height: 14px; }
.product-skeleton .sk-line.sk-desc  { width: 60%; }
.product-skeleton .sk-line.sk-price { width: 40%; height: 16px; margin-top: 10px; }
.product-skeleton .sk-btn {
    height: 38px;
    border-radius: var(--radius-xs);
    margin: 10px var(--space-3) var(--space-3);
}

@media (prefers-reduced-motion: reduce) {
    .skeleton-shimmer { animation: none; }
}

/* Phase 7.3 — DELETED. Auth page reverted to original styles. */

/* =============================================
 * Phase 8 — Home page polish (hero, categories, why-us)
 * Brand color #54a405 unchanged. Logo unchanged.
 * ============================================= */

/* Hero — gradient overlay + clearer CTA */
.hero-fullwidth {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: var(--space-4) var(--space-3);
    min-height: 220px;
}
.hero-fullwidth .hero-overlay {
    background: rgba(0, 0, 0, 0.3);
}
.hero-fullwidth .hero-text-wrap {
    padding: var(--space-8) var(--space-5);
}
.hero-fullwidth .hero-badge-tag {
    display: inline-block;
    padding: 4px 14px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-full);
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    color: #fff;
    letter-spacing: 0.5px;
    backdrop-filter: blur(6px);
    margin-bottom: var(--space-3);
}
.hero-fullwidth .hero-big-title {
    font-size: 1.8rem;
    line-height: var(--lh-tight);
    font-weight: var(--fw-extrabold);
    color: #fff;
    margin: 0 0 var(--space-3);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.hero-fullwidth .hero-big-desc {
    font-size: var(--fs-base);
    color: rgba(255, 255, 255, 0.92);
    margin: 0 0 var(--space-5);
    line-height: var(--lh-relaxed);
}
.hero-fullwidth .hero-big-btn {
    background: #fff;
    color: #54a405;
    border: none;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-full);
    font-size: var(--fs-base);
    font-weight: var(--fw-extrabold);
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease, box-shadow 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}
.hero-fullwidth .hero-big-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
}
@media (min-width: 769px) {
    .hero-fullwidth { min-height: 320px; }
    .hero-fullwidth .hero-big-title { font-size: 2.6rem; }
    .hero-fullwidth .hero-big-desc  { font-size: var(--fs-lg); }
}

/* Mobile compact hero (≤480px) — keeps the brand look but takes
 * much less vertical space so products are visible without scrolling. */
@media (max-width: 480px) {
    .hero-fullwidth {
        min-height: 0;
        margin: var(--space-3) var(--space-3);
        border-radius: var(--radius-md);
    }
    .hero-fullwidth .hero-text-wrap {
        padding: var(--space-4) var(--space-4);
    }
    .hero-fullwidth .hero-badge-tag {
        padding: 3px 10px;
        font-size: 0.65rem;
        margin-bottom: var(--space-2);
    }
    .hero-fullwidth .hero-big-title {
        font-size: 1.15rem;
        line-height: 1.25;
        margin: 0 0 var(--space-2);
    }
    .hero-fullwidth .hero-big-desc {
        font-size: 0.78rem;
        margin: 0 0 var(--space-3);
        line-height: 1.45;
        /* clamp to two lines so the hero never balloons on long copy */
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .hero-fullwidth .hero-big-btn {
        padding: 8px 18px;
        font-size: 0.82rem;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    }
}

/* Very small phones (≤360px) — even tighter */
@media (max-width: 360px) {
    .hero-fullwidth {
        margin: var(--space-2) var(--space-2);
    }
    .hero-fullwidth .hero-text-wrap {
        padding: var(--space-3) var(--space-3);
    }
    .hero-fullwidth .hero-big-title { font-size: 1.05rem; }
    .hero-fullwidth .hero-big-desc { font-size: 0.74rem; }
    .hero-fullwidth .hero-big-btn { padding: 7px 16px; font-size: 0.78rem; }
}

/* Category cards — refined card look */
.categories-grid-new {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--space-3);
    padding: 0 var(--space-3);
    margin-bottom: var(--space-6);
}
.categories-grid-new .category-card,
.categories-grid-new > * {
    background: #fff;
    border-radius: var(--radius-md);
    border: 1px solid #ecf0e8;
    box-shadow: 0 2px 6px rgba(45, 62, 80, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.categories-grid-new > *:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(84, 164, 5, 0.12);
    border-color: rgba(84, 164, 5, 0.3);
}

/* Why-us section (new — markup added in app.js loadHomePage) */
.why-us-section {
    margin: var(--space-8) var(--space-3);
    padding: var(--space-6) var(--space-4);
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 16px rgba(45, 62, 80, 0.05);
}
.why-us-title {
    text-align: center;
    font-size: var(--fs-xl);
    font-weight: var(--fw-extrabold);
    color: #1f2937;
    margin: 0 0 var(--space-6);
}
.why-us-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--space-4);
}
.why-us-item {
    text-align: center;
    padding: var(--space-4) var(--space-3);
    border-radius: var(--radius-md);
    transition: background 0.25s ease, transform 0.25s ease;
}
.why-us-item:hover {
    background: #f5faec;
    transform: translateY(-2px);
}
.why-us-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto var(--space-3);
    border-radius: 50%;
    background: linear-gradient(135deg, #54a405, #65b818);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 6px 14px rgba(84, 164, 5, 0.28);
}
.why-us-h {
    font-size: var(--fs-base);
    font-weight: var(--fw-bold);
    color: #1f2937;
    margin: 0 0 var(--space-1);
}
.why-us-p {
    font-size: var(--fs-sm);
    color: var(--gray);
    margin: 0;
    line-height: var(--lh-snug);
}

/* =============================================
 * Phase 8 — Product details page polish
 * Targets the inline-styled markup of showProductDetails().
 * ============================================= */
.product-details-page {
    background: #fafbfc !important;
}
.product-details-page .pd-image-card {
    border-radius: var(--radius-lg) !important;
    box-shadow: 0 8px 30px rgba(45, 62, 80, 0.08) !important;
    border: 1px solid #ecf0e8;
    overflow: hidden;
}
.product-details-page .pd-image-card img,
.product-details-page .pd-image-card .img-blur-up {
    border-radius: var(--radius-lg) !important;
}
.product-details-page .pd-info-block {
    padding: var(--space-5) !important;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 14px rgba(45, 62, 80, 0.05);
    margin: var(--space-3) var(--space-4);
}
.product-details-page .pd-title {
    font-size: 1.4rem !important;
    font-weight: var(--fw-extrabold) !important;
    line-height: var(--lh-snug);
    margin-bottom: var(--space-3) !important;
}
.product-details-page .pd-price {
    font-size: 1.6rem !important;
    font-weight: var(--fw-extrabold) !important;
    color: #54a405 !important;
    font-variant-numeric: tabular-nums;
}

/* Trust chip row — injected by JS into product details */
.pd-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: var(--space-4) 0;
}
.pd-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    background: #f5faec;
    color: #2d6b00;
    border: 1px solid #d9e9c4;
}
.pd-chip i { font-size: 0.85rem; }
.pd-chip.pd-chip-warn  { background: #fff7ed; color: #92400e; border-color: #fdd29e; }
.pd-chip.pd-chip-info  { background: #eff6ff; color: #1e40af; border-color: #c0d3f3; }

/* Bigger, bolder add-to-cart on product details */
.product-details-page button[onclick*="firstAddToCart"],
.product-details-page button[onclick*="increaseQty"],
.product-details-page button[onclick*="decreaseQty"] {
    border-radius: var(--radius-md) !important;
}
.product-details-page button[onclick*="firstAddToCart"] {
    background: linear-gradient(135deg, #54a405, #65b818) !important;
    box-shadow: 0 8px 20px rgba(84, 164, 5, 0.28) !important;
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease !important;
}
.product-details-page button[onclick*="firstAddToCart"]:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

/* =============================================
 * Phase 8 — Cart page polish
 * ============================================= */
.cart-page {
    padding: var(--space-4) !important;
}
.cart-page .cart-item,
#cartItemsContainer > div {
    background: #fff;
    border-radius: var(--radius-md) !important;
    border: 1px solid #ecf0e8;
    box-shadow: 0 2px 6px rgba(45, 62, 80, 0.04);
    padding: var(--space-3) !important;
    margin-bottom: var(--space-3) !important;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
#cartItemsContainer > div:hover {
    box-shadow: 0 6px 16px rgba(45, 62, 80, 0.08);
    transform: translateY(-1px);
}
.cart-page img {
    border-radius: var(--radius-sm) !important;
}
/* Quantity controls in cart */
#cartItemsContainer button[onclick*="updateCartQty"],
#cartItemsContainer button[onclick*="changeQty"],
#cartItemsContainer .qty-control button {
    background: #f5faec !important;
    color: #54a405 !important;
    border: 1px solid #d9e9c4 !important;
    border-radius: var(--radius-sm) !important;
    width: 32px !important;
    height: 32px !important;
    font-weight: var(--fw-bold);
    transition: background 0.15s ease;
}
#cartItemsContainer button:hover {
    background: #54a405 !important;
    color: #fff !important;
}
.cart-summary,
.cart-page > div:last-child {
    background: #fff;
    border-radius: var(--radius-md);
    border: 1px solid #ecf0e8;
    padding: var(--space-5);
    box-shadow: 0 4px 14px rgba(45, 62, 80, 0.06);
}

/* =============================================
 * Phase 8 — About Us page polish
 * Counters, timeline, team grid.
 * ============================================= */
.about-section-title {
    text-align: center;
    font-size: var(--fs-xl);
    font-weight: var(--fw-extrabold);
    color: #1f2937;
    margin: 0 0 var(--space-5);
}
.about-counters .counter-num {
    font-variant-numeric: tabular-nums;
    background: linear-gradient(135deg, #54a405, #65b818);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Timeline */
.about-timeline {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: var(--space-6) var(--space-5);
    margin-bottom: var(--space-6);
    box-shadow: 0 4px 16px rgba(45, 62, 80, 0.05);
}
.tl-list {
    position: relative;
    padding-inline-start: 24px;
}
.tl-list::before {
    content: "";
    position: absolute;
    inset-inline-start: 8px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, #54a405, #d9e9c4);
    border-radius: 1px;
}
.tl-item {
    position: relative;
    margin-bottom: var(--space-4);
}
.tl-item:last-child { margin-bottom: 0; }
.tl-dot {
    position: absolute;
    inset-inline-start: -22px;
    top: 14px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #54a405;
    box-shadow: 0 0 0 4px #fff, 0 0 0 5px rgba(84, 164, 5, 0.3);
}
.tl-card {
    background: #f8faf6;
    border: 1px solid #ecf0e8;
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tl-card:hover {
    transform: translateX(-3px);
    box-shadow: 0 6px 16px rgba(84, 164, 5, 0.12);
}
[dir="ltr"] .tl-card:hover { transform: translateX(3px); }
.tl-year {
    font-family: 'Cairo', sans-serif;
    font-size: 1.1rem;
    font-weight: var(--fw-extrabold);
    color: #54a405;
    margin-bottom: 2px;
}
.tl-text {
    font-size: var(--fs-sm);
    color: #475569;
}

/* Team grid */
.about-team {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: var(--space-6) var(--space-5);
    margin-bottom: var(--space-6);
    box-shadow: 0 4px 16px rgba(45, 62, 80, 0.05);
}
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--space-4);
}
.team-card {
    text-align: center;
    padding: var(--space-4) var(--space-3);
    border-radius: var(--radius-md);
    background: #f8faf6;
    border: 1px solid #ecf0e8;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.team-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(84, 164, 5, 0.12);
}
.team-avatar {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-3);
    border-radius: 50%;
    background: linear-gradient(135deg, #54a405, #65b818);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cairo', sans-serif;
    font-size: 1.5rem;
    font-weight: var(--fw-extrabold);
    box-shadow: 0 8px 20px rgba(84, 164, 5, 0.32);
}
.team-name {
    font-size: var(--fs-base);
    font-weight: var(--fw-bold);
    color: #1f2937;
    margin-bottom: 2px;
}
.team-role {
    font-size: var(--fs-xs);
    color: var(--gray);
    font-weight: var(--fw-semibold);
}


/* =============================================
 * Phase 9 — Decorative animations & polish
 * Brand color #54a405 unchanged. All animations
 * honor prefers-reduced-motion.
 * ============================================= */

/* ----- 1. Scroll-reveal ----- */
.sr-fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition:
        opacity 400ms cubic-bezier(0.16, 1, 0.3, 1),
        transform 400ms cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}
.sr-fade-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ----- 3. Marquee ticker (smoother + hover pause) ----- */
.hd-marquee-track {
    /* slower, linear, paused on hover */
    animation-duration: 50s !important;
    animation-timing-function: linear !important;
    transition: animation-play-state 0.2s;
}
.hd-marquee-wrap:hover .hd-marquee-track {
    animation-play-state: paused;
}

/* ----- 4. Floating particles inside Hero only ----- */
.hero-fullwidth { position: relative; }
.hero-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}
.hero-fullwidth .hero-text-wrap { position: relative; z-index: 2; }
.hero-particles span {
    position: absolute;
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.45);
    animation: hero-float 14s ease-in-out infinite;
    will-change: transform, opacity;
}
.hero-particles span:nth-child(1) { left:  6%; top: 80%; width: 5px; height: 5px; animation-delay: 0s;  animation-duration: 13s; }
.hero-particles span:nth-child(2) { left: 18%; top: 60%; width: 4px; height: 4px; animation-delay: 1s;  animation-duration: 16s; }
.hero-particles span:nth-child(3) { left: 32%; top: 85%; width: 7px; height: 7px; animation-delay: 2s;  animation-duration: 12s; }
.hero-particles span:nth-child(4) { left: 46%; top: 55%; width: 5px; height: 5px; animation-delay: 0.5s; animation-duration: 17s; }
.hero-particles span:nth-child(5) { left: 60%; top: 90%; width: 6px; height: 6px; animation-delay: 3s;  animation-duration: 14s; }
.hero-particles span:nth-child(6) { left: 72%; top: 65%; width: 4px; height: 4px; animation-delay: 1.5s; animation-duration: 15s; }
.hero-particles span:nth-child(7) { left: 84%; top: 78%; width: 6px; height: 6px; animation-delay: 2.5s; animation-duration: 13s; }
.hero-particles span:nth-child(8) { left: 92%; top: 50%; width: 4px; height: 4px; animation-delay: 0.8s; animation-duration: 18s; }
.hero-particles span:nth-child(9) { left: 26%; top: 30%; width: 5px; height: 5px; animation-delay: 4s;  animation-duration: 16s; }
.hero-particles span:nth-child(10){ left: 66%; top: 25%; width: 5px; height: 5px; animation-delay: 2.2s; animation-duration: 14s; }
@keyframes hero-float {
    0%, 100% { transform: translate(0, 0); opacity: 0.3; }
    25%      { transform: translate(8px, -16px); opacity: 0.7; }
    50%      { transform: translate(-6px, -28px); opacity: 0.5; }
    75%      { transform: translate(10px, -14px); opacity: 0.65; }
}

/* ----- 5. Smooth page transitions ----- */
@keyframes ph9-page-fade {
    from { opacity: 0.95; transform: translateY(2px); }
    to   { opacity: 1; transform: translateY(0); }
}
.ph9-page-fade {
    animation: ph9-page-fade 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ----- 6. Hover glow on green buttons ----- */
.add-to-cart,
.cart-add-btn,
.auth-btn,
.ap-submit,
button.checkout-btn,
.product-card .add-to-cart,
.product-details-page button[onclick*="firstAddToCart"],
.checkout-page #confirmOrderBtn {
    position: relative;
    transition: box-shadow 0.4s ease, transform 0.2s ease, filter 0.2s ease;
}
.add-to-cart:hover,
.cart-add-btn:hover,
.auth-btn:hover,
.ap-submit:hover,
button.checkout-btn:hover,
.product-card .add-to-cart:hover,
.product-details-page button[onclick*="firstAddToCart"]:hover,
.checkout-page #confirmOrderBtn:hover {
    box-shadow:
        0 0 0 4px rgba(84, 164, 5, 0.18),
        0 12px 28px rgba(84, 164, 5, 0.32) !important;
}

/* ----- 7. WhatsApp float pulse (every ~3s) ----- */
#waFloatBtn {
    animation: wa-pulse 3s ease-out infinite;
}
@keyframes wa-pulse {
    0%, 60%, 100% {
        box-shadow:
            0 2px 8px rgba(0, 0, 0, 0.15),
            0 0 0 0 rgba(37, 211, 102, 0.55);
    }
    30% {
        box-shadow:
            0 2px 8px rgba(0, 0, 0, 0.15),
            0 0 0 14px rgba(37, 211, 102, 0);
    }
}
#waFloatBtn:hover {
    animation: none;
}

/* ----- prefers-reduced-motion: kill everything ----- */
@media (prefers-reduced-motion: reduce) {
    .sr-fade-up,
    .sr-fade-up.is-visible,
    .ph9-page-fade,
    .hero-particles span,
    .hd-marquee-track,
    #waFloatBtn {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* =============================================
 * Phase 9.1 — Mobile overflow fixes
 * Defends against horizontal scroll on the home page
 * (320–430px) and ensures the hero never exceeds the viewport.
 * ============================================= */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}
.main-website {
    overflow-x: hidden;
    max-width: 100vw;
}
.main-website .container,
#mainWebsite > div {
    max-width: 100%;
    box-sizing: border-box;
}

/* Hero — hard-cap so margins + content can never push past the viewport */
.hero-fullwidth {
    box-sizing: border-box;
    max-width: calc(100vw - 24px);   /* leaves 12px on each side */
    overflow: hidden;
}
.hero-fullwidth .hero-text-wrap,
.hero-fullwidth .hero-overlay,
.hero-fullwidth .hero-particles {
    max-width: 100%;
    box-sizing: border-box;
}
.hero-fullwidth .hero-big-title,
.hero-fullwidth .hero-big-desc,
.hero-fullwidth .hero-badge-tag {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.hero-fullwidth .hero-big-btn {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 480px) {
    .hero-fullwidth {
        max-width: calc(100vw - 24px);
        margin-inline: 12px;
    }
    /* Categories grid: ensure it doesn't push wider than viewport */
    .categories-grid-new {
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }
    /* Why-us & section cards */
    .why-us-section,
    .section-title {
        max-width: 100%;
        box-sizing: border-box;
    }
    .why-us-section {
        margin-inline: 12px;
    }
    /* Buttons stay inside their containers */
    button, .btn {
        max-width: 100%;
    }
}

@media (max-width: 360px) {
    .hero-fullwidth {
        max-width: calc(100vw - 16px);
        margin-inline: 8px;
    }
    .why-us-section {
        margin-inline: 8px;
    }
}

/* Desktop ≥1024px — keep content centered, prevent crazy wide stretching */
@media (min-width: 1024px) {
    .hero-fullwidth {
        max-width: 1200px;
        margin-inline: auto;
    }
    .why-us-section {
        max-width: 1200px;
        margin-inline: auto;
    }
}

/* =============================================
 * Bottom Navigation — Mobile Only (≤768px)
 * ============================================= */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 0.5px solid #e5e5e5;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)) 4px;
    z-index: 998;
    justify-content: space-around;
    align-items: stretch;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
}

.bnav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 5px 2px;
    min-height: 48px;
    color: #999;
    text-decoration: none;
    position: relative;
    transition: color 0.2s;
    font-size: 10px;
    font-weight: 600;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.bnav-item svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.8;
    flex-shrink: 0;
}

.bnav-item.active {
    color: #54a405;
}

.bnav-item.active svg {
    stroke-width: 2.4;
}

.bnav-item:active {
    transform: scale(0.92);
    transition: transform 0.1s;
}

.bnav-badge {
    position: absolute;
    top: 1px;
    right: calc(50% - 19px);
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: #e24b4a;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #fff;
    line-height: 1;
}

@media (max-width: 768px) {
    .bottom-nav {
        display: flex;
    }
    body {
        padding-bottom: calc(62px + env(safe-area-inset-bottom));
    }
    /* Push WhatsApp float and scroll-to-top above the bottom nav */
    #waFloatBtn {
        bottom: calc(74px + env(safe-area-inset-bottom)) !important;
    }
    .scroll-top-btn {
        bottom: calc(142px + env(safe-area-inset-bottom)) !important;
    }
}

/* =============================================
 * Sticky Buy Bar — Mobile product page
 * ============================================= */
.sticky-buy-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(62px + env(safe-area-inset-bottom));
    background: #ffffff;
    border-top: 1px solid #e5e5e5;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 997;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.sticky-buy-bar.visible {
    transform: translateY(0);
    opacity: 1;
}

.sbb-info {
    flex: 1;
    min-width: 0;
}

.sbb-price {
    font-size: 16px;
    font-weight: 800;
    color: #54a405;
    line-height: 1.2;
}

.sbb-name {
    font-size: 11px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.sbb-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #54a405;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}

.sbb-btn svg { width: 18px; height: 18px; }
.sbb-btn:hover { background: #3b6d11; }
.sbb-btn:active { transform: scale(0.95); }
.sbb-btn.added { background: #0F6E56; }
.sbb-btn.added span::after { content: ' \2713'; }

@media (min-width: 992px) {
    .sticky-buy-bar { display: none !important; }
}

/* =============================================
 * Image Lightbox / Zoom
 * ============================================= */
.img-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: lbFadeIn 0.2s ease;
}

.img-lightbox.closing {
    animation: lbFadeOut 0.2s ease forwards;
}

@keyframes lbFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes lbFadeOut { from { opacity: 1; } to { opacity: 0; } }

.lb-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.92);
    cursor: zoom-out;
}

.lb-stage {
    position: relative;
    max-width: 95vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: none;
    overflow: hidden;
}

.lb-stage img {
    max-width: 95vw;
    max-height: 85vh;
    object-fit: contain;
    transition: transform 0.2s ease;
    cursor: zoom-in;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}

.lb-close {
    position: absolute;
    top: calc(20px + env(safe-area-inset-top));
    right: 20px;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lb-close:hover { background: rgba(255,255,255,0.25); }

.lb-counter {
    position: absolute;
    top: calc(24px + env(safe-area-inset-top));
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    background: rgba(0,0,0,0.5);
    padding: 6px 14px;
    border-radius: 20px;
    z-index: 10;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: none;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background 0.2s, transform 0.1s;
}
.lb-nav:hover { background: rgba(255,255,255,0.25); }
.lb-nav:active { transform: translateY(-50%) scale(0.9); }
.lb-nav svg { width: 24px; height: 24px; }

.lb-prev { left: 20px; }
.lb-next { right: 20px; }

body.lb-open { overflow: hidden; }

@media (max-width: 768px) {
    .lb-nav { width: 40px; height: 40px; }
    .lb-prev { left: 12px; }
    .lb-next { right: 12px; }
    .lb-close { top: calc(12px + env(safe-area-inset-top)); right: 12px; width: 40px; height: 40px; font-size: 24px; }
    .lb-counter { top: calc(18px + env(safe-area-inset-top)); font-size: 12px; padding: 5px 12px; }
}
