/* ==========================================
   Reset & Base Styles
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Remove tap highlight on mobile for all clickable elements */
a, button, input, select, textarea, label, [onclick], [role="button"] {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    outline: none;
}

/* Also apply to elements with tabindex */
[tabindex] {
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #e74c3c;
    --accent-color: #3498db;
    --text-primary: #2c3e50;
    --text-secondary: #636e72;
    --bg-light: #f9f9f9;
    --bg-white: #ffffff;
    --border-color: #ecf0f1;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
    --font-base: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
}

@media (min-width: 768px) {
    html {
        scrollbar-gutter: stable;
        overflow-y: scroll;
    }
}

/* ==========================================
   Vazirmatn & Yekan Font Faces (assets/fonts/*)
========================================== */
@font-face {
    font-family: 'Vazirmatn';
    font-style: normal;
    font-weight: 300 500;
    font-display: swap;
    src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Vazirmatn';
    font-style: normal;
    font-weight: 600 900;
    font-display: swap;
    src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
}
@font-face {
    font-family: 'Yekan';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/Yekan.woff2') format('woff2');
}

body {
    font-family: var(--font-base);
    direction: rtl;
    background-color: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.6;
    padding-top: 60px;
    padding-bottom: 80px;
}

/* Lock scroll without layout shift when filter panel/sheets are open */
body.filter-open {
    overflow: hidden;
    padding-right: 0;
    padding-inline-end: 0;
}

body.filter-open .main-header {
    padding-right: 0;
    padding-inline-end: 0;
}

/* Ensure content doesn't hide under bottom-nav on all devices */
@media (max-width: 767px) {
    body {
        padding-bottom: 80px;
    }
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* Numeric-only font override helper */
.yekan-nums {
    font-family: 'Yekan', 'Vazirmatn', sans-serif;
    font-feature-settings: 'ss01' on;
    font-variant-numeric: tabular-nums;
}

.stock-badge,
.badge-limited,
.discount-percent-badge,
.cart-count,
[data-cart-badge="1"],
.quantity-selector input,
.qty-input,
.price,
.amount,
.total-value,
.price-value,
.filter-size__count,
.rating-text {
    font-family: 'Yekan', 'Vazirmatn', sans-serif;
    font-feature-settings: 'ss01' on;
    font-variant-numeric: tabular-nums;
}

/* ==========================================
   Header - Sticky Top
   ========================================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    box-shadow: none;
    border-bottom: 1px solid #e5e7eb;
    z-index: 1000;
}

/* لوگو تصویری در هدر */
.site-logo {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 44px;
    display: block;
    object-fit: contain;
    object-position: center;
}
.logo-text {font-size:18px;font-weight:700;}

/* موبایل: لوگو حداکثر 30px ارتفاع */
@media (max-width: 767px) {
    .site-logo {
        max-height: 34px;
    }
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    height: 60px;
    gap: 8px;
}

.hamburger-menu,
.search-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-primary);
    border-radius: 8px;
    transition: var(--transition);
}

.hamburger-menu:active,
.search-btn:active {
    background: var(--bg-light);
    transform: none;
}

.logo {
    flex: 1;
    text-align: center;
    margin: 0;
}

/* موبایل: مارجین بالا 7px */
@media (max-width: 767px) {
    .logo {
        margin-top: 15px;
    }
}

.logo a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: clamp(120px, 40vw, 220px);
    min-height: 36px;
    max-width: 100%;
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
}

.logo i {
    font-size: 24px;
    color: var(--secondary-color);
}

/* Desktop Navigation */
.desktop-nav {
    display: none;
    gap: 2px;
    align-items: center;
    justify-content: flex-end;
    width: fit-content;
    max-width: 100%;
    margin: 0;
}

.desktop-nav a {
    padding: 7px 12px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    transition: var(--transition);
    white-space: nowrap;
}

.desktop-nav a:hover {
    background: var(--bg-light);
    color: var(--secondary-color);
}

.desktop-nav a:active {
    transform: none;
}

/* Header Icons Container */
.header-icons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-icon,
.user-icon,
.message-icon {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-primary);
    border-radius: 8px;
    transition: var(--transition);
}

.cart-icon:hover,
.user-icon:hover,
.message-icon:hover {
    background: var(--bg-light);
    color: var(--secondary-color);
}

.cart-badge-desktop,
.message-badge-desktop {
    position: absolute;
    top: 2px;
    right: auto;
    left: 0px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-size: 12px;
    font-weight: 700;
    width: 19px;
    height: 19px;
    line-height: 14px;
    padding: 0;
    border-radius: 50%;
    text-align: center;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
    border: 2px solid white;
    font-family: 'Tahoma', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Header-specific badge positioning (don't affect footer) */
.main-header .cart-icon .cart-badge-desktop,
.main-header .message-icon .message-badge-desktop {
    top: -6px;
    right: -8px;
    left: auto;
}

.desktop-only {
    display: none;
}

/* Search Bar */
.search-bar {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    padding: 12px 16px;
    box-shadow: none;
    border: 1px solid #e5e7eb;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.search-bar.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.search-bar form {
    display: flex;
    gap: 8px;
}

.search-bar input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.search-bar button {
    padding: 12px 20px;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    font-size: 16px;
}

/* ==========================================
   Side Drawer Menu
   ========================================== */
.side-drawer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    pointer-events: none;
}

.side-drawer.active {
    pointer-events: all;
}

.drawer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.side-drawer.active .drawer-overlay {
    opacity: 1;
}

.drawer-content {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 80%;
    max-width: 320px;
    background: var(--bg-white);
    box-shadow: none;
    border-left: 1px solid #e5e7eb;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    padding: 20px 0;
}

.side-drawer.active .drawer-content {
    transform: translateX(0);
}

.drawer-close {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-secondary);
    border-radius: 50%;
    transition: var(--transition);
}

.drawer-close:active {
    background: var(--bg-light);
}

.drawer-menu {
    list-style: none;
    padding: 50px 0 20px;
}

.drawer-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    color: var(--text-primary);
    font-size: 16px;
    transition: var(--transition);
}

.drawer-menu li a:active {
    background: var(--bg-light);
}

.drawer-menu li a i {
    width: 24px;
    font-size: 18px;
    color: var(--secondary-color);
}

.drawer-menu li.divider {
    height: 1px;
    background: var(--border-color);
    margin: 12px 24px;
}

.drawer-group-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    cursor: pointer;
    font-family: inherit;
    color: var(--text-primary);
}

.drawer-group-toggle:active {
    background: var(--bg-light);
}

.drawer-group-title {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 600;
}

.drawer-group-title i {
    width: 24px;
    font-size: 17px;
    color: var(--secondary-color);
}

.drawer-group-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: transform 0.25s ease;
}

.drawer-group.is-open .drawer-group-indicator {
    transform: rotate(180deg);
}

.drawer-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    background: #f8fafc;
    border-top: 1px solid #eef2f7;
    transition: max-height 0.28s ease;
}

.drawer-group.is-open .drawer-submenu {
    max-height: 560px;
}

.drawer-submenu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 24px 13px 44px;
    color: var(--text-secondary);
    font-size: 15px;
}

.drawer-submenu li a:active {
    background: #eef2f7;
    color: var(--text-primary);
}

.drawer-submenu-empty {
    display: block;
    padding: 12px 24px 14px;
    color: #94a3b8;
    font-size: 13px;
}

/* ==========================================
   Main Content
   ========================================== */
.main-content {
    min-height: calc(100vh - 130px);
}

/* دسترس‌پذیری: مخفی دیداری بدون حذف از دسترس صفحه‌خوان‌ها */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ==========================================
   Quick Categories - Dynamic Grid System
   ========================================== */
.quick-categories {
    padding: 24px 16px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ==========================================
    Hero Banner با Safe Zone
    دسکتاپ: 1200:470 (نسبت 120:47) - Safe Zone: مرکز 1000×250 (4:1 برای لوگو)
    موبایل: 13:10 - کراپ چپ/راست، ارتفاع بیشتر
    Safe Zone: مرکز با نسبت 1600:400 (4:1)
    ========================================== */
.hero { background: var(--bg-white); padding: 0 0 0; position: relative; }
.hero-inner { position: relative; width: 100%; margin: 0 auto; overflow: hidden; border-radius: 0; aspect-ratio: 1200 / 470; background: #f6f7f9; }
.hero-image { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center; border-radius: 0; }

/* موبایل: نسبت 13:10 برای ارتفاع بیشتر و کراپ چپ/راست کنترل‌شده */
@media (max-width: 600px) {
    .hero-inner { aspect-ratio: 13 / 10; }
    .hero-image { object-fit: cover; object-position: center; }
}
/* اورلپ تصویر پروفایل */
.hero-profile { position:absolute; right:42px; bottom:16px; width:clamp(90px,10vw,120px); height:clamp(90px,10vw,120px); border-radius:50%; border:0px solid #000000; overflow:hidden; box-shadow:0 8px 24px -6px rgba(0,0,0,0.0);  display:flex; align-items:center; justify-content:center; }
.hero-profile img { width:100%; height:100%; object-fit:cover; display:block; }
@media (max-width:768px){ .hero { padding:0 0 0; } .hero-profile { right:30px; bottom:-44px; width:110px; height:110px; } }
@media (max-width:480px){ .hero { padding:0 0 0; } .hero-profile { right:20px; bottom:-38px; width:70px; height:70px; border-width:4px; } }

/* عنوان زیر هیرو، سمت چپ و در کنار دایره پروفایل */
.hero-below-title { padding: 0 16px; margin-top: 10px; padding-right: calc(clamp(90px, 12vw, 140px) + 20px); }
.hero-below-title .page-title { margin: -10px 5px; font-size: clamp(1rem, 1.8vw, 2rem); font-weight: normal; color: #111; letter-spacing: -0.015em;font-family: 'lalezar'; }
@media (max-width: 768px){ .hero-below-title { padding-right: calc(110px + 16px); } }
@media (max-width: 480px){ .hero-below-title { padding-right: calc(70px + 12px); } .hero-below-title .page-title { font-size: 1.1rem; } }

/* در موبایل هم نسبت 20:9 حفظ می‌شود، نیازی به ارتفاع ثابت نیست */

/* Responsive */
@media (max-width: 1200px) {
    .product-card {
        min-width: calc(33.333% - 13.33px);
    }
}

@media (max-width: 768px) {
    .product-card {
        min-width: calc(50% - 10px);
    }
}

@media (max-width: 480px) {
    /* ========================= Mobile Refresh ========================= */
    html, body {overflow-x:hidden;}
    body {background: var(--bg-white);}
    .main-header {border-bottom:1px solid #eee;}
    /* Unified spacing scale */
    :root { --space-1:4px; --space-2:8px; --space-3:12px; --space-4:16px; --space-5:24px; --space-6:32px; }
    /* Typography adjustments */
    body {font-size:14px;}
    /* Slider removed */
    /* Category grid tidy */
    .category-grid {padding: 0 var(--space-3); gap: var(--space-3);}    
    .category-item {padding: var(--space-3) var(--space-2);}
    /* Highlight bar tightening */
    .highlight-bar-container {padding: var(--space-2) var(--space-3) var(--space-2);}
    .highlight-track {gap: var(--space-2);}
    /* Drawer off-canvas assurance */
    .drawer-content {transform: translateX(105%);}    
    /* Quick categories padding fix for full visibility */
    .quick-categories {padding: 16px 12px;}
    /* Special 3-2 layout when 5 items (grid-3-2) */
    .category-grid.grid-3-2 {display:grid; grid-template-columns: repeat(6, 1fr);} /* 6 virtual tracks */
    .category-grid.grid-3-2 .category-item:nth-child(-n+3) {grid-column: span 2;} /* first 3 => 3 columns */
    .category-grid.grid-3-2 .category-item:nth-child(n+4) {grid-column: span 3;} /* last 2 => 2 columns */
    .category-grid.grid-3-2 .category-item {padding: var(--space-3) var(--space-2);}    
}


.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
    justify-content: center;
    max-width: 100%;
}

/* Mobile - 4 items per row */
@media (max-width: 767px) {
    /* Prevent horizontal overflow: allow columns to shrink below 100px */
    .category-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
/* الگوریتم توزیع هوشمند آیتم‌های ردیف آخر در موبایل (پر کردن عرض) */
@media (max-width: 767px) {
    /* غیرفعال‌سازی الگوریتم برای چینش ویژه grid-3-2 */
    .category-grid.grid-3-2 > .category-item {aspect-ratio: 1/1 !important; height:auto !important; min-height:90px;}
    .category-grid.grid-3-2 > .category-item i {font-size:32px;}
    .category-grid.grid-3-2 > .category-item span {font-size:13px;}
    .category-grid.grid-3-2 > .category-item {grid-column:auto;}
    /* فقط برای گریدهای معمولی اعمال شود */
    /* باقی‌مانده 1 (فقط یک آیتم در ردیف آخر) => تمام عرض */
    .category-grid:not(.grid-3-2) > .category-item:nth-last-child(1):nth-child(4n+1) { grid-column: span 4; }
    /* باقی‌مانده 2 => هر کدام نصف عرض (2 ستون) */
    .category-grid:not(.grid-3-2) > .category-item:nth-last-child(2):nth-child(4n+1),
    .category-grid:not(.grid-3-2) > .category-item:nth-last-child(1):nth-child(4n+2) { grid-column: span 2; }
    /* باقی‌مانده 3 => آیتم اول ردیف آخر دو ستون، بقیه یک ستون */
    .category-grid:not(.grid-3-2) > .category-item:nth-last-child(3):nth-child(4n+1) { grid-column: span 2; }
    /* جلوگیری از کشیده شدن ارتفاع آیتم‌های گسترده شده */
    .category-grid:not(.grid-3-2) > .category-item:nth-last-child(1):nth-child(4n+1),
    .category-grid:not(.grid-3-2) > .category-item:nth-last-child(2):nth-child(4n+1),
    .category-grid:not(.grid-3-2) > .category-item:nth-last-child(1):nth-child(4n+2),
    .category-grid:not(.grid-3-2) > .category-item:nth-last-child(3):nth-child(4n+1) {
        aspect-ratio: unset; /* لغو مربع شدن خودکار */
        height: 100px; /* همان ارتفاع مربع‌های قبلی */
        min-height: 100px;
    }
    /* تراز عمودی محتوای مستطیل‌ها */
    .category-grid:not(.grid-3-2) > .category-item:nth-last-child(1):nth-child(4n+1) i,
    .category-grid:not(.grid-3-2) > .category-item:nth-last-child(2):nth-child(4n+1) i,
    .category-grid:not(.grid-3-2) > .category-item:nth-last-child(1):nth-child(4n+2) i,
    .category-grid:not(.grid-3-2) > .category-item:nth-last-child(3):nth-child(4n+1) i { font-size: 38px; }
    .category-grid:not(.grid-3-2) > .category-item:nth-last-child(1):nth-child(4n+1) span,
    .category-grid:not(.grid-3-2) > .category-item:nth-last-child(2):nth-child(4n+1) span,
    .category-grid:not(.grid-3-2) > .category-item:nth-last-child(1):nth-child(4n+2) span,
    .category-grid:not(.grid-3-2) > .category-item:nth-last-child(3):nth-child(4n+1) span { font-size: 14px; }
}

/* Tablet - 6-8 items per row */
@media (min-width: 768px) and (max-width: 1023px) {
    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        max-width: 800px;
        margin: 0 auto;
    }
}

/* Desktop - max 8 items per row, centered */
@media (min-width: 1024px) {
    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(130px, 140px));
        justify-content: center;
        max-width: 1200px;
        margin: 0 auto;
        gap: 16px;
    }
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 12px;
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: none;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    aspect-ratio: 1 / 1; /* مربعی */
    min-height: 100px;
}

.category-item:hover {
    background: #fef9e7;
}

.category-item:active {
    opacity: 0.95;
}

.category-item i {
    font-size: 32px;
    color: var(--secondary-color);
}

.category-item span {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    text-align: center;
    word-break: break-word;
}

/* ==========================================
   Products Section
   ========================================== */
.products-section {
    padding: 0 16px 32px;
}

.section-header {
    margin-bottom: 16px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: bold;
    color: var(--text-primary);
}

.section-title i {
    color: var(--secondary-color);
}

/* Products Grid - 2 Columns */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

/* Product Card */
.product-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: none;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.product-card:active {
    opacity: 0.95;
}

.product-link {
    display: block;
}

.product-image {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    background: var(--bg-light);
    overflow: hidden;
}

.product-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 193, 7, 0);
    transition: background 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.product-card:hover .product-image::before {
    background: rgba(83, 83, 83, 0.25);
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.product-image img.lazy-loaded {
    opacity: 1;
}

/* Product Card Badges */
.product-card__badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: #ef4444;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    animation: none;
}

/* Responsive badge size for mobile */
@media (max-width: 768px) {
    .product-card__badge {
        width: 3rem;
        height: 3rem;
        font-size: 0.75rem;
    }
}

/* Bottom banners on product images */
.product-card__badge--sold,
.product-card__badge--sale {
    position: absolute;
    top: auto;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: auto;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: none;
    border-radius: 0;
    padding: 0.6rem 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    text-align: center;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    box-shadow: none;
    animation: none;
}

/* Out of stock: dark semi-transparent */
.product-card__badge--sold {
    background: rgba(0, 0, 0, 0.75);
}

/* Sale: red semi-transparent */
.product-card__badge--sale {
    background: rgba(220, 38, 38, 0.82);
}

@keyframes slideUpBadge {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.product-card__badge--sold::before {
    content: 'ناموجود';
}

.product-card__badge--sale::before {
    content: 'تخفیف خورده';
}

/* Dark overlay on image when out of stock (same as hover) */
.product-image.is-out-of-stock::after,
.product-image:has(.product-card__badge--sold)::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(83, 83, 83, 0.25);
    z-index: 2;
    pointer-events: none;
}

/* Slightly dim sold products but keep visible */
.product-image.is-out-of-stock img,
.product-image:has(.product-card__badge--sold) img {
    opacity: 0.7 !important;
    filter: grayscale(15%) !important;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .product-card__badge--sold,
    .product-card__badge--sale {
        font-size: 0.7rem;
        padding: 0.5rem 0.4rem;
    }
}

.product-info {
    padding: 12px;
}

.product-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==========================================
   PRODUCT CARD HOVER STYLES - UNIFIED
   Only image highlight effect, no card transform/shadow
   ========================================== */

/* Remove all hover effects from product cards */
.product-card:hover,
.product-slide-card:hover,
.carousel-product-card:hover {
    box-shadow: none !important;
    transform: none !important;
    background: transparent !important;
}

/* Only image highlight on hover */
.product-card:hover .product-image::before,
.product-slide-card:hover .product-image::before,
.carousel-product-card:hover .product-image::before {
    background: rgba(83, 83, 83, 0.25);
}

@media (hover: none), (pointer: coarse) {
    .product-card:hover .product-image::before,
    .product-slide-card:hover .product-image::before,
    .carousel-product-card:hover .product-image::before {
        background: rgba(0, 0, 0, 0) !important;
    }
}

/* Remove hover effects from other elements */
.category-item:hover,
.instagram-post:hover,
.highlight-item:hover,
.card:hover,
.tag-card:hover,
.brand-card:hover,
.attr-card:hover,
.highlight-card:hover,
.create-box:hover,
.form-section:hover,
.products-table:hover,
.login-wrapper:hover,
.profile-wrapper:hover { box-shadow: none !important; transform: none !important; }

/* Background changes for non-product elements */
.category-item:hover { background: #fcfcfc; }
.instagram-post:hover { background: #fcfcfc; }
.highlight-item:hover { background: transparent; }
.tag-card:hover,
.brand-card:hover,
.attr-card:hover,
.card:hover,
.create-box:hover,
.form-section:hover,
.products-table:hover { background:#fcfcfc; }

.product-description {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-price {
    font-size: 16px;
    font-weight: bold;
    color: #d63031;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.product-price--original {
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    text-decoration: line-through;
}

.product-price--current {
    font-size: 16px;
    font-weight: 700;
    color: #d63031;
}

/* No Products */
.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

/* Section Footer */
.section-footer {
    margin-top: 16px;
}

.btn-view-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-weight: 600;
    color: var(--text-primary);
    transition: var(--transition);
}

.btn-view-all:active {
    background: var(--bg-light);
    border-color: var(--primary-color);
}

/* ==========================================
   Instagram Section
   ========================================== */
.instagram-section {
    padding: 0 16px 32px;
}

.section-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.instagram-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.instagram-post {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: none;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.post-image {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Square */
    background: var(--bg-light);
    overflow: hidden;
}

.post-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 193, 7, 0);
    transition: background 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.instagram-post:hover .post-image::before {
     background: rgba(83, 83, 83, 0.25);
}

.post-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.post-image img.lazy {
    opacity: 0;
}

.post-image img.loaded {
    opacity: 1;
}

.post-caption {
    padding: 12px;
    font-size: 12px;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-instagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
    border-radius: 8px;
    font-weight: bold;
    box-shadow: none;
    border: 1px solid #e5e7eb;
}

.btn-instagram:active {
    transform: scale(0.98);
}

/* ==========================================
   Bottom Navigation - Fixed
   ========================================== */
.bottom-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    display: flex !important;
    background: var(--bg-white) !important;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1) !important;
    z-index: 9999 !important;
    height: 64px;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
    transition: none !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Keep bottom-nav fixed even when sidebar is open */
body.sidebar-open .bottom-nav,
body.filter-open .bottom-nav {
    position: fixed !important;
    transform: none !important;
    left: 0 !important;
    right: 0 !important;
    padding-right: 0 !important;
    padding-inline-end: 0 !important;
    width: 100% !important;
}

@media (min-width: 768px) {
    body.sidebar-open,
    body.filter-open,
    body.sidebar-open .main-header,
    body.filter-open .main-header {
        padding-right: 0 !important;
        padding-inline-end: 0 !important;
    }
}

/* Reduce height on desktop */
@media (min-width: 768px) {
    .bottom-nav {
        height: 60px !important;
    }
    .nav-item {
        gap: 2px;
    }
    .nav-item span {
        font-size: 10px;
    }
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    position: relative;
    color: #555e61;
    transition: var(--transition);
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    outline: none;
}

.nav-item:active {
    background: var(--bg-light);
}

.nav-item i {
    font-size: 22px;
    pointer-events: none;
}

.nav-item span {
    font-size: 11px;
    pointer-events: none;
}

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

.nav-item.active i {
    color: var(--secondary-color);
}

/* Cart Icon Wrapper for Badge */
.nav-item--cart .cart-icon-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    min-width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 0 5px;
    border-radius: 9px;
    text-align: center;
    line-height: 18px;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
    border: 2px solid #fff;
    animation: cart-badge-pop 0.3s ease-out;
    font-family: 'Vazirmatn', sans-serif;
}

@keyframes cart-badge-pop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Badge pulse animation when updating */
.cart-badge.updating {
    animation: badge-pulse 0.5s ease-in-out;
}

@keyframes badge-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.6);
    }
}

/* Filter Badge */
.filter-badge {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    margin-left: 14px;
    background: var(--primary-color, #6366f1);
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Filter Button in Footer */
.nav-item--filter {
    border: none;
    background: none;
    cursor: pointer;
}

.nav-item--filter:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.nav-item--filter:not(:disabled):active {
    background: var(--bg-light);
}

/* =====================================================================================
   MOBILE FILTER PANEL - Matching Category Sidebar Style
   ===================================================================================== */
.mobile-filter-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    background: #ffffff;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    visibility: hidden;
    direction: rtl;
    
    /* Desktop: Fixed width matching category sidebar */
    width: 380px;
    min-width: 360px;
    max-width: 420px;
    left: auto;
    box-shadow: -8px 0 32px rgba(44, 62, 80, 0.2);
}

/* Mobile: Full screen */
@media (max-width: 768px) {
    .mobile-filter-panel {
        left: 0;
        width: 100%;
        min-width: auto;
        max-width: none;
        box-shadow: none;
    }
}

.mobile-filter-panel.is-open {
    transform: translateX(0);
    visibility: visible;
}

.mobile-filter-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #2c3e50 0%, #3d566e 100%);
    border-bottom: none;
    flex-shrink: 0;
    min-height: 68px;
    position: relative;
}

.mobile-filter-panel__header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #e74c3c 0%, #c0392b 50%, #e74c3c 100%);
}

.mobile-filter-panel__header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.mobile-filter-panel__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0;
    cursor: pointer;
    color: #ffffff;
    border-radius: 50%;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(4px);
}

.mobile-filter-panel__close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

.mobile-filter-panel__close:active {
    transform: rotate(90deg) scale(0.92);
}

.mobile-filter-panel__content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
    -webkit-overflow-scrolling: touch;
    background: #f5f7fa;
}

.mobile-filter-panel__footer {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid #ecf0f1;
    background: #ffffff;
    flex-shrink: 0;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
}

.mobile-filter-panel__btn {
    flex: 1;
    padding: 0.875rem 1rem;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-filter-panel__btn--clear {
    background: #f5f7fa;
    border: 1px solid #ecf0f1;
    color: #2c3e50;
}

.mobile-filter-panel__btn--clear:hover {
    background: #eef1f5;
    border-color: #dde1e6;
}

.mobile-filter-panel__btn--clear:active {
    background: #e5e9ed;
}

.mobile-filter-panel__btn--apply {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border: none;
    color: #fff;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.25);
}

.mobile-filter-panel__btn--apply:hover {
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.35);
}

.mobile-filter-panel__btn--apply:active {
    background: #2c3e50;
    transform: scale(0.98);
}

/* Mobile Filter Section - Accordion - Matching Category Sidebar */
.mobile-filter-section {
    margin-bottom: 0;
    border-bottom: 1px solid #ecf0f1;
    background: transparent;
}

.mobile-filter-section:last-child {
    border-bottom: none;
}

.mobile-filter-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1rem 0.5rem 1rem 0;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: right;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.2s ease;
    position: relative;
}

.mobile-filter-section__header::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: #e74c3c;
    transition: height 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

.mobile-filter-section.is-open .mobile-filter-section__header::before {
    height: 60%;
}

.mobile-filter-section__header:active {
    background: #eef3f7;
}

.mobile-filter-section__title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.mobile-filter-section__arrow {
    color: #636e72;
    transition: transform 0.3s ease, color 0.2s ease;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 50%;
    padding: 3px;
    width: 22px;
    height: 22px;
}

.mobile-filter-section.is-open .mobile-filter-section__arrow {
    transform: rotate(180deg);
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

.mobile-filter-section__options {
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    padding-bottom: 1rem;
    max-height: 300px;
    overflow-y: auto;
    background: linear-gradient(180deg, #f5f7fa 0%, #eef1f5 100%);
    margin: 0 -1.25rem;
    padding: 0.75rem 1.25rem 1rem;
}

.mobile-filter-section.is-open .mobile-filter-section__options {
    display: flex;
}

/* Mobile Filter Empty State */
.mobile-filter-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    text-align: center;
    color: var(--text-secondary, #94a3b8);
}

.mobile-filter-empty p {
    margin: 0;
    font-size: 0.95rem;
}

/* Mobile Filter Overlay - Matching Category Sidebar */
.mobile-filter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(44, 62, 80, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-filter-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

/* Mobile Filter Options - Styled */
.mobile-filter-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0;
    cursor: pointer;
    border-bottom: 1px solid #ecf0f1;
    transition: background 0.15s ease;
}

.mobile-filter-option:hover {
    background: rgba(44, 62, 80, 0.02);
}

.mobile-filter-option:last-child {
    border-bottom: none;
}

.mobile-filter-option input {
    display: none;
}

.mobile-filter-option__checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-color, #cbd5e1);
    border-radius: 6px;
    position: relative;
    transition: all 0.2s;
    flex-shrink: 0;
}

.mobile-filter-option input:checked + .mobile-filter-option__checkbox {
    background: var(--primary-color, #6366f1);
    border-color: var(--primary-color, #6366f1);
}

.mobile-filter-option input:checked + .mobile-filter-option__checkbox::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 12px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

.mobile-filter-option__radio {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-color, #cbd5e1);
    border-radius: 50%;
    position: relative;
    transition: all 0.2s;
    flex-shrink: 0;
}

.mobile-filter-option input:checked + .mobile-filter-option__radio {
    border-color: var(--primary-color, #6366f1);
}

.mobile-filter-option input:checked + .mobile-filter-option__radio::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 4px;
    width: 10px;
    height: 10px;
    background: var(--primary-color, #6366f1);
    border-radius: 50%;
}

.mobile-filter-option__label {
    flex: 1;
    font-size: 0.95rem;
}

.mobile-filter-option__count {
    color: var(--text-secondary, #94a3b8);
    font-size: 0.85rem;
}

/* Mobile Price Range */
.mobile-price-range {
    padding: 0.5rem 0;
}

.mobile-price-inputs {
    display: flex;
    gap: 1rem;
}

.mobile-price-input {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--bg-light, #f8f9fa);
    border-radius: 10px;
}

.mobile-price-input label {
    font-size: 0.85rem;
    color: var(--text-secondary, #666);
}

.mobile-price-input input {
    flex: 1;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 1rem;
    text-align: center;
    min-width: 0;
    direction: ltr;
}

.mobile-price-input span {
    font-size: 0.75rem;
    color: var(--text-secondary, #94a3b8);
}

/* Mobile Color Grid */
.mobile-color-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.mobile-color-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
}

.mobile-color-option input {
    display: none;
}

.mobile-color-swatch {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid transparent;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1);
    transition: all 0.2s;
}

.mobile-color-option.is-selected .mobile-color-swatch,
.mobile-color-option input:checked + .mobile-color-swatch {
    border-color: var(--primary-color, #6366f1);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
}

.mobile-color-name {
    font-size: 0.75rem;
    color: var(--text-secondary, #666);
    text-align: center;
}

/* =====================================================================================
   MOBILE FILTER BAR (Sort & Price - Always Visible on Mobile)
   ===================================================================================== */
.mobile-filter-bar {
    display: none; /* Hidden on desktop */
}

@media (max-width: 768px) {
    .mobile-filter-bar {
        display: block;
        position: relative; /* Not fixed - stays in document flow above products */
        background: var(--bg-white, #fff);
        border-bottom: 1px solid var(--border-color, #e2e8f0);
        padding: 0.75rem 1rem;
        margin: 0 -1rem; /* Full width on mobile */
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }
    
    .mobile-filter-bar__inner {
        display: flex;
        gap: 0.5rem;
    }
    
    .mobile-filter-bar__btn {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.375rem;
        padding: 0.625rem 0.75rem;
        font-family: inherit;
        font-size: 0.875rem;
        font-weight: 500;
        color: var(--text-primary, #1a1a1a);
        background: var(--bg-light, #f8f9fa);
        border: 1px solid var(--border-color, #e2e8f0);
        border-radius: 8px;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        transition: background 0.2s, border-color 0.2s;
    }
    
    .mobile-filter-bar__btn:active {
        background: #e2e8f0;
    }
    
    .mobile-filter-bar__btn.has-value {
        background: var(--primary-color, #6366f1);
        border-color: var(--primary-color, #6366f1);
        color: #fff;
    }
    
    .mobile-filter-bar__btn.has-value:active {
        background: #4f46e5;
    }
    
    .mobile-filter-bar__btn svg {
        flex-shrink: 0;
    }
    
    /* Hide desktop filter on mobile */
    .smart-filter-section {
        display: none !important;
    }
}

/* Mobile Bottom Sheet */
.mobile-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.mobile-sheet-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.mobile-bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-white, #fff);
    border-radius: 16px 16px 0 0;
    z-index: 10002;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    max-height: 70vh;
    display: flex;
    flex-direction: column;
}

.mobile-bottom-sheet.is-open {
    transform: translateY(0);
}

.mobile-bottom-sheet__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    flex-shrink: 0;
}

.mobile-bottom-sheet__title {
    font-size: 1.1rem;
    font-weight: 700;
}

.mobile-bottom-sheet__close {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-primary);
    border-radius: 50%;
}

.mobile-bottom-sheet__close:active {
    background: var(--bg-light, #f1f5f9);
}

.mobile-bottom-sheet__content {
    padding: 1rem 1.25rem;
    overflow-y: auto;
    flex: 1;
}

/* ========================================
   Category Navigation Sheet - Redesigned
   Based on UX Best Practices
   ======================================== */

/* Category-specific bottom sheet styling */
.mobile-bottom-sheet--categories {
    max-height: 80vh;
    min-height: 50vh;
}

.mobile-bottom-sheet--categories .mobile-bottom-sheet__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
}

.mobile-bottom-sheet--categories .mobile-bottom-sheet__title {
    flex: 1;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
}

.mobile-bottom-sheet--categories .mobile-bottom-sheet__content {
    min-height: 200px; /* Prevent layout shift */
    transition: opacity 0.15s ease;
}

/* Back button */
.category-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-light, #f1f5f9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-primary);
    transition: background 0.2s;
}

.category-back-btn:active {
    background: #e2e8f0;
}

/* Breadcrumb bar */
.category-breadcrumb-bar {
    padding: 0 1rem 0.25rem;
}

.category-breadcrumb-bar::-webkit-scrollbar {
    display: none;
}

.category-breadcrumb-list {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 0 0.75rem;
    white-space: nowrap;
}

.category-breadcrumb-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    background: var(--bg-light, #f1f5f9);
    border-radius: 20px;
    font-size: 0.8125rem;
    color: var(--text-secondary, #64748b);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.category-breadcrumb-chip:active {
    background: #e2e8f0;
}

.category-breadcrumb-chip.is-active {
    background: var(--primary-color, #6366f1);
    color: #fff;
    cursor: default;
}

/* View products button */
.category-view-products-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--primary-color, #6366f1), #4f46e5);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.category-view-products-btn:active {
    transform: scale(0.98);
}

.category-view-products-arrow {
    font-size: 1.25rem;
}

/* Category list */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.category-list--root {
    flex-direction: column;
}

.category-list--children {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 56px; /* Touch-friendly size */
    padding: 0.75rem 1rem;
    background: var(--bg-white, #fff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.1s;
}

.category-list-item:active {
    background: var(--bg-light, #f8f9fa);
    transform: scale(0.99);
}

.category-list-item--root {
    background: var(--bg-white, #fff);
    border-color: var(--border-color, #e2e8f0);
}

.category-list-item--child {
    width: calc(50% - 0.25rem);
    min-width: 45%;
    min-height: 64px;
    padding: 0.5rem 0.75rem;
    background: #f5f7ff;
    border-color: #e0e7ff;
}

@media (min-width: 480px) {
    .category-list-item--child {
        width: calc(33.333% - 0.34rem);
        min-width: 30%;
    }
}

.category-list-item.is-current {
    background: var(--primary-light, #eef2ff);
    border-color: var(--primary-color, #6366f1);
    cursor: default;
}

.category-list-item:disabled {
    cursor: default;
}

.category-list-item__info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.125rem;
    text-align: right;
}

.category-list-item__name {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary, #1a1a1a);
}

.category-list-item__count {
    font-size: 0.75rem;
    color: var(--text-secondary, #64748b);
}

.category-list-item__arrow {
    flex-shrink: 0;
    color: var(--text-secondary, #94a3b8);
    transition: transform 0.2s;
}

.category-list-item:active .category-list-item__arrow {
    transform: translateX(-3px);
}

.category-list-item__current {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--primary-color, #6366f1);
    color: #fff;
    border-radius: 50%;
    font-size: 0.75rem;
}

/* Section label */
.category-section-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary, #64748b);
    margin: 1rem 0 0.5rem;
    padding-right: 0.25rem;
}

/* Empty state */
.category-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
    color: var(--text-secondary, #64748b);
}

/* Loading state */
.category-sheet-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    padding: 2rem;
}

.category-sheet-error {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary, #64748b);
}
/* Current category row (compact, hierarchical) */
.category-current-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0.25rem 0.75rem;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    margin-bottom: 0.5rem;
}

.category-current-row__main {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.category-current-row__name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary, #111827);
}

.category-current-row__meta {
    font-size: 0.75rem;
    color: var(--text-secondary, #6b7280);
}

.category-current-row__path {
    font-size: 0.75rem;
    color: var(--text-secondary, #9ca3af);
}

.category-current-row__link {
    font-size: 0.8125rem;
    color: var(--accent-color, #2563eb);
    text-decoration: none;
    white-space: nowrap;
}

.category-current-row__link:active {
    opacity: 0.7;
}

.category-list-item__meta {
    font-size: 0.75rem;
    color: var(--text-secondary, #6b7280);
}

/* Current path helper text */
.category-current-path {
    font-size: 0.8125rem;
    color: var(--text-secondary, #64748b);
    margin-bottom: 0.5rem;
}

.category-current-path strong {
    color: var(--text-primary, #1f2933);
}

/* Legacy styles - keep for smart-filter.js compatibility */
.category-nav-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    font-size: 0.875rem;
}

.category-breadcrumb-item {
    color: var(--accent-color, #3498db);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.category-breadcrumb-item:active {
    background: var(--bg-light, #f1f5f9);
}

.category-breadcrumb-item.is-current {
    color: var(--text-primary, #1a1a1a);
    font-weight: 600;
    cursor: default;
}

.category-nav-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-nav-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1rem;
    background: var(--bg-light, #f8f9fa);
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.category-nav-item:active {
    background: #e2e8f0;
    transform: scale(0.98);
}

.category-nav-item.is-current {
    background: var(--primary-color, #6366f1);
    color: #fff;
    cursor: default;
}

.category-nav-item.is-current:active {
    transform: none;
}

.category-nav-name {
    font-size: 0.95rem;
    font-weight: 500;
}

.category-nav-count {
    font-size: 0.8125rem;
    color: var(--text-secondary, #64748b);
}

.category-nav-section-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary, #64748b);
    margin: 1rem 0 0.5rem;
}

.category-nav-empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary, #64748b);
}

.category-nav-view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1rem;
    margin-bottom: 1rem;
    background: var(--primary-color, #6366f1);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
}

.category-nav-view-btn:active {
    background: #4f46e5;
    transform: scale(0.98);
}

.category-nav-arrow {
    flex-shrink: 0;
    color: var(--text-secondary, #94a3b8);
}

/* Mobile Price Buttons Container */
.mobile-price-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

/* Mobile Price Clear Button */
.mobile-price-clear {
    flex: 1;
    padding: 0.875rem;
    background: var(--bg-light, #f1f5f9);
    color: var(--text-primary, #1a1a1a);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.mobile-price-clear:active {
    background: #e2e8f0;
}

/* Mobile Price Apply Button */
.mobile-price-apply {
    flex: 2;
    padding: 0.875rem;
    background: var(--text-primary, #1a1a1a);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.mobile-price-apply:active {
    background: #000;
}

/* ========================================
   Dual Range Slider (Price Filter)
   ======================================== */
.price-range-slider {
    padding: 0.75rem 0;
}

.price-range-values {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.price-range-value {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
}

.price-range-value small {
    font-size: 0.75rem;
    color: var(--text-muted, #64748b);
    font-weight: 500;
}

.price-range-value .price-range-min-label,
.price-range-value .price-range-max-label {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-primary, #1a1a1a);
    background: var(--bg-light, #f8fafc);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    min-width: 120px;
    text-align: center;
    border: 1px solid var(--border-color, #e2e8f0);
}

/* Dual range wrapper contains both inputs and visual elements */
.dual-range-wrapper {
    position: relative;
    width: calc(100% - 24px); /* Reduce width to accommodate thumb overflow */
    margin: 30px 12px; /* Center and provide space for thumbs */
    height: 40px;
    display: flex;
    align-items: center;
    /* Force LTR direction for consistent slider behavior */
    direction: ltr !important;
}

/* Slider track background */
.slider-track {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: 6px;
    background: var(--border-color, #e2e8f0);
    border-radius: 3px;
    z-index: 1;
    pointer-events: none;
}

/* Slider fill (active range between thumbs) */
.slider-fill {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 6px;
    background: var(--accent-color, #3b82f6);
    border-radius: 3px;
    z-index: 2;
    pointer-events: none;
    left: 0;
    width: 100%;
}

/* Range inputs */
.dual-range-input {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    height: 6px;
    background: transparent;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
    padding: 0;
    outline: none;
    z-index: 3;
}

/* Webkit (Chrome, Safari) - remove default track */
.dual-range-input::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    background: transparent;
    border: none;
}

/* Webkit thumb styling */
.dual-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    background: #ffffff;
    border: 3px solid var(--accent-color, #3b82f6);
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
    transition: all 0.2s ease;
    margin-top: -8px;
}

.dual-range-input::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 12px rgba(59, 130, 246, 0.4);
}

.dual-range-input::-webkit-slider-thumb:active {
    transform: scale(1.2);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.5);
}

/* Firefox - remove default track */
.dual-range-input::-moz-range-track {
    width: 100%;
    height: 6px;
    background: transparent;
    border: none;
}

/* Firefox thumb styling */
.dual-range-input::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #ffffff;
    border: 3px solid var(--accent-color, #3b82f6);
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
    transition: all 0.2s ease;
}

.dual-range-input::-moz-range-thumb:hover {
    transform: scale(1.15);
}

/* Ensure min slider is above max for proper interaction */
.dual-range-min {
    z-index: 4;
}

.dual-range-max {
    z-index: 3;
}

/* Price range limits */
.price-range-limits {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    font-size: 0.8125rem;
    color: var(--text-muted, #64748b);
    font-weight: 500;
}

/* Smart Filter Section Container */
.smart-filter-section {
    background: var(--bg-white, #fff);
    position: sticky;
    top: 60px;
    z-index: 100;
}

/* Desktop: Show all filters normally */
@media (min-width: 769px) {
    .smart-filter-section {
        display: block;
    }
}

/* Mobile: Show only sort and price in filter bar */
@media (max-width: 768px) {
    .smart-filter-section {
        display: block !important;
        position: sticky;
        top: 56px;
        z-index: 100;
        background: var(--bg-white, #fff);
        border-bottom: 1px solid var(--border-color, #e2e8f0);
        margin: 0;
        padding: 0;
    }
    
    .smart-filter-section .smart-filter {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        padding: 0.625rem 1rem !important;
        gap: 0.5rem !important;
        margin: 0 !important;
        background: var(--bg-white, #fff) !important;
    }
    
    /* Hide all pills except sort and price */
    .smart-filter-section .smart-filter .filter-pill:not([data-filter-type="sort"]):not([data-filter-type="price"]) {
        display: none !important;
    }
    
    /* Hide clear all button on mobile bar */
    .smart-filter-section .smart-filter .filter-pill-clear {
        display: none !important;
    }
    
    /* Hide filter overlay in mobile bar */
    .smart-filter-section .filter-overlay {
        display: none !important;
    }
    
    /* Simplify sort and price pills for mobile */
    .smart-filter-section .smart-filter .filter-pill {
        flex: 1 !important;
        max-width: 50% !important;
    }
    
    .smart-filter-section .smart-filter .filter-pill__trigger {
        width: 100% !important;
        justify-content: center !important;
        padding: 0.625rem 0.75rem !important;
        font-size: 0.875rem !important;
        gap: 0.375rem !important;
        border-radius: 8px !important;
        background: var(--bg-light, #f8f9fa) !important;
        border: 1px solid var(--border-color, #e2e8f0) !important;
    }
    
    .smart-filter-section .smart-filter .filter-pill__trigger svg {
        width: 16px !important;
        height: 16px !important;
    }
    
    .smart-filter-section .smart-filter .filter-pill__dropdown {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        top: auto !important;
        min-width: auto !important;
        width: 100% !important;
        border-radius: 16px 16px 0 0 !important;
        max-height: 70vh !important;
    }
    
    /* Loading state */
    .smart-filter-section .smart-filter-loading {
        padding: 0.75rem 1rem;
        text-align: center;
        font-size: 0.85rem;
        color: var(--text-secondary, #666);
    }
}

/* ==========================================
   Skeleton Loader
   ========================================== */
.skeleton {
    background: linear-gradient(90deg, 
        var(--bg-light) 25%, 
        #e8e8e8 50%, 
        var(--bg-light) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ==========================================
   Utility Classes
   ========================================== */
.hidden {
    display: none !important;
}

/* ==========================================
     Highlight Bar (Instagram-like Highlights)
     ========================================== */
.highlight-bar-wrapper {background: var(--bg-white); position: relative; margin-top: 16px;}
.highlight-bar-container {max-width: 1200px; margin: 0 auto; padding: 12px 12px 8px; position: relative; display: flex; align-items: center; border: none;}
.highlight-bar {overflow: hidden; flex: 1;}
.highlight-track {display: flex; gap: 12px; transition: transform .3s ease; padding: 4px 4px 8px;}
.highlight-item {width: 78px; flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; color: var(--text-primary); -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; outline: none;}

/* Prevent first-paint jump: reveal highlight bar only after JS computes alignment/nav state */
.highlight-bar:not(.is-ready) {
    opacity: 0;
}

.highlight-bar.is-ready {
    opacity: 1;
    transition: opacity .12s ease;
}
.highlight-avatar {width: 70px; height: 70px; border-radius: 50%; position: relative; overflow: hidden; padding: 0; background: transparent; -webkit-tap-highlight-color: transparent;}
.highlight-avatar img {width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: none; -webkit-tap-highlight-color: transparent; pointer-events: none; position: relative; z-index: 1;}
.highlight-title {font-size: 11px; font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-clamp: 2; color: #000;}
.no-highlights {font-size: 13px; color: var(--text-secondary); padding: 8px 12px;}
.hl-nav {width: 34px; height: 34px; border-radius: 50%; background: var(--bg-white); display: flex; align-items: center; justify-content: center; color: var(--text-primary); cursor: pointer; transition: var(--transition); margin: 0 4px; box-shadow: none;}
.hl-nav:disabled {opacity:.35; cursor: default;}
.hl-nav:active {transform: scale(.9); background: var(--primary-color); color:#fff;}

/* افکت استاندارد hover روی هایلایت‌ها */
.highlight-item {
    transition: all 0.3s ease;
}
.highlight-item:hover {
    opacity: 0.9;
} 

.highlight-item,
.highlight-item:visited,
.highlight-item:hover,
.highlight-item:active,
.highlight-item:focus,
.highlight-item:focus-visible,
.highlight-item .highlight-title {
    color: #000;
}

/* حالت انتخاب‌شده هایلایت */
.highlight-item.active .highlight-title {
    color: #000;
    font-weight: 700;
}

@media (min-width: 1024px){
    .highlight-item {width: 90px;}
    .highlight-avatar {width: 80px; height: 80px;}
}
/* مخفی کردن اسکرول بار در مرورگرها */
.highlight-bar::-webkit-scrollbar {display:none;}
.highlight-bar {scrollbar-width:none; -ms-overflow-style:none;}

/* محدود کردن نمایش به مرکز وقتی آیتم‌ها <= 8 */
.highlight-bar.less-items .highlight-track {justify-content: center;}

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

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

/* ==========================================
   LEGACY: Products Grid 2 Rows - DEPRECATED
   This section is kept for backward compatibility with other pages.
   Home page now uses dedicated home-carousel.css
   ========================================== */
.products-section-grid {
    padding: 0 16px 32px;
}

.products-grid-2rows {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 12px;
    margin-bottom: 16px;
}

/* موبایل: فقط 4 آیتم اول نمایش (3 محصول + 1 کارت نمایش همه) */
@media (max-width: 767px) {
    .products-grid-2rows {
        grid-template-columns: repeat(2, 1fr);
    }
    .products-grid-2rows > .product-card:nth-child(n+4):not(.view-all-card) {
        display: none;
    }
}

/* تبلت: 3 ستون */
@media (min-width: 768px) and (max-width: 1023px) {
    .products-grid-2rows {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
    .products-grid-2rows > .product-card:nth-child(n+6):not(.view-all-card) {
        display: none;
    }
}

/* دسکتاپ: 4 ستون */
@media (min-width: 1024px) {
    .products-grid-2rows {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
        max-width: 1200px;
        margin: 0 auto 16px;
    }
}

/* ==========================================
   LEGACY: View All Card - DEPRECATED FOR HOME PAGE
   Kept for other pages that may still use it
   ========================================== */
.view-all-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.view-all-card:hover {
    background: #fcfcfc;
}

.view-all-image {
    position: relative;
    width: 100%;
    padding-top: 100%;
    background: var(--bg-light);
    overflow: hidden;
}

.view-all-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.view-all-overlay {
    position: absolute;
    inset: 0;
    background: rgba(44, 62, 80, 0.45);
    transition: background 0.3s ease;
}

.view-all-card:hover .view-all-overlay {
    background: rgba(44, 62, 80, 0.55);
}

.view-all-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: var(--bg-white);
    color: rgb(64, 64, 64);
    text-align: center;
    height: 100%;
}

.view-all-text {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.view-all-content i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.view-all-card:hover .view-all-content i {
    transform: translateX(-4px);
}

@media (min-width: 768px) {
    .view-all-text {
        font-size: 14px;
    }
    .view-all-content {
        padding: 14px;
    }
}

@media (min-width: 1024px) {
    .view-all-text {
        font-size: 15px;
    }
    .view-all-content {
        padding: 16px;
        gap: 10px;
    }
    .view-all-content i {
        font-size: 16px;
    }
}

/* ==========================================
   Category Page Styles
   صفحات دسته‌بندی (مردانه، زنانه و ...)
   ========================================== */

/* هیرو صفحه دسته‌بندی - مشابه هیرو اصلی */
.category-hero {
    margin-bottom: 0;
}

/* Quick Categories اختصاصی صفحات */
.page-quick-categories {
    padding: 20px 16px;
}

/* بنر ثانویه (کوچکتر) */
.page-banner-section {
    padding: 16px;
    max-width: 1000px;
    margin: 0 auto;
}

.page-banner-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.page-banner-link {
    display: block;
}

.page-banner-image {
    width: 100%;
    height: auto;
    display: block;
    max-height: 200px;
    object-fit: cover;
}

/* موبایل: ارتفاع کمتر برای بنر */
@media (max-width: 767px) {
    .page-banner-section {
        padding: 12px;
    }
    .page-banner-image {
        max-height: 120px;
    }
}

/* ==========================================
   Filter Bar - نوار فیلتر
   ========================================== */
.filter-bar-section {
    padding: 12px 16px;
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 60px;
    z-index: 100;
}

.filter-bar-container {
    max-width: 1200px;
    margin: 0 auto;
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.filter-bar::-webkit-scrollbar {
    display: none;
}

.filter-label {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    white-space: nowrap;
    flex-shrink: 0;
}

.filter-options {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
}

.filter-btn {
    padding: 8px 16px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    background: #e2e8f0;
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* موبایل: دکمه‌های کوچکتر */
@media (max-width: 767px) {
    .filter-bar-section {
        padding: 10px 12px;
    }
    .filter-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    .filter-label {
        font-size: 13px;
    }
}

/* ==========================================
   Category Products Grid - گرید محصولات صفحه دسته‌بندی
   ========================================== */
.category-products-section {
    padding: 24px 16px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.category-products-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.products-count {
    font-size: 14px;
    color: var(--text-secondary);
}

.category-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* تبلت: 3 ستون */
@media (min-width: 768px) {
    .category-products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

/* دسکتاپ: 4 ستون */
@media (min-width: 1024px) {
    .category-products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

/* دسکتاپ بزرگ: همچنان 4 ستون */
@media (min-width: 1440px) {
    .category-products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }
}

/* دکمه بارگذاری بیشتر */
.load-more-container {
    text-align: center;
    margin-top: 32px;
}

.btn-load-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

.btn-load-more:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-load-more:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==========================================
   استایل‌های Highlight Section به فایل 
   highlight-section.css منتقل شده‌اند
   ========================================== */
