@import url("theme-tokens.css");

/* سفارشی‌سازی صفحه اصلی (index.html) — فونت، تم پروفایل، چت آنلاین */

/* دکمهٔ بلاگ در نوار منو (کنار پیشنهاد امروز) */
.header-nav .header-blog-button .header-blog-button-emoji {
    font-size: 1.15rem;
    line-height: 1;
    display: inline-block;
    margin-inline-end: 0.2rem;
}

.header-nav .header-nav-right.d-flex {
    gap: 0.5rem;
}

/* هاور دکمه‌های «بلاگ» و «پیشنهاد امروز» در هدر */
.header-nav .header-nav-right .deal-button {
    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        filter 0.2s ease,
        border-color 0.2s ease;
}

.header-nav .header-nav-right .deal-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
    filter: brightness(1.06);
}

.header-nav .header-nav-right .deal-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

body:not(.light) .header-nav .header-nav-right .deal-button:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    filter: brightness(1.08);
}

@media (prefers-reduced-motion: reduce) {
    .header-nav .header-nav-right .deal-button {
        transition: box-shadow 0.2s ease, filter 0.2s ease;
    }

    .header-nav .header-nav-right .deal-button:hover {
        transform: none;
    }
}

/* مودال آخرین بلاگ: تامبنیل + ویدیو به‌صورت مستطیل (۱۶:۹) — نه مربع deal-modal */
.blog-recent-modal .deal-modal-thumb-preview.blog-media-preview {
    position: relative;
    overflow: hidden;
    display: block;
    flex-shrink: 0;
    align-self: center;
    width: calc(96px + 18 * (100vw - 320px) / 1600);
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    isolation: isolate;
}

.blog-recent-modal .deal-modal-thumb-preview .deal-image.blog-thumb-link {
    display: block;
    width: 100%;
    height: 100%;
}

/* اولویت بالاتر از dark.css (deal-image img مربع) تا داخل کادر ۱۶:۹ بماند */
.blog-recent-modal.deal-modal .modal-dialog .modal-content .modal-body .deal-offer-box .deal-offer-list li .deal-offer-contain .blog-media-preview.deal-modal-thumb-preview .deal-image img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    vertical-align: middle;
    display: block;
    border-radius: inherit;
}

.blog-recent-modal .deal-modal-thumb-preview .blog-hover-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    min-width: 0;
    min-height: 0;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.2s ease;
    box-sizing: border-box;
}

.blog-recent-modal .deal-modal-thumb-preview .blog-hover-video.is-active {
    opacity: 1;
}

.blog-recent-modal .deal-modal-thumb-preview.is-previewing .deal-image {
    transform: none !important;
}

/* جستجوی هدر: dropdown نتایج بیرون از باکس بریده نشود */
header .top-nav .navbar-top .middle-box .search-box.position-relative,
header .top-nav .navbar-top .rightside-box .search-full.position-relative,
.coffee-header-below-search .search-box.position-relative,
#coffeeProductSearchModal .search-box.position-relative,
#coffeeProductSearchModal .modal-body {
    overflow: visible;
}

/* جستجوی موبایل زیر هدر: نوار جدا + باکس کپسولی (آیکن سفید، متن RTL) */
.coffee-mobile-search-strip {
    background: linear-gradient(180deg, #f8f9fb 0%, #eef1f5 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
    /* bulk-style/dark: روی همهٔ sectionها padding-top واکنش‌گرا می‌گذارد؛ pt روی div داخلی این را خنثی نمی‌کند */
    padding-top: 0;
}

/* داخل breadcrumb: بالای .breadcrumb-contain، بدون حاشیهٔ تمام‌عرض اضافه */
.coffee-mobile-search-above-breadcrumb {
    width: 100%;
}

/* صفحه محصول: جستجوی موبایل بالای محتوا؛ مسیر داخل .product-section */
.product-section .coffee-breadcrumb-search-wrap {
    padding-bottom: 0;
    padding-left: 0;
    padding-right: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* نوار جستجو تمام‌عرض والد */
.product-section .coffee-breadcrumb-search-wrap > .coffee-mobile-search-above-breadcrumb {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.product-section .coffee-mobile-search-strip--in-breadcrumb .search-box.position-relative {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.product-section .coffee-mobile-search-strip--in-breadcrumb {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0.35rem 0.5rem;
    border-radius: 12px;
    border-bottom: none;
    box-shadow: 0 2px 14px rgba(15, 23, 42, 0.07);
}

body:not(.light) .product-section .coffee-mobile-search-strip--in-breadcrumb {
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

.coffee-header-below-search-pill {
    display: flex;
    flex-direction: row;
    align-items: center;
    direction: ltr;
    width: 100%;
    min-height: 48px;
    padding: 5px 8px 5px 6px;
    border-radius: 999px;
    background-color: #f0f2f5;
    border: 1px solid #e1e4ea;
    box-sizing: border-box;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.coffee-header-below-search-pill:focus-within {
    border-color: rgba(0, 78, 152, 0.35);
    box-shadow: 0 0 0 3px rgba(0, 78, 152, 0.12);
}

/* بالای breadcrumb: گوشه‌ها کم‌گردتر از حالت قرص کامل */
.coffee-mobile-search-strip--in-breadcrumb .coffee-header-below-search-pill {
    border-radius: 12px;
}

.coffee-mobile-search-strip--in-breadcrumb .coffee-header-below-search-pill-btn {
    border-radius: 10px;
}

.coffee-header-below-search-pill-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    margin-inline-end: 10px;
    border-radius: 14px;
    background-color: var(--theme-color, #004e98) !important;
    border: 1px solid var(--theme-color, #004e98) !important;
    color: #fff !important;
    box-shadow: 0 1px 4px rgba(0, 78, 152, 0.25);
}

.coffee-header-below-search-pill-btn:hover,
.coffee-header-below-search-pill-btn:focus-visible {
    background-color: var(--theme-color, #004e98) !important;
    border-color: var(--theme-color, #004e98) !important;
    color: #fff !important;
    filter: brightness(0.96);
}

/* بلوک کناری اسلایدر: جمع کل + افزودن همه به سبد */
.slider-with-bulk-cart {
    display: flex;
    align-items: stretch;
    gap: 14px;
}

.bulk-section-card {
    margin-top: 18px;
    padding: 14px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.bulk-section-card .title.bulk-section-card-title {
    margin-top: 0;
    margin-bottom: 12px;
}

/* اسلایدر بلاگ: خروج آیتم از قاب نداشته باشد */
.blog-slider-card.slick-slider .slick-list {
    overflow: hidden;
    padding-top: 0;
}

.blog-slider-card.slick-slider .slick-track {
    margin-top: 0;
}

.slider-with-bulk-cart .slider-3_2.product-wrapper {
    flex: 1 1 auto;
    min-width: 0;
}

/* جداکننده بین محصولات داخل کارت‌های 3_2 */
.bulk-section-card .slider-3_2 .product-box-2 + .product-box-2 {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(var(--theme-color-rgb, 0, 78, 152), 0.28);
}

.slider-bulk-cart-box {
    flex: 0 0 220px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 14px 12px;
    border: 1px solid rgba(var(--theme-color-rgb, 0, 78, 152), 0.18);
    border-radius: 12px;
    background:
        linear-gradient(165deg,
            rgba(var(--theme-color-rgb, 0, 78, 152), 0.12) 0%,
            rgba(var(--theme-color-rgb, 0, 78, 152), 0.05) 45%,
            rgba(255, 255, 255, 0.96) 100%);
    box-shadow:
        0 0 0 1px rgba(var(--theme-color-rgb, 0, 78, 152), 0.12),
        0 6px 18px rgba(var(--theme-color-rgb, 0, 78, 152), 0.1);
}

.slider-bulk-cart-box .bulk-cart-label {
    margin: 0;
    font-size: 0.86rem;
    color: #6c757d;
}

.slider-bulk-cart-box .bulk-cart-total {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 700;
    color: #2f2f2f;
}

.slider-bulk-cart-box .bulk-cart-btn {
    width: 100%;
    max-width: 170px;
    font-size: 0.88rem;
}

body:not(.light) .slider-bulk-cart-box {
    background:
        linear-gradient(165deg,
            rgba(var(--theme-color-rgb, 0, 78, 152), 0.24) 0%,
            rgba(34, 40, 49, 0.94) 50%,
            rgba(27, 31, 36, 0.98) 100%);
    border-color: rgba(var(--theme-color-rgb, 0, 78, 152), 0.34);
    box-shadow:
        0 0 0 1px rgba(var(--theme-color-rgb, 0, 78, 152), 0.22),
        0 8px 22px rgba(0, 0, 0, 0.35);
}

body:not(.light) .bulk-section-card {
    background: #1b1f24;
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

body:not(.light) .slider-bulk-cart-box .bulk-cart-label {
    color: #c8ccd2;
}

body:not(.light) .slider-bulk-cart-box .bulk-cart-total {
    color: #ffffff;
}

@media (max-width: 1199px) {
    .slider-bulk-cart-box {
        flex-basis: 190px;
    }
}

@media (max-width: 991px) {
    .slider-with-bulk-cart {
        flex-direction: column;
    }

    .slider-bulk-cart-box {
        flex-basis: auto;
    }
}

/* لوگوهای شبکه اجتماعی در فوتر */
.footer-contact .social-app .footer-social-icons {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 16px;
    padding: 0;
    margin: 0;
    list-style: none;
    width: auto;
    min-width: 0;
}

.footer-contact .social-app .footer-social-icons li {
    margin: 0 !important;
    width: auto;
    height: auto;
}

.footer-contact .social-app .footer-social-icons .social-icon-box {
    overflow: hidden;
    background: rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.footer-contact .social-app .footer-social-icons .social-icon-box:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
    background: rgba(var(--theme-color-rgb, 0, 78, 152), 0.08);
}

.footer-contact .social-app .footer-social-icons .social-icon-img {
    object-fit: contain;
    object-position: center;
    flex-shrink: 0;
    display: block;
}

/* Utility classes used for social icons */
.footer-contact .social-app .w-14 {
    width: 56px !important;
}

.footer-contact .social-app .h-14 {
    height: 56px !important;
}

.footer-contact .social-app .w-16 {
    width: 64px !important;
}

.footer-contact .social-app .h-16 {
    height: 64px !important;
}

.footer-contact .social-app .w-8 {
    width: 32px !important;
}

.footer-contact .social-app .h-8 {
    height: 32px !important;
}

.footer-contact .social-app .w-9 {
    width: 36px !important;
}

.footer-contact .social-app .h-9 {
    height: 36px !important;
}

.footer-contact .social-app .flex {
    display: flex !important;
}

.footer-contact .social-app .items-center {
    align-items: center !important;
}

.footer-contact .social-app .items-end {
    align-items: flex-end !important;
}

.footer-contact .social-app .justify-center {
    justify-content: center !important;
}

.footer-contact .social-app .pb-3 {
    padding-bottom: 12px !important;
}

.footer-contact .social-app .rounded-3xl {
    border-radius: 24px !important;
}

.footer-contact .social-app .shadow-sm {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

/* باکس مجوزها در فوتر */
.footer-license .footer-license-icons {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-license .footer-license-icons {
    margin-top: 12px;
}

.footer-license .footer-license-icons li {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: right;
    gap: 12px;
}

.footer-license .license-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    width: 68px !important;
    height: 68px !important;
    border-radius: 999px !important;
    background: rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.footer-license .license-icon-box:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
    background: rgba(var(--theme-color-rgb, 0, 78, 152), 0.08);
}

.footer-license .license-icon-img {
    object-fit: contain;
    object-position: center;
    flex-shrink: 0;
    display: block;
    width: 50px !important;
    height: 50px !important;
}

.footer-license .footer-license-icons span {
    font-size: 0.88rem;
    line-height: 1.25;
    color: #6c757d;
}

body:not(.light) .footer-license .footer-license-icons span {
    color: #c8ccd2;
}

/* منوی دکمه چت آنلاین */
.chat-online {
    position: relative;
}

.chat-online-menu {
    position: absolute;
    left: 0;
    bottom: calc(100% + 10px);
    transform: none;
    min-width: 146px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.09);
    border-radius: 12px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.16);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 1200;
}

.chat-online-menu[hidden] {
    display: none !important;
}

.chat-online-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    color: #2f2f2f;
    font-size: 0.86rem;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.chat-online-menu-item i {
    width: 16px;
    text-align: center;
}

.chat-online-menu-item:hover {
    background: rgba(var(--theme-color-rgb, 0, 78, 152), 0.12);
    color: var(--theme-color, #004e98);
}

body:not(.light) .chat-online-menu {
    background: #1f2329;
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
}

body:not(.light) .chat-online-menu-item {
    color: #f1f3f5;
}

@media (max-width: 767px) {
    .footer-contact .social-app .footer-social-icons {
        justify-content: center;
        margin-inline: auto;
    }

    .footer-license .footer-license-icons {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: flex-start;
        gap: 8px;
    }

    .footer-license .footer-license-icons li {
        flex: 1 1 0;
        min-width: 0;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        text-align: center;
        gap: 8px;
    }

    .footer-license .footer-license-icons span {
        font-size: 0.76rem;
    }
}

.coffee-header-below-search-pill-btn svg,
.coffee-header-below-search-pill-icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.coffee-header-below-search .coffee-header-search-below-input {
    flex: 1 1 auto;
    min-width: 0;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    direction: rtl;
    text-align: right;
    font-size: 0.9375rem;
    padding: 0.5rem 0.75rem 0.5rem 0.25rem;
    color: #1e293b;
}

.coffee-header-below-search .coffee-header-search-below-input::placeholder {
    color: #8b95a8;
    opacity: 1;
}

.coffee-header-below-search .coffee-header-search-below-input:focus {
    outline: none;
    box-shadow: none !important;
}

body:not(.light) .coffee-mobile-search-strip {
    background: linear-gradient(180deg, #1e2226 0%, #171a1d 100%);
    border-bottom-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

body:not(.light) .coffee-header-below-search-pill {
    background-color: #2a2d32;
    border-color: rgba(255, 255, 255, 0.1);
}

body:not(.light) .coffee-header-below-search-pill:focus-within {
    border-color: rgba(0, 120, 200, 0.45);
    box-shadow: 0 0 0 3px rgba(0, 120, 200, 0.15);
}

body:not(.light) .coffee-header-below-search-pill-btn {
    background-color: var(--theme-color, #004e98) !important;
    border-color: var(--theme-color, #004e98) !important;
    color: #fff !important;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

body:not(.light) .coffee-header-below-search-pill-btn:hover,
body:not(.light) .coffee-header-below-search-pill-btn:focus-visible {
    background-color: var(--theme-color, #004e98) !important;
    border-color: var(--theme-color, #004e98) !important;
    color: #fff !important;
    filter: brightness(1.06);
}

body:not(.light) .coffee-header-below-search .coffee-header-search-below-input {
    color: rgba(255, 255, 255, 0.92);
}

body:not(.light) .coffee-header-below-search .coffee-header-search-below-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

/*
 * جستجوی دسکتاپ وسط هدر (xl+): کپسول مثل موبایل — غلبه بر سلکتورهای طولانی style/dark
 * چیدمان: direction:ltr + row-reverse تا با DOM ورودی→دکمه، دکمه سمت چپ و متن RTL بماند.
 * middle-box با flex-grow تمام عرض باقی‌مانده بین لوگو و ستون راست را می‌گیرد.
 */
@media (min-width: 1200px) {
    header .top-nav .navbar-top .middle-box {
        flex: 1 1 auto;
        min-width: 0;
        max-width: none;
    }

    header .top-nav .navbar-top .middle-box .search-box.coffee-header-desktop-search {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        padding-inline: clamp(0.75rem, 1.5vw, 1.35rem);
        box-sizing: border-box;
    }
}

header .top-nav .navbar-top .middle-box .search-box .input-group.coffee-header-desktop-search-pill {
    direction: ltr;
    display: flex !important;
    flex-direction: row-reverse;
    align-items: center;
    flex-wrap: nowrap;
    width: 100%;
    max-width: none;
    min-height: 48px;
    padding: 5px 10px 5px 6px;
    box-sizing: border-box;
    border-radius: 12px !important;
    background-color: #f0f2f5 !important;
    border: 1px solid #e1e4ea !important;
    box-shadow: 0 2px 14px rgba(15, 23, 42, 0.06);
}

header .top-nav .navbar-top .middle-box .search-box .input-group.coffee-header-desktop-search-pill .coffee-header-desktop-search-input,
header .top-nav .navbar-top .middle-box .search-box .input-group.coffee-header-desktop-search-pill .form-control {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    direction: rtl !important;
    text-align: right !important;
    border-radius: 0 !important;
    color: #1e293b;
}

header .top-nav .navbar-top .middle-box .search-box .input-group.coffee-header-desktop-search-pill .form-control:focus {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none;
}

header .top-nav .navbar-top .middle-box .search-box .input-group.coffee-header-desktop-search-pill .form-control::placeholder {
    color: #8b95a8;
    opacity: 1;
}

[dir="rtl"] header .top-nav .navbar-top .middle-box .search-box .input-group.coffee-header-desktop-search-pill .form-control {
    border-radius: 0 !important;
}

header .top-nav .navbar-top .middle-box .search-box .input-group.coffee-header-desktop-search-pill button.coffee-header-search-theme-btn.search-button-2 {
    flex-shrink: 0 !important;
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    margin: 0 !important;
    margin-inline-end: 10px !important;
    border-radius: 10px !important;
    background-color: var(--theme-color, #004e98) !important;
    border: 1px solid var(--theme-color, #004e98) !important;
    color: #fff !important;
    box-shadow: 0 1px 4px rgba(0, 78, 152, 0.25);
}

[dir="rtl"] header .top-nav .navbar-top .middle-box .search-box .input-group.coffee-header-desktop-search-pill button.coffee-header-search-theme-btn.search-button-2 {
    border-radius: 10px !important;
}

header .top-nav .navbar-top .middle-box .search-box .input-group.coffee-header-desktop-search-pill button.coffee-header-search-theme-btn.search-button-2:hover,
header .top-nav .navbar-top .middle-box .search-box .input-group.coffee-header-desktop-search-pill button.coffee-header-search-theme-btn.search-button-2:focus-visible {
    background-color: var(--theme-color, #004e98) !important;
    border-color: var(--theme-color, #004e98) !important;
    color: #fff !important;
    filter: brightness(0.96);
}

header .top-nav .navbar-top .middle-box .search-box .input-group.coffee-header-desktop-search-pill button.coffee-header-search-theme-btn.search-button-2 svg {
    stroke: currentColor;
}

body:not(.light) header .top-nav .navbar-top .middle-box .search-box .input-group.coffee-header-desktop-search-pill {
    background-color: #2a2d32 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

body:not(.light) header .top-nav .navbar-top .middle-box .search-box .input-group.coffee-header-desktop-search-pill .form-control {
    color: rgba(255, 255, 255, 0.92);
}

body:not(.light) header .top-nav .navbar-top .middle-box .search-box .input-group.coffee-header-desktop-search-pill .form-control::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

body:not(.light) header .top-nav .navbar-top .middle-box .search-box .input-group.coffee-header-desktop-search-pill button.coffee-header-search-theme-btn.search-button-2 {
    background-color: var(--theme-color, #004e98) !important;
    border-color: var(--theme-color, #004e98) !important;
    color: #fff !important;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

body:not(.light) header .top-nav .navbar-top .middle-box .search-box .input-group.coffee-header-desktop-search-pill button.coffee-header-search-theme-btn.search-button-2:hover,
body:not(.light) header .top-nav .navbar-top .middle-box .search-box .input-group.coffee-header-desktop-search-pill button.coffee-header-search-theme-btn.search-button-2:focus-visible {
    background-color: var(--theme-color, #004e98) !important;
    border-color: var(--theme-color, #004e98) !important;
    color: #fff !important;
    filter: brightness(1.06);
}

body:not(.light) header .top-nav .navbar-top .middle-box .search-box .input-group.coffee-header-desktop-search-pill .form-control:focus {
    background: transparent !important;
    border-color: transparent !important;
}

/*
 * نتایج جستجوی هدر: RTL واقعی (بدون text-end بوت‌استرپ که در html[dir=rtl] برعکس می‌شود)،
 * فونت وزیر با اولویت بالاتر از تم، قیمت آبی، تخفیف قرمز.
 * همان استایل برای مودال جستجو (#coffeeProductSearchModal).
 */
header .top-nav .navbar-top ul.coffee-header-search-results,
.coffee-header-below-search ul.coffee-header-search-results,
#coffeeProductSearchModal ul.coffee-header-search-results {
    direction: rtl;
    unicode-bidi: isolate;
    text-align: right;
}

header .top-nav .navbar-top ul.coffee-header-search-results,
header .top-nav .navbar-top ul.coffee-header-search-results .coffee-search-result-item,
header .top-nav .navbar-top ul.coffee-header-search-results .coffee-search-result-title,
header .top-nav .navbar-top ul.coffee-header-search-results .coffee-search-result-price,
header .top-nav .navbar-top ul.coffee-header-search-results .coffee-search-result-old,
header .top-nav .navbar-top ul.coffee-header-search-results .coffee-search-result-discount,
.coffee-header-below-search ul.coffee-header-search-results,
.coffee-header-below-search ul.coffee-header-search-results .coffee-search-result-item,
.coffee-header-below-search ul.coffee-header-search-results .coffee-search-result-title,
.coffee-header-below-search ul.coffee-header-search-results .coffee-search-result-price,
.coffee-header-below-search ul.coffee-header-search-results .coffee-search-result-old,
.coffee-header-below-search ul.coffee-header-search-results .coffee-search-result-discount,
#coffeeProductSearchModal ul.coffee-header-search-results,
#coffeeProductSearchModal ul.coffee-header-search-results .coffee-search-result-item,
#coffeeProductSearchModal ul.coffee-header-search-results .coffee-search-result-title,
#coffeeProductSearchModal ul.coffee-header-search-results .coffee-search-result-price,
#coffeeProductSearchModal ul.coffee-header-search-results .coffee-search-result-old,
#coffeeProductSearchModal ul.coffee-header-search-results .coffee-search-result-discount {
    font-family: var(--coffee-font-family) !important;
}

header .top-nav .navbar-top ul.coffee-header-search-results .coffee-search-result-item,
.coffee-header-below-search ul.coffee-header-search-results .coffee-search-result-item,
#coffeeProductSearchModal ul.coffee-header-search-results .coffee-search-result-item {
    padding: 0.65rem 0.75rem;
    border-color: rgba(0, 0, 0, 0.08);
    text-align: right;
}

header .top-nav .navbar-top ul.coffee-header-search-results .coffee-search-result-row,
.coffee-header-below-search ul.coffee-header-search-results .coffee-search-result-row,
#coffeeProductSearchModal ul.coffee-header-search-results .coffee-search-result-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    min-height: 3.5rem;
}

/* در RTL: اولین فرزند (تصویر) سمت راست، متن چپِ تصویر */
header .top-nav .navbar-top ul.coffee-header-search-results .coffee-search-result-img,
.coffee-header-below-search ul.coffee-header-search-results .coffee-search-result-img,
#coffeeProductSearchModal ul.coffee-header-search-results .coffee-search-result-img {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: #f5f5f5;
}

header .top-nav .navbar-top ul.coffee-header-search-results .coffee-search-result-body,
.coffee-header-below-search ul.coffee-header-search-results .coffee-search-result-body,
#coffeeProductSearchModal ul.coffee-header-search-results .coffee-search-result-body {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: right;
}

header .top-nav .navbar-top ul.coffee-header-search-results .coffee-search-result-title,
.coffee-header-below-search ul.coffee-header-search-results .coffee-search-result-title,
#coffeeProductSearchModal ul.coffee-header-search-results .coffee-search-result-title {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.45;
    color: #212529;
    unicode-bidi: plaintext;
}

header .top-nav .navbar-top ul.coffee-header-search-results .coffee-search-result-prices,
.coffee-header-below-search ul.coffee-header-search-results .coffee-search-result-prices,
#coffeeProductSearchModal ul.coffee-header-search-results .coffee-search-result-prices {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.65rem;
    justify-content: flex-start;
    width: 100%;
    margin-top: 0.3rem;
}

header .top-nav .navbar-top ul.coffee-header-search-results .coffee-search-result-price,
.coffee-header-below-search ul.coffee-header-search-results .coffee-search-result-price,
#coffeeProductSearchModal ul.coffee-header-search-results .coffee-search-result-price {
    color: #0d6efd;
    font-weight: 700;
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
}

header .top-nav .navbar-top ul.coffee-header-search-results .coffee-search-result-old,
.coffee-header-below-search ul.coffee-header-search-results .coffee-search-result-old,
#coffeeProductSearchModal ul.coffee-header-search-results .coffee-search-result-old {
    color: #6c757d;
    font-size: 0.8rem;
    text-decoration: line-through;
    font-variant-numeric: tabular-nums;
}

header .top-nav .navbar-top ul.coffee-header-search-results .coffee-search-result-discount,
.coffee-header-below-search ul.coffee-header-search-results .coffee-search-result-discount,
#coffeeProductSearchModal ul.coffee-header-search-results .coffee-search-result-discount {
    color: #dc3545;
    font-weight: 700;
    font-size: 0.82rem;
}

body:not(.light) header .top-nav .navbar-top ul.coffee-header-search-results .coffee-search-result-title,
body:not(.light) .coffee-header-below-search ul.coffee-header-search-results .coffee-search-result-title,
body:not(.light) #coffeeProductSearchModal ul.coffee-header-search-results .coffee-search-result-title {
    color: rgba(255, 255, 255, 0.92);
}

body:not(.light) header .top-nav .navbar-top ul.coffee-header-search-results .coffee-search-result-img,
body:not(.light) .coffee-header-below-search ul.coffee-header-search-results .coffee-search-result-img,
body:not(.light) #coffeeProductSearchModal ul.coffee-header-search-results .coffee-search-result-img {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
}

:root {
    --bs-font-sans-serif: var(--coffee-font-family);
}

body,
input,
textarea,
select,
.form-control,
.form-select,
.btn {
    font-family: var(--coffee-font-family);
}

/* تیترها و کلاس‌های سرفصل قالب که هنوز Public Sans / فونت انگلیسی دارند */
body h1,
body h2,
body h3,
body h4,
body h5,
body h6,
body .h1,
body .h2,
body .h3,
body .h4,
body .h5,
body .h6 {
    font-family: var(--coffee-font-family);
}

/* breadcrumb تم تیره/روشن — تم Public Sans می‌گذارد */
.breadcrumb-section .breadcrumb-contain,
.breadcrumb-section .breadcrumb-contain h2,
.breadcrumb-section .breadcrumb-contain nav,
.breadcrumb-section .breadcrumb-contain .breadcrumb,
.breadcrumb-section .breadcrumb-contain .breadcrumb-item,
.breadcrumb-section .breadcrumb-contain a {
    font-family: var(--coffee-font-family);
}

.product-section .coffee-product-breadcrumb-contain,
.product-section .coffee-product-breadcrumb-contain nav,
.product-section .coffee-product-breadcrumb-contain .breadcrumb,
.product-section .coffee-product-breadcrumb-contain .breadcrumb-item,
.product-section .coffee-product-breadcrumb-contain a {
    font-family: var(--coffee-font-family);
}

.digital-breadcrumb .breadcrumb-contain,
.digital-breadcrumb .breadcrumb-contain h2,
.digital-breadcrumb .breadcrumb-contain nav,
.digital-breadcrumb .breadcrumb-contain .breadcrumb,
.digital-breadcrumb .breadcrumb-contain .breadcrumb-item {
    font-family: var(--coffee-font-family);
}

/* صفحه محصول: مسیر داخل product-section؛ هر دو آیتم یک‌جا سمت راست (در RTL: flex-start) */
.product-section .coffee-product-breadcrumb-inline .coffee-product-breadcrumb-contain {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
}

[dir="ltr"] .product-section .coffee-product-breadcrumb-inline .coffee-product-breadcrumb-contain {
    justify-content: flex-end;
}

.coffee-product-breadcrumb-section .coffee-product-breadcrumb-contain nav {
    width: auto;
    max-width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.coffee-product-breadcrumb-section .coffee-product-breadcrumb-trail {
    width: auto;
    max-width: 100%;
    display: flex !important;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    font-size: 0.8125rem;
    line-height: 1.35;
}

[dir="ltr"] .coffee-product-breadcrumb-section .coffee-product-breadcrumb-trail {
    justify-content: flex-end;
}

.coffee-product-breadcrumb-section .coffee-product-breadcrumb-trail .breadcrumb-item {
    font-size: inherit;
}

.coffee-product-breadcrumb-section .coffee-product-breadcrumb-trail .breadcrumb-item.active {
    font-weight: 600;
}

.coffee-product-breadcrumb-section .coffee-product-breadcrumb-trail .fa-house {
    font-size: 0.85rem;
    vertical-align: -0.06em;
}

body.light .product-section .coffee-product-breadcrumb-trail .breadcrumb-item,
body.light .product-section .coffee-product-breadcrumb-trail .breadcrumb-item a {
    color: #5c636a;
}

body.light .product-section .coffee-product-breadcrumb-trail .breadcrumb-item.active {
    color: #212529;
}

body:not(.light) .product-section .coffee-product-breadcrumb-trail .breadcrumb-item,
body:not(.light) .product-section .coffee-product-breadcrumb-trail .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.75);
}

body:not(.light) .product-section .coffee-product-breadcrumb-trail .breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.95);
}

@media (max-width: 480px) {
    .coffee-product-breadcrumb-section .coffee-product-breadcrumb-contain {
        display: block;
    }

    .coffee-product-breadcrumb-section .coffee-product-breadcrumb-trail {
        font-size: 0.75rem;
    }
}

/* سایدبار وبلاگ: عنوان آکاردئون (آخرین نوشته‌ها، دسته‌بندی و …) */
.blog-section .left-sidebar-box .left-accordion-box .accordion-header .accordion-button {
    font-family: var(--coffee-font-family);
}

.blog-section .left-sidebar-box .left-accordion-box .accordion-collapse .accordion-body,
.blog-section .left-sidebar-box .left-accordion-box .accordion-collapse .accordion-body a,
.blog-section .left-sidebar-box .left-accordion-box .accordion-collapse .accordion-body h5,
.blog-section .left-sidebar-box .left-accordion-box .accordion-collapse .accordion-body h6 {
    font-family: var(--coffee-font-family);
}

/* تم صفحه داخل دراپ‌داون پروفایل */
header .onhover-div-login .user-box-name li.profile-theme-row {
    padding: 0.65rem 1rem 0.85rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.profile-theme-label {
    display: block;
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.profile-theme-toggle {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.profile-theme-toggle__track {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 2.25rem;
    padding: 0 0.75rem;
    border-radius: 999px;
    background: #eef1f4;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.profile-theme-toggle__side {
    font-size: 0.95rem;
    z-index: 1;
    opacity: 0.4;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.profile-theme-toggle:not(.is-dark) .profile-theme-toggle__side--sun,
.profile-theme-toggle.is-dark .profile-theme-toggle__side--moon {
    opacity: 1;
    color: var(--theme-color, #004e98);
}

.profile-theme-toggle__thumb {
    position: absolute;
    top: 3px;
    inset-inline-start: 3px;
    width: calc(50% - 6px);
    height: calc(100% - 6px);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: inset-inline-start 0.25s ease;
}

.profile-theme-toggle.is-dark .profile-theme-toggle__thumb {
    inset-inline-start: calc(50% + 3px);
}

.profile-theme-toggle__thumb i {
    font-size: 0.85rem;
    color: var(--theme-color, #004e98);
}

.profile-theme-toggle:focus-visible .profile-theme-toggle__track {
    outline: 2px solid var(--theme-color, #004e98);
    outline-offset: 2px;
}

body.dark header .onhover-div-login .user-box-name li.profile-theme-row {
    border-top-color: rgba(255, 255, 255, 0.12);
}

body.dark .profile-theme-label {
    color: #adb5bd;
}

body.dark .profile-theme-toggle__track {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
}

body.dark .profile-theme-toggle__thumb {
    background: #2b2b31;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

/* مودال جستجوی محصول: نتایج اسکرول‌شونده */
#coffeeProductSearchModal .coffee-header-search-results {
    max-height: min(50vh, 360px);
}

/* میانبرهای navbar-top: فقط زیر عرض xl (~دسکتاپ تمام‌عرض) — در دسکتاپ مخفی */
header .top-nav .navbar-top .coffee-navbar-quick {
    display: none;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    flex: 0 0 auto;
}

@media (max-width: 1199.98px) {
    header .top-nav .navbar-top .coffee-navbar-quick {
        display: flex;
    }
}

header .top-nav .navbar-top .coffee-navbar-quick-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.35rem;
    min-height: 2.35rem;
    padding: 0.35rem !important;
    line-height: 1;
    border-radius: 0.35rem;
}

header .top-nav .navbar-top .coffee-navbar-quick-link i {
    font-size: 1rem;
}

/*
 * تم روشن: تم قدیمی Bootstrap برای .navbar-light متن سفید گذاشته (نوار تیره).
 * در هدر روشن باید لینک‌ها و دکمهٔ منو سیاه/تیره باشند.
 */
body.light header .navbar-light .navbar-nav .nav-link {
    color: #1a1a1a !important;
}

body.light header .navbar-light .navbar-nav .nav-link:hover,
body.light header .navbar-light .navbar-nav .nav-link:focus {
    color: var(--theme-color, #004e98) !important;
}

body.light header .navbar-light .navbar-nav .show > .nav-link,
body.light header .navbar-light .navbar-nav .nav-link.active {
    color: var(--theme-color, #004e98) !important;
}

body.light header .navbar-light .navbar-brand {
    color: #1a1a1a !important;
}

body.light header .top-nav .navbar-top .coffee-navbar-quick-link {
    color: #1a1a1a !important;
}

body.light header .top-nav .navbar-top .coffee-navbar-quick-cart svg,
body.light header .top-nav .navbar-top .coffee-navbar-quick-cart .coffee-navbar-quick-cart-feather {
    stroke: #1a1a1a;
}

body.light #primaryMenu.coffee-primary-menu-offcanvas .offcanvas-title {
    color: #1a1a1a !important;
}

/* سبد میانبر: همان آیکن سبد دسکتاپ (feather) + بج تعداد */
header .top-nav .navbar-top .coffee-navbar-quick-cart {
    overflow: visible;
}

header .top-nav .navbar-top .coffee-navbar-quick-cart .coffee-navbar-quick-cart-feather,
header .top-nav .navbar-top .coffee-navbar-quick-cart svg {
    width: 1.15rem;
    height: 1.15rem;
    stroke-width: 2;
}

header .top-nav .navbar-top .coffee-navbar-quick-cart-badge {
    font-size: 0.65rem;
    min-width: 1.1rem;
    padding: 0.12em 0.38em;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

/* لوگوی مستطیلی: بدون فاصله اضافه + هم‌راستا */
.web-logo.nav-logo,
.footer-logo .theme-logo a {
    display: flex;
    align-items: center;
    margin: 0 !important;
    padding: 0 !important;
}

.web-logo.nav-logo picture {
    display: flex;
    align-items: center;
    line-height: 0;
}

.coffee-site-logo {
    display: block;
    margin: 0 !important;
    padding: 0 !important;
}

/* In dark theme, keep footer logo colors as-is (no forced white inversion). */
html[data-theme*="dark"] footer .main-footer .theme-logo a img.coffee-site-logo,
body.dark footer .main-footer .theme-logo a img.coffee-site-logo {
    -webkit-filter: none !important;
    filter: none !important;
}

/* utility classes for consistent logo sizing/alignment */
.h-10 {
    height: 2.9rem !important;
}

.h-9 {
    height: 2.55rem !important;
}

@media (min-width: 768px) {
    .md\:h-12 {
        height: 3.3rem !important;
    }
}

@media (min-width: 992px) {
    .lg\:h-14 {
        height: 3.75rem !important;
    }
}

.w-auto {
    width: auto !important;
}

.object-contain {
    object-fit: contain !important;
}

.items-center {
    align-items: center !important;
}

.hover-scale-105 {
    transition: transform 0.2s ease;
}

.hover-scale-105:hover {
    transform: scale(1.05);
}

/* بج تعداد سبد (میانبر + سبد اصلی): رنگ تم سازمانی */
header .top-nav .navbar-top .coffee-navbar-quick-cart-badge,
header .top-nav .navbar-top .coffee-header-cart-badge,
header .top-nav .navbar-top .js-coffee-header-cart-count.badge,
header .top-nav .navbar-top .rightside-box .right-side-menu .right-side .header-wishlist span.badge {
    background-color: var(--theme-color) !important;
    border-color: var(--theme-color) !important;
    color: #fff !important;
}

/*
 * قالب اصلی (style/dark) برای .header-wishlist span همهٔ spanها را بج‌گونه می‌کند؛
 * span.visually-hidden داخل بج را دوباره واقعاً پنهان کن.
 */
header .top-nav .navbar-top .rightside-box .right-side-menu .right-side .header-wishlist span.visually-hidden {
    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;
    display: block !important;
    background: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
    align-items: unset !important;
    justify-content: unset !important;
    border-radius: 0 !important;
}

/* زیر xl: فقط سبد اصلی (feather + بج) چپ، لوگو وسط، دکمه منو راست — بدون خانه/جستجو/سبد میانبر */
@media (max-width: 1199.98px) {
    header .top-nav .navbar-top {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-areas: "cart logo menu";
        align-items: center;
        gap: 0.35rem 0.65rem;
        min-height: 2.75rem;
    }

    header .top-nav .navbar-top .coffee-navbar-quick {
        grid-area: menu;
        justify-self: end;
        align-self: center;
        display: flex !important;
        flex: none;
        margin: 0;
    }

    header .top-nav .navbar-top .coffee-navbar-quick .coffee-navbar-quick-home,
    header .top-nav .navbar-top .coffee-navbar-quick .coffee-navbar-quick-search,
    header .top-nav .navbar-top .coffee-navbar-quick .coffee-navbar-quick-cart {
        display: none !important;
    }

    header .top-nav .navbar-top .coffee-navbar-quick .coffee-navbar-quick-menu {
        display: inline-flex !important;
    }

    header .top-nav .navbar-top > a.web-logo.nav-logo {
        grid-area: logo;
        justify-self: center;
        align-self: center;
        position: relative !important;
        inset: auto !important;
        transform: none !important;
        margin: 0 !important;
        display: block !important;
    }

    header .top-nav .navbar-top .middle-box {
        display: none !important;
    }

    header .top-nav .navbar-top .rightside-box {
        grid-area: cart;
        justify-self: start;
        align-self: center;
        margin: 0 !important;
        width: auto;
    }

    header .top-nav .navbar-top .rightside-box .search-full {
        display: none !important;
    }

    header .top-nav .navbar-top .rightside-box .right-side-menu {
        padding: 0 !important;
        margin: 0 !important;
    }

    header .top-nav .navbar-top .rightside-box .right-side-menu > .right-side {
        display: none !important;
    }

    header .top-nav .navbar-top .rightside-box .right-side-menu > .coffee-header-main-cart {
        display: block !important;
    }

    header .top-nav .navbar-top .rightside-box .right-side-menu > li.coffee-header-main-cart {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    header .top-nav .navbar-top .rightside-box .right-side-menu > .coffee-header-main-cart::before {
        content: none !important;
    }

    /* در RTL ستون اول گرید سمت راست صفحه است؛ جابه‌جایی ناحیه‌ها تا سبد فیزیکی چپ و منو راست بماند */
    [dir="rtl"] header .top-nav .navbar-top {
        grid-template-areas: "menu logo cart";
    }
}

@media (max-width: 767.98px) {
    header .top-nav .navbar-top .rightside-box .right-side-menu .right-side:last-child {
        display: none !important;
    }

    header .top-nav .navbar-top .rightside-box .right-side-menu > .coffee-header-main-cart {
        display: block !important;
    }
}

/*
 * هدر بالای بلوک‌هایی مثل .product-section__main-grid (z-index:2 + isolation) تا
 * #primaryMenu / مگامنو زیر محتوا نروند؛ 1042 بالاتر از بک‌دراپ آف‌کانوس بوت‌استرپ (1040)، پایین‌تر از مودال معمول.
 */
header.pb-md-4 {
    position: relative;
    z-index: 1042;
}

/*
 * منوی آف‌کانوس #primaryMenu: همان کلاس‌های main-nav + navbar-expand-xl + navbar-light تم
 * (مثل header-nav / main-nav) — پس‌زمینه و لینک و فاصله‌ها هم‌راستا با نوار میانی دسکتاپ
 */
#primaryMenu.coffee-primary-menu-offcanvas .coffee-primary-menu-main-nav.navbar {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    max-width: 100%;
    padding: 12px 0 !important;
    margin: 0 auto;
    z-index: 1;
}

#primaryMenu.coffee-primary-menu-offcanvas .coffee-primary-menu-navbar-nav.navbar-nav {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem clamp(0.75rem, 2vw, 1.85rem);
    width: 100%;
    max-width: 100%;
    padding-top: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0 auto !important;
    list-style: none;
}

#primaryMenu.coffee-primary-menu-offcanvas .navbar-nav .nav-item {
    margin-bottom: 0 !important;
    flex: 0 0 auto;
}

#primaryMenu.coffee-primary-menu-offcanvas .navbar-nav .nav-item + .nav-item {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

[dir="rtl"] #primaryMenu.coffee-primary-menu-offcanvas .navbar-nav .nav-item + .nav-item {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* تم فلش/آیکن اضافهٔ قالب روی هر لینک — برای منوی ساده غیرفعال */
#primaryMenu.coffee-primary-menu-offcanvas .navbar-nav .nav-link::before,
#primaryMenu.coffee-primary-menu-offcanvas .navbar-nav .nav-link::after {
    content: none !important;
}

#primaryMenu.coffee-primary-menu-offcanvas .navbar-nav .nav-link {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    font-size: 16px;
    font-weight: 400;
    padding: 0.35rem 0.5rem;
    position: relative;
}

body.light #primaryMenu.coffee-primary-menu-offcanvas .offcanvas-body {
    background-color: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

body.light #primaryMenu.coffee-primary-menu-offcanvas .navbar-nav .nav-link {
    color: #212529;
}

body.light #primaryMenu.coffee-primary-menu-offcanvas .navbar-nav .nav-link:hover,
body.light #primaryMenu.coffee-primary-menu-offcanvas .navbar-nav .nav-link:focus {
    color: var(--theme-color, #004e98);
}

body:not(.light) #primaryMenu.coffee-primary-menu-offcanvas .offcanvas-body {
    background-color: #2a2d2d;
    box-shadow: 0 2px 10px -3px rgba(255, 255, 255, 0.1);
}

body:not(.light) #primaryMenu.coffee-primary-menu-offcanvas .navbar-nav .nav-link {
    color: #fff;
}

body:not(.light) #primaryMenu.coffee-primary-menu-offcanvas .navbar-nav .nav-link:hover,
body:not(.light) #primaryMenu.coffee-primary-menu-offcanvas .navbar-nav .nav-link:focus {
    color: var(--theme-color, #0da487);
}

#primaryMenu.coffee-primary-menu-offcanvas .offcanvas-body {
    padding: 0 18px;
}

#primaryMenu.coffee-primary-menu-offcanvas .coffee-mobile-account-box {
    margin: 12px 0 14px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.82);
}

#primaryMenu.coffee-primary-menu-offcanvas .coffee-mobile-account-box .delivery-login-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

#primaryMenu.coffee-primary-menu-offcanvas .coffee-mobile-account-box .delivery-icon .feather {
    width: 20px;
    height: 20px;
    color: var(--theme-color, #de4e02);
}

#primaryMenu.coffee-primary-menu-offcanvas .coffee-mobile-account-box .delivery-detail h6 {
    margin: 0;
    font-size: 0.78rem;
    color: #6c757d;
}

#primaryMenu.coffee-primary-menu-offcanvas .coffee-mobile-account-box .delivery-detail h5 {
    margin: 2px 0 0;
    font-size: 0.98rem;
    font-weight: 700;
    color: #1f2328;
}

#primaryMenu.coffee-primary-menu-offcanvas .coffee-mobile-account-links {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#primaryMenu.coffee-primary-menu-offcanvas .coffee-mobile-account-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.32rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    color: inherit;
    text-decoration: none;
    font-size: 0.84rem;
    line-height: 1.2;
}

#primaryMenu.coffee-primary-menu-offcanvas .coffee-mobile-theme-row {
    margin-top: 10px;
}

#primaryMenu.coffee-primary-menu-offcanvas .coffee-mobile-theme-label {
    display: block;
    margin-bottom: 7px;
    font-size: 0.78rem;
    color: #6c757d;
}

#primaryMenu.coffee-primary-menu-offcanvas .coffee-mobile-theme-radios {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

#primaryMenu.coffee-primary-menu-offcanvas .coffee-mobile-theme-option {
    margin: 0;
}

#primaryMenu.coffee-primary-menu-offcanvas .coffee-mobile-theme-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

#primaryMenu.coffee-primary-menu-offcanvas .coffee-mobile-theme-option span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    font-size: 0.79rem;
    line-height: 1.2;
    cursor: pointer;
    transition: all 0.2s ease;
}

#primaryMenu.coffee-primary-menu-offcanvas .coffee-mobile-theme-option input:checked + span {
    border-color: var(--theme-color, #de4e02);
    background: rgba(var(--theme-color-rgb, 222, 78, 2), 0.12);
    color: var(--theme-color, #de4e02);
}

body:not(.light) #primaryMenu.coffee-primary-menu-offcanvas .coffee-mobile-account-box {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.12);
}

body:not(.light) #primaryMenu.coffee-primary-menu-offcanvas .coffee-mobile-account-box .delivery-detail h6 {
    color: rgba(255, 255, 255, 0.72);
}

body:not(.light) #primaryMenu.coffee-primary-menu-offcanvas .coffee-mobile-account-box .delivery-detail h5 {
    color: #fff;
}

body:not(.light) #primaryMenu.coffee-primary-menu-offcanvas .coffee-mobile-account-links a {
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
}

body:not(.light) #primaryMenu.coffee-primary-menu-offcanvas .coffee-mobile-theme-label {
    color: rgba(255, 255, 255, 0.72);
}

body:not(.light) #primaryMenu.coffee-primary-menu-offcanvas .coffee-mobile-theme-option span {
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
}

#primaryMenu.coffee-primary-menu-offcanvas .offcanvas-header {
    background-color: inherit;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body:not(.light) #primaryMenu.coffee-primary-menu-offcanvas .offcanvas-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 575.98px) {
    #primaryMenu.coffee-primary-menu-offcanvas .coffee-primary-menu-navbar-nav.navbar-nav {
        justify-content: center;
    }
}

/* پس‌زمینهٔ نوار منوی اصلی + مگامنو (هاور در xl؛ کلیک/تاچ در موبایل) */
#primaryMenu.coffee-primary-menu-offcanvas .coffee-primary-menu-main-nav {
    position: relative;
    overflow: visible;
}

#primaryMenu.coffee-primary-menu-offcanvas .coffee-primary-menu-navbar-nav.navbar-nav {
    padding: 0.55rem 1rem !important;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

body.light #primaryMenu.coffee-primary-menu-offcanvas .coffee-primary-menu-navbar-nav.navbar-nav {
    background: linear-gradient(180deg, #e8edf4 0%, #dfe7f2 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

body:not(.light) #primaryMenu.coffee-primary-menu-offcanvas .coffee-primary-menu-navbar-nav.navbar-nav {
    background: linear-gradient(180deg, #2f3436 0%, #252a2c 100%);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* زیر xl: منوی آف‌کانوس به‌صورت لیست عمودی (هر آیتم یک ردیف) */
@media (max-width: 1199.98px) {
    #primaryMenu.coffee-primary-menu-offcanvas .coffee-primary-menu-main-nav.navbar {
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
    }

    #primaryMenu.coffee-primary-menu-offcanvas .coffee-primary-menu-navbar-nav.navbar-nav {
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        gap: 0.35rem 0;
    }

    #primaryMenu.coffee-primary-menu-offcanvas .navbar-nav .nav-item {
        width: 100%;
        flex: 0 0 auto !important;
    }

    #primaryMenu.coffee-primary-menu-offcanvas .navbar-nav .nav-link {
        width: 100%;
        justify-content: flex-start;
        text-align: start;
        white-space: normal;
        padding: 0.55rem 0.75rem;
    }
}

@media (min-width: 1200px) {
    header .coffee-primary-menu-offcanvas .offcanvas-body {
        overflow: visible !important;
    }

    #primaryMenu.coffee-primary-menu-offcanvas .coffee-primary-nav-mega .dropdown-menu.coffee-mega-dropdown {
        position: absolute;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: none;
        margin-top: 0;
        top: 100%;
        z-index: 1040;
        border-radius: 0 0 12px 12px;
    }

    #primaryMenu.coffee-primary-menu-offcanvas
        .coffee-primary-menu-navbar-nav
        .nav-item.dropdown:hover
        > .dropdown-menu.coffee-mega-dropdown {
        display: block !important;
    }

    /* پل بین لینک و پنل تا هاور قطع نشود */
    #primaryMenu.coffee-primary-menu-offcanvas .coffee-mega-dropdown::before {
        content: "";
        display: block;
        height: 10px;
        margin-top: -10px;
    }
}

@media (max-width: 1199.98px) {
    #primaryMenu.coffee-primary-menu-offcanvas .coffee-primary-nav-mega .dropdown-menu.coffee-mega-dropdown {
        position: static !important;
        float: none;
        width: 100% !important;
        margin-top: 0.35rem;
        border-radius: 10px;
    }
}

body.light #primaryMenu.coffee-primary-menu-offcanvas .coffee-mega-dropdown {
    background-color: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.07) !important;
}

body:not(.light) #primaryMenu.coffee-primary-menu-offcanvas .coffee-mega-dropdown {
    background-color: #2a2d2d;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

#primaryMenu.coffee-primary-menu-offcanvas .coffee-mega-col-title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.45);
    margin-bottom: 0.35rem;
    padding: 0 0.65rem;
}

body:not(.light) #primaryMenu.coffee-primary-menu-offcanvas .coffee-mega-col-title {
    color: rgba(255, 255, 255, 0.45);
}

#primaryMenu.coffee-primary-menu-offcanvas .coffee-mega-link.dropdown-item {
    border-radius: 8px;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
    white-space: normal;
}

body.light #primaryMenu.coffee-primary-menu-offcanvas .coffee-mega-link.dropdown-item {
    color: #212529;
}

body.light #primaryMenu.coffee-primary-menu-offcanvas .coffee-mega-link.dropdown-item:hover,
body.light #primaryMenu.coffee-primary-menu-offcanvas .coffee-mega-link.dropdown-item:focus {
    background-color: rgba(0, 78, 152, 0.08);
    color: var(--theme-color, #004e98);
}

body:not(.light) #primaryMenu.coffee-primary-menu-offcanvas .coffee-mega-link.dropdown-item {
    color: #e9ecef;
}

body:not(.light) #primaryMenu.coffee-primary-menu-offcanvas .coffee-mega-link.dropdown-item:hover,
body:not(.light) #primaryMenu.coffee-primary-menu-offcanvas .coffee-mega-link.dropdown-item:focus {
    background-color: rgba(255, 255, 255, 0.06);
    color: var(--theme-color, #0da487);
}

/* مودال پیش‌نمایش سبد: همان استایل dropdown */
#coffeeCartPreviewModal .cart-list {
    max-height: min(55vh, 320px);
    overflow-y: auto;
}

#coffeeCartPreviewModal .modal-body .button-group {
    margin-top: 0.75rem;
}

/* چت آنلاین (جایگزین آیکون تنظیمات) */
.theme-option .setting-box.chat-online .setting-button {
    text-decoration: none;
}

.theme-option .setting-box.chat-online .setting-button:hover {
    opacity: 0.92;
}

/*
 * چت / برگشت‌به‌بالا: دو طرف پایین صفحه — بدون transition و بدون تغییر bottom هنگام اسکرول یا stickyCart.
 * والد تمام‌عرض + فرزندان absolute؛ پیش‌فرض (LTR): چت راست، برگشت‌به‌بالا چپ — [dir=rtl]: برعکس.
 */
.theme-option {
    left: 0 !important;
    right: 0 !important;
    width: 100%;
    max-width: 100%;
    height: 0;
    overflow: visible;
    pointer-events: none;
    z-index: 10;
    bottom: calc(10px + 15 * (100vw - 320px) / 1600) !important;
    -webkit-transition: none !important;
    transition: none !important;
}

.theme-option .setting-box {
    -webkit-transition: none !important;
    transition: none !important;
}

@media (max-width: 767.98px) {
    .theme-option {
        bottom: calc(10px + 15 * (100vw - 320px) / 1600) !important;
    }
}

.theme-option .setting-box.chat-online {
    position: absolute;
    right: calc(10px + 15 * (100vw - 320px) / 1600);
    left: auto;
    bottom: 0;
    pointer-events: auto;
}

/* پیش‌فرض مخفی؛ با کلاس .back-to-top--visible نرم‌نمایش (اسکرول در script.js) */
.theme-option .back-to-top {
    position: absolute;
    /* فاصله از لبه — بدون !important روی right تا در RTL مقدار inset اعمال شود */
    --coffee-back-top-inset: clamp(1.25rem, 4.5vw, 3rem);
    left: var(--coffee-back-top-inset);
    right: auto;
    bottom: 0;
    margin-top: 0;
    display: block;
    opacity: 0;
    pointer-events: none;
    transform: translate3d(0, 12px, 0) scale(0.92);
    transition:
        opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.theme-option .back-to-top.back-to-top--visible {
    opacity: 1;
    pointer-events: auto;
    transform: translate3d(0, 0, 0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
    .theme-option .back-to-top,
    .theme-option .back-to-top.back-to-top--visible {
        transition-duration: 0.01ms;
    }
}

[dir=rtl] .theme-option .setting-box.chat-online {
    left: calc(10px + 15 * (100vw - 320px) / 1600);
    right: auto;
}

/*
 * RTL: فاصله از لبهٔ فیزیکی راست + safe-area.
 * از html[dir="rtl"] و !important استفاده می‌کنیم تا با هر قاعدهٔ هم‌خصوصیت
 * در style.css / dark.css مقدار right بازنشود و دکمه به لبه نچسبد.
 */
html[dir="rtl"] .theme-option .back-to-top {
    right: calc(
        env(safe-area-inset-right, 0px) + clamp(1.25rem, 5vw, 3rem)
    ) !important;
    left: auto !important;
}

/* حاشیهٔ اضافه برای خود لینک (در صورت نیاز روی مرورگرهایی که inset والد را عجیب حساب می‌کنند) */
.theme-option .back-to-top a#back-to-top {
    margin-inline-start: 0;
    margin-inline-end: 0;
}

/* روی صفحه محصول بالاتر از نوار سبد شناور */
body.product-page-body .theme-option {
    z-index: 35;
}

/*
 * صفحهٔ محصول ≤991px: چت + برگشت‌به‌بالا بالای .sticky-bottom-cart.
 * ارتفاع نوار موبایل ~۷۴px؛ bottom باید از آن بیشتر باشد + گپ (~۱۶px) تا تداخل نباشد.
 */
@media (max-width: 991.98px) {
    body.product-page-dropdown .theme-option {
        bottom: calc(74px + 16px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

/* نوار استوری: بدون کارت — نوار ساده روی پس‌زمینهٔ هدر */
header .header-top.header-top--stories-bar {
    background: transparent !important;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
}

/* حداکثر عرض ممکن برای نوار استوری (کم‌کردن padding تم نسبت به container-fluid-lg) */
header .header-top.header-top--stories-bar .container-fluid-lg {
    width: 100%;
    max-width: 100%;
    padding-left: clamp(0.35rem, 1.2vw, 0.75rem);
    padding-right: clamp(0.35rem, 1.2vw, 0.75rem);
    box-sizing: border-box;
}

header .header-top.header-top--stories-bar .container-fluid-lg > .row {
    margin-left: 0;
    margin-right: 0;
}

header .header-top.header-top--stories-bar .container-fluid-lg > .row > .col-12 {
    padding-left: 0;
    padding-right: 0;
}

header .header-top.header-top--stories-bar .header-offer.header-stories-wrap {
    padding: 0.15rem 0;
    margin: 0;
    background: transparent;
    border-radius: 0;
    border: none;
    box-shadow: none;
}

body.dark header .header-top.header-top--stories-bar .header-offer.header-stories-wrap {
    background: transparent;
    border: none;
    box-shadow: none;
}

header .header-top .header-story-pill {
    color: #343a40;
}

body.dark header .header-top .header-story-pill {
    color: rgba(255, 255, 255, 0.92);
}

header .header-top .header-stories-strip-nav {
    color: rgba(33, 37, 41, 0.88);
    background: rgba(0, 0, 0, 0.06);
}

header .header-top .header-stories-strip-nav:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.1);
}

body.dark header .header-top .header-stories-strip-nav {
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.12);
}

body.dark header .header-top .header-stories-strip-nav:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
}

/* نوار استوری ویدیوی هدر — کاروسل + دکمه + سوایپ (بدون اسکرول‌بار افقی) */
.header-stories-wrap {
    padding: 0.25rem 0;
}

.header-stories-carousel {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
    max-width: 100%;
}

/* دکمه‌های داخل کاروسل: قرمز؛ نوسان افقی روی آیکن (چپ/راست) — بدون pulse قبلی */
header .header-top .header-stories-carousel .header-stories-strip-nav {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    background: #dc3545 !important;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(220, 53, 69, 0.4);
    transition:
        background 0.18s ease,
        box-shadow 0.18s ease,
        opacity 0.18s ease;
}

header .header-top .header-stories-carousel .header-stories-strip-nav i {
    display: inline-block;
    animation: header-stories-nav-x 0.72s ease-in-out infinite;
}

header .header-top .header-stories-carousel .header-stories-strip-next i {
    animation-direction: reverse;
}

header .header-top .header-stories-carousel .header-stories-strip-nav:hover:not(:disabled) {
    background: #c82333 !important;
    box-shadow: 0 4px 16px rgba(200, 35, 51, 0.45);
}

header .header-top .header-stories-carousel .header-stories-strip-nav:hover:not(:disabled) i {
    animation-play-state: paused;
}

header .header-top .header-stories-carousel .header-stories-strip-nav:active:not(:disabled) {
    opacity: 0.92;
}

header .header-top .header-stories-carousel .header-stories-strip-nav:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    background: rgba(220, 53, 69, 0.45) !important;
    box-shadow: none;
}

header .header-top .header-stories-carousel .header-stories-strip-nav:disabled i {
    animation: none;
}

header .header-top .header-stories-carousel .header-stories-strip-nav:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.95);
    outline-offset: 2px;
}

@keyframes header-stories-nav-x {
    0%,
    100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(5px);
    }
}

@media (prefers-reduced-motion: reduce) {
    header .header-top .header-stories-carousel .header-stories-strip-nav i {
        animation: none;
    }
}

.header-stories-viewport {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    touch-action: pan-y;
    padding: 0.1rem 0;
}

/* وقتی همهٔ قرص‌ها در عرض جا می‌شوند: وسط چین (موبایل و دسکتاپ) */
.header-stories-viewport.header-stories-viewport--center-track {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.header-stories-viewport.header-stories-viewport--center-track .header-stories-track {
    margin-left: auto;
    margin-right: auto;
}

.header-stories-track {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.1rem 0;
    width: max-content;
    max-width: none;
    will-change: transform;
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.header-stories-track.is-dragging {
    transition: none;
}

@media (max-width: 991.98px) {
    .header-stories-wrap {
        padding: 0.35rem 0;
    }

    /* کاروسل استوری در موبایل/تبلت: کل نوار در ستون وسط */
    header .header-top.header-top--stories-bar .header-stories-carousel {
        justify-content: center;
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    header .header-top .header-stories-carousel .header-stories-strip-nav {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .header-stories-carousel {
        gap: 0.2rem;
    }

    .header-stories-track {
        gap: 0.55rem;
        padding-inline: 0.05rem;
    }

    .header-story-pill {
        font-size: 0.65rem;
        width: 4.5rem;
        min-width: 4.5rem;
        max-width: 4.5rem;
    }

    .header-story-avatar {
        width: 48px;
        height: 48px;
    }
}

.header-story-pill {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.28rem;
    width: 5rem;
    min-width: 5rem;
    max-width: 5rem;
    box-sizing: border-box;
    margin: 0;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.18rem;
    color: rgba(255, 255, 255, 0.92);
    font-family: inherit;
    font-size: 0.68rem;
    line-height: 1.25;
    text-align: center;
}

.header-story-pill:focus-visible {
    outline: 2px solid var(--theme-color, #0d6efd);
    outline-offset: 3px;
    border-radius: 14px;
}

.header-story-ring {
    display: block;
    padding: 2px;
    border-radius: 50%;
    background: linear-gradient(
        135deg,
        #f09433 0%,
        #e6683c 25%,
        #dc2743 50%,
        #cc2366 75%,
        #bc1888 100%
    );
    box-shadow: none;
}

.header-story-avatar {
    display: block;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    overflow: hidden;
    background: #1d1d22;
}

.header-story-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.header-story-label {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.header-story-modal-open {
    overflow: hidden;
}

.header-story-modal[hidden] {
    display: none !important;
}

.header-story-modal:not([hidden]) {
    display: block;
}

.header-story-modal {
    position: fixed;
    inset: 0;
    z-index: 10550;
}

.header-story-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    cursor: pointer;
}

.header-story-modal-inner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding-top: max(2rem, env(safe-area-inset-top));
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
    padding-inline: max(3.75rem, env(safe-area-inset-inline-start), env(safe-area-inset-inline-end));
    pointer-events: none;
}

.header-story-modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    max-width: 100%;
    pointer-events: none;
}

.header-story-modal-body .header-story-modal-video,
.header-story-modal-body .header-story-modal-close,
.header-story-modal-body .header-story-modal-buy {
    pointer-events: auto;
}

.header-story-modal-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.65rem 0.75rem;
}

.header-story-modal-buy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0.55rem 1.5rem;
    border: none;
    border-radius: 999px;
    background: var(--theme-color, #004e98);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.3;
    text-decoration: none;
    cursor: pointer;
    transition: filter 0.2s, transform 0.15s;
}

.header-story-modal-buy:hover {
    color: #fff;
    filter: brightness(1.08);
}

.header-story-modal-buy:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.header-story-modal-video {
    display: block;
    margin: 0 auto;
    width: auto;
    height: auto;
    max-width: min(92vw, 520px);
    max-height: min(72vh, 800px);
    object-fit: contain;
    object-position: center center;
    border-radius: 12px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.55);
    background: #000;
}

.header-story-modal-close {
    flex-shrink: 0;
    margin: 0;
    padding: 0.55rem 1.75rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.3;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.header-story-modal-close:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.5);
}

.header-story-modal-close:focus-visible {
    outline: 2px solid var(--theme-color, #0d6efd);
    outline-offset: 3px;
}

.header-story-nav {
    position: fixed;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    z-index: 10552;
    width: 46px;
    height: 46px;
    margin: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.header-story-nav:hover {
    background: rgba(255, 255, 255, 0.22);
}

/* قبلی = لبهٔ راست، بعدی = لبهٔ چپ (هماهنگ با RTL و سوایپ) */
.header-story-prev {
    right: max(0.5rem, env(safe-area-inset-right, 0px));
    left: auto;
}

.header-story-next {
    left: max(0.5rem, env(safe-area-inset-left, 0px));
    right: auto;
}

@media (max-width: 575px) {
    .header-story-modal-inner {
        padding-inline: max(2.75rem, env(safe-area-inset-inline-start), env(safe-area-inset-inline-end));
    }

    .header-story-modal-video {
        max-width: min(94vw, 520px);
        max-height: min(72vh, 800px);
    }

    .header-story-nav {
        width: 40px;
        height: 40px;
    }
}

/* بلاگ شبکه و لیست: هاور — زوم، سایه و z-index تا کارت از بقیه جدا دیده شود */
.blog-section .blog-box {
    position: relative;
    z-index: 0;
    border-radius: 14px;
    overflow: visible;
    transition:
        transform 0.38s cubic-bezier(0.33, 1, 0.68, 1),
        box-shadow 0.38s ease,
        border-color 0.3s ease;
    border: 1px solid rgba(var(--theme-color-rgb, 13, 110, 253), 0.18);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.blog-section .blog-box:hover {
    z-index: 5;
    transform: none;
    border-color: rgba(var(--theme-color-rgb, 13, 110, 253), 0.35);
    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(var(--theme-color-rgb, 13, 110, 253), 0.35),
        0 0 26px rgba(var(--theme-color-rgb, 13, 110, 253), 0.24);
}

body.light .blog-section .blog-box:hover {
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(var(--theme-color-rgb, 13, 110, 253), 0.28),
        0 0 20px rgba(var(--theme-color-rgb, 13, 110, 253), 0.18);
}

body:not(.light) .blog-section .blog-box {
    border-color: rgba(var(--theme-color-rgb, 13, 110, 253), 0.28);
    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(var(--theme-color-rgb, 13, 110, 253), 0.08);
}

@media (prefers-reduced-motion: reduce) {
    .blog-section .blog-box,
    .blog-section .blog-box:hover {
        transition: box-shadow 0.2s ease, border-color 0.2s ease;
        transform: none;
    }
}

/* ستون‌های گرید وبلاگ — تا زوم کارت زیر کادر ستون بریده نشود */
.blog-section .row.ratio_65 > [class*="col-"] {
    overflow: visible;
}

/* پیش‌نمایش ویدیو روی تامبنیل بلاگ (شبیه یوتیوب) */
.blog-section .blog-media-preview {
    position: relative;
    overflow: hidden;
    width: 100%;
    display: block;
    /* هم‌راستا با گوشهٔ گرد کارت (.blog-section .blog-box = 14px) — گرید: فقط بالا */
    border-radius: 14px 14px 0 0;
    isolation: isolate;
}

/* لیست بلاگ افقی: گوشهٔ بیرونی تصویر با کارت یکی باشد (LTR / RTL) */
@media (min-width: 1200px), (min-width: 768px) and (max-width: 991px) {
    [dir="ltr"] .blog-section .blog-list .blog-media-preview {
        border-radius: 14px 0 0 14px;
    }

    [dir="rtl"] .blog-section .blog-list .blog-media-preview {
        border-radius: 0 14px 14px 0;
    }
}

/* لیست وقتی تصویر تمام‌عرض بالا می‌شود */
@media (max-width: 1199px) and (min-width: 992px), (max-width: 767px) {
    .blog-section .blog-list .blog-media-preview {
        border-radius: 14px 14px 0 0;
    }
}

.blog-section .blog-media-preview .blog-thumb-link {
    display: block;
    width: 100%;
    border-radius: inherit;
    overflow: hidden;
}

.blog-section .blog-media-preview .blog-thumb-img {
    width: 100%;
    height: auto;
    vertical-align: middle;
    display: block;
    border-radius: inherit;
}

.blog-section .blog-hover-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    min-width: 0;
    min-height: 0;
    object-fit: cover;
    object-position: center;
    /* بدون این، در هاور گوشه‌های ویدیو تیز می‌ماند (مخصوصاً WebKit) */
    border-radius: 14px 14px 0 0;
    -webkit-clip-path: inset(0 round 14px 14px 0 0);
    clip-path: inset(0 round 14px 14px 0 0);
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.2s ease;
    box-sizing: border-box;
}

.blog-section .blog-hover-video.is-active {
    opacity: 1;
}

/* جلوگیری از zoom/rotate روی تامبنیل وقتی پیش‌نمایش فعال است یا برای لینک جدید */
.blog-section .blog-box:hover .blog-media-preview .blog-thumb-link,
.blog-section .blog-box:hover .blog-image .blog-media-preview .blog-thumb-link {
    transform: none !important;
}

.blog-section .blog-box.blog-list .blog-media-preview {
    min-height: 100%;
}

.blog-section .blog-box.blog-list .blog-image {
    position: relative;
}

.blog-section .blog-box .blog-image > label {
    z-index: 2;
}

/* سایدبار «آخرین نوشته‌ها» — پیش‌نمایش ویدیو؛ override عرض/گوشهٔ قوانین گرید بلاگ */
.blog-section .recent-post-box .blog-media-preview.recent-post-preview {
    width: 110px;
    flex-shrink: 0;
    align-self: center;
    border-radius: 5px;
}

.blog-section .left-sidebar-box .left-accordion-box .accordion-item .accordion-collapse .accordion-body .recent-post-box .recent-box .blog-media-preview.recent-post-preview .recent-image.blog-thumb-link {
    width: 100%;
    max-width: none;
    display: block;
    border-radius: inherit;
    overflow: hidden;
}

.blog-section .left-sidebar-box .left-accordion-box .accordion-item .accordion-collapse .accordion-body .recent-post-box .recent-box:hover .blog-media-preview.is-previewing .recent-image img {
    transform: none !important;
}

/* ویدیوی اصلی تست در blog-detail */
.blog-detail-main-video video {
    max-height: 70vh;
    background: #000;
}

/* برچسب‌های سایدبار وبلاگ — پالت ۱۰ رنگ ملایم، متفاوت برای هر آیتم (چرخش nth-child) */
.blog-section .left-sidebar-box .left-accordion-box .accordion-body .product-tags-box ul li::after {
    display: none !important;
}

.blog-section .left-sidebar-box .left-accordion-box .accordion-body .product-tags-box ul li {
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: filter 0.2s ease, box-shadow 0.2s ease;
}

.blog-section .left-sidebar-box .left-accordion-box .accordion-body .product-tags-box ul li:hover {
    filter: brightness(1.07);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.blog-section .left-sidebar-box .left-accordion-box .accordion-body .product-tags-box ul li:hover a {
    color: inherit !important;
}

.blog-section .left-sidebar-box .left-accordion-box .accordion-body .product-tags-box ul li a {
    font-weight: 600;
    text-decoration: none;
}

/* ۱ آبی — ۲ سبز — ۳ کهربایی — ۴ بنفش — ۵ فیروزه‌ای — ۶ گل‌بهی — ۷ نیلی — ۸ زیتونی — ۹ آبی آسمانی — ۱۰ صورتی ارغوانی */
.blog-section .left-sidebar-box .left-accordion-box .accordion-body .product-tags-box ul li:nth-child(10n + 1) {
    background-color: #dbeafe !important;
}
.blog-section .left-sidebar-box .left-accordion-box .accordion-body .product-tags-box ul li:nth-child(10n + 1) a {
    color: #1d4ed8 !important;
}

.blog-section .left-sidebar-box .left-accordion-box .accordion-body .product-tags-box ul li:nth-child(10n + 2) {
    background-color: #d1fae5 !important;
}
.blog-section .left-sidebar-box .left-accordion-box .accordion-body .product-tags-box ul li:nth-child(10n + 2) a {
    color: #047857 !important;
}

.blog-section .left-sidebar-box .left-accordion-box .accordion-body .product-tags-box ul li:nth-child(10n + 3) {
    background-color: #fef3c7 !important;
}
.blog-section .left-sidebar-box .left-accordion-box .accordion-body .product-tags-box ul li:nth-child(10n + 3) a {
    color: #b45309 !important;
}

.blog-section .left-sidebar-box .left-accordion-box .accordion-body .product-tags-box ul li:nth-child(10n + 4) {
    background-color: #ede9fe !important;
}
.blog-section .left-sidebar-box .left-accordion-box .accordion-body .product-tags-box ul li:nth-child(10n + 4) a {
    color: #6d28d9 !important;
}

.blog-section .left-sidebar-box .left-accordion-box .accordion-body .product-tags-box ul li:nth-child(10n + 5) {
    background-color: #ccfbf1 !important;
}
.blog-section .left-sidebar-box .left-accordion-box .accordion-body .product-tags-box ul li:nth-child(10n + 5) a {
    color: #0f766e !important;
}

.blog-section .left-sidebar-box .left-accordion-box .accordion-body .product-tags-box ul li:nth-child(10n + 6) {
    background-color: #ffe4e6 !important;
}
.blog-section .left-sidebar-box .left-accordion-box .accordion-body .product-tags-box ul li:nth-child(10n + 6) a {
    color: #be123c !important;
}

.blog-section .left-sidebar-box .left-accordion-box .accordion-body .product-tags-box ul li:nth-child(10n + 7) {
    background-color: #e0e7ff !important;
}
.blog-section .left-sidebar-box .left-accordion-box .accordion-body .product-tags-box ul li:nth-child(10n + 7) a {
    color: #4338ca !important;
}

.blog-section .left-sidebar-box .left-accordion-box .accordion-body .product-tags-box ul li:nth-child(10n + 8) {
    background-color: #ecfccb !important;
}
.blog-section .left-sidebar-box .left-accordion-box .accordion-body .product-tags-box ul li:nth-child(10n + 8) a {
    color: #3f6212 !important;
}

.blog-section .left-sidebar-box .left-accordion-box .accordion-body .product-tags-box ul li:nth-child(10n + 9) {
    background-color: #cffafe !important;
}
.blog-section .left-sidebar-box .left-accordion-box .accordion-body .product-tags-box ul li:nth-child(10n + 9) a {
    color: #0e7490 !important;
}

.blog-section .left-sidebar-box .left-accordion-box .accordion-body .product-tags-box ul li:nth-child(10n + 10) {
    background-color: #fae8ff !important;
}
.blog-section .left-sidebar-box .left-accordion-box .accordion-body .product-tags-box ul li:nth-child(10n + 10) a {
    color: #86198f !important;
}

/* سایدبار بلاگ — دسته‌بندی: همان سلکتور طولانی dark.css تا override شود؛ باکس + خط بین آیتم‌ها */
.blog-section .left-sidebar-box .left-accordion-box .accordion-item .accordion-collapse .accordion-body .category-list-box ul {
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
}

.blog-section .left-sidebar-box .left-accordion-box .accordion-item .accordion-collapse .accordion-body .category-list-box ul li {
    padding: 0;
    list-style: none;
    overflow: visible !important;
}

/* خط افقی بین هر دسته */
.blog-section .left-sidebar-box .left-accordion-box .accordion-item .accordion-collapse .accordion-body .category-list-box ul li:not(:last-child)::after {
    content: "";
    display: block;
    width: 100%;
    height: 0;
    margin-top: 0.55rem;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

.blog-section .left-sidebar-box .left-accordion-box .accordion-item .accordion-collapse .accordion-body .category-list-box ul li:not(:last-child) {
    margin-bottom: 0.55rem;
    padding-bottom: 0;
}

.blog-section .left-sidebar-box .left-accordion-box .accordion-item .accordion-collapse .accordion-body .category-list-box ul li a {
    display: block;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.blog-section .left-sidebar-box .left-accordion-box .accordion-item .accordion-collapse .accordion-body .category-list-box ul li a:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.26);
}

.blog-section .left-sidebar-box .left-accordion-box .accordion-item .accordion-collapse .accordion-body .recent-post-box .recent-box {
    padding: 0.65rem 0.7rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
}

/* خط جداکنندهٔ زیر هر نوشته (به‌جز آخری) */
.blog-section .left-sidebar-box .left-accordion-box .accordion-item .accordion-collapse .accordion-body .recent-post-box .recent-box:not(:last-child) {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

.blog-section .left-sidebar-box .left-accordion-box .accordion-item .accordion-collapse .accordion-body .recent-post-box .recent-box + .recent-box {
    margin-top: 0 !important;
    padding-top: unset;
    border-top: none;
}

/* محصولات مرتبط زیر گالری (صفحه محصول) */
.product-page-related-under-gallery {
    margin-top: 0.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.product-page-related-under-gallery h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

body:not(.light) .product-page-related-under-gallery {
    border-top-color: rgba(255, 255, 255, 0.12);
}

.product-page-related-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem 1rem;
    list-style: none;
}

@media (min-width: 576px) {
    .product-page-related-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem 1.25rem;
    }
}

@media (min-width: 768px) {
    .product-page-related-list {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
}

.product-page-related-list li {
    margin: 0;
}

.product-page-related-list li .offer-product {
    height: 100%;
}

/* مرتبط / مشابه در ستون کناری (یک ستون عمودی) */
.product-page-related-list--sidebar {
    grid-template-columns: 1fr !important;
    gap: 0.65rem 0 !important;
}

/* دو باکس جدا: مرتبط / مشابه */
.product-section .right-sidebar-box--related-list,
.product-section .right-sidebar-box--similar-list,
.product-section .right-sidebar-box--buy-panel {
    padding: 1rem 1rem 1.1rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 22px rgba(0, 0, 0, 0.07);
}

body:not(.light) .product-section .right-sidebar-box--related-list,
body:not(.light) .product-section .right-sidebar-box--similar-list,
body:not(.light) .product-section .right-sidebar-box--buy-panel {
    background: rgba(30, 32, 34, 0.96);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

/* ردیف اصلی گالری + جزئیات محصول (کنار هم) — همان زبان بصری کارت‌های کناری */
.product-section .product-section__main-grid {
    position: relative;
    z-index: 2;
    isolation: isolate;
    margin-top: clamp(0.35rem, 1.2vw, 0.65rem);
    margin-bottom: clamp(0.45rem, 1.5vw, 0.85rem);
    padding: 1rem 1rem 1.1rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.98);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.04),
        0 6px 20px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

body:not(.light) .product-section .product-section__main-grid {
    background: rgba(30, 32, 34, 0.96);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.2),
        0 8px 28px rgba(0, 0, 0, 0.32);
}

/* گالری محصول (ردیف .row.g-sm-4): سایه + گوشه گرد — تصویر اصلی و بندانگشتی‌ها */
.product-section .product-left-box .product-main .slick-list {
    padding-block: 0.75rem;
    margin-block: -0.75rem;
    border-radius: 10px;
    overflow: hidden;
}

.product-section .product-left-box .left-slider-image .slick-list {
    padding-block: 0.75rem;
    margin-block: -0.75rem;
}

/* باکس پشت تصویر اصلی: هم‌رادیوس با img تا پس‌زمینهٔ #f8 در لایت گوشه تیز نشان ندهد */
.product-section .product-left-box .product-main .slider-image {
    border-radius: 10px;
    overflow: hidden;
    background-color: #f8f8f8;
}

body:not(.light) .product-section .product-left-box .product-main .slider-image {
    background-color: rgba(40, 42, 45, 0.95);
}

.product-section .product-left-box .left-slider-image .sidebar-image {
    overflow: visible;
    background: transparent;
    padding: 4px;
    margin: -4px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* تصویر اصلی گالری: سایهٔ ملایم */
.product-section .product-left-box .product-main .slider-image img {
    border: none;
    border-radius: 10px;
    box-sizing: border-box;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.1), 0 1px 4px rgba(0, 0, 0, 0.06);
}

body:not(.light) .product-section .product-left-box .product-main .slider-image img {
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35), 0 1px 4px rgba(0, 0, 0, 0.25);
}

/* بندانگشتی‌ها: کمی کوچک‌تر + سایهٔ خیلی کم */
.product-section .product-left-box .left-slider-image .sidebar-image img {
    border: none;
    border-radius: 8px;
    box-sizing: border-box;
    display: block;
    width: auto;
    max-width: 100%;
    max-height: clamp(56px, 12vw, 72px);
    height: auto;
    object-fit: contain;
    margin-inline: auto;
    background-color: #f8f8f8;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

body:not(.light) .product-section .product-left-box .left-slider-image .sidebar-image img {
    background-color: rgba(40, 42, 45, 0.95);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

/* اسلاید فعال: حلقهٔ ظریف هم‌رنگ تم (توکن‌های theme-tokens روی html[data-theme]) */
.product-section .product-left-box .left-slider-image .slick-slide.slick-current .sidebar-image img {
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.1),
        0 0 0 2px rgba(var(--theme-color-rgb), 0.42) !important;
}

body:not(.light) .product-section .product-left-box .left-slider-image .slick-slide.slick-current .sidebar-image img {
    box-shadow:
        0 1px 4px rgba(0, 0, 0, 0.35),
        0 0 0 2px rgba(var(--theme-color-rgb), 0.52) !important;
}

/* صفحه محصول: فاصله کمتر بین کارت اصلی و بلوک «اغلب با هم» */
body.product-page-body .product-section .product-section__main-grid {
    margin-top: clamp(0.25rem, 0.9vw, 0.45rem);
    margin-bottom: clamp(0.15rem, 0.55vw, 0.35rem);
}

body.product-page-body .related-product-2 {
    padding-top: 0;
    margin-top: 0;
}

body.product-page-body .related-product-2 > .container-fluid-lg {
    padding-top: 0.2rem;
}

body.product-page-body .related-product-2 .related-product .product-title-2 h4 {
    margin-bottom: 0.65rem;
}

/* فاصلهٔ عمودی بین مسیر/جستجو و کارت اصلی محصول */
.product-section .coffee-product-breadcrumb-row + .row {
    position: relative;
    z-index: 1;
}

.product-sidebar-block h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

/* تم (_product_page): .product-left-box را sticky کرده — فقط ستون گالری این صفحه باید معمولی اسکرول شود */
.product-section .product-page-col-gallery .product-left-box {
    position: relative;
    top: auto;
}

/* گالری و بلوک تب‌ها: همان کارت محصولات مرتبط / مشابه (رادیوس و سایه) */
.product-section .product-page-col-gallery .product-left-box,
.product-section .product-page-col-tabs .product-section-box {
    padding: 1rem 1rem 1.1rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.98);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.04),
        0 6px 20px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

body:not(.light) .product-section .product-page-col-gallery .product-left-box,
body:not(.light) .product-section .product-page-col-tabs .product-section-box {
    background: rgba(30, 32, 34, 0.96);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.2),
        0 8px 28px rgba(0, 0, 0, 0.32);
}

/* تب‌های توضیحات/نظرات: ستون جدا — در موبایل بعد از گالری و باکس خرید (order در HTML) */
.product-section .product-page-col-tabs {
    min-width: 0;
}

/*
 * دسکتاپ (xl+): با flex، ارتفاع ردیف = بلندترین ستون (معمولاً مرتبط) و زیر گالری فضای خالی می‌ماند.
 * Grid دو ردیف: [مرتبط | گالری | خرید] و [مرتبط | تب‌ها | خرید] — تب‌ها دقیقاً زیر گالری.
 */
@media (min-width: 1200px) {
    /* ویژگی بالاتر از .row { align-items: stretch } تا آیتم‌های گرید کش نیایند */
    .product-section > .container-fluid-lg > .row.product-page-main-row {
        display: grid;
        grid-template-columns: repeat(12, minmax(0, 1fr));
        grid-template-rows: auto auto;
        align-items: start;
        column-gap: 1.5rem;
        row-gap: 1rem;
        margin-inline: 0;
        width: 100%;
    }

    .product-section > .container-fluid-lg > .row.product-page-main-row > .product-page-col-related,
    .product-section > .container-fluid-lg > .row.product-page-main-row > .product-page-col-gallery,
    .product-section > .container-fluid-lg > .row.product-page-main-row > .product-page-col-buy,
    .product-section > .container-fluid-lg > .row.product-page-main-row > .product-page-col-tabs {
        order: 0;
        width: 100%;
        max-width: none;
        padding-inline: 0;
        margin-inline: 0;
    }

    /* RTL: ستون ۱ از راست — مرتبط | گالری | خرید */
    .product-section > .container-fluid-lg > .row.product-page-main-row > .product-page-col-related {
        grid-column: 1 / span 3;
        grid-row: 1 / span 2;
    }

    .product-section > .container-fluid-lg > .row.product-page-main-row > .product-page-col-gallery {
        grid-column: 4 / span 6;
        grid-row: 1;
    }

    .product-section > .container-fluid-lg > .row.product-page-main-row > .product-page-col-buy {
        grid-column: 10 / span 3;
        grid-row: 1 / span 2;
    }

    .product-section > .container-fluid-lg > .row.product-page-main-row > .product-page-col-tabs {
        grid-column: 4 / span 6;
        grid-row: 2;
        margin-top: 0;
    }
}

/* تب «نحوه نگهداری»: تم ul را flex کرده و margin چپ روی li — در RTL متن از باکس می‌زند */
.product-section-box .information-box {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.product-section-box .information-box ul {
    display: block;
    flex-wrap: unset;
    gap: 0;
    padding-inline-start: 1.25rem;
    margin-bottom: 0;
}

.product-section-box .information-box ul li {
    display: list-item;
    width: auto;
    max-width: 100%;
    margin-left: 0;
    margin-inline-start: 0;
    margin-bottom: 0.65rem;
    padding-inline-end: 0.15rem;
    line-height: 1.65;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-break: break-word;
}

.product-section-box .information-box ul li:last-child {
    margin-bottom: 0;
}

/*
 * لیست‌های جزئیات محصول — کارت با border-radius شبیه .recent-box (سایدبار بلاگ)
 */
body.product-page-body .product-section-box .product-description .nav-desh {
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.05);
}

body.product-page-body:not(.light) .product-section-box .product-description .nav-desh {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: none;
}

body.product-page-body .product-section-box .information-box ul li {
    list-style: none;
    padding: 0.65rem 0.85rem;
    margin-inline-start: 0;
    padding-inline-start: 0.85rem;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.05);
}

body.product-page-body:not(.light) .product-section-box .information-box ul li {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: none;
}

body.product-page-body .product-section-box .review-box .people-box {
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.05);
}

body.product-page-body:not(.light) .product-section-box .review-box .people-box {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: none;
}

body.product-page-body .product-section-box .accordion-body .table-responsive {
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.05);
}

body.product-page-body:not(.light) .product-section-box .accordion-body .table-responsive {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: none;
}

/* تب «ویدیوها»: لیست عمودی + تامبنیل کوچک + پیش‌نمایش ویدیو (مثل بلاگ) */
.product-section-box .product-tab-videos {
    direction: rtl;
    text-align: right;
    font-family: var(--coffee-font-family);
}

.product-section-box .product-tab-videos-lead {
    line-height: 1.65;
}

.product-section-box .product-tab-videos-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.product-section-box .product-tab-video-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.05);
}

body:not(.light) .product-section-box .product-tab-video-row {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: none;
}

.product-section-box .product-tab-video-row:last-child {
    margin-bottom: 0;
}

.product-section-box .product-tab-video-row:first-child {
    margin-top: 0;
}

.product-section-box .product-tab-video-thumb {
    flex: 0 0 auto;
    width: 118px;
    max-width: 32%;
}

@media (min-width: 576px) {
    .product-section-box .product-tab-video-thumb {
        width: 132px;
        max-width: none;
    }
}

/* همان رفتار پیش‌نمایش ویدیوی بلاگ، داخل تب محصول */
.product-section-box .product-tab-videos-preview.blog-media-preview {
    position: relative;
    overflow: hidden;
    width: 100%;
    display: block;
    border-radius: 10px;
    background: #f3f4f6;
}

.product-section-box .product-tab-videos-preview .blog-thumb-link {
    display: block;
    width: 100%;
}

.product-section-box .product-tab-videos-preview .blog-thumb-img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    vertical-align: middle;
    display: block;
}

.product-section-box .product-tab-videos-preview .blog-hover-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    min-width: 0;
    min-height: 0;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.2s ease;
    box-sizing: border-box;
}

.product-section-box .product-tab-videos-preview .blog-hover-video.is-active {
    opacity: 1;
}

.product-section-box .product-tab-videos-preview.is-previewing .blog-thumb-link {
    transform: none !important;
}

.product-section-box .product-tab-video-body {
    flex: 1;
    min-width: 0;
}

.product-section-box .product-tab-video-title {
    line-height: 1.45;
    transition: color 0.2s ease;
}

.product-section-box .product-tab-video-title-link:hover .product-tab-video-title {
    color: var(--theme-color, #0f406b);
}

.product-section-box .product-tab-video-excerpt {
    line-height: 1.75;
    font-size: 0.9375rem;
}

body:not(.light) .product-section-box .product-tab-videos-preview.blog-media-preview {
    background: rgba(255, 255, 255, 0.06);
}

/* جزئیات محصول: آکاردئون بوت‌استرپ به‌جای تب‌های افقی */
.product-section-box .product-page-detail-accordion {
    --product-accordion-radius: 12px;
}

.product-section-box .product-page-detail-accordion .accordion-header {
    margin-bottom: 0;
}

.product-section-box .product-page-detail-accordion .accordion-header .accordion-button {
    font-family: inherit;
}

body.product-page-body .product-section-box .product-page-detail-accordion .accordion-item {
    border: none;
    background: transparent;
    margin-bottom: 0.75rem;
}

body.product-page-body .product-section-box .product-page-detail-accordion .accordion-item:last-child {
    margin-bottom: 0;
}

body.product-page-body .product-section-box .product-page-detail-accordion .accordion-collapse {
    margin-top: 0.5rem;
}

/* دکمه‌ها مثل کارت recent-box: بوردر گرد + پس‌زمینه */
body.product-page-body .product-section-box .product-page-detail-accordion .accordion-button {
    font-size: 1.05rem;
    font-weight: 700;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.05);
    color: inherit;
}

body.product-page-body:not(.light) .product-section-box .product-page-detail-accordion .accordion-button {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: none;
}

body.product-page-body .product-section-box .product-page-detail-accordion .accordion-button:not(.collapsed) {
    color: var(--theme-color, #0f406b);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.05);
}

body.product-page-body:not(.light) .product-section-box .product-page-detail-accordion .accordion-button:not(.collapsed) {
    color: var(--theme-color, #1aa488);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: none;
}

body.product-page-body .product-section-box .product-page-detail-accordion .accordion-button:focus {
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.05), 0 0 0 0.2rem rgba(15, 64, 107, 0.15);
}

body.product-page-body:not(.light) .product-section-box .product-page-detail-accordion .accordion-button:focus {
    box-shadow: none;
    outline: 2px solid rgba(26, 164, 136, 0.35);
    outline-offset: 2px;
}

body.product-page-body .product-section-box .product-page-detail-accordion .accordion-button::after {
    margin-inline-start: auto;
    margin-inline-end: 0;
}

.product-section-box .product-page-detail-accordion .accordion-body.custom-tab-body {
    min-width: 0;
    max-width: 100%;
    padding-top: 0.25rem;
    padding-bottom: 1rem;
}

body.product-page-body .product-section-box .product-page-detail-accordion .accordion-body.custom-tab-body,
.product-section .product-page-col-gallery .product-section-box .product-page-detail-accordion .accordion-body.custom-tab-body,
.product-section .product-page-col-tabs .product-section-box .product-page-detail-accordion .accordion-body.custom-tab-body {
    overflow: visible;
}

/* سکشن جزئیات محصول: تاچ عمودی صفحه */
body.product-page-body section > .container-fluid-lg:has(#productDetailAccordion) {
    touch-action: pan-y;
}

/* آکاردئون «ویدیوها»: قرمز؛ فلش بوت‌استرپ (::after) ثابت؛ انیمیشن فقط روی فلش داخل بج */
#headingProductVideos .product-accordion-videos-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    color: #c82333;
    font-weight: 600;
}

#headingProductVideos .product-accordion-videos-btn:not(.collapsed) {
    color: #fff;
    background-color: #dc3545;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12);
}

#headingProductVideos .product-accordion-videos-btn .product-accordion-videos-title {
    flex: 1 1 auto;
    text-align: start;
}

#headingProductVideos .product-accordion-videos-btn .product-accordion-videos-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(220, 53, 69, 0.18);
    color: #dc3545;
    font-size: 0.7rem;
}

#headingProductVideos .product-accordion-videos-btn:not(.collapsed) .product-accordion-videos-badge {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* حرکت فقط روی آیکن فلش داخل بج */
#headingProductVideos .product-accordion-videos-btn .product-accordion-videos-badge i {
    display: block;
    line-height: 1;
    animation: productAccordionVideosBadgeArrowY 0.85s ease-in-out infinite;
}

#headingProductVideos .product-accordion-videos-btn.collapsed::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23dc3545'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

#headingProductVideos .product-accordion-videos-btn:not(.collapsed)::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

@keyframes productAccordionVideosBadgeArrowY {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(4px);
    }
}

@media (prefers-reduced-motion: reduce) {
    #headingProductVideos .product-accordion-videos-btn .product-accordion-videos-badge i {
        animation: none;
    }
}

/*
 * تب نظرات: بدون اسکرول تودرتو — با محتوای تب بلند می‌شود.
 */
body.product-page-body .product-section-box .review-box .review-people {
    max-height: none;
    height: auto;
    overflow: visible;
}

/* فاصلهٔ عمودی صفحه محصول: جمع‌وجورتر از هدر تا کارت (بدون فضای خالی زیاد) */
body.product-page-body header.pb-md-4 {
    padding-bottom: 0.45rem !important;
}

@media (min-width: 768px) {
    body.product-page-body header.pb-md-4 {
        padding-bottom: 0.6rem !important;
    }
}

body.product-page-body .product-section {
    padding-top: 0;
    padding-bottom: clamp(0.3rem, 1vw, 0.65rem);
}

body.product-page-body .product-section > .container-fluid-lg:first-of-type {
    padding-top: 0.25rem;
}

body.product-page-body .coffee-product-breadcrumb-row {
    margin-bottom: 0.35rem !important;
}

body.product-page-body .product-section .coffee-breadcrumb-search-wrap {
    margin-bottom: 0.15rem;
}

/* صفحه محصول: ردیف محصول */
.product-section > .container-fluid-lg > .row {
    align-items: flex-start;
}

/* دسکتاپ: ستون‌ها هم‌قد می‌شوند تا sticky سایدبار داخل viewport بماند */
@media (min-width: 992px) {
    .product-section > .container-fluid-lg > .row {
        align-items: stretch;
    }
}

@media (min-width: 992px) {
    /*
     * بدون استیکی عمومی روی .right-sidebar-box — روی ستون فروشنده/ویجت‌های تم (مثل vendor) اعمال می‌شد و صفحه را خراب می‌کرد.
     * استیکی فقط روی باکس خرید از طریق .product-sticky-buy-wrap و استثناهای زیر.
     */
    .product-section .product-page-col-related .right-sidebar-box {
        position: relative;
        top: auto;
        max-height: none;
        overflow: visible;
        z-index: auto;
        align-self: stretch;
        padding-bottom: 0;
        -webkit-overflow-scrolling: auto;
    }

    /* ستون خرید: flex-start تا sticky داخل flex ردیف به‌درستی نسبت به viewport بچسبد (stretch ارتفاع ستون را با گالری یکی می‌کند و sticky را خراب می‌کند) */
    .product-section .product-page-col-buy {
        align-self: flex-start;
    }

    .product-section .product-page-col-buy .right-sidebar-box {
        position: relative;
        top: auto;
        max-height: none;
        overflow: visible;
        padding-bottom: 0;
        z-index: auto;
        -webkit-overflow-scrolling: auto;
    }

    .product-section .product-page-col-buy .product-sticky-buy-wrap {
        position: sticky;
        top: calc(5.5rem + env(safe-area-inset-top, 0px));
        z-index: 9;
        max-height: none;
        overflow: visible;
    }

    .product-section .product-page-col-buy .product-sticky-buy-wrap .right-box-contain {
        box-shadow: 0 10px 36px rgba(0, 0, 0, 0.1);
    }

    body:not(.light) .product-section .product-page-col-buy .product-sticky-buy-wrap .right-box-contain {
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    }
}

/* تم روی .product-section .right-box-contain نیز sticky می‌گذارد؛ با sticky روی .product-sticky-buy-wrap تداخل می‌کند — فقط wrapper باید sticky باشد */
.product-section .product-sticky-buy-wrap .right-box-contain {
    position: relative;
    top: auto;
    left: auto;
    padding: 1rem 1rem 1.25rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 22px rgba(0, 0, 0, 0.07);
}

body:not(.light) .product-section .product-sticky-buy-wrap .right-box-contain {
    background: rgba(30, 32, 34, 0.96);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

/* «اغلب با هم خریداری می‌شود»: اسلایدر Slick مثل محصولات مرتبط — بدون اسکرول‌بار افقی */
.related-product-2 .related-box .related-image-fbt-slider {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: visible;
    touch-action: auto;
    -ms-touch-action: auto;
    padding-bottom: 0;
}

.related-product-2 .related-image-fbt-slider.slick-slider .slick-list {
    margin-left: 0;
    margin-right: 0;
}

@media (max-width: 575.98px) {
    .related-product-2 .related-image-fbt-slider.slick-slider .slick-list {
        margin-left: 0;
        margin-right: 0;
    }
}

.related-product-2 .related-image-fbt-slider.slick-slider .slick-list .slick-slide > * {
    margin-left: 6px;
    margin-right: 6px;
}

@media (max-width: 575.98px) {
    .related-product-2 .related-image-fbt-slider.slick-slider .slick-list .slick-slide > * {
        margin-left: 4px;
        margin-right: 4px;
    }
}

/* وسط‌چین محتوای هر کارت؛ جهت لیست اسلایدر برای RTL درست از چپ به راست اسکرول شود */
.related-product-2 .related-box .related-image-fbt-slider .slick-list {
    text-align: center;
}

[dir="rtl"] .related-product-2 .related-box .related-image-fbt-slider .slick-list {
    direction: ltr;
}

[dir="rtl"] .related-product-2 .related-box .related-image-fbt-slider .slick-slide {
    direction: rtl;
}

.related-product-2 .related-box .related-image-fbt-slider .product-box.product-box-bg {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 0;
    max-width: 100%;
}

.related-product-2 .related-box .related-image-fbt-slider .product-box .product-image {
    min-width: 0;
    width: 100%;
}

.related-product-2 .related-box .related-image-fbt-slider .product-detail {
    width: 100%;
    min-width: 0;
    text-align: center;
}

.related-product-2 .related-box .related-image-fbt-slider .product-detail .name {
    text-align: center;
}

/* کارت تیره‌تر فقط برای ناحیهٔ اسلایدر محصولات */
.related-product-2 .related-box .related-image.related-image-fbt-slider {
    padding: 1rem clamp(0.65rem, 2vw, 1.1rem);
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.055);
    border: 1px solid rgba(0, 0, 0, 0.07);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

body:not(.light) .related-product-2 .related-box .related-image.related-image-fbt-slider {
    background: rgba(0, 0, 0, 0.38);
    border-color: rgba(255, 255, 255, 0.09);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* کارت هر محصول FBT: گردتر و کمی روشن‌تر از پس‌زمینهٔ نوار */
.related-product-2 .related-box .product-box.product-box-bg {
    border-radius: 14px;
    padding: 0.45rem 0.35rem 0.6rem;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

body:not(.light) .related-product-2 .related-box .product-box.product-box-bg {
    background: rgba(255, 255, 255, 0.11);
    border-color: rgba(255, 255, 255, 0.14);
}

/* گوشه‌های گردتر برای تصویر هر محصول */
.related-product-2 .related-box .related-product-2__image-wrap {
    border-radius: 14px;
    overflow: hidden;
}

.related-product-2 .related-box .related-product-2__image-link,
.related-product-2 .related-box .related-product-2__image-link img {
    border-radius: inherit;
}

/* FBT: اسلایدها کنار هم مثل اسلایدر پیش‌فرض Slick (float) */
.related-product-2 .related-box .related-image-fbt-slider .slick-slide {
    box-sizing: border-box;
    padding-inline: 0.35rem;
}

.related-product-2 .related-box .related-image-fbt-slider .slick-slide > div {
    position: relative;
    box-sizing: border-box;
    min-width: 0;
}

/* چک‌باکس انتخاب روی خود تصویر محصول (FBT) */
.related-product-2 .related-product-2__image-wrap {
    position: relative;
}

.related-product-2 .related-product-2__image-link {
    display: block;
    position: relative;
    z-index: 0;
}

.related-product-2 .related-product-2__image-check {
    position: absolute;
    top: 0.72rem;
    inset-inline-end: 0.72rem;
    z-index: 4;
    margin: 0;
    padding: 0;
    min-height: 0;
    width: 21px;
    height: 21px;
    overflow: visible;
}

.related-product-2 .related-product-2__image-check .checkbox_animated {
    margin: 0;
    display: block;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    border: none;
    background: transparent;
    padding: 0;
}

/* مربع گوشه‌گرد (نه دایره)؛ کمی دورتر از گوشهٔ تصویر */
.related-product-2 .related-product-2__image-check .checkbox_animated::after {
    border-radius: 6px;
    border: 2px solid var(--theme-color, #004e98);
    background-color: rgba(255, 255, 255, 0.96);
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.12);
}

body:not(.light) .related-product-2 .related-product-2__image-check .checkbox_animated::after {
    border-color: var(--theme-color, #004e98);
    background-color: rgba(255, 255, 255, 0.16);
}

.related-product-2 .related-product-2__image-check .checkbox_animated:checked::after {
    background-color: var(--theme-color, #004e98);
    border-color: var(--theme-color, #004e98);
}

.related-product-2 .related-product-2__image-check .checkbox_animated:checked::before {
    border-color: #fff;
}

/* مجموع انتخاب‌شده: هر آیتم یک سطر، وسط‌چین */
.related-product-2 .bundle-list > ul > li.content {
    margin-top: 0 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.45rem;
}

.related-product-2 .bundle-list > ul > li.content h5 {
    margin: 0;
    width: 100%;
    text-align: center;
}

.related-product-2 .bundle-list > ul > li.content h4 {
    margin: 0;
    width: 100%;
    text-align: center;
}

.related-product-2 .bundle-list > ul > li.content .btn {
    margin-top: 0.35rem !important;
    align-self: center;
}

/* موبایل/تبلت: کاروسل بالا، باکس «مجموع انتخاب‌شده» تمام‌عرض پایین */
@media (max-width: 991.98px) {
    .related-product-2 .related-box {
        align-items: stretch;
    }

    .related-product-2 .related-box.related-box--fbt {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
    }

    .related-product-2 .related-box .related-image-fbt-slider {
        width: 100%;
        max-width: 100%;
        align-self: stretch;
        order: 1;
    }

    .related-product-2 .related-box .bundle-list {
        width: 100%;
        max-width: 100%;
        order: 2;
        justify-content: center;
        align-items: center;
    }

    .related-product-2 .related-box .bundle-list > ul {
        width: 100%;
        justify-content: center;
        align-items: center;
    }

    .related-product-2 .related-box .bundle-list > ul > li.content {
        width: 100%;
        max-width: 100%;
        align-items: center;
        text-align: center;
    }
}

/* دسکتاپ: کاروسل و ستون مجموع در یک ردیف */
@media (min-width: 992px) {
    .related-product-2 .related-box {
        flex-direction: row;
        align-items: center;
        flex-wrap: nowrap;
    }

    .related-product-2 .related-box.related-box--fbt {
        flex-wrap: nowrap;
        align-items: stretch;
    }

    .related-product-2 .related-box .related-image-fbt-slider {
        flex: 1 1 0;
        min-width: 0;
        max-width: min(900px, 100%);
    }

    .related-product-2 .related-box .bundle-list {
        flex: 0 0 auto;
        width: auto;
        max-width: min(420px, 38vw);
    }

    .related-product-2 .related-box .bundle-list > ul {
        width: auto;
        justify-content: center;
    }
}

/* فاصلهٔ نقاط اسلایدر FBT از کارت‌ها */
.related-product-2 .related-image-fbt-slider .slick-dots {
    margin-bottom: 0;
    padding-top: 0.35rem;
}

/* صفحه محصول: تم موبایل روی .right-box-contain وسط‌چین می‌گذارد — راست‌به‌چپ و تراز شروع (در RTL راست) */
body.product-page-dropdown .product-section .right-box-contain {
    text-align: start !important;
    direction: rtl;
}

body.product-page-dropdown .product-section .right-box-contain .name,
body.product-page-dropdown .product-section .right-box-contain .product-title h4 {
    text-align: start !important;
}

@media (max-width: 767.98px) {
    body.product-page-dropdown .product-section .right-box-contain .price-rating .custom-rate {
        justify-content: flex-start !important;
    }

    body.product-page-dropdown .product-section .right-box-contain .price-rating .price {
        text-align: start !important;
    }

    body.product-page-dropdown .product-section .right-box-contain .product-package .select-package {
        justify-content: flex-start !important;
    }
}

@media (max-width: 991.98px) {
    .product-section .right-sidebar-box {
        position: relative;
        top: auto;
        max-height: none;
        overflow: visible;
        padding-bottom: 0;
    }

    .product-section .product-sticky-buy-wrap {
        position: relative;
        top: auto;
        max-height: none;
        overflow: visible;
    }

    .product-section .product-sticky-buy-wrap .right-box-contain {
        margin-bottom: 0.5rem;
    }

    /* نوار تعداد + سبد: شناور بالای منوی پایین موبایل (.mobile-menu z-index:2) */
    .product-page-mobile-floating-cart .product-sticky-buy-wrap .note-box.product-package {
        position: fixed;
        left: 0;
        right: 0;
        bottom: calc(4.35rem + env(safe-area-inset-bottom, 0px));
        z-index: 4;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.35rem;
        margin: 0;
        padding: 0.45rem 0.55rem 0.5rem;
        background: rgba(255, 255, 255, 0.98);
        border-top: 1px solid rgba(0, 0, 0, 0.1);
        box-shadow: 0 -6px 22px rgba(0, 0, 0, 0.1);
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
    }

    /* خط ۱: فقط قیمت، یک خط */
    .product-page-mobile-floating-cart .product-sticky-buy-wrap .note-box.product-package .product-page-float-cart-top {
        display: block;
        min-width: 0;
    }

    .product-page-mobile-floating-cart .product-sticky-buy-wrap .note-box.product-package .product-page-float-price {
        display: flex;
        flex-wrap: nowrap;
        align-items: baseline;
        gap: 0.35rem 0.45rem;
        font-size: 0.9rem;
        line-height: 1.25;
        white-space: nowrap;
        overflow: hidden;
    }

    .product-page-mobile-floating-cart .product-sticky-buy-wrap .note-box.product-package .product-page-float-price-current {
        flex: 0 1 auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .product-page-mobile-floating-cart .product-sticky-buy-wrap .note-box.product-package .product-page-float-price-old {
        flex: 0 1 auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 0.78rem;
    }

    /* خط ۲: سلکت + تعداد + دکمهٔ فشرده */
    .product-page-mobile-floating-cart .product-sticky-buy-wrap .note-box.product-package .product-page-float-cart-bottom {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 0.35rem;
        min-width: 0;
    }

    .product-page-mobile-floating-cart .product-sticky-buy-wrap .note-box.product-package .product-page-float-package {
        flex: 1 1 0;
        min-width: 0;
        width: auto;
        min-height: 2rem;
        padding-top: 0.25rem;
        padding-bottom: 0.25rem;
        font-size: 0.8125rem;
        line-height: 1.2;
    }

    .product-page-mobile-floating-cart .product-sticky-buy-wrap .note-box.product-package .product-page-float-qty {
        flex: 0 0 auto;
        min-width: 0;
        max-width: 6.25rem;
    }

    .product-page-mobile-floating-cart .product-sticky-buy-wrap .note-box.product-package .product-page-float-qty .input-group {
        flex-wrap: nowrap;
    }

    .product-page-mobile-floating-cart .product-sticky-buy-wrap .note-box.product-package .product-page-float-qty .qty-input {
        min-width: 1.5rem;
        padding-left: 0.2rem;
        padding-right: 0.2rem;
        font-size: 0.8125rem;
    }

    .product-page-mobile-floating-cart .product-sticky-buy-wrap .note-box.product-package .product-page-float-qty .qty-right-plus,
    .product-page-mobile-floating-cart .product-sticky-buy-wrap .note-box.product-package .product-page-float-qty .qty-left-minus {
        padding: 0.2rem 0.35rem;
    }

    .product-page-mobile-floating-cart .product-sticky-buy-wrap .note-box.product-package .product-page-float-cart-btn {
        flex: 0 0 auto;
        max-width: 42%;
        padding: 0.32rem 0.45rem;
        font-size: 0.78rem;
        font-weight: 600;
        line-height: 1.2;
        white-space: nowrap;
    }

    body:not(.light) .product-page-mobile-floating-cart .product-sticky-buy-wrap .note-box.product-package {
        background: rgba(26, 28, 30, 0.97);
        border-top-color: rgba(255, 255, 255, 0.12);
        box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.45);
    }

    /* فضای خالی پایین صفحه تا محتوا زیر نوار و منو نرود */
    body.product-page-body {
        padding-bottom: calc(9.25rem + env(safe-area-inset-bottom, 0px));
    }
}

@media (min-width: 992px) {
    /* دسکتاپ: قیمت و سلکت تکراری‌اند — فقط تعداد و دکمه */
    .product-section .product-page-float-cart-top {
        display: none;
    }

    .product-section .note-box.product-package .product-page-float-cart-bottom .product-page-float-package {
        display: none;
    }

    .product-section .note-box.product-package .product-page-float-cart-bottom {
        display: flex;
        flex-wrap: nowrap;
        align-items: stretch;
        gap: 0.5rem;
    }

    .product-section .note-box.product-package .product-page-float-cart-bottom .product-page-float-cart-btn {
        flex: 1 1 auto;
        min-width: 0;
        max-width: none;
        padding: 0.5rem 0.75rem;
        font-size: 0.9375rem;
        font-weight: 500;
    }
}

@media (prefers-reduced-motion: reduce) {
    .product-section .right-sidebar-box,
    .product-section .product-sticky-buy-wrap,
    .product-section .product-page-col-buy .product-sticky-buy-wrap {
        position: relative;
        top: auto;
        max-height: none;
        overflow: visible;
    }
}

/* RTL: کنترل تعداد — همیشه منفی چپ، مثبت راست (موقعیت فیزیکی ثابت؛ DOM: منفی، اینپوت، مثبت) */
[dir="rtl"] .input-group:has(.qty-left-minus):has(.qty-right-plus) {
    direction: ltr;
}

/* نوار چسبان پایین (product-dropdown): ردیف ۱۲ ستونه — col-4 + col-4 + col-2 + col-2 */
body.product-page-dropdown .sticky-bottom-cart {
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
}

body.product-page-dropdown .sticky-bottom-cart .sticky-cart-content {
    min-width: 0;
}

body.product-page-dropdown .sticky-bottom-cart .sticky-cart-content > [class*="col-"] {
    min-width: 0;
}

body.product-page-dropdown .sticky-bottom-cart .product-image {
    flex-shrink: 0;
}

body.product-page-dropdown .sticky-bottom-cart .product-image > img.img-fluid {
    width: 60px;
    max-width: 60px;
    min-width: 60px;
    height: auto;
    flex-shrink: 0;
    border-radius: 6px;
    object-fit: cover;
}

/* تم: بین ~۴۸۰ تا ۹۹۱px .content را مخفی می‌کند؛ روی پس‌زمینهٔ روشن متن سفید دیده نمی‌شود */
body.product-page-dropdown .sticky-bottom-cart .product-image .content {
    min-width: 0;
    display: block !important;
    color: var(--body-color, #212529);
}

body.product-page-dropdown .sticky-bottom-cart .product-image .content h5 {
    margin-bottom: 0.15rem;
    line-height: 1.25;
    color: inherit;
}

body.product-page-dropdown .sticky-bottom-cart .selection-section.sticky-cart-selection {
    margin: 0;
    margin-inline: 0;
}

body.product-page-dropdown .sticky-bottom-cart .sticky-cart-packages {
    align-items: flex-end;
    min-width: 0;
}

body.product-page-dropdown .sticky-bottom-cart .product-package--sticky {
    margin-bottom: 0;
}

body.product-page-dropdown .sticky-bottom-cart .product-package--sticky .product-title h4 {
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 0.1rem;
    line-height: 1.15;
    white-space: nowrap;
}

body.product-page-dropdown .sticky-bottom-cart .product-package--sticky .select-package {
    margin-bottom: 0;
}

body.product-page-dropdown .sticky-bottom-cart .product-package--sticky .form-select {
    max-width: 100%;
}

body.product-page-dropdown .sticky-bottom-cart .sticky-cart-qty-col.cart_qty.product-qty,
body.product-page-dropdown .sticky-bottom-cart .sticky-cart-qty-mobile.cart_qty.product-qty {
    flex: 0 0 auto;
    height: auto !important;
}

body.product-page-dropdown .sticky-bottom-cart .sticky-cart-price-line {
    font-size: 0.88rem;
    line-height: 1.3;
    margin: 0;
}

body.product-page-dropdown.stickyCart {
    padding-bottom: 104px;
}

/* نوار چسبان product-dropdown: دسکتاپ کاملاً مخفی؛ موبایل فقط قیمت + دکمه سبد */
@media (min-width: 992px) {
    body.product-page-dropdown .sticky-bottom-cart {
        display: none !important;
    }

    body.product-page-dropdown.stickyCart {
        padding-bottom: 0 !important;
    }
}

@media (max-width: 991.98px) {
    /* موبایل: نوار همیشه چسبیده به پایین — بدون اسکرول و بدون انیمیشن جابه‌جایی */
    body.product-page-dropdown .sticky-bottom-cart {
        bottom: 0 !important;
        -webkit-transition: none !important;
        transition: none !important;
    }

    /* هم‌تراز با ارتفاع نوار سبد شناور (~۷۴px) + حاشیه برای اسکرول */
    body.product-page-dropdown {
        padding-bottom: calc(74px + 12px + env(safe-area-inset-bottom, 0px)) !important;
    }

    body.product-page-dropdown .sticky-bottom-cart .add-btn {
        width: 100%;
    }

    body.product-page-dropdown .sticky-bottom-cart .sticky-cart-content > .col-12.col-lg-4:nth-child(2),
    body.product-page-dropdown .sticky-bottom-cart .sticky-cart-content > .col-12.d-lg-none {
        display: none !important;
    }

    body.product-page-dropdown .sticky-bottom-cart .product-image > img.img-fluid,
    body.product-page-dropdown .sticky-bottom-cart .product-image .content h5 {
        display: none !important;
    }

    body.product-page-dropdown .sticky-bottom-cart .sticky-cart-content {
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
    }

    /* قیمت و دکمه سبد جابه‌جا: دکمه نزدیک لبهٔ شروع (در RTL راست)، قیمت کنار */
    body.product-page-dropdown .sticky-bottom-cart .sticky-cart-content > .col-12.col-lg-4:first-child {
        flex: 1 1 auto;
        width: auto;
        max-width: none;
        order: 2;
    }

    body.product-page-dropdown .sticky-bottom-cart .sticky-cart-content > .col-12.col-lg-2:last-child {
        flex: 0 0 auto;
        width: auto;
        max-width: min(55%, 220px);
        order: 1;
    }

    body.product-page-dropdown .sticky-bottom-cart .sticky-cart-content > .col-12.col-lg-2:last-child .btn.w-100.d-lg-none {
        width: auto !important;
        min-width: min(100%, 11rem);
        padding-inline: 0.75rem;
        white-space: nowrap;
    }

    body.product-page-dropdown .sticky-bottom-cart .product-image {
        gap: 0;
    }
}

/* ≤575px: تم پایه نوار انتخاب را کم می‌کند؛ این صفحه فقط قیمت+سبد می‌ماند */
@media (max-width: 575.98px) {
    body.product-page-dropdown .sticky-bottom-cart .selection-section.sticky-cart-selection {
        display: none !important;
    }

    body.product-page-dropdown .sticky-bottom-cart .product-image {
        display: flex !important;
        align-items: center;
    }
}

/* سبد خرید — بلوک حذف‌شده‌ها همان ساختار .cart-table تم است (wrapper دور table) */
.cart-page-body .cart-removed-section .cart-table {
    margin-bottom: 0;
}

/* تسویه حساب — بلوک پیشنهاد ویژه */
/* تم dark: روی .offer-detail محدودیت ۱۰۴px + overflow اسکرول داخلی — اینجا ارتفاع با محتوا */
.checkout-section-2 .right-side-summery-box .checkout-offer {
    height: auto;
    min-height: 0;
}

.checkout-section-2 .right-side-summery-box .checkout-offer ul.offer-detail.checkout-offer-text-list {
    display: block;
    width: 100%;
    max-height: none !important;
    height: auto !important;
    min-height: 0;
    overflow: visible !important;
    flex-wrap: unset;
}

/* تسویه حساب — خلاصه سفارش: flex-wrap + شکستن عنوان تا با قیمت قاطی نشود */
.checkout-section-2 .right-side-summery-box .summery-box-2 .summery-contain > li {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.35rem 0.65rem;
}

.checkout-section-2 .right-side-summery-box .summery-box-2 .summery-contain > li > .checkout-image {
    flex: 0 0 auto;
    align-self: center;
}

.checkout-section-2 .right-side-summery-box .summery-box-2 .summery-contain > li > h4:not(.price) {
    flex: 1 1 0;
    min-width: 0;
    max-width: min(34%, 7.5rem);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.checkout-section-2 .right-side-summery-box .summery-box-2 .summery-contain > li > h4.price {
    flex: 0 0 auto;
    align-self: center;
    white-space: nowrap;
    margin-inline-start: auto;
}

.checkout-section-2 .right-side-summery-box .summery-box-2 .summery-contain > li.checkout-offer-summary-line--text {
    align-items: center;
}

/* تسویه حساب — جلوگیری از جابه‌جایی افقی هنگام باز شدن مودال (حذف اسکرول‌بار بدن) */
html.checkout-page {
    scrollbar-gutter: stable;
}

.checkout-offer .checkout-offer-price {
    color: #dc3545 !important;
}

body:not(.light) .checkout-offer .checkout-offer-price {
    color: #ff6b6b !important;
}

.checkout-offer .checkout-offer-text-list.checkout-offer-text-list li.checkout-offer-product {
    padding-bottom: 0.65rem;
    margin-bottom: 0.65rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.checkout-offer .checkout-offer-text-list li.checkout-offer-product:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

body:not(.light) .checkout-offer .checkout-offer-text-list li.checkout-offer-product {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

#checkoutOfferModal .checkout-offer-qty-input {
    max-width: 4rem;
}

/* گروه تعداد مودال پیشنهاد — فشرده؛ کنار قیمت (h6) در یک ردیف */
#checkoutOfferModal.checkout-offer-deal-modal .cart_qty {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    vertical-align: middle;
    margin-top: 0 !important;
}

#checkoutOfferModal.checkout-offer-deal-modal .checkout-offer-modal-qty-group {
    max-width: none;
    width: auto;
    flex-wrap: nowrap;
    align-items: stretch;
}

#checkoutOfferModal.checkout-offer-deal-modal .checkout-offer-modal-qty-group .btn {
    padding: 0.18rem 0.32rem;
    min-width: 1.65rem;
    line-height: 1;
    font-size: 0.65rem;
}

#checkoutOfferModal.checkout-offer-deal-modal .checkout-offer-modal-qty-group .checkout-offer-qty-input {
    max-width: 2.35rem !important;
    min-width: 2rem;
    width: 2.35rem;
    padding: 0.12rem 0.2rem;
    font-size: 0.78rem;
    line-height: 1.2;
    height: 1.85rem;
    flex: 0 0 auto;
}

/* مودال پیشنهاد تسویه — هم‌سبک مودال «پیشنهاد امروز» (deal-modal)، تصویر مربع */
#checkoutOfferModal.checkout-offer-deal-modal .deal-offer-box.checkout-offer-modal-deal-box {
    height: auto;
    max-height: min(70vh, 520px);
    overflow-y: auto;
}

@media (max-width: 575px) {
    #checkoutOfferModal.checkout-offer-deal-modal .deal-offer-box.checkout-offer-modal-deal-box {
        max-height: none;
    }
}

#checkoutOfferModal.checkout-offer-deal-modal .deal-offer-contain.checkout-offer-modal-deal-row {
    align-items: flex-start;
}

#checkoutOfferModal.checkout-offer-deal-modal .deal-image {
    flex-shrink: 0;
}

#checkoutOfferModal.checkout-offer-deal-modal .deal-image img {
    width: calc(69px + 11 * (100vw - 320px) / 1600);
    height: calc(69px + 11 * (100vw - 320px) / 1600);
    max-width: 88px;
    max-height: 88px;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.45);
}

body.checkout-page-body.light #checkoutOfferModal.checkout-offer-deal-modal .deal-offer-contain .deal-contain {
    color: #212529;
}

body.checkout-page-body.light #checkoutOfferModal.checkout-offer-deal-modal .deal-offer-contain .deal-contain h5 {
    color: #212529;
    font-weight: 600;
}

body.checkout-page-body.light #checkoutOfferModal.checkout-offer-deal-modal .deal-offer-contain .deal-contain h6 {
    color: #6c757d;
}

body.checkout-page-body.light #checkoutOfferModal.checkout-offer-deal-modal .deal-offer-contain .deal-contain h6 span {
    color: #868e96;
}

#checkoutOfferModal.checkout-offer-deal-modal .deal-offer-contain .deal-contain h5 {
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    display: -webkit-box;
    overflow: hidden;
    white-space: normal;
    line-height: 1.45;
    margin-bottom: 6px;
}

#checkoutOfferModal.checkout-offer-deal-modal .deal-offer-contain .deal-contain h6 {
    margin-top: 0;
    flex-wrap: wrap;
    display: inline-block;
    vertical-align: middle;
    margin-bottom: 0;
    margin-inline-end: 0.5rem;
}

#checkoutOfferModal.checkout-offer-deal-modal .cart_qty .input-group .btn {
    background-color: rgba(255, 255, 255, 0.92);
}

body.checkout-page-body:not(.light) #checkoutOfferModal.checkout-offer-deal-modal .cart_qty .input-group .btn {
    background-color: rgba(30, 30, 30, 0.35);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.25) !important;
}

body.checkout-page-body:not(.light) #checkoutOfferModal.checkout-offer-deal-modal .cart_qty .checkout-offer-qty-input {
    background-color: rgba(0, 0, 0, 0.2);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}
 
/* Dark Gold Premium appended */
/**
 * Dark mode — اکسنت از theme-tokens (html[data-theme="dark"] یا dark-orange).
 * Scope: body.dark (همراه با dark.css از theme-setting.js)
 */

body.dark {
    --discount-color: #ff4d4d;
}

/* 1) پس‌زمینهٔ اصلی */
body.dark {
    background-color: var(--bg-page) !important;
    color: var(--text-primary);
}

body.dark main,
body.dark section {
    background-color: transparent;
}

body.dark .bg-light,
body.dark .bg-white {
    background-color: var(--bg-card) !important;
    color: var(--text-primary);
}

/* 2) متن */
body.dark .text-content,
body.dark .text-muted,
body.dark small.text-content {
    color: var(--text-secondary) !important;
}

body.dark h1,
body.dark h2,
body.dark h3,
body.dark h4,
body.dark h5,
body.dark h6,
body.dark .name {
    color: var(--text-primary);
}

body.dark a:not(.btn):not(.nav-link):not(.dropdown-item) {
    transition:
        color 0.22s ease,
        text-shadow 0.22s ease;
}

body.dark a:not(.btn):hover {
    color: var(--accent-hover) !important;
    text-shadow: 0 0 12px rgba(var(--theme-color-rgb), 0.35);
}

/* 3) دکمه‌ها و CTA طلایی */
body.dark .theme-bg-color,
body.dark .btn.theme-bg-color {
    background: linear-gradient(180deg, var(--theme-color) 0%, var(--accent-gradient-end) 100%) !important;
    color: #121212 !important;
    border: 1px solid rgba(var(--theme-color-rgb), 0.85) !important;
    box-shadow: var(--accent-glow);
    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        filter 0.2s ease,
        background 0.2s ease;
}

body.dark .theme-bg-color:hover,
body.dark .btn.theme-bg-color:hover {
    background: linear-gradient(180deg, var(--accent-hover) 0%, var(--theme-color) 100%) !important;
    color: #121212 !important;
    box-shadow: var(--accent-glow-strong);
    transform: translateY(-1px);
    filter: brightness(1.03);
}

body.dark .theme-color {
    color: var(--theme-color) !important;
    text-shadow: 0 0 1px rgba(var(--theme-color-rgb), 0.25);
}

/* تخفیف / badge قرمز + درخشش طلایی */
body.dark .offer-top,
body.dark .label-tag,
body.dark .discount-box .discount-label,
body.dark .product-box .label-tag {
    background: linear-gradient(135deg, var(--discount-color), #c0392b) !important;
    color: var(--theme-color) !important;
    border: 1px solid rgba(var(--theme-color-rgb), 0.65) !important;
    box-shadow:
        0 0 12px rgba(255, 77, 77, 0.45),
        0 0 18px rgba(var(--theme-color-rgb), 0.35);
    font-weight: 700;
}

/* تم تیره نارنجی: متن تخفیف روی بج قرمز با اکسنت نارنجی دیده نمی‌شود → زرد */
html[data-theme="dark-orange"] body.dark .offer-top {
    color: #ffd700 !important;
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.85);
}

/* 4) کارت محصول و باندل */
body.dark .product-box:not(.product-box-2):not(.product-box-3):not(.product-box-4),
body.dark .product-box-bg,
body.dark .product-theme-box,
body.dark .book-product-box {
    background-color: var(--bg-card) !important;
    border: 1px solid rgba(var(--theme-color-rgb), 0.55) !important;
    box-shadow:
        0 4px 18px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(var(--theme-color-rgb), 0.08);
    transition:
        transform 0.28s ease,
        box-shadow 0.28s ease,
        border-color 0.28s ease;
}

body.dark .product-box:hover,
body.dark .product-box-bg:hover,
body.dark .product-theme-box:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--theme-color-rgb), 0.95) !important;
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.55),
        0 0 24px rgba(var(--theme-color-rgb), 0.28);
}

/* افزودن به سبد روی کارت */
body.dark .product-box .counter-box .addtocart_btn .add-button,
body.dark .product-box .counter-box .addtocart_btn .add_cart,
body.dark .book-product-box .counter-box .addtocart_btn .add-button,
body.dark .book-product-box .counter-box .addtocart_btn .add_cart {
    background-color: var(--theme-color) !important;
    color: #121212 !important;
    box-shadow: var(--accent-glow);
}

body.dark .product-box .counter-box .addtocart_btn .add-button:hover,
body.dark .product-box .counter-box .addtocart_btn .add_cart:hover {
    background-color: var(--accent-hover) !important;
    box-shadow: var(--accent-glow-strong);
}

/* دکمه‌های + / - تعداد */
body.dark .product-box .counter-box .addtocart_btn .input-group .btn,
body.dark .cart_qty .input-group .btn,
body.dark .qty-box .input-group .btn,
body.dark .product-qty .input-group .btn {
    background-color: rgba(var(--theme-color-rgb), 0.18) !important;
    border-color: rgba(var(--theme-color-rgb), 0.55) !important;
    color: var(--theme-color) !important;
    transition:
        background 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.15s ease;
}

body.dark .product-box .counter-box .addtocart_btn .input-group .btn:hover,
body.dark .cart_qty .input-group .btn:hover,
body.dark .qty-box .input-group .btn:hover {
    background-color: rgba(var(--theme-color-rgb), 0.32) !important;
    box-shadow: var(--accent-glow);
}

body.dark .product-box .counter-box .addtocart_btn .input-group {
    background-color: #1a1a1a !important;
    border: 1px solid rgba(var(--theme-color-rgb), 0.25);
    box-shadow: inset 0 0 0 1px rgba(var(--theme-color-rgb), 0.08);
}

/* 5) صفحه محصول — گالری دارک: سایهٔ تصویر (قاب .slider-image در بالا برای همهٔ تم‌ها گرد است) */
body.dark.product-page-body .product-section .product-left-box .product-main .slider-image img {
    border-radius: 10px;
    box-shadow:
        0 4px 18px rgba(0, 0, 0, 0.35),
        0 1px 4px rgba(0, 0, 0, 0.25),
        0 0 20px rgba(var(--theme-color-rgb), 0.1);
}

/* بلوک‌های خرید / گرید اصلی — هماهنگ با کارت */
body.dark.product-page-body .product-section .product-section__main-grid,
body.dark.product-page-body .product-section .right-sidebar-box--buy-panel,
body.dark.product-page-body .product-section .product-page-col-gallery .product-left-box,
body.dark.product-page-body .product-section .product-page-col-tabs .product-section-box {
    background: var(--bg-card) !important;
    border: 1px solid rgba(var(--theme-color-rgb), 0.45) !important;
    box-shadow:
        0 8px 28px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(var(--theme-color-rgb), 0.08);
}

/* 6) نوار چسبان سبد — بزرگ‌تر و طلایی */
body.dark.product-page-dropdown .sticky-bottom-cart {
    background: linear-gradient(180deg, #1a1a1a 0%, #121212 100%) !important;
    border-top: 2px solid rgba(var(--theme-color-rgb), 0.5) !important;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.55), 0 -4px 24px rgba(var(--theme-color-rgb), 0.12);
}

body.dark.product-page-dropdown .sticky-bottom-cart .btn-lg.theme-bg-color {
    min-height: 3.15rem;
    font-size: 1.05rem;
    font-weight: 800;
    padding-inline: 1.35rem;
    border-radius: 12px;
}

body.dark.product-page-dropdown .sticky-bottom-cart .sticky-cart-qty-inputgroup,
body.dark.product-page-dropdown .sticky-bottom-cart .cart_qty .input-group {
    min-height: 2.85rem;
    border-radius: 10px;
}

/* 7) FBT — چک‌باکس و دکمهٔ «افزودن همه» */
body.dark .related-product-2 .related-product-2__image-check .checkbox_animated::after {
    border-color: var(--theme-color) !important;
    background-color: rgba(var(--theme-color-rgb), 0.12) !important;
    box-shadow: 0 0 10px rgba(var(--theme-color-rgb), 0.35);
}

body.dark .related-product-2 .related-product-2__image-check .checkbox_animated:checked::after {
    background-color: var(--theme-color) !important;
    border-color: var(--theme-color) !important;
    box-shadow: var(--accent-glow);
}

body.dark .related-product-2 .bundle-list .btn.theme-bg-color,
body.dark .related-product-2 .bundle-list .btn.text-white.theme-bg-color {
    background: linear-gradient(180deg, var(--theme-color), var(--accent-gradient-end)) !important;
    color: #121212 !important;
    border: 1px solid rgba(var(--theme-color-rgb), 0.9) !important;
    box-shadow: var(--accent-glow);
}

body.dark .related-product-2 .related-box .product-box.product-box-bg {
    background: var(--bg-card) !important;
    border: 1px solid rgba(var(--theme-color-rgb), 0.45) !important;
}

body.dark .related-product-2 .related-box .related-image.related-image-fbt-slider {
    border-color: rgba(var(--theme-color-rgb), 0.25);
}

/* FBT دارک: بدون انیمیشن fadeUp روی کارت؛ فقط زوم ملایم روی تصویر با هاور */
body.dark .related-product-2 .related-box .related-image-fbt-slider .product-box.wow,
body.dark .related-product-2 .related-box .related-image-fbt-slider .product-box.animated {
    visibility: visible !important;
    animation: none !important;
    animation-name: none !important;
    animation-delay: 0s !important;
    opacity: 1 !important;
    transform: none !important;
}

body.dark .related-product-2 .related-box .related-image-fbt-slider .product-box .related-product-2__image-link img {
    transition: transform 0.35s ease;
}

body.dark .related-product-2 .related-box .related-image-fbt-slider .product-box:hover .related-product-2__image-link img {
    transform: scale(1.07);
}

/* نوار استوری هدر: در دارک مود کاملاً فعال و با opacity عادی (قبلاً عمداً کم‌رنگ شده بود) */
body.dark header .header-top.header-top--stories-bar {
    opacity: 1;
    pointer-events: auto;
}

/* 9) بندانگشتی گالری — حلقهٔ طلایی فعال */
body.dark .product-section .product-left-box .left-slider-image .slick-slide.slick-current .sidebar-image img {
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.45),
        0 0 0 2px rgba(var(--theme-color-rgb), 0.65) !important;
}

/* چک‌باکس عمومی تم */
body.dark .checkbox_animated:after {
    border-color: rgba(var(--theme-color-rgb), 0.55) !important;
    background-color: #1e1e1e !important;
}

body.dark .checkbox_animated:before {
    border-color: var(--theme-color) !important;
}

body.dark .checkbox_animated:checked:before {
    border-color: #121212 !important;
}

/* دکمهٔ افزودن به سبد دسکتاپ (قالب bg-dark) */
body.dark .cart-button.bg-dark,
body.dark .btn.bg-dark.cart-button {
    background: linear-gradient(180deg, var(--theme-color) 0%, var(--accent-gradient-end) 100%) !important;
    color: #121212 !important;
    border: 1px solid rgba(var(--theme-color-rgb), 0.85) !important;
    box-shadow: var(--accent-glow);
    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease;
}

body.dark .cart-button.bg-dark:hover,
body.dark .btn.bg-dark.cart-button:hover {
    background: linear-gradient(180deg, var(--accent-hover) 0%, var(--theme-color) 100%) !important;
    box-shadow: var(--accent-glow-strong);
    transform: translateY(-1px);
}

/* متن درصد تخفیف: قرمز + هاله طلایی */
body.dark .price .offer.theme-color,
body.dark h3 .offer.theme-color,
body.dark .sticky-cart-price-line .offer.theme-color {
    color: #ff4d4d !important;
    text-shadow: 0 0 12px rgba(var(--theme-color-rgb), 0.5);
}

/* صفحه محصول: خط جداکنندهٔ پایین .pickup-box (قالب style/dark) حذف */
.product-section .right-box-contain .pickup-box {
    border-bottom: none;
    padding-bottom: 0;
}

/*
 * صفحه محصول — لیست کد کالا / موجودی: در dark.css لینک‌ها #fff روی باکس #f9f9f9
 * سلکت حجم: گرادیان روشن‌دار + color سفید از body → متن نامرئی
 */
body.dark .product-section .right-box-contain .pickup-box .product-info .product-info-list {
    background-color: #1e1e1e !important;
    border: 1px solid rgba(var(--theme-color-rgb), 0.28);
}

body.dark .product-section .right-box-contain .pickup-box .product-info .product-info-list li {
    color: #cccccc !important;
}

body.dark .product-section .right-box-contain .pickup-box .product-info .product-info-list li a {
    color: var(--theme-color) !important;
}

body.dark .product-section .right-box-contain .pickup-box .product-info .product-info-list li a:hover {
    color: var(--accent-hover) !important;
}

body.dark .product-section .right-box-contain .pickup-box .product-info .product-info-list li::after {
    background-color: rgba(var(--theme-color-rgb), 0.75) !important;
}

body.dark .product-section .right-box-contain .product-package .select-package .form-select,
body.dark .product-section .product-package .select-package .form-control.form-select {
    color: #f5f5f5 !important;
    background: #2a2a2a linear-gradient(180deg, #333333 0%, #1e1e1e 100%) !important;
    border-color: rgba(var(--theme-color-rgb), 0.45) !important;
}

body.dark .product-section .right-box-contain .product-package .select-package .form-select:focus {
    border-color: rgba(var(--theme-color-rgb), 0.85) !important;
    box-shadow: 0 0 0 2px rgba(var(--theme-color-rgb), 0.2);
    outline: none;
}

body.dark .product-section .right-box-contain .product-package .select-package .form-select option {
    background-color: #1e1e1e;
    color: #f5f5f5;
}

body.dark.product-page-dropdown .sticky-bottom-cart .product-package--sticky .form-select {
    color: #f5f5f5 !important;
    background: #2a2a2a linear-gradient(180deg, #333333 0%, #1e1e1e 100%) !important;
    border-color: rgba(var(--theme-color-rgb), 0.45) !important;
}

body.dark.product-page-dropdown .sticky-bottom-cart .product-package--sticky .form-select option {
    background-color: #1e1e1e;
    color: #f5f5f5;
}

/* انتخاب رنگ (حلقهٔ دایره‌ای): استروک اکسنت تم — در dark.css برای :checked مقدار border-color:#222 است */
.product-section .right-box-contain .product-package .select-package.color li .form-check-input:checked ~ .form-check-label {
    border-color: var(--theme-color) !important;
    box-shadow: 0 0 0 2px rgba(var(--theme-color-rgb), 0.45);
    opacity: 1 !important;
}

/*
 * صفحات داخلی (coffee-inner-page): یکسان‌سازی فونت فارسی با index و غلبه بر font-family: «Public Sans»
 * داخل style.css روی breadcrumb، فوتر، فرم ورود و غیره. بدنه وزیرمتن؛ بقیه inherit؛ آیکن‌ها استثنا.
 */
body.coffee-inner-page {
    font-family: var(--coffee-font-family) !important;
}

body.coffee-inner-page * {
    font-family: inherit !important;
}

body.coffee-inner-page .fa,
body.coffee-inner-page .fa-solid,
body.coffee-inner-page .fa-regular,
body.coffee-inner-page .fa-brands,
body.coffee-inner-page .fas,
body.coffee-inner-page .far,
body.coffee-inner-page .fab {
    font-family: var(--fa-style-family, "Font Awesome 6 Free") !important;
}

body.coffee-inner-page .fab,
body.coffee-inner-page .fa-brands {
    font-family: "Font Awesome 6 Brands" !important;
}

body.coffee-inner-page .fa-regular,
body.coffee-inner-page .far {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 400 !important;
}

body.coffee-inner-page .fa-solid,
body.coffee-inner-page .fas {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

body.coffee-inner-page [class*="iconly-"],
body.coffee-inner-page .icli {
    font-family: "iconly" !important;
}

/* به زودی: پس‌زمینهٔ تمام‌صفحه Lottie (تم dark.jpg را غیرفعال می‌کند) */
.coming-soon-section.coming-soon-section--lottie {
    background-image: none !important;
    /* تم لایت: فallback سفید؛ تم دارک در بلوک body.dark */
    background-color: #fff;
    overflow: hidden;
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    min-height: 100dvh;
}

body.dark .coming-soon-section.coming-soon-section--lottie {
    background-color: #1b1d1f;
}

.coming-soon-section .coming-soon-lottie-background {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background-color: #fff;
}

body.dark .coming-soon-section .coming-soon-lottie-background {
    background-color: #1b1d1f;
}

.coming-soon-section .coming-soon-lottie-background lottie-player {
    display: block;
    position: absolute;
    left: 50%;
    top: 50%;
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    max-width: none;
    transform: translate(-50%, -50%) scale(1.08);
    transform-origin: center center;
}

.coming-soon-section .coming-soon-section__scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    /* تم لایت: بدون تیره‌کردن کل صفحه */
    background: rgba(255, 255, 255, 0.06);
}

body.dark .coming-soon-section .coming-soon-section__scrim {
    background: rgba(0, 0, 0, 0.28);
}

.coming-soon-section .coming-soon-section__content {
    position: relative;
    z-index: 2;
}

/* به زودی لاتی + تم دارک: جعبهٔ تایمر تیره (در لایت همان سفید/تم از dark.css) */
body.dark .coming-soon-section.coming-soon-section--lottie .coming-box .coming-timer ul li {
    background-color: rgba(42, 45, 45, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

body.dark .coming-soon-section.coming-soon-section--lottie .coming-box .coming-timer ul li .counter p {
    color: #e2e2e2 !important;
}

/*
 * به‌زودی: تایمر — چپ‌به‌راست: روز | ساعت | دقیقه | ثانیه
 * (dir="ltr" روی ul؛ html همچنان RTL است — جداکنندهٔ : را بازتعریف می‌کنیم)
 */
.coming-soon-section .coming-box .coming-timer ul.coming-soon-timer__list {
    direction: ltr;
    flex-direction: row;
}

.coming-soon-section .coming-box .coming-timer ul.coming-soon-timer__list li + li::after {
    left: calc(-10px + -7 * (100vw - 320px) / 1600) !important;
    right: auto !important;
}

.coming-soon-section .coming-box .coming-timer .days,
.coming-soon-section .coming-box .coming-timer .hours,
.coming-soon-section .coming-box .coming-timer .minutes,
.coming-soon-section .coming-box .coming-timer .seconds {
    direction: ltr;
    unicode-bidi: isolate;
}

.coming-soon-section .coming-box .coming-timer ul.coming-soon-timer__list .counter > p {
    direction: rtl;
    unicode-bidi: plaintext;
}

body.dark .coming-soon-section.coming-soon-section--lottie .coming-box .coming-title .coming-text {
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
}

.coming-soon-section.coming-soon-section--lottie .coming-soon-lead {
    font-size: calc(18px + 10 * (100vw - 320px) / 1600);
    font-weight: 600;
    line-height: 1.55;
}

/* به زودی: در تم دارک متن‌های .coming-title سفید (dark.css آن‌ها را #4a5568 می‌کند) */
body.dark .coming-soon-section .coming-box .coming-title .coming-text {
    color: #fff !important;
}

body.dark .coming-soon-section .coming-box .coming-title h2 {
    color: #fff !important;
}

/* به زودی لاتی + تم لایت: متن .coming-title (dark.css خاکستری کم‌رنگ می‌دهد) */
body.light .coming-soon-section.coming-soon-section--lottie .coming-box .coming-title .coming-text {
    color: #0d0d0d !important;
    font-weight: 600;
}

/* به زودی: آیکون‌های شبکهٔ اجتماعی به‌جای فرم خبرنامه */
.coming-soon-section .coming-contain--social {
    margin-top: calc(18px + 12 * (100vw - 320px) / 1600);
}

.coming-soon-section .coming-soon-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 10px;
    font-size: 1.15rem;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
    text-decoration: none;
    color: #ededed;
    background-color: rgba(42, 45, 45, 0.65);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

body.light .coming-soon-section .coming-soon-social-link {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.coming-soon-section .coming-soon-social-link:hover {
    transform: translateY(-2px);
}

.coming-soon-section .coming-soon-social-link.telegram-bg {
    color: #229ed9;
}

.coming-soon-section .coming-soon-social-link.telegram-bg:hover {
    background-color: #229ed9;
    color: #2a2d2d;
}

.coming-soon-section .coming-soon-social-link.whatsapp-bg {
    color: #25d366;
}

.coming-soon-section .coming-soon-social-link.whatsapp-bg:hover {
    background-color: #25d366;
    color: #2a2d2d;
}

.coming-soon-section .coming-soon-social-link.insta-bg {
    color: #f56040;
}

.coming-soon-section .coming-soon-social-link.insta-bg:hover {
    background-color: #f56040;
    color: #2a2d2d;
}

.coming-soon-section .coming-soon-social-link.youtube-bg {
    color: #ff0000;
}

.coming-soon-section .coming-soon-social-link.youtube-bg:hover {
    background-color: #ff0000;
    color: #fff;
}

/* تماس با ما: انیمیشن Lottie به‌جای PNG (عرض مثل img تم) */
.contact-box-section .left-sidebar-box .contact-image--lottie lottie-player {
    width: 60%;
    max-width: 355px;
    height: auto;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

@media (max-width: 1199px) {
    .contact-box-section .left-sidebar-box .contact-image--lottie lottie-player {
        width: 77%;
    }
}

@media (max-width: 991px) {
    .contact-box-section .left-sidebar-box .contact-image--lottie lottie-player {
        width: 60%;
        margin-bottom: calc(25px + 39 * (100vw - 320px) / 1600);
    }
}

/* دربارهٔ ما — کارت تیم: تلگرام، واتساپ، تماس (به‌جای فیسبوک/پینترست/توییتر/اینستاگرام) */
.team-section .team-box .team-name .team-media li a.telegram-bg {
    color: #229ed9;
    transition: all 0.3s ease-in-out;
}

.team-section .team-box .team-name .team-media li a.telegram-bg:hover {
    background-color: #229ed9;
    color: #2a2d2d;
}

.team-section .team-box .team-name .team-media li a.whatsapp-bg {
    color: #25d366;
    transition: all 0.3s ease-in-out;
}

.team-section .team-box .team-name .team-media li a.whatsapp-bg:hover {
    background-color: #25d366;
    color: #2a2d2d;
}

.team-section .team-box .team-name .team-media li a.phone-bg {
    color: var(--theme-color);
    transition: all 0.3s ease-in-out;
}

.team-section .team-box .team-name .team-media li a.phone-bg:hover {
    background-color: var(--theme-color);
    color: #2a2d2d;
}

/* سایدبار فیلتر فروشگاه در موبایل باید روی بقیه لایه‌ها بیاید */
@media (max-width: 991.98px) {
    .shop-section .left-box,
    .shop-section .left-box.show,
    .shop-section .left-box.wow.fadeInUp.show {
        z-index: 1200 !important;
    }
}

/* Shop categories: hide icon images in category buttons */
.shop-section .shop-left-sidebar .nav-pills .nav-link img,
.shop-section .shop-left-sidebar #pills-tab .nav-link img {
    display: none !important;
}

/* Shop category active tab: orange -> dark maroon gradient */
.shop-section .shop-left-sidebar .nav-pills .nav-link.active,
.shop-section .shop-left-sidebar #pills-tab .nav-link.active {
    background: linear-gradient(270deg, var(--theme-color, #de4e02) 0%, #6b1f1f 100%) !important;
    border-color: #6b1f1f !important;
}

