/* =====================================================
   home.css — اسلایدر فشرده زیر هدر (سبک دیجی‌کالا)
   ===================================================== */

.hero-slider {
    position: relative;
    min-height: var(--hero-min-height, 340px);
    max-height: var(--hero-min-height, 340px);
    overflow: hidden;
    background: var(--ink-900);
    isolation: isolate;
    border-bottom: 1px solid var(--paper-line);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.04);
    transition: opacity 0.8s var(--ease-out), visibility 0.8s, transform 1.2s var(--ease-out);
    will-change: opacity, transform;
}
.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    z-index: 1;
}
.hero-slide.is-active .hero-bg {
    animation: ken-burns 10s var(--ease-out) forwards;
}
@keyframes ken-burns {
    from { transform: scale(1); }
    to { transform: scale(1.06); }
}

.hero-bg {
    position: absolute;
    inset: -3%;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.hero-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, rgba(22,22,29,.82) 0%, rgba(22,22,29,.45) 55%, rgba(22,22,29,.65) 100%);
}

.hero-slider::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    opacity: .1;
    background-image: radial-gradient(rgba(247,247,242,.9) 1px, transparent 1.4px);
    background-size: 6px 6px;
    pointer-events: none;
    mix-blend-mode: overlay;
}

.hero-content {
    position: relative;
    z-index: 3;
    padding: 28px 0;
    max-width: 560px;
}

.hero-content .ink-heading {
    font-size: clamp(26px, 4vw, 42px);
    margin-bottom: 12px;
    color: #fff;
}

.hero-slide:not(.is-active) .hero-animate { opacity: 0; transform: translateY(16px); }
.hero-slide.is-active .hero-animate {
    animation: hero-fade-up 0.7s var(--ease-out) forwards;
}
.hero-slide.is-active .hero-animate-delay-1 { animation-delay: 0.12s; opacity: 0; }
.hero-slide.is-active .hero-animate-delay-2 { animation-delay: 0.24s; opacity: 0; }
.hero-slide.is-active .hero-animate-delay-3 { animation-delay: 0.36s; opacity: 0; }
@keyframes hero-fade-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-subtitle {
    color: rgba(247,247,242,.88);
    font-size: clamp(14px, 1.8vw, 17px);
    max-width: 460px;
    margin-bottom: 20px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.hero-actions .btn { padding: 10px 22px; font-size: 14px; }

.hero-stats {
    display: none;
}

/* ---- Slider controls ---- */
.hero-dots {
    position: absolute;
    z-index: 4;
    bottom: 16px;
    inset-inline: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
}
.hero-dot {
    width: 40px; height: 3px;
    border-radius: 4px;
    background: rgba(247,247,242,.25);
    border: 0;
    cursor: pointer;
    padding: 0;
    position: relative;
    overflow: hidden;
    transition: background var(--duration-fast) ease;
}
.hero-dot:hover { background: rgba(247,247,242,.4); }
.hero-dot.is-active::before {
    content: '';
    position: absolute; inset: 0;
    background: var(--gradient-brand);
    animation: hero-progress 6s linear forwards;
    border-radius: inherit;
}
@keyframes hero-progress {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}
.hero-dot::before { transform-origin: right center; }

.hero-arrows {
    position: absolute;
    z-index: 4;
    inset-inline: 0;
    top: 50%;
    display: flex;
    justify-content: space-between;
    padding: 0 16px;
    transform: translateY(-50%);
    pointer-events: none;
}
.hero-arrow {
    pointer-events: auto;
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.25);
    background: rgba(22,22,29,.45);
    color: var(--paper-050);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: background var(--duration-fast) ease, transform var(--duration-fast) var(--ease-spring);
}
.hero-arrow:hover {
    background: rgba(236, 12, 140, 0.55);
    transform: scale(1.08);
}

@media (max-width: 720px) {
    .hero-arrows { display: none; }
    .hero-content { padding: 20px 0; }
}

/* ---- Category cards (home only extras) ---- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
@media (max-width: 900px) { .category-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .category-grid { grid-template-columns: 1fr; } }

.category-card {
    position: relative;
    background: var(--paper-050);
    border: 1px solid var(--paper-line);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    overflow: hidden;
    display: block;
    transition: transform var(--duration-med) var(--ease-out), box-shadow var(--duration-med) var(--ease-out);
}
.category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: var(--gradient-brand);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--duration-med) ease;
}
.category-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}
.category-card:hover::before { opacity: 1; }

.category-icon {
    width: 52px; height: 52px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(236,12,140,.1), rgba(0,174,239,.1));
    color: var(--magenta-500);
    margin-bottom: 18px;
    transition: transform var(--duration-med) var(--ease-spring), background var(--duration-med) ease, color var(--duration-med) ease;
}
.category-card:hover .category-icon {
    transform: scale(1.08) rotate(-4deg);
    background: var(--gradient-brand);
    color: #fff;
}
.category-card h3 { font-size: 17px; margin-bottom: 8px; }
.category-card p { font-size: 14px; color: var(--ink-700); margin: 0; line-height: 1.65; }

.category-card-arrow {
    position: absolute;
    bottom: 22px;
    inset-inline-end: 22px;
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--paper-100);
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transform: translateX(6px);
    transition: opacity var(--duration-med) ease, transform var(--duration-med) var(--ease-out);
    color: var(--magenta-500);
}
.category-card:hover .category-card-arrow { opacity: 1; transform: translateX(0); }

/* home product grid uses 4 cols always on desktop */
.page-home .product-grid {
    grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1000px) { .page-home .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .page-home .product-grid { grid-template-columns: 1fr; } }

/* taller hero variant */
body.hero-medium .hero-slider { min-height: 480px; max-height: 480px; }
body.hero-large .hero-slider { min-height: 620px; max-height: 620px; }
body.hero-medium .hero-stats,
body.hero-large .hero-stats {
    display: flex;
    gap: 28px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,.12);
}
body.hero-medium .hero-stat strong,
body.hero-large .hero-stat strong {
    display: block;
    font-size: 22px;
    font-weight: 900;
    color: var(--paper-050);
}
body.hero-medium .hero-stat span,
body.hero-large .hero-stat span {
    font-size: 12px;
    color: rgba(247,247,242,.55);
    margin-top: 4px;
    display: block;
}

/* =====================================================
   صفحهٔ خانه — الهام گرفته از ویترین چاپ مدرن
   این قواعد عمداً فقط زیر .page-home هستند تا صفحات
   داخلی و قابلیت‌های فعلی سایت بدون تغییر بمانند.
   ===================================================== */
body.page-home {
    --home-bg: #070811;
    --home-surface: #0d1019;
    --home-surface-2: #121622;
    --home-line: rgba(255,255,255,.11);
    --home-text: #f6f2e9;
    --home-muted: #a9adba;
    --home-gold: #e8c45e;
    --home-gold-light: #f7d775;
    background: var(--home-bg);
    color: var(--home-text);
}

body.page-home .site-header {
    position: sticky;
    height: 96px;
    padding: 16px 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}
body.page-home .header-shell {
    min-height: 64px;
    padding-inline: 20px;
    background: rgba(8, 21, 32, .88);
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 22px;
    box-shadow: 0 14px 34px rgba(0,0,0,.22);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    overflow: hidden;
}
body.page-home .header-shell::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(115deg, rgba(255,255,255,.14), transparent 30%, transparent 72%, rgba(232,196,94,.08));
    opacity: .8;
}
body.page-home .header-shell > .brand,
body.page-home .header-shell > .nav-toggle { position: relative; z-index: 1; }
body.page-home .site-header.is-scrolled .header-shell {
    background: rgba(8, 16, 27, .96);
    box-shadow: 0 14px 38px rgba(0,0,0,.36);
}
body.page-home .brand-name,
body.page-home .nav-link,
body.page-home .nav-icon-btn { color: var(--home-text); }
body.page-home .brand-tag { color: var(--home-muted); }
body.page-home .brand-mark {
    background: linear-gradient(135deg, var(--home-gold-light), #aa8126);
    box-shadow: 0 0 0 5px rgba(232,196,94,.10);
}
body.page-home .nav-panel { background: transparent; border: 0; }
body.page-home .nav-actions { border-color: rgba(255,255,255,.12); }
body.page-home .nav-link { color: rgba(246,242,233,.78); }
body.page-home .nav-link:hover,
body.page-home .nav-link.is-active {
    color: var(--home-gold-light);
    background: rgba(232,196,94,.10);
}
body.page-home .nav-cta,
body.page-home .btn-primary {
    color: #17130b;
    background: linear-gradient(135deg, var(--home-gold-light), var(--home-gold));
    box-shadow: 0 10px 28px rgba(232,196,94,.17);
}
body.page-home .nav-cta:hover,
body.page-home .btn-primary:hover {
    box-shadow: 0 14px 34px rgba(232,196,94,.27);
}

body.page-home main { overflow: hidden; }
body.page-home .hero-slider {
    min-height: min(690px, calc(100vh - 96px));
    max-height: none;
    margin: 0 auto 32px;
    width: min(100% - 40px, 1440px);
    border: 1px solid var(--home-line);
    border-radius: 0 0 42px 42px;
    background:
        radial-gradient(circle at 86% 9%, rgba(0,163,191,.22), transparent 30%),
        radial-gradient(circle at 12% 4%, rgba(147,48,122,.23), transparent 31%),
        linear-gradient(140deg, #11131e, #090a11 66%);
}
body.page-home .hero-slide::after {
    background: linear-gradient(100deg, rgba(7,8,17,.97) 2%, rgba(7,8,17,.79) 51%, rgba(7,8,17,.44));
}
body.page-home .hero-slider::before {
    opacity: .16;
    background-image: radial-gradient(rgba(232,196,94,.6) .7px, transparent .9px);
    background-size: 8px 8px;
}
body.page-home .hero-content {
    max-width: 720px;
    padding: 92px 24px 108px;
    text-align: right;
}
body.page-home .hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 20px;
    color: var(--home-gold-light);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .03em;
}
body.page-home .hero-kicker-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--home-gold);
    box-shadow: 0 0 0 5px rgba(232,196,94,.13), 0 0 18px rgba(232,196,94,.62);
}
body.page-home .hero-content .ink-heading {
    max-width: 660px;
    font-size: clamp(38px, 5.2vw, 70px);
    line-height: 1.18;
    color: var(--home-text);
    text-shadow: none;
}
body.page-home .ink-heading::before,
body.page-home .ink-heading::after { display: none; }
body.page-home .hero-subtitle {
    max-width: 580px;
    color: var(--home-muted);
    font-size: clamp(15px, 1.8vw, 18px);
    -webkit-line-clamp: 3;
    margin-bottom: 28px;
}
body.page-home .hero-actions { gap: 14px; }
body.page-home .hero-actions .btn { padding: 13px 26px; }
body.page-home .btn-ghost {
    color: var(--home-text);
    border-color: rgba(255,255,255,.19);
    background: rgba(9,10,17,.28);
}
body.page-home .btn-ghost:hover { background: rgba(255,255,255,.09); }
body.page-home .hero-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-top: 30px;
    color: rgba(246,242,233,.67);
    font-size: 12px;
    font-weight: 600;
}
body.page-home .hero-trust span { display: inline-flex; align-items: center; gap: 8px; }
body.page-home .hero-trust span::before {
    content: '✓';
    color: var(--home-gold-light);
    font-size: 13px;
}
body.page-home .hero-dots { bottom: 28px; justify-content: flex-start; padding-inline: 7.5%; }
body.page-home .hero-dot { background: rgba(255,255,255,.25); }
body.page-home .hero-dot.is-active::before { background: var(--home-gold); }
body.page-home .hero-arrows { padding-inline: 26px; }
body.page-home .hero-arrow { background: rgba(8,12,19,.55); border-color: var(--home-line); }
body.page-home .hero-arrow:hover { background: var(--home-gold); color: #17130b; }
body.page-home .hero-index {
    position: absolute;
    z-index: 4;
    bottom: 23px;
    inset-inline-end: 7.5%;
    display: flex;
    align-items: baseline;
    gap: 6px;
    direction: ltr;
    color: rgba(246,242,233,.48);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}
body.page-home .hero-index strong { color: var(--home-gold-light); font-size: 16px; }
body.page-home.hero-medium .hero-slider,
body.page-home.hero-large .hero-slider { min-height: min(690px, calc(100vh - 96px)); max-height: none; }
body.page-home.hero-medium .hero-stats,
body.page-home.hero-large .hero-stats { border-color: rgba(255,255,255,.14); }
body.page-home.hero-medium .hero-stat strong,
body.page-home.hero-large .hero-stat strong { color: var(--home-gold-light); }

body.page-home .section { padding: 110px 0; }
body.page-home .section-alt { background: var(--home-surface); }
body.page-home .section-alt::before {
    background: radial-gradient(ellipse 50% 45% at 88% 10%, rgba(232,196,94,.08), transparent), radial-gradient(ellipse 45% 35% at 8% 100%, rgba(0,163,191,.08), transparent);
}
body.page-home .section-head { max-width: 680px; }
body.page-home .section-head h2,
body.page-home .feature-item h3,
body.page-home .category-card h3,
body.page-home .product-body h3 { color: var(--home-text); }
body.page-home .section-head p,
body.page-home .category-card p,
body.page-home .feature-item p,
body.page-home .product-body p { color: var(--home-muted); }
body.page-home .eyebrow {
    color: var(--home-gold-light);
    background: rgba(232,196,94,.08);
    border-color: rgba(232,196,94,.18);
}
body.page-home .eyebrow::before { background: var(--home-gold); }
body.page-home .category-grid { gap: 16px; }
body.page-home .category-card,
body.page-home .feature-item,
body.page-home .product-card {
    background: linear-gradient(145deg, rgba(21,25,38,.96), rgba(10,12,20,.96));
    border-color: var(--home-line);
    box-shadow: none;
}
body.page-home .category-card { min-height: 215px; padding: 28px; border-radius: 20px; }
body.page-home .category-card:hover,
body.page-home .feature-item:hover,
body.page-home .product-card:hover {
    border-color: rgba(232,196,94,.52);
    box-shadow: 0 18px 42px rgba(0,0,0,.24);
}
body.page-home .category-card::before { background: linear-gradient(135deg, var(--home-gold), transparent 65%); }
body.page-home .category-icon {
    color: var(--home-gold-light);
    background: rgba(232,196,94,.10);
}
body.page-home .category-card:hover .category-icon { color: #17130b; background: var(--home-gold); }
body.page-home .category-card-arrow { background: rgba(232,196,94,.14); color: var(--home-gold-light); }
body.page-home .product-thumb { background: #151925; }
body.page-home .product-price { color: var(--home-gold-light); background: rgba(232,196,94,.10); }
body.page-home .feature-item { text-align: right; padding: 30px; border-radius: 20px; }
body.page-home .feature-icon { margin: 0 0 20px; background: rgba(232,196,94,.10); color: var(--home-gold-light); }
body.page-home .feature-icon::before { background: var(--home-gold); }
body.page-home .portfolio-tile { border-radius: 18px; box-shadow: none; border: 1px solid var(--home-line); }
body.page-home .portfolio-tile:hover { box-shadow: 0 16px 38px rgba(0,0,0,.28); }
body.page-home .cta-banner {
    background: linear-gradient(115deg, #152436, #101018 58%, #33291a);
    border-color: rgba(232,196,94,.20);
    border-radius: 28px;
}
body.page-home .cta-banner::after { background: radial-gradient(circle, rgba(232,196,94,.28), transparent 70%); }
body.page-home .cta-banner p { color: var(--home-muted); }
body.page-home .site-footer { background: #06070d; border-top-color: var(--home-line); }
body.page-home .site-footer, body.page-home .site-footer .brand-name { color: var(--home-text); }
body.page-home .site-footer p, body.page-home .site-footer a, body.page-home .footer-bottom { color: var(--home-muted); }
body.page-home .site-footer h4 { color: var(--home-text); }

@media (max-width: 1020px) {
    body.page-home .site-header {
        height: auto;
        padding: 10px 0;
    }
    body.page-home .header-shell {
        min-height: 0;
        padding-block: 12px;
        overflow: visible !important;
    }
    body.page-home .header-shell .main-nav.is-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
    }
    body.page-home .header-shell .main-nav .nav-panel {
        background: var(--paper-050);
        border: 1px solid var(--paper-line);
    }
}

@media (max-width: 720px) {
    body.page-home .site-header {
        height: auto;
        padding: 8px 0;
    }
    body.page-home .header-shell {
        min-height: 0;
        padding-block: 10px;
        padding-inline: 14px;
        border-radius: 14px;
    }
    body.page-home .hero-slider {
        width: calc(100% - 16px);
        min-height: min(480px, calc(100svh - var(--header-h) - 20px));
        max-height: none;
        margin-bottom: 14px;
        border-radius: 0 0 24px 24px;
    }
    body.page-home .hero-slide { align-items: flex-start; }
    body.page-home .hero-content { padding: 18px 14px 48px; }
    body.page-home .hero-content .ink-heading { font-size: clamp(28px, 9vw, 44px); }
    body.page-home .hero-dots { padding-inline: 16px; }
    body.page-home .hero-index { inset-inline-end: 16px; }
    body.page-home .hero-trust { gap: 6px 12px; font-size: 11px; }
    body.page-home .section { padding: 64px 0; }
    body.page-home.hero-medium .hero-stats,
    body.page-home.hero-large .hero-stats {
        flex-wrap: wrap;
        gap: 10px 18px;
        margin-top: 20px;
        padding-top: 16px;
    }
}
/* حالت روشن برای صفحهٔ اصلی */
html[data-theme="light"] body.page-home { --home-bg: #f6f3ec; --home-surface: #f0ede6; --home-text: #192031; --home-muted: #627083; --home-line: rgba(25,32,49,.12); background: var(--home-bg); }
html[data-theme="light"] body.page-home .site-header { background: transparent; }
html[data-theme="light"] body.page-home .header-shell { background: rgba(255,255,255,.82); box-shadow: 0 14px 34px rgba(29,35,48,.10); }
html[data-theme="light"] body.page-home .brand-name, html[data-theme="light"] body.page-home .nav-icon-btn { color: var(--home-text); }
html[data-theme="light"] body.page-home .nav-link { color: var(--home-muted); }
html[data-theme="light"] body.page-home .hero-slider { background: linear-gradient(135deg, #e7eeef, #f7f1e4); }
html[data-theme="light"] body.page-home .hero-slide::after { background: linear-gradient(100deg, rgba(246,243,236,.90), rgba(246,243,236,.55), rgba(246,243,236,.20)); }
html[data-theme="light"] body.page-home .hero-content .ink-heading, html[data-theme="light"] body.page-home .hero-subtitle { color: var(--home-text); }
html[data-theme="light"] body.page-home .hero-trust { color: var(--home-muted); }
html[data-theme="light"] body.page-home .category-card, html[data-theme="light"] body.page-home .feature-item, html[data-theme="light"] body.page-home .product-card { background: #fff; border-color: var(--home-line); }
html[data-theme="light"] body.page-home .product-thumb { background: #ece8df; }
html[data-theme="light"] body.page-home .cta-banner { background: linear-gradient(115deg, #17283a, #20202b 58%, #80652d); }
