:root {
    --primary: #7a1f2b;
    --gold: #b8860b;
    --dark: #222;
    --muted: #666;
    --bg: #faf7f2;
}

body { background: var(--bg);}

/* ================= HERO ================= */
/* تمام عرض صفحه، حتی اگر داخل کانتینر باشد */
.HeroSection {
    --hero-gold: var(--gold, #c9a227);
    --hero-primary: var(--primary, #7c2d12);

    position: relative;
    box-sizing: border-box;
    width: 100vw;
    max-width: none;
    margin: 0 0 0 calc(50% - 50vw);
    height: 100vh;
    height: 100dvh;
    min-height: 480px;
    overflow: hidden;
    color: #fff;
    isolation: isolate;
    background: #1a1410;
}

/* اسلایدها: عکس و لایه تیره با هم زوم می‌کنند */
.HeroSection .hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.08);
    transform-origin: center center;
    transition: opacity 1.4s ease-in-out, transform 8s ease-out;
    will-change: opacity, transform;
}

.HeroSection .hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,.35) 0%,
        rgba(0,0,0,.55) 60%,
        rgba(0,0,0,.75) 100%
    );
}

.HeroSection .hero-slide.active {
    opacity: 1;
    transform: scale(1);
}

/* محتوا */
.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: .25rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .4rem 1.1rem;
    margin-bottom: 1.25rem;
    font-size: clamp(.8rem, 1.2vw, .95rem);
    font-weight: 500;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 999px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.hero-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--hero-gold);
    box-shadow: 0 0 0 4px rgba(201,162,39,.25);
}

.hero-title {
    margin: 0;
    font-size: clamp(2rem, 5.5vw, 4rem);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -.01em;
    text-shadow: 0 4px 24px rgba(0,0,0,.35);
}

.hero-title-accent {
    display: block;
    margin-top: .15em;
    color: var(--hero-gold);
    background: linear-gradient(90deg, #f7e7a6, var(--hero-gold));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    margin: 1rem 0 0;
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 500;
    opacity: .95;
}

.hero-note {
    margin: .25rem 0 0;
    font-size: clamp(.9rem, 1.6vw, 1.05rem);
    opacity: .8;
}

.hero-actions {
    margin-top: 2rem;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .9rem 2.2rem;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background: var(--hero-gold);
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(0,0,0,.3);
    transition: transform .25s ease, background .25s ease, color .25s ease, box-shadow .25s ease;
}

.hero-btn span {
    transition: transform .25s ease;
}

.hero-btn:hover,
.hero-btn:focus-visible {
    background: #fff;
    color: var(--hero-primary);
    transform: translateY(-3px);
    box-shadow: 0 16px 35px rgba(0,0,0,.35);
}

.hero-btn:hover span {
    transform: translateX(-4px);
}

.hero-btn:focus-visible {
    outline: 3px solid rgba(255,255,255,.7);
    outline-offset: 4px;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .hero-badge {
        margin-bottom: 1rem;
    }

    .hero-actions {
        margin-top: 1.5rem;
    }
}

@media (max-width: 480px) {
    .HeroSection {
        min-height: 520px;
    }

    .hero-content {
        padding: 1rem;
    }

    .hero-btn {
        padding: .8rem 1.8rem;
        font-size: .95rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .HeroSection .hero-slide,
    .hero-btn,
    .hero-btn span {
        transition: none;
    }

    .HeroSection .hero-slide {
        transform: none;
    }
}



/* ================= SECTION HEADER ================= */
.section-head {
    text-align: center;
    margin: 3.5rem 0 2rem;
}
.section-head h2 {
    font-weight: 800;
    color: var(--primary);
    font-size: clamp(1.4rem, 3vw, 2rem);
}
.section-line {
    display: block;
    width: 70px;
    height: 3px;
    margin: .6rem auto 0;
    background: var(--gold);
    border-radius: 2px;
}

/* ================= DISCOUNTED PRODUCTS ================= */
.DiscountedProduct {
    padding-bottom: 2rem;
}
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}
.product-card {
    position: relative;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,.06);
    transition: transform .25s, box-shadow .25s;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 30px rgba(0,0,0,.12);
}
.discount-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    background: var(--primary);
    color: #fff;
    font-size: .8rem;
    padding: .25rem .7rem;
    border-radius: 999px;
}
.product-img {
    height: 220px;
    background-size: cover;
    background-position: center;
}
.product-body {
    padding: 1rem;
    text-align: center;
}
.product-body h3 {
    font-size: 1rem;
    color: var(--dark);
    margin-bottom: .5rem;
}
.price del {
    color: #999;
    font-size: .9rem;
    margin-left: .4rem;
}
.price strong {
    color: var(--primary);
    font-size: 1rem;
}

/* ================= CATEGORIES ================= */
.MostFavoriteCategories {
    padding-bottom: 4rem;
}
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}
.category-card {
    position: relative;
    display: block;
    height: 240px;
    border-radius: 18px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(0,0,0,.1);
}
.category-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform .5s;
}
.category-card:hover .category-img {
    transform: scale(1.08);
}
.category-title {
    position: absolute;
    inset: auto 0 0 0;
    padding: 2.5rem 1rem 1rem;
    background: linear-gradient(to top, rgba(0,0,0,.75), transparent);
    text-align: center;
}
.category-title h3 {
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 992px) {
    .category-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
    .HeroSection { height: 65vh; min-height: 360px; }
    .category-grid { grid-template-columns: repeat(2, 1fr); gap: .9rem; }
    .category-card { height: 180px; border-radius: 14px; }
    .category-title h3 { font-size: .95rem; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .product-img { height: 160px; }
}


/* ===== Weekly Discount Section ===== */
.weekly-discount {
    --wd-primary: #ef4444;
    --wd-primary-dark: #dc2626;
    --wd-accent: #f59e0b;
    --wd-text: #1f2937;
    --wd-muted: #6b7280;
    --wd-bg: #ffffff;
    --wd-surface: #f9fafb;
    --wd-border: #e5e7eb;
    --wd-radius: 16px;
    --wd-shadow: 0 4px 14px rgba(0, 0, 0, .06);
    --wd-shadow-hover: 0 14px 30px rgba(0, 0, 0, .12);

    font-family: inherit;
    padding: 3rem 0;
    background: linear-gradient(180deg, #fff7ed 0%, #ffffff 60%);
    color: var(--wd-text);
    overflow: hidden;
}

.weekly-discount .container-fluid {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    box-sizing: border-box;
}

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

/* ----- Header ----- */
.wd-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.wd-title-wrap {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}

.wd-badge {
    background: linear-gradient(135deg, var(--wd-primary), var(--wd-accent));
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    padding: .35rem .8rem;
    border-radius: 999px;
    letter-spacing: .3px;
}

.wd-title {
    margin: 0;
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 800;
    line-height: 1.4;
}

.wd-line {
    flex: 1;
    height: 2px;
    min-width: 40px;
    background: linear-gradient(to left, var(--wd-primary), transparent);
    border-radius: 2px;
}

/* ----- Grid ----- */
.wd-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 640px) {
    .wd-grid { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
}

@media (min-width: 992px) {
    .wd-grid { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
}

/* ----- Card ----- */
.wd-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--wd-bg);
    border: 1px solid var(--wd-border);
    border-radius: var(--wd-radius);
    box-shadow: var(--wd-shadow);
    overflow: hidden;
    transition: transform .3s ease, box-shadow .3s ease;
}

.wd-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--wd-shadow-hover);
}

/* Discount tag */
.wd-discount {
    position: absolute;
    top: .75rem;
    right: .75rem;
    z-index: 2;
    background: var(--wd-primary);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    padding: .3rem .65rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(239, 68, 68, .35);
}

/* Image */
.wd-media {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--wd-surface);
    overflow: hidden;
}

.wd-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}

.wd-card:hover .wd-img {
    transform: scale(1.06);
}

/* Body */
.wd-body {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    padding: 1rem;
    flex: 1;
}

.wd-name {
    margin: 0;
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3em;
}

.wd-price {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.wd-old {
    color: var(--wd-muted);
    font-size: .85rem;
}

.wd-new {
    color: var(--wd-primary-dark);
    font-size: 1.1rem;
    font-weight: 800;
}

.wd-new small {
    font-size: .75rem;
    font-weight: 600;
    color: var(--wd-muted);
    margin-right: .2rem;
}

/* ----- Small screens tweaks ----- */
@media (max-width: 480px) {
    .weekly-discount { padding: 2rem 0; }
    .wd-body { padding: .75rem; }
    .wd-name { font-size: .85rem; }
    .wd-new { font-size: 1rem; }
    .wd-discount { font-size: .68rem; top: .5rem; right: .5rem; }
}

/* ----- Reduced motion ----- */
@media (prefers-reduced-motion: reduce) {
    .wd-card, .wd-img { transition: none; }
    .wd-card:hover { transform: none; }
    .wd-card:hover .wd-img { transform: none; }
}
.wd-link {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
    color: inherit;
    text-decoration: none;
    outline: none;
}

/* نمایش حالت فوکوس برای کیبورد */
.wd-card:focus-within {
    outline: 2px solid var(--wd-primary);
    outline-offset: 3px;
}

.wd-link:focus-visible {
    outline: none;
}