/* =====================================================
   Pharmastan - Main Stylesheet
   Design: Medical + Clean + Premium + Glassmorphism
   ===================================================== */

/* =================== CSS Variables =================== */
:root {
    --primary: #5A0D1A;
    --primary-light: #7a1525;
    --primary-dark: #3d0812;
    --secondary: #C48A95;
    --accent: #A86478;

    --bg: #FFFFFF;
    --bg-alt: #F5F5F5;
    --bg-card: #FFFFFF;
    --bg-glass: rgba(255, 255, 255, 0.75);

    --text: #1A1A2E;
    --text-muted: #6B7280;
    --text-light: #9CA3AF;

    --border: #E5E7EB;
    --border-light: #F3F4F6;

    --shadow-sm: 0 1px 3px rgba(90, 13, 26, 0.08);
    --shadow: 0 4px 20px rgba(90, 13, 26, 0.10);
    --shadow-lg: 0 10px 40px rgba(90, 13, 26, 0.15);
    --shadow-xl: 0 20px 60px rgba(90, 13, 26, 0.20);

    --radius: 16px;
    --radius-sm: 8px;
    --radius-lg: 24px;
    --radius-xl: 32px;

    --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.2s ease;

    --font: 'Cairo', 'Tajawal', sans-serif;

    --navbar-height: 70px;
    --topbar-height: 40px;
    --bottom-nav-height: 68px;
}

/* =================== Dark Mode =================== */
[data-theme="dark"] {
    --bg: #0F0F14;
    --bg-alt: #1A1A24;
    --bg-card: #1E1E2E;
    --bg-glass: rgba(30, 30, 46, 0.80);

    --text: #F0F0F8;
    --text-muted: #9A9AB0;
    --text-light: #6B6B88;

    --border: #2A2A3E;
    --border-light: #252535;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.6);
}

/* =================== Base Styles =================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background: var(--bg);
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    direction: rtl;
    overflow-x: hidden;
    transition: background var(--transition), color var(--transition);
    line-height: 1.7;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--secondary); }

img { max-width: 100%; height: auto; display: block; }

/* =================== Mobile Performance (no UI change) =================== */
@media (max-width: 768px) {
    /*
      تعطيل content-visibility على الموبايل.
      أحيانًا هذا السلوك يسبب مشاكل/تأخير في العرض على بعض الأجهزة.
    */
    .section,
    .section-sm,
    .category-card,
    .offer-banner,
    .brand-item,
    .trust-badge,
    .footer-col,
    .cart-item,
    .order-item {
        content-visibility: visible;
        contain-intrinsic-size: unset;
    }
    /* صف واحد من قائمة الأكثر مبيعاً ~92px — القيمة السابقة 520px كانت تضخم التخطيط */
    .best-selling-item {
        content-visibility: visible;
        contain-intrinsic-size: unset;
    }

    /* بطاقات المنتجات: نبقي content-visibility مفعّل لكن بقيمة intrinsic أدق لمنع القفزة */
    .product-card {
        content-visibility: visible;
        contain-intrinsic-size: unset;
    }
    /* بقية العناصر قد تكون أصغر عادةً */
    .category-card { contain-intrinsic-size: 1px 180px; }
    .brand-item { contain-intrinsic-size: 1px 110px; }

    /* تثبيت إضافي لبطاقات السلايدر حتى لا يتغير ارتفاع القسم أثناء السحب */
    .featured-swiper .product-card,
    .home-new-swiper .product-card,
    .home-best-swiper .product-card,
    .home-discount-swiper .product-card,
    .home-brand-swiper .product-card,
    .home-category-products-swiper .product-card {
        contain-intrinsic-size: unset;
    }

}

::selection { background: var(--primary); color: #fff; }

/* =================== Scrollbar =================== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-alt); }
::-webkit-scrollbar-thumb { background: var(--secondary); border-radius: 100px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* =================== Preloader =================== */
#preloader {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
#preloader.hidden { opacity: 0; visibility: hidden; }

.preloader-inner { text-align: center; position: relative; z-index: 2; }
.preloader-logo {
    position: relative;
    width: min(90vw, 420px);
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 28px;
    padding: 36px 24px 28px;
    background:
        radial-gradient(120px 120px at 20% 15%, rgba(196,138,149,0.22), transparent 70%),
        radial-gradient(160px 160px at 82% 22%, rgba(90,13,26,0.17), transparent 72%),
        linear-gradient(145deg, rgba(255,255,255,0.9), rgba(255,255,255,0.72));
    border: 1px solid rgba(196,138,149,0.28);
    box-shadow: 0 24px 60px rgba(90, 13, 26, 0.16), inset 0 1px 0 rgba(255,255,255,0.8);
    backdrop-filter: blur(10px) saturate(120%);
    -webkit-backdrop-filter: blur(10px) saturate(120%);
    overflow: hidden;
}
.preloader-logo::before {
    content: '';
    position: absolute;
    width: 190px;
    height: 190px;
    right: -55px;
    bottom: -70px;
    background: radial-gradient(circle, rgba(168,100,120,0.24), transparent 72%);
    pointer-events: none;
}
.preloader-logo-img {
    position: relative;
    width: 92px;
    height: 92px;
    object-fit: contain;
    border-radius: 22px;
    padding: 10px;
    margin: 0 0 14px;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(196,138,149,0.28);
    box-shadow: 0 12px 30px rgba(90,13,26,0.18);
    z-index: 2;
    opacity: 1;
    animation: logoFloat 2.8s ease-in-out infinite;
}
.preloader-logo .logo-text {
    font-size: clamp(1.8rem, 4.6vw, 2.3rem);
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
    margin-bottom: 14px;
    letter-spacing: 1px;
    position: relative;
    z-index: 2;
    text-shadow: 0 6px 18px rgba(90, 13, 26, 0.16);
}
.preloader-bar {
    width: min(240px, 62vw);
    height: 6px;
    background: rgba(90,13,26,0.12);
    border-radius: 100px;
    overflow: hidden;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}
.preloader-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 100px;
    animation: fillBar 2s ease-in-out forwards;
}
@keyframes fillBar {
    0% { width: 0; }
    100% { width: 100%; }
}
@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* =================== Flash Messages =================== */
.flash-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    min-width: 320px;
    max-width: 550px;
    width: 90%;
}
.flash-message {
    margin-bottom: 10px;
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
    font-weight: 500;
}

/* =================== Top Bar =================== */
.top-bar {
    background: var(--primary);
    color: rgba(255,255,255,0.9);
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    font-size: 0.82rem;
}
.top-bar-info a {
    color: rgba(255,255,255,0.85);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color var(--transition-fast);
}
.top-bar-info a:hover { color: #fff; }
.top-bar-info i { font-size: 0.75rem; }

.free-shipping-badge {
    background: rgba(255,255,255,0.15);
    padding: 4px 14px;
    border-radius: 100px;
    font-size: 0.78rem;
    backdrop-filter: blur(10px);
}

.theme-toggle {
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}
.theme-toggle:hover { background: rgba(255,255,255,0.3); }

/* =================== Navbar =================== */
.main-navbar {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 2000;
    padding: 0;
    transition: background var(--transition), box-shadow var(--transition);
    flex-direction: column;
}
.main-navbar.scrolled {
    background: var(--bg-glass);
    box-shadow: var(--shadow-lg);
}

.main-navbar .container-fluid { padding: 0 1.5rem; }

/* First Row */
.main-navbar > .container-fluid:first-child {
    height: var(--navbar-height);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Logo */
.navbar-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.navbar-logo-text { display: flex; flex-direction: column; min-width: 0; }
.navbar-logo-text.has-image .logo-main {
    font-size: 1.1rem;
    line-height: 1.15;
}
.navbar-logo-text.has-image .logo-sub {
    font-size: 0.58rem;
    letter-spacing: 1.4px;
    margin-top: 3px;
}
.logo-main {
    font-size: 1.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    letter-spacing: 1px;
}
.logo-sub {
    font-size: 0.6rem;
    color: var(--secondary);
    letter-spacing: 3px;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1;
    margin-top: 2px;
}
.navbar-logo-img {
    height: 45px;
    width: 45px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: linear-gradient(145deg, rgba(255,255,255,0.95), rgba(255,255,255,0.78));
    box-shadow: 0 8px 22px rgba(90, 13, 26, 0.14);
    padding: 4px;
    flex: 0 0 auto;
}

/* Search */
.navbar-search { flex: 1; max-width: 500px; }
.search-form { position: relative; }
.search-wrapper { position: relative; }
.search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    z-index: 1;
    pointer-events: none;
}
.search-input {
    width: 100%;
    padding: 12px 48px 12px 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--bg-alt);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.9rem;
    transition: var(--transition);
    outline: none;
}
.search-input:focus {
    border-color: var(--secondary);
    background: var(--bg-card);
    box-shadow: 0 0 0 4px rgba(196, 138, 149, 0.15);
}
.search-input::placeholder { color: var(--text-light); }

/* Search Dropdown */
.search-results-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
    max-height: 400px;
    overflow-y: auto;
    z-index: 9999;
    display: none;
}
.search-results-dropdown.show { display: block; animation: fadeDown 0.2s ease; }
.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: var(--transition-fast);
    border-bottom: 1px solid var(--border-light);
    text-decoration: none;
    color: var(--text);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--bg-alt); }
.search-result-img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.search-result-info .name { font-weight: 600; font-size: 0.9rem; }
.search-result-info .price { color: var(--primary); font-weight: 700; font-size: 0.85rem; }

/* Nav Actions */
.navbar-actions { display: flex; align-items: center; gap: 8px; }
.nav-action-btn {
    position: relative;
    background: none;
    border: none;
    color: var(--text);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 1.1rem;
    text-decoration: none;
}
.nav-action-btn:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}
.cart-badge {
    position: absolute;
    top: 2px;
    left: 2px;
    background: var(--secondary);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: badgePop 0.3s ease;
}
@keyframes badgePop {
    0% { transform: scale(0); }
    70% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* User Dropdown */
.user-btn { gap: 6px; padding: 0 12px; width: auto; border-radius: var(--radius-xl); font-size: 0.9rem; font-weight: 600; }
.glass-dropdown {
    background: var(--bg-glass) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow-xl) !important;
    min-width: 220px;
    padding: 8px;
}
.glass-dropdown .dropdown-item {
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: var(--text);
    font-size: 0.9rem;
    transition: var(--transition-fast);
}
.glass-dropdown .dropdown-item:hover { background: var(--bg-alt); }
.dropdown-header { padding: 12px 14px 8px; }
.user-info strong { display: block; font-size: 0.95rem; }
.user-info small { color: var(--text-muted); font-size: 0.8rem; }

/* Navbar Nav Links */
.navbar-nav-wrapper {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-top: 1px solid rgba(255,255,255,0.12);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    box-shadow: inset 0 -1px 0 rgba(255,255,255,0.06);
    border-radius: 12px;
    overflow: visible;
    position: relative;
    z-index: 2001;
}
.navbar-nav-wrapper .container-fluid {
    padding-top: 6px;
    padding-bottom: 6px;
}
.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 4px;
    gap: 6px;
    height: 56px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.nav-links > li { position: relative; height: 100%; display: flex; align-items: center; }
.nav-links > li > a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    color: rgba(255,255,255,0.94);
    font-weight: 700;
    font-size: 0.9rem;
    height: 100%;
    border-radius: 8px;
    transition: var(--transition-fast);
    white-space: nowrap;
}
.nav-links > li > a:hover,
.nav-links > li > a.active {
    color: #fff;
    background: rgba(255,255,255,0.18);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}
.nav-links > li > a .arrow { font-size: 0.65rem; margin-right: 4px; transition: var(--transition-fast); }
.nav-links > li:hover .arrow { transform: rotate(-180deg); }
.nav-links > li > a i:first-child { font-size: 0.85rem; opacity: 0.95; }

/* Mega Dropdown */
.mega-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    left: -120px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xl);
    border-radius: var(--radius);
    min-width: 600px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: var(--transition);
    z-index: 2100;
}
.has-dropdown:hover .mega-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.mega-menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 16px 12px;
    text-align: center;
    border-radius: var(--radius);
    color: var(--text);
    transition: var(--transition);
    text-decoration: none;
}
.mega-menu-item:hover { background: var(--bg-alt); transform: translateY(-3px); }
.mega-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}
.mega-menu-item span { font-size: 0.85rem; font-weight: 500; color: var(--text); }

/* Mobile Menu Toggle */
.navbar-toggler-custom {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 6px;
}
.navbar-toggler-custom span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition-fast);
}
.navbar-toggler-custom.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.navbar-toggler-custom.active span:nth-child(2) { opacity: 0; }
.navbar-toggler-custom.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile Nav */
@media (max-width: 991px) {
    .navbar-nav-wrapper {
        display: block;
        position: fixed;
        top: 0;
        right: -320px;
        width: min(320px, 88vw);
        height: 100vh;
        overflow-y: auto;
        background: rgba(255, 255, 255, 0.48);
        backdrop-filter: blur(30px) saturate(180%) brightness(1.08);
        -webkit-backdrop-filter: blur(30px) saturate(180%) brightness(1.08);
        box-shadow: -4px 0 40px rgba(0, 0, 0, 0.18);
        border-left: 1px solid rgba(255, 255, 255, 0.5);
        z-index: 1260;
        transition: right 0.32s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 16px 0 22px;
        border-radius: 12px 0 0 12px;
    }

    [data-theme="dark"] .navbar-nav-wrapper {
        background: rgba(20, 16, 28, 0.68);
        border-left-color: rgba(255, 255, 255, 0.1);
    }

    .navbar-nav-wrapper.show { right: 0; }

    .mobile-drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 16px 12px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        margin-bottom: 6px;
        background: rgba(90, 13, 26, 0.06);
        border-top-left-radius: 12px;
    }
    .mobile-drawer-brand {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .mobile-drawer-logo {
        width: 38px;
        height: 38px;
        object-fit: cover;
        border-radius: 10px;
        border: 1px solid var(--border);
        padding: 3px;
        background: #fff;
    }
    .mobile-drawer-name {
        font-size: 1rem;
        font-weight: 900;
        background: linear-gradient(135deg, var(--primary), var(--accent));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        line-height: 1.2;
    }
    .mobile-drawer-tagline {
        font-size: 0.56rem;
        color: var(--secondary);
        letter-spacing: 2px;
        text-transform: uppercase;
        font-weight: 600;
        margin-top: 2px;
    }
    .mobile-drawer-close {
        width: 34px;
        height: 34px;
        border: none;
        background: rgba(0, 0, 0, 0.07);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
        color: var(--text);
        cursor: pointer;
        transition: var(--transition-fast);
        flex-shrink: 0;
    }
    .mobile-drawer-close:hover {
        background: var(--primary);
        color: #fff;
    }

    .mobile-nav-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.28);
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
        z-index: 1240;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
    }
    .mobile-nav-backdrop.show {
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links {
        flex-direction: column;
        align-items: stretch;
        height: auto;
        padding: 0;
    }
    .navbar-nav-wrapper > .container-fluid {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .nav-links > li {
        height: auto;
        width: 100%;
        display: block;
    }
    .nav-links > li > a {
        padding: 14px 20px;
        justify-content: space-between;
        color: #1a1a2e;
        border-bottom: 1px solid rgba(0, 0, 0, 0.07);
        font-size: 0.97rem;
        font-weight: 700;
        text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
    }
    .nav-links > li > a:hover,
    .nav-links > li > a.active {
        background: rgba(90, 13, 26, 0.14);
        color: #3d0812;
    }

    [data-theme="dark"] .nav-links > li > a {
        color: #f3f0ff;
        border-bottom-color: rgba(255, 255, 255, 0.08);
        text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
    }
    [data-theme="dark"] .nav-links > li > a:hover,
    [data-theme="dark"] .nav-links > li > a.active {
        background: rgba(255, 255, 255, 0.12);
        color: #ffffff;
    }
    .has-dropdown > a .arrow {
        transition: transform 0.2s ease;
    }
    .has-dropdown.open > a .arrow {
        transform: rotate(-180deg);
    }
    .mega-dropdown {
        display: none;
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        min-width: 100%;
        background: transparent;
        box-shadow: none;
        border: 0;
        border-radius: 0;
        padding: 6px 0 10px;
    }
    .has-dropdown.open > .mega-dropdown {
        display: block;
        width: 100%;
    }
    .mega-dropdown .container-fluid,
    .mega-dropdown .row {
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .mega-dropdown .col-6,
    .mega-dropdown .col-md-3 {
        display: block !important;
        float: none !important;
        width: 100%;
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0;
    }
    .mega-menu-item {
        flex-direction: row;
        justify-content: flex-start;
        text-align: right;
        gap: 10px;
        padding: 10px 22px;
        border-radius: 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }
    .mega-menu-item .mega-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        border-radius: 10px;
    }
    .mega-menu-item span {
        font-size: 0.9rem;
        font-weight: 600;
    }
}

.mobile-search-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.38);
    z-index: 1410;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.mobile-search-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

.mobile-search-panel {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    transform: translateY(-110%);
    transition: transform 0.28s ease;
    z-index: 1420;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}
.mobile-search-panel.show {
    transform: translateY(0);
}
.mobile-search-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 14px 8px;
}
.mobile-search-header h6 {
    margin: 0;
    font-weight: 800;
    color: var(--text);
}
.mobile-search-body {
    padding: 0 12px 12px;
}
.mobile-search-panel .search-results-dropdown {
    position: static;
    margin-top: 8px;
    box-shadow: none;
    border-radius: var(--radius-sm);
    max-height: 55vh;
}

/* =================== Mini Cart =================== */
.mini-cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
    display: none;
    backdrop-filter: blur(4px);
}
.mini-cart-overlay.show { display: block; animation: fadeIn 0.3s ease; }
.mini-cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    max-width: 100vw;
    height: 100vh;
    background: var(--bg-card);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-xl);
}
.mini-cart-sidebar.show { transform: translateX(0); }

.mini-wishlist-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
    display: none;
    backdrop-filter: blur(4px);
}
.mini-wishlist-overlay.show { display: block; animation: fadeIn 0.3s ease; }
.mini-wishlist-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    max-width: 100vw;
    height: 100vh;
    background: var(--bg-card);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-xl);
}
.mini-wishlist-sidebar.show { transform: translateX(0); }
.mini-cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-glass);
}
.mini-cart-header h5 { margin: 0; font-size: 1.1rem; font-weight: 700; }
.mini-cart-body { flex: 1; overflow-y: auto; padding: 16px; }
.mini-cart-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    background: var(--bg-glass);
}
.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
}
.cart-total-row strong { color: var(--primary); font-size: 1.3rem; }

.mini-cart-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}
.mini-cart-item-img {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 1px solid var(--border);
}
.mini-cart-item-info { flex: 1; }
.mini-cart-item-name { font-weight: 600; font-size: 0.9rem; line-height: 1.4; }
.mini-cart-item-price { color: var(--primary); font-weight: 700; font-size: 0.9rem; margin-top: 4px; }

/* =================== Glassmorphism Card =================== */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

/* =================== Buttons =================== */
.btn {
    font-family: var(--font);
    font-weight: 600;
    border-radius: var(--radius);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0);
    transition: var(--transition-fast);
}
.btn:hover::after { background: rgba(255,255,255,0.1); }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 15px rgba(90, 13, 26, 0.3);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    box-shadow: 0 8px 25px rgba(90, 13, 26, 0.4);
    transform: translateY(-2px);
    color: #fff;
    border-color: transparent;
}
.btn-outline-primary {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
}
.btn-outline-primary:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}
.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    border-color: transparent;
    color: #fff;
}
.btn-secondary:hover { transform: translateY(-2px); filter: brightness(1.1); color: #fff; border-color: transparent; }

/* =================== Hero Section =================== */
.hero-section {
    position: relative;
    overflow: hidden;
    height: 85vh;
    min-height: 500px;
    max-height: 700px;
}
.hero-swiper { width: 100%; height: 100%; }
.hero-slide {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}
.hero-section.hero-as-banner {
    height: auto;
    min-height: 0;
    max-height: none;
    padding: 18px 0;
}
.hero-swiper.hero-swiper-as-banner {
    height: auto;
}
.hero-slide.hero-slide-as-banner {
    height: auto;
    min-height: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 2 / 1;
}
.hero-section.hero-as-banner .hero-bg {
    transform: none;
    transition: transform 0.5s ease;
}
.hero-section.hero-as-banner .swiper-slide-active .hero-bg {
    transform: none;
}
.hero-section.hero-as-banner .hero-overlay {
    background: linear-gradient(135deg, rgba(90,13,26,0.85), rgba(90,13,26,0.3));
}
.hero-content.hero-content-as-banner {
    max-width: 100%;
    width: 100%;
    height: 100%;
    justify-content: center;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.05);
    transition: transform 8s ease;
}
.swiper-slide-active .hero-bg { transform: scale(1); }
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(36, 12, 20, 0.36) 0%, rgba(36, 12, 20, 0.48) 100%);
}
.hero-content {
    position: relative;
    z-index: 2;
    color: #fff;
    max-width: 760px;
    padding: 0 1.6rem;
    text-align: center;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.hero-content > * {
    position: relative;
    z-index: 2;
}
.hero-line-glass {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin-right: auto;
    margin-left: auto;
    background: rgba(28, 12, 18, 0.24);
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 999px;
    padding: 6px 16px;
}
.hero-logo-premium {
    width: 112px;
    height: 112px;
    object-fit: cover;
    display: block;
    margin-right: auto;
    margin-left: auto;
    padding: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.38);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.3));
    margin-bottom: 14px;
    animation: logoScaleIn .7s ease-out both;
}
.hero-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 10px;
    color: var(--secondary);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
    padding: 8px 22px;
}
.hero-tagline {
    margin: 0 0 12px;
    color: rgba(255,255,255,0.92);
    font-size: 0.82rem;
    letter-spacing: 2.6px;
    text-transform: uppercase;
    font-weight: 600;
    padding: 6px 18px;
}
.hero-desc {
    font-size: 1rem;
    color: rgba(255,255,255,0.9);
    margin: 0 auto 24px;
    line-height: 1.8;
    max-width: 48ch;
    padding: 7px 18px;
}
.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}
.btn-hero-primary {
    background: #fff;
    color: var(--primary);
    padding: 14px 34px;
    border-radius: var(--radius-xl);
    font-weight: 800;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    transition: var(--transition);
    border: none;
    font-family: var(--font);
    cursor: pointer;
    font-size: 1.03rem;
}
.btn-hero-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,0.24); color: var(--primary); }
.btn-hero-outline {
    background: transparent;
    color: #fff;
    padding: 11px 24px;
    border-radius: var(--radius-xl);
    font-weight: 600;
    border: 1.8px solid rgba(255,255,255,0.66);
    transition: var(--transition);
    font-family: var(--font);
    cursor: pointer;
    font-size: 0.92rem;
}
.btn-hero-outline:hover { background: rgba(255,255,255,0.14); color: #fff; transform: translateY(-2px); }

/* Hero Stats */
.hero-stats {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 40px;
    z-index: 3;
}
.hero-stat {
    text-align: center;
    color: #fff;
}
.hero-stat .number { font-size: 2rem; font-weight: 900; line-height: 1; }
.hero-stat .label { font-size: 0.8rem; opacity: 0.8; margin-top: 4px; }

/* Hero Navigation */
.hero-swiper .swiper-button-next,
.hero-swiper .swiper-button-prev {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: #fff;
    transition: var(--transition-fast);
}
.hero-swiper .swiper-button-next::after,
.hero-swiper .swiper-button-prev::after { font-size: 1rem; }
.hero-swiper .swiper-button-next:hover,
.hero-swiper .swiper-button-prev:hover { background: var(--primary); }

.hero-swiper .swiper-pagination-bullet {
    background: rgba(255,255,255,0.5);
    width: 8px; height: 8px;
    transition: var(--transition-fast);
}
.hero-swiper .swiper-pagination-bullet-active {
    background: #fff;
    width: 28px;
    border-radius: 4px;
}

/* =================== Section Styles =================== */
.section { padding: 80px 0; }
.section-sm { padding: 50px 0; }
.section-lg { padding: 100px 0; }

.section-header { text-align: center; margin-bottom: 50px; }
.section-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary)15, var(--secondary)15);
    color: var(--primary);
    padding: 6px 20px;
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 1px;
    border: 1px solid var(--primary)30;
}
.section-title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 800;
    color: var(--text);
    margin-bottom: 12px;
}
.section-title span { color: var(--primary); }
.section-desc { color: var(--text-muted); font-size: 1rem; max-width: 600px; margin: 0 auto; }
.section-divider {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 100px;
    margin: 16px auto 0;
}

/* =================== Categories Grid =================== */
.categories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; }
.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}
.category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary)08, var(--secondary)08);
    opacity: 0;
    transition: var(--transition);
}
.category-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--secondary); color: var(--text); }
.category-card:hover::before { opacity: 1; }
.category-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    transition: var(--transition);
}
.category-card:hover .category-icon { transform: scale(1.1) rotate(5deg); }
.category-name { font-weight: 600; font-size: 0.9rem; }
.category-count { font-size: 0.75rem; color: var(--text-muted); }

/* =================== Product Card =================== */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: var(--secondary);
}

.product-image-wrapper {
    position: relative;
    padding-top: 72%;
    background: var(--bg-alt);
    overflow: hidden;
}
.product-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.product-card:hover .product-image { transform: scale(1.08); }

/* Product Badges */
.product-badges {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 1;
}
.badge-discount {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
}
.badge-new {
    background: linear-gradient(135deg, #10B981, #059669);
    color: #fff;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
}
.badge-out { background: #6B7280; color: #fff; padding: 4px 10px; border-radius: 100px; font-size: 0.75rem; font-weight: 700; }

/* Product Actions Overlay */
.product-actions-overlay {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(-10px);
    transition: var(--transition);
    z-index: 1;
}
.product-card:hover .product-actions-overlay {
    opacity: 1;
    transform: translateX(0);
}
.product-action-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    color: var(--text);
    font-size: 0.9rem;
}
.product-action-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); transform: scale(1.1); }
.product-action-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Product Info */
.product-info {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.product-category {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.home-brand-desc,
.home-brands-subtitle {
    color: var(--text-muted);
}
.product-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 8px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-name a { color: inherit; text-decoration: none; }
.product-name a:hover { color: var(--primary); }

.product-rating { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.stars { display: flex; gap: 2px; }
.stars i { font-size: 0.8rem; }
.rating-count { font-size: 0.78rem; color: var(--text-muted); }

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    gap: 10px;
}
.product-price-block {
    min-height: 44px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
.product-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary);
}
.product-old-price {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-decoration: line-through;
}
.product-old-price-placeholder {
    visibility: hidden;
}

.btn-add-cart {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: var(--radius);
    font-family: var(--font);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.btn-add-cart:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(90,13,26,0.35); }
.btn-add-cart:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-add-cart .spinner {
    display: none;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.btn-add-cart.loading .spinner { display: block; }
.btn-add-cart.loading i { display: none; }

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

/* =================== Product Detail Page =================== */
.product-gallery { position: sticky; top: calc(var(--navbar-height) + var(--topbar-height) + 50px + 1rem); }
.gallery-main {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-alt);
    aspect-ratio: 1;
    position: relative;
    cursor: zoom-in;
}
.gallery-main-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}
.gallery-main:hover .gallery-main-img { transform: scale(1.05); }
.gallery-thumbs-swiper { margin-top: 12px; }
.gallery-thumb {
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition-fast);
    aspect-ratio: 1;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb.active, .gallery-thumb:hover { border-color: var(--primary); }

.product-detail-info {}
.product-detail-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary)12;
    color: var(--primary);
    padding: 4px 14px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 16px;
}
.product-detail-title {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 12px;
}
.product-detail-meta { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.product-detail-rating { display: flex; align-items: center; gap: 8px; }
.product-detail-sku { color: var(--text-muted); font-size: 0.85rem; }
.product-detail-price-block { margin-bottom: 24px; }
.product-detail-price {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary);
}
.product-detail-old-price {
    font-size: 1.1rem;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-right: 12px;
}
.price-save { background: var(--secondary)20; color: var(--accent); padding: 3px 12px; border-radius: 100px; font-size: 0.82rem; font-weight: 700; }

.stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
}
.stock-badge.success { background: #D1FAE5; color: #065F46; }
.stock-badge.warning { background: #FEF3C7; color: #92400E; }
.stock-badge.danger  { background: #FEE2E2; color: #991B1B; }

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    width: fit-content;
    margin-bottom: 20px;
}
.qty-btn {
    width: 44px;
    height: 44px;
    background: var(--bg-alt);
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}
.qty-btn:hover { background: var(--primary); color: #fff; }
.qty-input {
    width: 60px;
    text-align: center;
    border: none;
    background: var(--bg-card);
    color: var(--text);
    font-family: var(--font);
    font-weight: 700;
    font-size: 1rem;
    outline: none;
    -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.product-actions-bar { display: flex; gap: 12px; align-items: center; margin-bottom: 24px; flex-wrap: wrap; }
.btn-add-cart-lg {
    flex: 1;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    border: none;
    padding: 16px 32px;
    border-radius: var(--radius-lg);
    font-family: var(--font);
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(90,13,26,0.3);
}
.btn-add-cart-lg:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(90,13,26,0.4); }

.btn-wishlist-lg {
    width: 52px;
    height: 52px;
    border-radius: var(--radius);
    border: 2px solid var(--border);
    background: var(--bg-card);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}
.btn-wishlist-lg:hover, .btn-wishlist-lg.active { color: #ef4444; border-color: #ef4444; background: #fef2f2; }

.product-features { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.product-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.product-feature i { color: var(--primary); font-size: 1rem; }

/* Tabs */
.product-tabs .nav-tabs {
    border: none;
    gap: 4px;
    margin-bottom: 24px;
}
.product-tabs .nav-link {
    border: none;
    border-radius: var(--radius);
    padding: 10px 22px;
    color: var(--text-muted);
    font-weight: 600;
    font-family: var(--font);
    transition: var(--transition-fast);
}
.product-tabs .nav-link:hover { color: var(--primary); background: var(--bg-alt); }
.product-tabs .nav-link.active {
    background: var(--primary);
    color: #fff;
}

/* =================== Cart Page =================== */
.cart-table th {
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    border: none;
    border-bottom: 2px solid var(--border);
}
.cart-row td { padding: 16px; vertical-align: middle; border: none; border-bottom: 1px solid var(--border-light); }
.cart-product-img {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 1px solid var(--border);
}
.cart-product-name { font-weight: 700; font-size: 0.95rem; }
.cart-summary-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: sticky;
    top: calc(var(--navbar-height) + var(--topbar-height) + 50px + 1rem);
}
.cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.95rem;
}
.cart-summary-row:last-child { border-bottom: none; }
.cart-total-final {
    display: flex;
    justify-content: space-between;
    padding: 16px 0;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary);
    border-top: 2px solid var(--border);
    margin-top: 8px;
}

/* =================== Cart Mobile =================== */
.cart-mobile-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cart-mobile-item {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px;
}

.cart-mobile-top {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.cart-mobile-link img {
    cursor: pointer;
}

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

.cart-mobile-stock {
    margin-top: 3px;
}

.cart-mobile-price {
    margin-top: 8px;
    font-size: 1rem;
    color: var(--primary);
}

.cart-mobile-bottom {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.cart-mobile-qty {
    border-radius: 999px;
    margin: 0;
    border-width: 1px;
}

.cart-mobile-total {
    margin-right: auto;
    white-space: nowrap;
}

/* =================== Forms =================== */
.form-control, .form-select {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font);
    padding: 12px 16px;
    transition: var(--transition-fast);
}
.form-control:focus, .form-select:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px rgba(196,138,149,0.15);
    background: var(--bg-card);
    color: var(--text);
    outline: none;
}
.form-label { font-weight: 600; font-size: 0.9rem; color: var(--text); margin-bottom: 6px; }
.input-group-text {
    background: var(--bg-alt);
    border: 2px solid var(--border);
    color: var(--text-muted);
}

/* Auth Forms */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 50%, var(--secondary) 100%);
    padding: 40px 16px;
}
.auth-card {
    background: var(--bg-glass);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-xl);
    padding: 50px 40px;
    width: 100%;
    max-width: 460px;
    box-shadow: var(--shadow-xl);
}
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo .logo-main { font-size: 2rem; color: #fff; }
.auth-logo .logo-sub { color: rgba(255,255,255,0.7); }
.auth-title { text-align: center; font-size: 1.5rem; font-weight: 800; color: #fff; margin-bottom: 8px; }
.auth-subtitle { text-align: center; color: rgba(255,255,255,0.7); font-size: 0.9rem; margin-bottom: 32px; }
.auth-card .form-control {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
    color: #fff;
}
.auth-card .form-control:focus {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.5);
    box-shadow: 0 0 0 4px rgba(255,255,255,0.1);
}
.auth-card .form-control::placeholder { color: rgba(255,255,255,0.5); }
.auth-card .form-label { color: rgba(255,255,255,0.9); }
.auth-card .btn-primary {
    background: #fff;
    color: var(--primary);
    border: none;
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    border-radius: var(--radius);
}
.auth-card .btn-primary:hover { background: rgba(255,255,255,0.9); color: var(--primary-light); transform: translateY(-2px); }
.auth-link { color: rgba(255,255,255,0.8); text-align: center; margin-top: 20px; font-size: 0.9rem; }
.auth-link a { color: #fff; font-weight: 700; }

/* =================== Newsletter =================== */
.newsletter-section { padding: 60px 0; background: var(--bg-alt); }
.newsletter-card {
    padding: 48px 48px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, var(--primary)08, var(--secondary)08);
    border: 1px solid var(--primary)20;
}
.badge-label {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 4px 16px;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 10px;
}
.newsletter-text h3 { font-size: 1.5rem; font-weight: 800; margin-bottom: 8px; }
.newsletter-text p { color: var(--text-muted); }
.newsletter-input-group { display: flex; gap: 10px; }
.newsletter-input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    color: var(--text);
    font-family: var(--font);
    outline: none;
    transition: var(--transition-fast);
}
.newsletter-input:focus { border-color: var(--secondary); }
.newsletter-btn {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: var(--radius-lg);
    font-family: var(--font);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}
.newsletter-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(90,13,26,0.35); }

/* =================== Footer =================== */
.site-footer { background: var(--primary); color: rgba(255,255,255,0.85); }
.footer-top { padding: 70px 0 50px; }
.footer-logo .logo-main { font-size: 1.8rem; font-weight: 900; color: #fff; display: block; }
.footer-logo .logo-sub { font-size: 0.65rem; letter-spacing: 3px; color: var(--secondary); text-transform: uppercase; }
.footer-desc { font-size: 0.88rem; line-height: 1.8; opacity: 0.8; }

.social-links { display: flex; gap: 10px; }
.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.8);
    transition: var(--transition-fast);
    font-size: 0.9rem;
}
.social-link:hover { transform: translateY(-3px); color: #fff; }
.social-link.facebook:hover  { background: #1877F2; }
.social-link.instagram:hover { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.social-link.twitter:hover   { background: #000; }
.social-link.whatsapp:hover  { background: #25D366; }

.footer-title { font-size: 1rem; font-weight: 700; color: #fff; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: rgba(255,255,255,0.7); font-size: 0.88rem; transition: var(--transition-fast); display: flex; align-items: center; gap: 6px; }
.footer-links a::before { content: '←'; font-size: 0.7rem; transition: var(--transition-fast); }
.footer-links a:hover { color: #fff; padding-right: 6px; }
.footer-links a:hover::before { transform: translateX(-3px); }

.footer-contact { list-style: none; padding: 0; }
.footer-contact li { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; color: rgba(255,255,255,0.7); font-size: 0.88rem; }
.footer-contact i { color: var(--secondary); width: 18px; flex-shrink: 0; margin-top: 3px; }
.footer-contact a { color: rgba(255,255,255,0.7); }
.footer-contact a:hover { color: #fff; }

.payment-methods {}
.payment-icons { display: flex; flex-direction: column; gap: 8px; }
.payment-icon { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--text-muted); }

/* تحسين نص "طرق الدفع المتاحة" للوضعين النهاري/الليلي (نص فقط) */
.payment-methods .text-muted,
.payment-info .text-muted { color: var(--text-muted) !important; }
.payment-methods .payment-icon i,
.payment-info i { color: currentColor; opacity: .9; }

/* داخل الفوتر الخلفية داكنة دائماً تقريباً: ارفع التباين قليلاً */
.site-footer .payment-icon { color: rgba(255,255,255,0.78); }
[data-theme="dark"] .site-footer .payment-icon { color: rgba(255,255,255,0.82); }

.trust-badges {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    padding: 32px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.trust-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,0.85);
}
.trust-badge i { font-size: 1.8rem; color: var(--secondary); }
.trust-badge div { display: flex; flex-direction: column; }
.trust-badge strong { font-size: 0.95rem; color: #fff; }
.trust-badge span { font-size: 0.78rem; opacity: 0.7; }

.footer-bottom {
    background: rgba(0,0,0,0.2);
    padding: 20px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.footer-bottom p { color: rgba(255,255,255,0.6); font-size: 0.85rem; margin: 0; }
.footer-bottom a { color: rgba(255,255,255,0.6); font-size: 0.85rem; transition: var(--transition-fast); }
.footer-bottom a:hover { color: #fff; }

/* =================== Scroll To Top =================== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}
.scroll-to-top.show { opacity: 1; visibility: visible; }
.scroll-to-top:hover { transform: translateY(-4px); box-shadow: var(--shadow-xl); }

/* =================== Compare Bar =================== */
.compare-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 2px solid var(--primary);
    padding: 12px 0;
    z-index: 998;
    box-shadow: 0 -4px 30px rgba(0,0,0,0.15);
}
.compare-bar-inner { display: flex; align-items: center; gap: 20px; }
.compare-title { font-weight: 700; white-space: nowrap; }
.compare-items { display: flex; gap: 12px; flex: 1; overflow-x: auto; }

/* =================== Mobile Bottom Navigation =================== */
.bottom-nav {
    display: none;
}

.bottom-nav-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-decoration: none;
    min-width: 0;
}

.bottom-nav-item i {
    font-size: 1.05rem;
}

.bottom-nav-item.active {
    color: var(--primary);
}

.bottom-nav-badge {
    position: absolute;
    top: 3px;
    left: calc(50% - 14px);
    min-width: 16px;
    height: 16px;
    border-radius: 100px;
    background: var(--secondary);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}

/* =================== Animations =================== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes logoScaleIn {
    from { opacity: 0; transform: scale(0.88); }
    to { opacity: 1; transform: scale(1); }
}

/* =================== Skeleton Loading =================== */
.skeleton {
    background: linear-gradient(90deg, var(--bg-alt) 25%, var(--border) 50%, var(--bg-alt) 75%);
    background-size: 200% 100%;
    animation: skeleton 1.5s infinite;
    border-radius: var(--radius-sm);
}
@keyframes skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* =================== Badges =================== */
.badge-label-primary { background: var(--primary)15; color: var(--primary); padding: 4px 12px; border-radius: 100px; font-size: 0.78rem; font-weight: 700; }

/* =================== Offer Banners =================== */
.offer-banner {
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    aspect-ratio: 2/1;
    cursor: pointer;
}
.offer-banner img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.offer-banner:hover img { transform: scale(1.05); }
.offer-banner.no-banner-zoom:hover img { transform: none; }
.offer-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(90,13,26,0.85), rgba(90,13,26,0.3));
    display: flex;
    align-items: center;
    padding: 30px;
}
.offer-banner-text h4 { color: #fff; font-size: 1.4rem; font-weight: 800; }
.offer-banner-text p { color: rgba(255,255,255,0.8); margin: 8px 0 16px; }


/* =================== Pagination =================== */
.pagination { gap: 6px; }
.page-item .page-link {
    border-radius: var(--radius-sm) !important;
    border: 2px solid var(--border);
    color: var(--text);
    font-family: var(--font);
    font-weight: 600;
    padding: 8px 14px;
    background: var(--bg-card);
    transition: var(--transition-fast);
}
.page-item .page-link:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary)10;
}
.page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* =================== Account Page =================== */
.account-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: sticky;
    top: calc(var(--navbar-height) + var(--topbar-height) + 50px + 1rem);
}
.account-sidebar-header {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    padding: 28px 24px;
    text-align: center;
}
.account-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 12px;
    color: #fff;
}
.account-name { font-size: 1.1rem; font-weight: 700; }
.account-email { font-size: 0.82rem; opacity: 0.8; margin-top: 4px; }
.account-nav { list-style: none; padding: 16px 12px; margin: 0; }
.account-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-weight: 500;
    transition: var(--transition-fast);
    text-decoration: none;
    font-size: 0.9rem;
}
.account-nav li a:hover { background: var(--bg-alt); color: var(--primary); }
.account-nav li a.active { background: var(--primary); color: #fff; }
.account-nav li a i { width: 18px; }

/* =================== Order Status =================== */
.order-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 700;
}
.status-pending    { background: #FEF3C7; color: #92400E; }
.status-confirmed  { background: #DBEAFE; color: #1E40AF; }
.status-processing { background: #E0E7FF; color: #3730A3; }
.status-shipped    { background: #D1FAE5; color: #065F46; }
.status-delivered  { background: #D1FAE5; color: #065F46; }
.status-cancelled  { background: #FEE2E2; color: #991B1B; }
.status-refunded   { background: #F3F4F6; color: #374151; }

/* =================== Admin Dashboard =================== */
/* (موجودة في admin/assets/css/admin.css) */

/* =================== Responsive =================== */
@media (max-width: 1199px) {
    .hero-stats { gap: 24px; }
}

@media (max-width: 991px) {
    .hero-section { height: 70vh; }
    .hero-section.hero-as-banner {
        height: auto;
        min-height: 0;
        padding: 12px 0;
    }
    .hero-content { max-width: 100%; }
    .hero-stats { bottom: 20px; gap: 20px; }
    .hero-stat .number { font-size: 1.5rem; }
    .categories-grid { grid-template-columns: repeat(4, 1fr); }
    .newsletter-card { padding: 32px 24px; }
    .trust-badges { gap: 24px; }
}

@media (max-width: 767px) {
    :root {
        --topbar-height-mobile: 36px;
    }

    html {
        overflow-x: hidden;
        width: 100%;
        max-width: 100%;
    }

    body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
        padding-top: calc(var(--topbar-height-mobile) + var(--navbar-height));
    }

    .container,
    .container-fluid {
        width: 100%;
        max-width: 100%;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .row {
        --bs-gutter-x: 0.9rem;
        margin-left: 0;
        margin-right: 0;
    }

    .row > * {
        padding-left: calc(var(--bs-gutter-x) * .5);
        padding-right: calc(var(--bs-gutter-x) * .5);
    }

    .flash-container {
        min-width: 0;
        width: calc(100% - 20px);
        left: 10px;
        transform: none;
    }

    .top-bar .container-fluid {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .top-bar {
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        z-index: 1300;
        height: var(--topbar-height-mobile);
    }

    .main-navbar {
        position: fixed;
        top: var(--topbar-height-mobile);
        right: 0;
        left: 0;
        z-index: 1250;
    }

    .top-bar-actions {
        width: 100%;
        justify-content: space-between !important;
    }

    .free-shipping-badge {
        font-size: 0.72rem;
        padding: 4px 10px;
        white-space: normal;
        text-align: center;
    }

    .main-navbar .container-fluid {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .main-navbar > .container-fluid:first-child {
        justify-content: space-between;
        flex-wrap: nowrap;
        gap: 8px;
    }

    .top-bar,
    .main-navbar,
    .main-content,
    .site-footer,
    .bottom-nav,
    .compare-bar {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .navbar-brand {
        max-width: calc(100% - 212px);
        flex: 1 1 auto;
        overflow: hidden;
    }

    .logo-main {
        font-size: 1.15rem;
    }

    .logo-sub {
        font-size: 0.52rem;
        letter-spacing: 1.5px;
    }

    .navbar-logo-img {
        width: 38px;
        height: 38px;
        border-radius: 12px;
        padding: 3px;
    }

    .navbar-actions {
        gap: 4px !important;
        flex: 0 0 auto;
        flex-wrap: nowrap;
    }

    .nav-action-btn {
        width: 38px;
        height: 38px;
        font-size: 1rem;
        padding: 0;
        flex: 0 0 38px;
    }

    .user-btn {
        width: 38px;
        height: 38px;
        padding: 0;
        border-radius: 50%;
        justify-content: center;
        gap: 0;
    }

    .user-dropdown .dropdown-toggle::after {
        display: none;
    }

    .navbar-logo-text.has-image .logo-main {
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .page-hero {
        padding-top: 22px;
        padding-bottom: 18px;
    }

    /* Hide breadcrumb on mobile product page — gallery handles the top */
    body:has(.mobile-product-page) .page-hero {
        display: none !important;
    }

    /* Mobile product page spacing */
    .mobile-product-page {
        margin-top: 0;
    }

    .page-title {
        font-size: clamp(1.2rem, 6vw, 1.55rem);
        line-height: 1.35;
        word-break: break-word;
    }

    .custom-breadcrumb {
        flex-wrap: wrap;
        row-gap: 4px;
    }

    .categories-grid { grid-template-columns: repeat(3, 1fr); }
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .hero-stats { display: none; }
    .hero-content {
        padding: 0 .7rem;
        max-width: 100%;
        text-align: center;
    }
    .hero-logo-premium {
        width: 88px;
        height: 88px;
        padding: 8px;
        margin-bottom: 10px;
    }
    .hero-line-glass {
        padding: 5px 12px;
    }
    .hero-title {
        font-size: clamp(1.6rem, 7vw, 2.1rem);
        margin-bottom: 6px;
        padding: 7px 14px;
    }
    .hero-tagline {
        font-size: .68rem;
        letter-spacing: 1.8px;
        margin-bottom: 12px;
        padding: 5px 12px;
    }
    .hero-desc {
        font-size: .88rem;
        margin-bottom: 18px;
        max-width: 92%;
        margin-right: auto;
        margin-left: auto;
        padding: 6px 12px;
    }
    .hero-actions {
        gap: 8px;
        justify-content: center;
    }
    .btn-hero-primary,
    .btn-hero-outline {
        padding: 10px 16px;
        font-size: .86rem;
    }
    .btn-hero-primary {
        min-width: 184px;
    }
    .btn-hero-outline {
        min-width: 148px;
    }

    .hero-swiper .swiper-button-next,
    .hero-swiper .swiper-button-prev {
        display: none;
    }

    .section {
        padding: 46px 0;
    }
    .section-header {
        margin-bottom: 30px;
    }
    .section-title {
        font-size: 1.35rem;
    }

    .product-card {
        min-width: 0;
    }
    .product-name {
        font-size: 0.86rem;
    }
    .product-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .btn-add-cart {
        width: 100%;
        justify-content: center;
    }

    .product-detail-meta {
        gap: 10px;
    }
    .product-actions-bar {
        gap: 8px;
    }
    .btn-add-cart-lg {
        width: 100%;
        font-size: .95rem;
        padding: 12px 16px;
    }
    .btn-wishlist-lg {
        width: 46px;
        height: 46px;
        flex: 0 0 46px;
    }

    .table-responsive {
        border-radius: var(--radius-sm);
    }
    .cart-table th,
    .cart-table td {
        white-space: nowrap;
    }
    .cart-row td {
        padding: 10px 8px;
    }
    .cart-product-img {
        width: 56px;
        height: 56px;
    }
    .cart-product-name {
        font-size: 0.85rem;
    }

    .cart-footer {
        display: grid;
        gap: 8px;
    }
    .cart-footer .btn {
        width: 100%;
    }

    .coupon-form {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .coupon-form .btn {
        width: 100%;
    }

    .auth-page {
        padding: 24px 10px;
    }
    .auth-card { padding: 32px 24px; }
    .newsletter-input-group { flex-direction: column; }
    .newsletter-card {
        padding: 22px 14px;
    }
    .newsletter-btn {
        width: 100%;
        justify-content: center;
    }

    .trust-badges { gap: 16px; justify-content: flex-start; }
    .trust-badge {
        width: 100%;
    }

    .footer-top {
        padding: 46px 0 24px;
    }
    .footer-bottom .text-md-start {
        text-align: right !important;
        margin-top: 8px;
    }

    .account-sidebar {
        position: static;
        top: auto;
    }
    .account-nav li a {
        font-size: 0.86rem;
    }

    .mini-cart-sidebar {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        height: min(78vh, 620px);
        border-radius: 18px 18px 0 0;
        transform: translateY(105%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .mini-cart-sidebar.show {
        transform: translateY(0);
    }
    .mini-wishlist-sidebar {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        height: min(78vh, 620px);
        border-radius: 18px 18px 0 0;
        transform: translateY(105%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .mini-wishlist-sidebar.show {
        transform: translateY(0);
    }
    .mini-cart-header,
    .mini-cart-footer {
        padding: 14px 12px;
    }
    .mini-cart-body {
        padding: 10px;
    }

    .main-content {
        padding-bottom: calc(var(--bottom-nav-height) + 14px);
    }

    .bottom-nav {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        align-items: center;
        position: fixed;
        bottom: 0;
        right: 0;
        left: 0;
        height: var(--bottom-nav-height);
        background: color-mix(in srgb, var(--bg-card) 82%, transparent);
        border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
        backdrop-filter: blur(16px) saturate(130%);
        -webkit-backdrop-filter: blur(16px) saturate(130%);
        box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.14);
        z-index: 1200;
        padding-bottom: calc(env(safe-area-inset-bottom, 0px));
    }

    .compare-bar {
        bottom: var(--bottom-nav-height);
    }

    .compare-bar-inner {
        gap: 10px;
        flex-wrap: wrap;
    }

    .scroll-to-top {
        bottom: calc(var(--bottom-nav-height) + 16px);
        left: 14px;
    }

    .products-toolbar .d-flex {
        align-items: stretch !important;
    }

    .products-toolbar .results-info,
    .products-toolbar .toolbar-actions,
    .products-toolbar .sort-select {
        width: 100%;
    }

    .product-gallery {
        position: static;
        top: auto;
    }

    .cart-summary-card {
        position: static;
        top: auto;
    }
}

@media (max-width: 575px) {
    :root {
        --topbar-height-mobile: 34px;
    }

    .row {
        --bs-gutter-x: .75rem;
        margin-left: 0;
        margin-right: 0;
    }

    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

    .top-bar {
        height: var(--topbar-height-mobile);
        min-height: var(--topbar-height-mobile);
        padding: 0;
    }
    .free-shipping-badge {
        font-size: 0.68rem;
        padding: 4px 8px;
    }

    .main-navbar > .container-fluid:first-child {
        height: auto;
        min-height: 60px;
        gap: .6rem;
        padding-top: 8px;
        padding-bottom: 8px;
        justify-content: space-between;
        flex-wrap: nowrap;
    }

    .navbar-brand {
        max-width: calc(100% - 188px);
    }
    .logo-main {
        font-size: 0.96rem;
    }
    .logo-sub {
        display: none;
    }

    .navbar-logo-img {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .navbar-actions {
        gap: 3px !important;
    }

    .nav-action-btn,
    .user-btn {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
        font-size: 0.92rem;
    }

    .hero-section {
        min-height: 390px;
        height: 62vh;
    }
    .hero-section.hero-as-banner {
        min-height: 0;
        height: auto;
        padding: 10px 0;
    }
    .hero-slide.hero-slide-as-banner {
        aspect-ratio: 16 / 11;
    }
    .hero-title {
        font-size: 1.45rem;
        max-width: 92%;
        margin-right: auto;
        margin-left: auto;
        padding: 6px 12px;
    }
    .hero-logo-premium {
        width: 74px;
        height: 74px;
        padding: 7px;
    }
    .hero-tagline {
        font-size: .62rem;
        letter-spacing: 1.4px;
        margin-bottom: 10px;
        padding: 5px 10px;
    }
    .hero-desc {
        font-size: .83rem;
        line-height: 1.55;
        padding: 5px 10px;
    }
    .hero-actions {
        width: 100%;
        flex-direction: column;
        gap: 9px;
    }
    .btn-hero-primary,
    .btn-hero-outline {
        width: 100%;
        max-width: 290px;
        margin: 0 auto;
        justify-content: center;
    }

    .product-info { padding: 12px; }
    .product-price { font-size: 1rem; }
    .btn-add-cart { padding: 8px 12px; font-size: 0.8rem; }

    .bottom-nav-item span {
        font-size: .66rem;
    }

    .scroll-to-top {
        width: 40px;
        height: 40px;
        font-size: .88rem;
    }

    .compare-bar {
        padding: 8px 0;
    }
    .compare-title {
        width: 100%;
        white-space: normal;
    }
    .compare-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .compare-actions .btn {
        width: 100%;
    }
}

/* =================== Quick View Modal =================== */
.quick-view-dialog {
    max-width: min(1080px, 96vw);
}
.quick-view-content {
    border-radius: 24px;
    border: 1px solid var(--border);
    background: linear-gradient(135deg, color-mix(in srgb, var(--bg-card) 92%, var(--secondary) 8%), var(--bg-card));
    box-shadow: 0 20px 50px rgba(0,0,0,0.16);
    overflow: hidden;
}
.quick-view-header {
    background: color-mix(in srgb, var(--bg-alt) 70%, transparent);
    border-bottom: 1px solid var(--border-light) !important;
}
.quick-view-image-wrap {
    border-radius: 18px;
    overflow: hidden;
    background: color-mix(in srgb, var(--bg-alt) 88%, var(--secondary) 12%);
    border: 1px solid var(--border-light);
    aspect-ratio: 1 / 1;
}
.quick-view-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.quick-view-category {
    color: var(--secondary);
    font-weight: 800;
    font-size: .82rem;
    margin-bottom: 6px;
}
.quick-view-title {
    font-size: 1.35rem;
    line-height: 1.45;
}
.quick-view-price-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}
.quick-view-price {
    font-size: 1.9rem;
    font-weight: 900;
    color: var(--primary);
}
.quick-view-old-price {
    text-decoration: line-through;
    color: var(--text-muted);
    font-size: .96rem;
}
.quick-view-discount-badge {
    background: var(--secondary)20;
    color: var(--accent);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 800;
}
.quick-view-desc {
    color: var(--text-muted);
    line-height: 1.9;
    margin-bottom: 18px;
}
.quick-view-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}
.quick-view-link-wrap .btn {
    border-width: 2px;
}
@media (max-width: 767px) {
    .quick-view-dialog.modal-dialog {
        max-width: calc(100vw - 14px) !important;
        width: calc(100vw - 14px);
        margin: 7px auto;
        max-height: min(92dvh, 92vh);
    }
    .quick-view-dialog .modal-content {
        max-height: min(92dvh, 92vh);
    }
    .quick-view-content {
        border-radius: 16px;
    }
    .quick-view-header {
        padding: 0.65rem 0.85rem !important;
        flex-shrink: 0;
    }
    .quick-view-header .modal-title {
        font-size: 0.95rem;
    }
    .quick-view-body {
        padding: 0.65rem 0.75rem !important;
    }
    .quick-view-layout {
        --bs-gutter-y: 0.75rem;
        --bs-gutter-x: 0.75rem;
    }
    .quick-view-image-wrap {
        max-width: 200px;
        max-height: 200px;
        margin-inline: auto;
        aspect-ratio: 1 / 1;
    }
    .quick-view-title {
        font-size: 1rem;
        line-height: 1.35;
        margin-bottom: 0.5rem !important;
    }
    .quick-view-category {
        font-size: 0.72rem;
        margin-bottom: 4px;
    }
    .quick-view-price-row {
        margin-bottom: 8px;
        gap: 6px;
    }
    .quick-view-price {
        font-size: 1.25rem;
    }
    .quick-view-old-price {
        font-size: 0.82rem;
    }
    .quick-view-desc {
        font-size: 0.82rem;
        line-height: 1.55;
        margin-bottom: 12px;
    }
    .quick-view-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .quick-view-actions .quantity-selector,
    .quick-view-actions .btn-add-cart-lg {
        width: 100%;
    }
    .quick-view-link-wrap {
        margin-top: 0.75rem !important;
    }
    .quick-view-link-wrap .btn {
        width: 100%;
        padding-top: 0.45rem;
        padding-bottom: 0.45rem;
        font-size: 0.86rem;
    }
}

/* =================== Utilities =================== */
.text-primary-custom { color: var(--primary) !important; }
.text-secondary-custom { color: var(--secondary) !important; }
.bg-primary-custom { background-color: var(--primary) !important; }

/* =================== SweetAlert2 Warning Icon =================== */
.swal2-popup .swal2-icon.swal2-warning {
    width: 5.2em;
    height: 5.2em;
    border: 0;
    border-radius: 50%;
    display: grid !important;
    place-items: center;
    background:
        radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.95) 0 20%, transparent 45%),
        linear-gradient(145deg, #ffd978 0%, #ffb347 52%, #ff8f2f 100%);
    box-shadow:
        0 14px 34px rgba(255, 149, 0, 0.28),
        inset 0 -8px 14px rgba(0, 0, 0, 0.12),
        inset 0 5px 10px rgba(255, 255, 255, 0.45);
    animation: swalWarningPulse 1.7s ease-in-out infinite;
}

.swal2-popup .swal2-icon.swal2-warning .swal2-icon-content {
    font-size: 2.35em;
    font-weight: 900;
    line-height: 1;
    color: #fff;
    text-shadow: 0 2px 8px rgba(109, 53, 0, 0.34);
    transform: translateY(-1px);
}

@keyframes swalWarningPulse {
    0%, 100% { transform: scale(1); }
    45% { transform: scale(1.06); }
}
.rounded-custom { border-radius: var(--radius) !important; }

/* RTL Support - Buttons */
html[dir="rtl"] .btn:not(.btn-icon),
html[dir="rtl"] .btn-hero-primary,
html[dir="rtl"] .btn-hero-outline,
html[dir="rtl"] .btn-add-cart,
html[dir="rtl"] .btn-add-cart-lg,
html[dir="rtl"] .btn-wishlist-lg {
    direction: rtl;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
}

html[dir="rtl"] .btn i,
html[dir="rtl"] .btn svg,
html[dir="rtl"] .btn-hero-primary i,
html[dir="rtl"] .btn-hero-outline i,
html[dir="rtl"] .btn-add-cart i,
html[dir="rtl"] .btn-add-cart-lg i,
html[dir="rtl"] .btn-wishlist-lg i {
    margin-left: 0 !important;
    margin-right: 0 !important;
}
.shadow-custom { box-shadow: var(--shadow) !important; }
.gap-3 { gap: 1rem !important; }

/* Wishlist indicator */
.wishlisted { color: #ef4444 !important; }
