﻿/* ─── H1 صفحه اصلی (بالا یا زیر اسلایدر اصلی) ─── */
.home-hero-head { padding-top: .1rem; padding-bottom: .55rem; }
.home-top-stack.is-intro-below { display: flex; flex-direction: column; }
.home-top-stack.is-intro-below .home-intro-panel { order: 2; }
.home-top-stack.is-intro-below .home-hero-head { margin-top: 0.85rem; }
.home-hero-title { margin: 0; text-align: center; font-weight: 800; line-height: 1.45; letter-spacing: -0.02em; color: var(--C6); font-size: clamp(1.05rem, 2.15vw, 1.38rem); padding-bottom: 10px; }
.home-hero-title :is(h1, h2, h3, h4, p, span) { display: inline; margin: 0; padding: 0; font: inherit; letter-spacing: inherit; line-height: inherit; color: inherit; }
.home-hero-title .home-hero-title__brand { color: var(--C3); font-weight: 800; }
.home-hero-title .home-hero-title__sep { color: color-mix(in srgb, var(--C5) 65%, var(--C6)); font-weight: 600; }
.home-hero-title .home-hero-title__tagline { font-weight: 700; color: color-mix(in srgb, var(--C6) 92%, var(--C1)); }

@media (max-width: 575.98px) {
    .home-hero-title { white-space: nowrap; font-size: clamp(0.68rem, 3.25vw, 0.84rem); letter-spacing: -0.035em; line-height: 1.2; }
}

@media (min-width: 576px) and (max-width: 991.98px) {
    .home-hero-title { font-size: clamp(0.92rem, 2.4vw, 1.12rem); }
}

:root[data-bs-theme="dark"] .home-hero-title .home-hero-title__brand { color: #42dfb0; }
:root[data-bs-theme="dark"] .home-hero-title .home-hero-title__tagline { color: color-mix(in srgb, var(--C5) 88%, #fff); }
:root[data-bs-theme="dark"] .home-hero-title .home-hero-title__sep { color: color-mix(in srgb, var(--C5) 55%, var(--C2)); }

/* اسلایدر بالا / پایین — همان padding افقی container مثل بنرهای دوتایی */
.home-main-slider-section {
    margin-bottom: 0;
    padding-bottom: 0.25rem;
}
.home-bottom-slider-section {
    padding-top: 0.25rem;
}

/* تمام‌عرض تا سقف انتخاب‌شده (۱۶۰۰ یا ۱۹۲۰)؛ گوشه‌ها صاف */
.home-main-slider-section.is-fullwidth,
.home-bottom-slider-section.is-fullwidth {
    width: 100%;
    max-width: var(--slider-full-max, 1600px);
    padding-left: 0;
    padding-right: 0;
}
.home-main-slider-section.is-fullwidth .content-slider-hero.main-slider-wrapper,
.home-bottom-slider-section.is-fullwidth .content-slider-hero.main-slider-wrapper,
.home-main-slider-section.is-fullwidth .site-loader-wrap,
.home-bottom-slider-section.is-fullwidth .site-loader-wrap,
.home-main-slider-section.is-fullwidth .content-slider-hero .img-fluid,
.home-main-slider-section.is-fullwidth .content-slider-hero .img-fluid img,
.home-main-slider-section.is-fullwidth .content-slider-hero .content-slider-video-wrap,
.home-main-slider-section.is-fullwidth .content-slider-hero .background-video,
.home-main-slider-section.is-fullwidth .content-slider-hero .content-slider-html,
.home-main-slider-section.is-fullwidth .content-slider-hero .content-slider-placeholder,
.home-bottom-slider-section.is-fullwidth .content-slider-hero .img-fluid,
.home-bottom-slider-section.is-fullwidth .content-slider-hero .img-fluid img,
.home-bottom-slider-section.is-fullwidth .content-slider-hero .content-slider-video-wrap,
.home-bottom-slider-section.is-fullwidth .content-slider-hero .background-video,
.home-bottom-slider-section.is-fullwidth .content-slider-hero .content-slider-html,
.home-bottom-slider-section.is-fullwidth .content-slider-hero .content-slider-placeholder {
    border-radius: 0;
}

/* وقتی باکس تخفیف مخفی است، فاصلهٔ عمودی (جایگزین py بخش تخفیف) */
.home-banners-dual-panel--gap-after-slider .home-banners-dual-section {
    padding-top: 1.25rem;
}
@media (min-width: 768px) {
    .home-banners-dual-panel--gap-after-slider .home-banners-dual-section {
        padding-top: 2rem;
    }
}

/* ─── سکشن همه محصولات (تب‌بندی دسته‌های اصلی) ─── */
.home-all-products-section { background: var(--C0); }
.home-all-products-tabs-scroll { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: thin; margin: 0 -0.25rem; padding: 0 0.25rem 0.85rem; }
.home-all-products-tabs { gap: 0.5rem; border-bottom: none; flex-wrap: nowrap; min-width: min-content; }
.home-all-products-tabs .nav-link { white-space: nowrap; border-radius: 999px; padding: 0.45rem 1rem; font-weight: 600; color: var(--C6); background: color-mix(in srgb, var(--C5) 35%, transparent); border: 1px solid color-mix(in srgb, var(--C5) 55%, transparent); transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.home-all-products-tabs .nav-link:hover { color: var(--C1); border-color: var(--C3); }
.home-all-products-tabs .nav-link.active { color: #fff; background: var(--C3); border-color: var(--C3); }
.home-all-products-grid-loader { min-height: 120px; border-radius: 0.875rem; }
.home-all-products-grid-loader.loading { min-height: 220px; }
.home-all-products-grid-loader.loading .home-all-products-grid { visibility: visible; }
.home-all-products-load-more.btn-outline-primary.btn-with-loader .btn-with-loader__spinner {
    border-color: color-mix(in srgb, var(--C3) 28%, transparent);
    border-left-color: var(--C3);
}
.home-all-products-grid { align-items: stretch; margin-left: 0; margin-right: 0; }
.home-all-products-grid > .home-all-products-col { display: flex; padding-left: calc(var(--bs-gutter-x, 1rem) * 0.5); padding-right: calc(var(--bs-gutter-x, 1rem) * 0.5); }
.home-all-products-grid > .home-all-products-col .product-card { width: 100%; }
.home-all-products-load-more { min-width: 10rem; border-radius: 999px; font-weight: 600; --bs-btn-hover-color: var(--C3); --bs-btn-active-color: var(--C3); }
.home-all-products-load-more:hover,
.home-all-products-load-more:focus,
.home-all-products-load-more:active { color: var(--C3) !important; }
.home-all-products-category-link { min-width: 12rem; font-weight: 600; }
.home-all-products-infinite-scroll-sentinel { height: 4px; width: 100%; pointer-events: none; }
.home-all-products-scroll-loader {
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.35rem 0 0.15rem;
}
.home-all-products-scroll-loader.is-loading { display: inline-flex; }
.home-all-products-scroll-loader__spinner { flex-shrink: 0; }

@media (min-width: 992px) {
    .home-all-products-grid > .home-all-products-col { flex: 0 0 20%; max-width: 20%; width: 20%; }
}

:root[data-bs-theme="dark"] .home-all-products-tabs .nav-link { background: color-mix(in srgb, var(--C5) 18%, transparent); color: var(--C5); }
:root[data-bs-theme="dark"] .home-all-products-tabs .nav-link.active { color: #fff; }

.home-banner-slot { display: inline-block; overflow: hidden; border-radius: 0.875rem; background: var(--bs-light, #f8f9fa); }
.home-banner-slot img { width: 100%; height: auto; border-radius: 0.875rem; transition: opacity .25s ease; }
.home-banner-slot:hover img { opacity: .9; }
:root[data-bs-theme="dark"] .home-banner-slot { border-color: rgba(255,255,255,.2); background: var(--bs-secondary-bg); }
.home-banner-placeholder { border: 2px dashed rgba(0,0,0,.15); background: var(--bs-light, #f8f9fa); }
:root[data-bs-theme="dark"] .home-banner-placeholder { border-color: rgba(255,255,255,.2); background: var(--bs-secondary-bg); }

/* مخفی‌سازی هیرو در یک ویوپورت (تنظیم ادمین) */
@media (max-width: 767.98px) {
    .home-hero-cover.home-hero-cover--desktop-only { display: none !important; }
}
@media (min-width: 768px) {
    .home-hero-cover.home-hero-cover--mobile-only { display: none !important; }
}
html.has-home-hero:not(.home-hero-viewport-active)[data-hero-header="clear"] #header.header,
html.has-home-hero:not(.home-hero-viewport-active)[data-hero-header="clear"] #header.header.scrolled,
html.has-home-hero:not(.home-hero-viewport-active)[data-hero-header="clear"] #header.header:hover,
html.has-home-hero:not(.home-hero-viewport-active)[data-hero-header="glass"] #header.header,
html.has-home-hero:not(.home-hero-viewport-active)[data-hero-header="glass"] #header.header.scrolled,
html.has-home-hero:not(.home-hero-viewport-active)[data-hero-header="glass"] #header.header:hover {
    background-color: var(--C10) !important;
    box-shadow: 0 13px 20px #292929a3;
}
/* ─── اسلایدر هیرو تمام‌صفحه ─── */
html.has-home-hero.home-hero-viewport-active .main { padding-top: 0; }
.home-hero-cover {
    position: relative;
    width: 100%;
    /* vh fallback؛ svh پایدار است تا با جمع شدن نوار آدرس موبایل ارتفاع هیرو نپرد */
    height: 100vh;
    height: 100svh;
    overflow: hidden;
    background: #0d1210;
    color: #fff;
}
.home-hero-cover .swiper.home-hero-swiper {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0 !important;
    box-sizing: border-box;
}
.home-hero-cover .swiper-wrapper,
.home-hero-cover .swiper-slide { height: 100%; }
.home-hero-cover .swiper-slide { position: relative; overflow: hidden; }
.home-hero-media { position: absolute; inset: 0; }
.home-hero-media a { display: block; width: 100%; height: 100%; }
.home-hero-media img,
.home-hero-media video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.home-hero-media img {
    opacity: 0;
    transition: opacity .5s ease;
}
.home-hero-media.is-ready img { opacity: 1; }
/* ویدیو مثل Behsarma از ابتدا دیده می‌شود تا autoplay موبایل قطع نشود */
.home-hero-media-loader {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s ease, visibility .35s ease;
}
.home-hero-media.is-loading .home-hero-media-loader {
    opacity: 1;
    visibility: visible;
}
.home-hero-media.is-loading::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 55% 40% at 50% 48%, color-mix(in srgb, var(--C3) 18%, transparent), transparent 70%),
        linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, .045) 48%, transparent 72%);
    background-size: 100% 100%, 220% 100%;
    animation: home-hero-media-shimmer 2.1s ease-in-out infinite;
}
.home-hero-media-loader__ring {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, .14);
    border-top-color: var(--C3);
    box-sizing: border-box;
    animation: home-hero-media-spin .85s linear infinite;
}
@keyframes home-hero-media-spin {
    to { transform: rotate(360deg); }
}
@keyframes home-hero-media-shimmer {
    0% { background-position: 0 0, 120% 0; }
    100% { background-position: 0 0, -120% 0; }
}
@media (prefers-reduced-motion: reduce) {
    .home-hero-media img { transition: none; }
    .home-hero-media.is-loading::before { animation: none; background: radial-gradient(ellipse 55% 40% at 50% 48%, color-mix(in srgb, var(--C3) 14%, transparent), transparent 70%); }
    .home-hero-media-loader__ring { animation: none; border-color: rgba(255, 255, 255, .2); border-top-color: var(--C3); opacity: .85; }
}
.home-hero-scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, .48) 0%, rgba(0, 0, 0, .12) 38%, rgba(0, 0, 0, .62) 100%);
}
.home-hero-copy {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: right;
    padding: 7.5rem 8vw 4.5rem;
    pointer-events: none;
    max-width: 920px;
}
.home-hero-copy a { pointer-events: auto; }
.home-hero-kicker {
    margin: 0 0 .65rem;
    font-size: .92rem;
    font-weight: 700;
    letter-spacing: .04em;
    color: #b7f3dc;
}
.home-hero-slide-title {
    margin: 0;
    font-size: clamp(1.8rem, 4.2vw, 3.4rem);
    font-weight: 800;
    line-height: 1.25;
    color: #fff;
}
.home-hero-lead {
    margin: .85rem 0 0;
    max-width: 38rem;
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    line-height: 1.8;
    color: rgba(255, 255, 255, .92);
}
.home-hero-btn {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    width: max-content;
    max-width: 100%;
    margin-top: 1.25rem;
    padding: .72rem 1.45rem;
    border-radius: 999px;
    background: #fff;
    color: #10211a;
    font-weight: 800;
    text-decoration: none;
    pointer-events: auto;
}
.home-hero-btn:hover { background: var(--C3); color: #fff; }
@media (max-width: 992px) {
    .home-hero-btn--full { align-self: stretch; width: 100%; justify-content: center; box-sizing: border-box; }
}
.home-hero-html { position: relative; z-index: 1; width: 100%; height: 100%; overflow: auto; }
.home-hero-cover .home-hero-nav {
    color: #fff;
    z-index: 3;
}
.home-hero-cover .home-hero-nav::after { font-size: 1.35rem; }
.home-hero-cover .home-hero-pagination { z-index: 3; bottom: 1.4rem !important; color: #fff; }
.home-hero-hit { position: absolute; inset: 0; z-index: 2; }
.home-hero-swiper[data-pagination-pos] > .home-hero-pagination { width: auto !important; margin: 0 !important; }
.home-hero-swiper[data-pagination-pos="bottom-left"] > .home-hero-pagination { top: auto !important; bottom: 1.4rem !important; left: 1.25rem !important; right: auto !important; }
.home-hero-swiper[data-pagination-pos="bottom-center"] > .home-hero-pagination { top: auto !important; bottom: 1.4rem !important; left: 0 !important; right: 0 !important; width: 100% !important; justify-content: center; }
.home-hero-swiper[data-pagination-pos="bottom-right"] > .home-hero-pagination { top: auto !important; bottom: 1.4rem !important; left: auto !important; right: 1.25rem !important; }
.home-hero-swiper[data-pagination-pos="top-left"] > .home-hero-pagination { top: 6.5rem !important; bottom: auto !important; left: 1.25rem !important; right: auto !important; }
.home-hero-swiper[data-pagination-pos="top-center"] > .home-hero-pagination { top: 6.5rem !important; bottom: auto !important; left: 0 !important; right: 0 !important; width: 100% !important; justify-content: center; }
.home-hero-swiper[data-pagination-pos="top-right"] > .home-hero-pagination { top: 6.5rem !important; bottom: auto !important; left: auto !important; right: 1.25rem !important; }
.home-hero-cover .swiper-pagination-bullet { background: #fff; opacity: .5; }
.home-hero-cover .swiper-pagination-bullet-active { opacity: 1; }

@media (max-width: 992px) {
    .home-hero-copy {
        justify-content: flex-end;
        align-items: stretch;
        max-width: none;
        padding: 5.5rem 1.15rem calc(var(--home-hero-menu, 148px) + env(safe-area-inset-bottom, 0px));
    }
    .home-hero-swiper[data-pagination-pos^="bottom"] > .home-hero-pagination,
    .home-hero-cover .home-hero-pagination { bottom: calc(var(--home-hero-menu, 148px) + .35rem + env(safe-area-inset-bottom, 0px)) !important; }
    .home-hero-swiper[data-pagination-pos^="top"] > .home-hero-pagination { top: 4.75rem !important; }
}
@media (max-width: 992px) and (orientation: landscape) {
    .home-hero-copy { padding-bottom: 1.35rem; }
    .home-hero-swiper[data-pagination-pos^="bottom"] > .home-hero-pagination,
    .home-hero-cover .home-hero-pagination { bottom: 1rem !important; }
}

html.has-home-hero.home-hero-viewport-active:not(.home-hero-passed)[data-hero-header="clear"] #header.header,
html.has-home-hero.home-hero-viewport-active:not(.home-hero-passed)[data-hero-header="clear"] #header.header.scrolled,
html.has-home-hero.home-hero-viewport-active:not(.home-hero-passed)[data-hero-header="clear"] #header.header:hover {
    background-color: transparent !important;
    box-shadow: none !important;
}
html.has-home-hero.home-hero-viewport-active:not(.home-hero-passed)[data-hero-header="glass"] #header.header,
html.has-home-hero.home-hero-viewport-active:not(.home-hero-passed)[data-hero-header="glass"] #header.header.scrolled,
html.has-home-hero.home-hero-viewport-active:not(.home-hero-passed)[data-hero-header="glass"] #header.header:hover {
    background-color: rgba(16, 24, 21, .38) !important;
    box-shadow: none !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
