/* =========================================
   فایل: home.css (نسخه اصلاح‌شده و سازگار با Base)
   ========================================= */

.home-page {
    direction: rtl;                    /* FIX: RTL صریح */
    --maxw: var(--home-max-w, 1200px);
    --color-primary: var(--color-primary, #ef394e);
    --color-primary-light: var(--color-primary-light, #fef2f4);
    --color-text-dark: var(--color-text-main, #23272c);
    --color-text-high: var(--color-text-main, #31363c);
    --color-text-low: var(--color-text-muted, #797f86);
    --color-bg-light: var(--color-bg-subtle, #f5f6f8);
    --color-white: var(--color-bg-surface, #ffffff);
    --color-border-light: var(--color-border-subtle, #eef0f3);
    --color-border: var(--color-border, #e6e9ee);
    --radius-sm: var(--radius-sm, 8px);
    --radius-md: var(--radius-md, 12px);
    --radius-lg: var(--radius-lg, 16px);
    --radius-xl: var(--radius-xl, 20px);
    --spacing-xs: var(--space-xs, 8px);
    --spacing-sm: var(--space-sm, 12px);
    --spacing-md: var(--space-md, 16px);
    --spacing-lg: var(--space-lg, 24px);
    --spacing-xl: var(--space-xl, 32px);

    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 var(--spacing-md) 60px;
    box-sizing: border-box;
    width: 100%;
}

.home-page *, .home-page *::before, .home-page *::after {
    box-sizing: border-box;
}

/* ===== HERO SLIDER ===== */
.home-page .hero-slider {
    position: relative;
    width: 100%;
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-top: var(--spacing-md);
    aspect-ratio: 24/8;
    background: var(--color-bg-light);
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.home-page .slides-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.home-page .hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.home-page .hero-slide.is-active {
    opacity: 1;
    z-index: 1;
}

.home-page .hero-slide a {
    display: block;
    width: 100%;
    height: 100%;
}

.home-page .hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-page .hero-slide--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    z-index: 1;
}

.home-page .hero-empty-state {
    color: var(--color-text-low);
    font-size: 16px;
}

/* Hero navigation arrows */
.home-page .hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 10;
    color: var(--color-text-high);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid var(--color-border-light);
    opacity: 0;
}

.home-page .hero-slider:hover .hero-arrow { opacity: 1; }

.home-page .hero-arrow:hover {
    background: var(--color-white);
    transform: translateY(-50%) scale(1.1);
    color: var(--color-primary);
}

.home-page .hero-arrow--prev { right: 24px; }
.home-page .hero-arrow--next { left: 24px; }

/* Hero dots */
.home-page .hero-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.3);
    padding: 6px 12px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.home-page .hero-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    padding: 0;
}

.home-page .hero-dots .dot.active {
    background: var(--color-white);
    width: 24px;
    border-radius: 4px;
}

/* ===== SECTION HEADER ===== */
.home-page .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}

.home-page .section-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--color-text-dark);
    position: relative;
    padding-right: 14px;
    margin: 0;
}

.home-page .section-title::before {
    content: '';
    position: absolute;
    right: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    border-radius: 2px;
    background: var(--color-primary);
}

/* ===== GENERIC SCROLLER ARROWS ===== */
.home-page .scroller-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--color-white);
    box-shadow: 0 3px 10px rgba(0,0,0,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;                        /* FIX: بالاتر از کارت‌ها */
    color: var(--color-text-high);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid var(--color-border-light);
}

.home-page .scroller-arrow:hover {
    background: var(--color-bg-light);
    color: var(--color-primary);
    transform: translateY(-50%) scale(1.08);
}

.home-page .scroller-arrow:disabled {
    opacity: 0;
    cursor: default;
    pointer-events: none;
}

.home-page .scroller-arrow--prev { right: -12px; }
.home-page .scroller-arrow--next { left: -12px; }

/* ===== AMAZING DEALS (پیشنهادهای شگفت‌انگیز) ===== */
.home-page .amazing-deals {
    background: linear-gradient(135deg, var(--color-primary, #ef394e) 0%, var(--color-primary-active, var(--color-primary-hover, #c62842)) 100%);
    border-radius: var(--radius-xl, 18px);
    margin-top: var(--spacing-xl, 32px);
    padding: 18px 18px 18px 14px;
    display: flex;
    gap: 14px;
    align-items: stretch;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(239, 57, 78, 0.2);
}

.home-page .amazing-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    width: 170px;
    min-width: 170px;
    color: #ffffff;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    padding: 8px 4px;
    text-align: center;
}

.home-page .amazing-sidebar__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.home-page .amazing-badge-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.home-page .amazing-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin: 0;
    line-height: 1.25;
}

.home-page .amazing-title__sub {
    font-size: 15px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: -0.2px;
}

.home-page .amazing-title__main {
    font-size: 22px;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.home-page .amazing-illustration {
    margin: 4px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.15));
    transition: transform 0.3s ease;
}

.home-page .amazing-illustration:hover {
    transform: scale(1.05) rotate(-2deg);
}

.home-page .amazing-box-svg {
    display: block;
    width: 84px;
    height: 84px;
}

.home-page .amazing-countdown-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.home-page .countdown-label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    gap: 5px;
}

.home-page .timer-box {
    display: flex;
    gap: 4px;
    direction: ltr;
    align-items: center;
    justify-content: center;
}

.home-page .time-unit-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.home-page .time-unit {
    background-color: #ffffff;
    color: var(--color-primary, #ef394e);
    min-width: 36px;
    height: 34px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 900;
    font-size: 14.5px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
    font-feature-settings: "tnum";
}

.home-page .time-unit-label {
    font-size: 9px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

.home-page .timer-sep {
    color: #ffffff;
    font-weight: 900;
    font-size: 15px;
    line-height: 1;
    align-self: flex-start;
    margin-top: 7px;
}

.home-page .amazing-see-all {
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    padding: 7px 18px;
    transition: all 0.25s ease;
    white-space: nowrap;
    text-decoration: none;
}

.home-page .amazing-see-all:hover {
    background: #ffffff;
    color: var(--color-primary, #ef394e);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    transform: translateY(-2px);
}

.home-page .amazing-carousel-wrapper {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    overflow: visible;
}

.home-page .amazing-carousel-wrapper .scroller-arrow--prev {
    right: 8px;
}

.home-page .amazing-carousel-wrapper .scroller-arrow--next {
    left: 8px;
}

.home-page .amazing-carousel {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 6px 2px 6px 0;
    width: 100%;
}

.home-page .amazing-carousel::-webkit-scrollbar {
    display: none;
}

/* ===== AMAZING DEAL CARDS ===== */
.home-page article.deal-card {
    background-color: #ffffff;
    width: 188px;
    min-width: 188px;
    max-width: 195px;
    border-radius: 14px;
    padding: 14px 12px 12px;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease;
    flex-shrink: 0;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    text-decoration: none;
}

.home-page .deal-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}

.home-page .deal-card__media {
    display: block;
    text-decoration: none;
    margin-bottom: 10px;
}

.home-page .deal-card__img-box {
    width: 100%;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fbfbfb;
    border-radius: 10px;
    overflow: hidden;
}

.home-page .deal-card .product-img {
    width: 90%;
    height: 90%;
    aspect-ratio: 1/1;
    object-fit: contain;
    transition: transform 0.35s ease;
}

.home-page .deal-card:hover .product-img {
    transform: scale(1.06);
}

.home-page .deal-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.home-page .deal-card .product-title {
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 38px;
    margin-bottom: 8px;
    color: var(--color-text-high, #27272a);
    text-decoration: none;
    transition: color 0.2s;
}

.home-page .deal-card .product-title:hover {
    color: var(--color-primary, #ef394e);
}

.home-page .deal-card__price-section {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
    min-height: 44px;
    justify-content: flex-end;
}

.home-page .deal-card__discount-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.home-page .deal-card .discount-badge {
    background-color: var(--color-primary, #ef394e);
    color: #ffffff;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 800;
    line-height: 1.3;
    font-feature-settings: "tnum";
}

.home-page .deal-card .old-price {
    color: #a1a1aa;
    font-size: 12px;
    font-weight: 500;
    text-decoration: line-through;
    font-feature-settings: "tnum";
}

.home-page .deal-card__final-row {
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
    gap: 4px;
    width: 100%;
}

.home-page .deal-card__final-row--single {
    padding-top: 14px;
}

.home-page .deal-card .new-price {
    font-weight: 800;
    font-size: 15px;
    color: #18181b;
    font-feature-settings: "tnum";
}

.home-page .deal-card .currency {
    font-size: 11px;
    font-weight: 500;
    color: #71717a;
}

.home-page .deal-card__stock-wrap {
    width: 100%;
    margin-top: 2px;
}

.home-page .deal-card .stock-bar {
    width: 100%;
    height: 4px;
    background-color: #f1f2f4;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}

.home-page .deal-card .stock-progress {
    height: 100%;
    background: linear-gradient(90deg, #ef394e, #f97316);
    border-radius: 2px;
}

.home-page .deal-card .stock-meta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.home-page .deal-card .stock-label {
    font-size: 10.5px;
    color: #71717a;
    font-weight: 500;
}

.home-page .deal-card .stock-label--danger {
    color: #ef394e;
    font-weight: 700;
}

/* کارت مشاهده همه در انتهای اسلایدر شگفت‌انگیز */
.home-page .deal-card-see-all {
    width: 140px;
    min-width: 140px;
    border-radius: 14px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none;
    color: var(--color-primary, #ef394e);
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease;
    cursor: pointer;
}

.home-page .deal-card-see-all:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}

.home-page .deal-card-see-all__icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--color-primary, #ef394e);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary, #ef394e);
    transition: all 0.25s ease;
}

.home-page .deal-card-see-all:hover .deal-card-see-all__icon {
    background: var(--color-primary, #ef394e);
    color: #ffffff;
    transform: scale(1.08);
}

.home-page .deal-card-see-all__text {
    font-size: 13.5px;
    font-weight: 700;
    color: #27272a;
    transition: color 0.2s;
}

.home-page .deal-card-see-all:hover .deal-card-see-all__text {
    color: var(--color-primary, #ef394e);
}

.home-page .amazing-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 200px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 14px;
}

/* ===== PRODUCT CARDS (GENERAL) ===== */
.home-page .product-card {
    background-color: var(--color-white);
    min-width: 190px;
    max-width: 220px;
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    flex-shrink: 0;
    position: relative;
}

.home-page .product-card-link { display: block; }

.home-page .product-img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: contain;
    transition: transform 0.3s ease;
    margin-bottom: 10px;
}

.home-page .product-card:hover .product-img { transform: scale(1.04); }

.home-page .product-title {
    font-size: 13px;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 40px;
    margin-bottom: 8px;
    color: var(--color-text-high);
    text-decoration: none;
    transition: color 0.2s;
}

.home-page .product-title:hover { color: var(--color-primary); }

.home-page .price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}

.home-page .discount-badge {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 3px 6px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.home-page .new-price {
    font-weight: 800;
    font-size: 15px;
    color: var(--color-text-dark);
}

.home-page .new-price small {
    font-size: 11px;
    font-weight: 500;
    color: var(--color-text-low);
}

.home-page .stock-bar {
    width: 100%;
    height: 4px;
    background-color: var(--color-border-light);
    border-radius: 2px;
    overflow: hidden;
    margin: 10px 0 4px;
}

.home-page .stock-progress {
    height: 100%;
    background: var(--color-primary);
    border-radius: 2px;
}

.home-page .stock-label {
    font-size: 11px;
    color: var(--color-text-low);
}

/* Best-seller cards (definition moved to grid section at the bottom) */

.home-page .empty-notice {
    padding: 20px;
    color: var(--color-text-low);
    font-size: 14px;
}

/* FIX: استایل missing برای حالت خالی دسته‌بندی */
.home-page .category-empty {
    padding: 20px;
    color: var(--color-text-low);
    font-size: 14px;
}

/* ===== BANNER GRID ===== */
/* ===== BANNER GRID (تطبیقی) ===== */
.home-page .banner-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
    align-items: stretch;
}

.home-page .banner-item {
    /* FIX: هر بنر بر اساس فضای موجود رشد می‌کنه */
    flex: 1 1 320px;
    min-width: 0;          /* جلوگیری از سرریز محتوا */
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 3/1;
    display: block;
    position: relative;
}

.home-page .banner-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.home-page .banner-item:hover img {
    transform: scale(1.02);
}

.home-page .banner-grid__empty {
    flex: 1 1 100%;
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--color-text-low);
    font-size: 14px;
}

/* ===== CATEGORY SHOWCASE (ADAPTIVE RESPONSIVE GRID) ===== */
.home-page .category-showcase { 
    margin-top: var(--spacing-xl); 
    width: 100%;
}

.home-page .category-adaptive-container {
    width: 100%;
    margin-top: 16px;
}

.home-page .category-grid-adaptive,
.home-page .category-circles {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 28px 24px;
    padding: var(--spacing-sm) 4px;
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
}

.home-page .category-item-adaptive,
.home-page .circle-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 112px;
    flex-shrink: 0;
    text-decoration: none;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.home-page .category-item-adaptive:hover,
.home-page .circle-item:hover {
    transform: translateY(-4px);
}

.home-page .category-item-img-box,
.home-page .circle-img {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background-color: var(--color-bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.25s ease;
    border: 2px solid transparent;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    color: #a1a1aa;
}

.home-page .category-item-adaptive:hover .category-item-img-box,
.home-page .circle-item:hover .circle-img {
    box-shadow: 0 8px 20px rgba(239, 57, 78, 0.15);
    border-color: rgba(239, 57, 78, 0.4);
    background-color: var(--color-white);
    color: var(--dk-red, #ef394e);
}

.home-page .category-item-img-box img,
.home-page .circle-img img {
    width: 65%;
    height: 65%;
    object-fit: contain;
    transition: transform 0.25s ease;
}

.home-page .category-item-adaptive:hover .category-item-img-box img,
.home-page .circle-item:hover .circle-img img {
    transform: scale(1.08);
}

.home-page .category-item-title,
.home-page .circle-item span {
    font-size: 13px;
    color: var(--color-text-dark);
    text-align: center;
    font-weight: 700;
    line-height: 1.4;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 100%;
}

/* ===== BEST SELLERS SECTION ===== */
.home-page .best-sellers { margin-top: var(--spacing-xl); }

.home-page .tabs-header {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    white-space: nowrap;
}

.home-page .tabs-header::-webkit-scrollbar { display: none; }

.home-page .tab-btn {
    padding: 8px 20px;
    font-size: 13.5px;
    color: var(--color-text-low);
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s ease;
    background: var(--color-bg-light);
    border: none;
    cursor: pointer;
}

.home-page .tab-btn:hover {
    color: var(--color-text-dark);
    background: var(--color-border-light);
}

.home-page .tab-btn.active {
    color: var(--color-white);
    font-weight: 700;
    background: var(--color-primary);
    box-shadow: 0 4px 12px rgba(239, 57, 78, 0.25);
}

.home-page .tab-content { display: none; }
.home-page .tab-content.active { display: block; }

/* FIX: overflow visible */
.home-page .best-sellers-scroll-wrapper {
    position: relative;
    overflow: visible;
}

.home-page .best-sellers-track {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-md);
    padding: var(--spacing-sm) 4px;
}

/* Hide scroller arrows as we are now using a grid instead of a horizontal track */
.home-page .best-sellers-scroll-wrapper .scroller-arrow {
    display: none !important;
}

.home-page .best-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    min-width: 0;
    max-width: none;
    transition: box-shadow 0.2s;
    background: #fff;
}

.home-page .best-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.home-page .best-card .product-card-link {
    width: 140px;
    flex-shrink: 0;
    padding: 12px;
}

.home-page .best-card .product-img {
    width: 100%;
    height: 130px;
    object-fit: contain;
}

.home-page .best-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding: 12px 16px;
}

@media (max-width: 768px) {
    .home-page .best-sellers-track {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: var(--spacing-sm);
        scroll-snap-type: x mandatory;
        padding-bottom: var(--spacing-sm);
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .home-page .best-sellers-track::-webkit-scrollbar {
        display: none;
    }
    .home-page .best-card {
        flex-direction: column;
        width: 160px;
        min-width: 160px;
        scroll-snap-align: start;
        align-items: center;
        text-align: center;
    }
    .home-page .best-card .product-card-link {
        width: 100%;
        padding: 12px 8px 4px;
    }
    .home-page .best-card .product-img {
        height: 120px;
    }
    .home-page .best-card__body {
        width: 100%;
        align-items: center;
        gap: 8px;
        padding: 4px 8px 12px;
    }
}

/* Load More */
.home-page .load-more-wrapper {
    text-align: center;
    padding: var(--spacing-lg) 0;
}

.home-page .load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 28px;
    border: 1px solid var(--color-border);
    border-radius: 30px;
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text-high);
    background: var(--color-white);
    cursor: pointer;
    transition: all 0.3s ease;
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .home-page .hero-slider { aspect-ratio: 21/9; border-radius: var(--radius-lg); }
    .home-page .banner-grid { gap: var(--spacing-md); }
    .home-page .banner-item { aspect-ratio: 2/1; }
    .home-page .amazing-sidebar { width: 150px; min-width: 150px; }
    .home-page article.deal-card { width: 175px; min-width: 175px; }
    .home-page .amazing-box-svg { width: 72px; height: 72px; }
}

@media (max-width: 768px) {
    .home-page { padding: 0 var(--spacing-xs) 40px; }

    .home-page .hero-slider { aspect-ratio: 16/9; border-radius: var(--radius-md); }

    .home-page .hero-arrow { display: none; }

    .home-page .amazing-deals {
        flex-direction: column;
        padding: 12px 10px;
        gap: 12px;
        border-radius: var(--radius-lg, 16px);
    }

    .home-page .amazing-sidebar {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        gap: 8px;
        min-width: 0;
        padding: 0 4px;
    }

    .home-page .amazing-illustration {
        display: none;
    }

    .home-page .amazing-sidebar__header {
        flex-direction: row;
        align-items: center;
        gap: 6px;
    }

    .home-page .amazing-badge-icon {
        width: 32px;
        height: 32px;
    }

    .home-page .amazing-badge-icon svg {
        width: 16px;
        height: 16px;
    }

    .home-page .amazing-title {
        flex-direction: row;
        gap: 4px;
    }

    .home-page .amazing-title__sub {
        display: none;
    }

    .home-page .amazing-title__main {
        font-size: 15px;
    }

    .home-page .amazing-countdown-wrap {
        width: auto;
        gap: 0;
    }

    .home-page .countdown-label {
        display: none;
    }

    .home-page .time-unit {
        min-width: 28px;
        height: 26px;
        font-size: 12px;
        border-radius: 6px;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    }

    .home-page .time-unit-label {
        display: none;
    }

    .home-page .timer-sep {
        margin-top: 0;
        font-size: 13px;
    }

    .home-page .amazing-see-all {
        padding: 5px 12px;
        font-size: 11.5px;
    }

    .home-page article.deal-card {
        width: 145px;
        min-width: 145px;
        padding: 10px 8px;
        border-radius: 12px;
    }

    .home-page article.deal-card .product-title {
        font-size: 11.5px;
        height: 34px;
        margin-bottom: 6px;
    }

    .home-page article.deal-card .new-price {
        font-size: 13.5px;
    }

    .home-page .deal-card-see-all {
        width: 120px;
        min-width: 120px;
        border-radius: 12px;
        gap: 8px;
    }

    .home-page .deal-card-see-all__icon {
        width: 38px;
        height: 38px;
    }

    .home-page .deal-card-see-all__text {
        font-size: 12px;
    }

    .home-page .product-card { min-width: 150px; max-width: 170px; }

    .home-page .scroller-arrow { display: none; }

    .home-page .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-xs);
    }

    .home-page .section-title { font-size: 17px; }

    .home-page .banner-grid { grid-template-columns: 1fr; }

    .home-page .circle-img { width: 70px; height: 70px; }
    .home-page .circle-item { min-width: 78px; }
    .home-page .category-item-adaptive { width: 90px; }
    .home-page .category-item-img-box { width: 76px; height: 76px; }
}

@media (max-width: 480px) {
    .home-page .hero-slider { aspect-ratio: 4/3; margin-top: 8px; }

    .home-page .amazing-deals {
        padding: 10px 8px;
        border-radius: 14px;
    }

    .home-page .amazing-sidebar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 6px;
    }

    .home-page .deal-card {
        width: 136px;
        min-width: 136px;
        padding: 8px 6px;
    }

    .home-page .deal-card .product-title {
        font-size: 11px;
    }

    .home-page .deal-card .new-price {
        font-size: 13px;
    }

    .home-page .product-card { min-width: 135px; max-width: 150px; padding: 10px; }

    .home-page .new-price { font-size: 13px; }

    .home-page .circle-img { width: 60px; height: 60px; }
    .home-page .circle-item { min-width: 68px; gap: 6px; }
    .home-page .circle-item span { font-size: 11px; }
    .home-page .category-item-adaptive { width: 80px; gap: 6px; }
    .home-page .category-item-img-box { width: 68px; height: 68px; }
    .home-page .category-item-title { font-size: 11px; }
}

/* ===== HOME FAQ SECTION ===== */
.home-page .home-faq-section {
    margin-top: 60px;
    margin-bottom: 40px;
    background: var(--color-bg-surface, #ffffff);
    border: 1px solid var(--color-border, #e4e4e7);
    border-radius: var(--radius-lg, 16px);
    padding: 36px 28px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.02);
}

.home-page .home-faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.home-page .home-faq-header {
    text-align: center;
    margin-bottom: 28px;
}

.home-page .home-faq-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--color-primary-light, rgba(239, 57, 78, 0.08));
    color: var(--color-primary, #ef394e);
    border: 1px solid var(--color-primary-subtle, rgba(239, 57, 78, 0.2));
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 10px;
}

.home-page .home-faq-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--color-text-dark, #18181b);
    margin: 0 0 8px;
}

.home-page .home-faq-subtitle {
    font-size: 14px;
    color: var(--color-text-low, #71717a);
    margin: 0;
}

.home-page .home-faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.home-page .home-faq-item {
    border: 1px solid var(--color-border, #e4e4e7);
    border-radius: var(--radius-md, 12px);
    background: var(--color-bg-subtle, #fafafa);
    overflow: hidden;
    transition: all 0.2s ease;
}

.home-page .home-faq-item.is-active {
    background: var(--color-bg-surface, #ffffff);
    border-color: var(--color-primary, #ef394e);
    box-shadow: 0 4px 14px rgba(0,0,0,0.04);
}

.home-page .home-faq-trigger {
    width: 100%;
    padding: 18px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text-dark, #18181b);
    text-align: start;
    transition: color 0.2s;
}

.home-page .home-faq-item.is-active .home-faq-trigger {
    color: var(--color-primary, #ef394e);
}

.home-page .home-faq-arrow {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--color-bg-subtle, #f4f4f5);
    display: grid;
    place-items: center;
    color: var(--color-text-low, #71717a);
    transition: transform 0.25s ease, background 0.2s, color 0.2s;
}

.home-page .home-faq-item.is-active .home-faq-arrow {
    transform: rotate(180deg);
    background: var(--color-primary-light, rgba(239, 57, 78, 0.1));
    color: var(--color-primary, #ef394e);
}

.home-page .home-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease-in-out;
}

.home-page .home-faq-item.is-active .home-faq-answer {
    max-height: 500px;
}

.home-page .home-faq-answer-inner {
    padding: 0 20px 18px;
    font-size: 13.5px;
    line-height: 1.9;
    color: var(--color-text-high, #3f3f46);
    border-top: 1px dashed var(--color-border, #f4f4f5);
    padding-top: 14px;
}

.home-page .home-faq-footer {
    text-align: center;
    margin-top: 24px;
}

.home-page .home-faq-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-primary, #ef394e);
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm, 8px);
    background: var(--color-primary-light, rgba(239, 57, 78, 0.05));
    border: 1px solid var(--color-primary-subtle, rgba(239, 57, 78, 0.15));
    transition: all 0.2s;
}

.home-page .home-faq-all-btn:hover {
    background: var(--color-primary, #ef394e);
    color: var(--color-primary-text, #ffffff);
}
/* ===== DARK MODE OVERRIDES ===== */
[data-theme="dark"] .home-page article.deal-card {
    background-color: var(--color-bg-surface);
}
[data-theme="dark"] .home-page .deal-card-see-all {
    background-color: var(--color-bg-surface);
}
[data-theme="dark"] .home-page .best-card {
    background-color: var(--color-bg-surface);
}
[data-theme="dark"] .home-page .deal-card__img-box {
    background-color: var(--color-bg-page);
}
[data-theme="dark"] .home-page .deal-card .new-price {
    color: var(--color-text-main);
}
[data-theme="dark"] .home-page .deal-card .old-price {
    color: var(--color-text-muted);
}
[data-theme="dark"] .home-page .deal-card .currency {
    color: var(--color-text-muted);
}
[data-theme="dark"] .home-page .deal-card-see-all__text {
    color: var(--color-text-main);
}
[data-theme="dark"] .home-page .time-unit {
    background-color: var(--color-bg-surface);
}
