/*!
 * جغجغه - استایل اصلی
 * Mobile First / CSS Variables / Flexbox & Grid / clamp() / Logical Properties
 * پشتیبانی خودکار RTL و LTR از طریق ویژگی dir روی <html> (بدون نیاز به فایل جدا،
 * چون از خاصیت‌های Logical مثل margin-inline و text-align:start استفاده شده)
 */

/* ===================== ریست پایه ===================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--jg-font-family-fa, "Vazirmatn", Tahoma, sans-serif);
    font-size: var(--jg-font-size, 16px);
    line-height: 1.7;
    background-color: var(--jg-bg-color, #ffffff);
    color: var(--jg-text-color, #222222);
}

body[dir="ltr"] {
    font-family: var(--jg-font-family-en, Arial, sans-serif);
}

a {
    text-decoration: none;
    color: inherit;
}

.jg-single__content a,
.jg-page__content a {
    color: var(--jg-link-color, #ff6600);
    text-decoration: underline;
}

.jg-single__content a:hover,
.jg-page__content a:hover {
    color: var(--jg-link-hover, #cc5200);
}

img {
    max-width: 100%;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    inset-inline-start: -9999px;
    top: 0;
    z-index: 10000;
    background: var(--jg-primary-color, #ff6600);
    color: #fff;
    padding: 10px 16px;
}

.skip-link:focus {
    inset-inline-start: 10px;
}

/* Focus state استاندارد برای Accessibility (WCAG) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--jg-focus-color, var(--jg-primary-color, #ff6600));
    outline-offset: 2px;
}

/* ===================== Dark Mode ===================== */
body.jg-dark-mode {
    --jg-bg-color: #121212;
    --jg-text-color: #eaeaea;
    --jg-header-bg: rgba(20, 20, 20, 0.7);
    background-color: var(--jg-bg-color);
    color: var(--jg-text-color);
}

body.jg-dark-mode .jg-card,
body.jg-dark-mode .jg-cart-drawer,
body.jg-dark-mode .jg-mobile-menu {
    background-color: #1c1c1c;
    border-color: #2c2c2c;
}

/* ===================== Container ===================== */
.jg-container {
    max-width: var(--jg-container-width, 100%);
    width: 100%;
    margin-inline: auto;
    padding-inline: clamp(16px, 4vw, 24px);
}

/* در حالت Boxed یک سقف منطقی هم می‌ذاریم */
:root {
    --jg-boxed-max: 1320px;
}
body:has(.jg-container) .jg-container {
    max-width: min(var(--jg-container-width, 100%), var(--jg-boxed-max));
}

/* ===================== دکمه‌ها ===================== */
.jg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 600;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.jg-btn--primary {
    background-color: var(--jg-button-color, var(--jg-primary-color, #ff6600));
    color: #fff;
}

.jg-btn--primary:hover {
    background-color: var(--jg-button-hover, #e65c00);
}

.jg-btn--outline {
    background: transparent;
    border-color: var(--jg-button-color, var(--jg-primary-color, #ff6600));
    color: var(--jg-button-color, var(--jg-primary-color, #ff6600));
}

/* ===================== هدر ===================== */
.jg-header {
    position: relative;
    z-index: 999;
    width: 100%;
    background-color: var(--jg-bg-color, #fff);
    border-block-end: 1px solid rgba(0, 0, 0, 0.06);
}

.jg-header.is-sticky {
    position: sticky;
    top: 0;
}

/* ===================== Liquid Glass (سطح شیشه‌ای اپل) ===================== */
.jg-header.is-glass {
    position: relative;
    overflow: hidden;
    background: var(--jg-header-bg, rgba(255, 255, 255, 0.08));
    backdrop-filter: blur(var(--jg-header-blur, 40px)) saturate(220%) contrast(1.05) brightness(1.08);
    -webkit-backdrop-filter: blur(var(--jg-header-blur, 40px)) saturate(220%) contrast(1.05) brightness(1.08);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow:
        0 1px 1px rgba(255, 255, 255, 0.6) inset,
        0 -1px 1px rgba(0, 0, 0, 0.05) inset,
        0 8px 16px rgba(0, 0, 0, 0.06),
        0 24px 48px rgba(0, 0, 0, 0.14);
}

/* حالت شناور (وقتی هم شیشه‌ای هم Sticky باشه) - فرم کپسولی/گرد که حس شیشه‌ی فیزیکی رو زیاد می‌کنه */
.jg-header.is-glass.is-sticky {
    top: 20px;
    margin-inline: auto;
    width: min(1200px, calc(100% - 32px));
    border-radius: 28px;
}

/* لایه‌ی «لنز نور» - یه نقطه‌ی نور بزرگ و منحنی بالا-چپ که حس تحدب شیشه‌ی واقعی رو می‌ده
   (به‌جای یه گرادیان صاف که فقط شبیه یه لایه‌ی سفید روی شیشه‌ست) */
.jg-header.is-glass::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(140% 100% at 15% -20%, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.15) 35%, rgba(255, 255, 255, 0) 60%),
        radial-gradient(100% 60% at 100% 120%, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 55%);
    mix-blend-mode: overlay;
}

/* لایه‌ی «شکست نور» - نقاط محو رنگی که عمق و بی‌قاعدگی سطح شیشه رو شبیه‌سازی می‌کنن */
.jg-header.is-glass::after {
    content: "";
    position: absolute;
    inset: -60%;
    pointer-events: none;
    background:
        radial-gradient(circle at 18% 25%, rgba(255, 255, 255, 0.25), transparent 30%),
        radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.18), transparent 25%),
        radial-gradient(circle at 60% 110%, rgba(255, 255, 255, 0.14), transparent 35%);
    filter: blur(24px);
}

/* دارک‌مود - هم برای ترجیح سیستم‌عامل، هم برای سوییچ دستی دارک‌مود قالب */
@media (prefers-color-scheme: dark) {
    .jg-header.is-glass {
        background: var(--jg-header-bg, rgba(18, 18, 20, 0.35));
        border-color: rgba(255, 255, 255, 0.14);
    }
    .jg-header.is-glass::before {
        background:
            radial-gradient(140% 100% at 15% -20%, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.05) 35%, rgba(255, 255, 255, 0) 60%),
            radial-gradient(100% 60% at 100% 120%, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 55%);
    }
}

body.jg-dark-mode .jg-header.is-glass {
    background: var(--jg-header-bg, rgba(18, 18, 20, 0.35));
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow:
        0 1px 1px rgba(255, 255, 255, 0.12) inset,
        0 -1px 1px rgba(0, 0, 0, 0.4) inset,
        0 8px 16px rgba(0, 0, 0, 0.3),
        0 24px 48px rgba(0, 0, 0, 0.45);
}

body.jg-dark-mode .jg-header.is-glass::before {
    background:
        radial-gradient(140% 100% at 15% -20%, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.05) 35%, rgba(255, 255, 255, 0) 60%),
        radial-gradient(100% 60% at 100% 120%, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 55%);
}

.jg-header.is-transparent {
    position: absolute;
    inset-inline: 0;
    top: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.jg-header__row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-block: 12px;
}

.jg-mobile-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    padding: 0;
}

.jg-mobile-toggle span {
    display: block;
    height: 2px;
    background: var(--jg-text-color, #222);
    border-radius: 2px;
}

.jg-header__logo img {
    height: var(--jg-logo-height, 50px);
    width: auto;
}

.jg-header__logo a {
    font-weight: bold;
    font-size: 20px;
}

.jg-header__search {
    flex: 1;
    max-width: 420px;
    position: relative;
}

.jg-ajax-search-form {
    position: relative;
    display: flex;
}

.jg-ajax-search-form input[type="search"] {
    width: 100%;
    padding: 9px 40px 9px 14px;
    border-radius: 20px;
    border: 1px solid #ddd;
    background: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.jg-ajax-search-form button {
    position: absolute;
    inset-inline-end: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    width: 28px;
    height: 28px;
}

.jg-ajax-search-results {
    position: absolute;
    top: calc(100% + 6px);
    inset-inline: 0;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    max-height: 360px;
    overflow-y: auto;
    z-index: 50;
}

.jg-ajax-search-results a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    font-size: 13px;
}

.jg-ajax-search-results a:hover {
    background: rgba(0, 0, 0, 0.04);
}

.jg-ajax-search-results img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
}

.jg-header__actions,
.jg-header__row-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-inline-start: auto;
}

.jg-header__actions > a,
.jg-header__actions > button,
.jg-header__row-actions > a,
.jg-header__row-actions > button {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    background: none;
    border: none;
    color: inherit;
}

.jg-header__label {
    display: none;
}

@media (min-width: 992px) {
    .jg-header__label {
        display: inline;
    }
}

.jg-cart-count {
    position: absolute;
    top: -6px;
    inset-inline-end: -8px;
    background: var(--jg-primary-color, #ff6600);
    color: #fff;
    font-size: 10px;
    border-radius: 50%;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ردیف پایین هدر - منو */
.jg-header__row--bottom {
    padding-block: 8px;
}

.jg-header__menu {
    display: none;
}

@media (min-width: 992px) {
    .jg-header__menu {
        display: block;
    }
}

.jg-menu {
    display: flex;
    align-items: center;
    gap: 22px;
}

.jg-menu > li {
    position: relative;
}

.jg-menu > li > a {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-block: 10px;
    font-size: 14px;
    color: var(--jg-menu-text-color, #222);
}

.jg-menu > li > a:hover,
.jg-menu > li.current-menu-item > a {
    color: var(--jg-menu-hover-color, var(--jg-primary-color, #ff6600));
}

.jg-menu-arrow {
    width: 6px;
    height: 6px;
    border-inline-end: 1.5px solid currentColor;
    border-block-end: 1.5px solid currentColor;
    transform: rotate(45deg);
    margin-block-start: -3px;
}

/* زیرمنو معمولی */
.jg-menu .jg-submenu {
    position: absolute;
    top: 100%;
    inset-inline-start: 0;
    background: #fff;
    min-width: 200px;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: all .18s ease;
    z-index: 40;
}

.jg-menu > li:hover > .jg-submenu,
.jg-menu > li:focus-within > .jg-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.jg-menu .jg-submenu a {
    display: block;
    padding: 8px 10px;
    font-size: 13px;
    border-radius: 6px;
}

.jg-menu .jg-submenu a:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* مگامنو */
.jg-menu > li.jg-mega-menu {
    position: static;
}

.jg-menu > li.jg-mega-menu > .jg-submenu {
    inset-inline: 0;
    width: 100%;
    max-width: var(--jg-boxed-max);
    margin-inline: auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 20px;
}

.jg-header__contact {
    display: none;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--jg-primary-color, #ff6600);
}

@media (min-width: 992px) {
    .jg-header__contact {
        display: flex;
    }
}

/* ===================== منوی موبایل ===================== */
.jg-mobile-menu {
    position: fixed;
    top: 0;
    inset-inline-start: 0;
    height: 100dvh;
    width: min(320px, 85vw);
    background: #fff;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform .25s ease;
    overflow-y: auto;
}

[dir="rtl"] .jg-mobile-menu {
    transform: translateX(100%);
}

.jg-mobile-menu.is-open {
    transform: translateX(0);
}

.jg-mobile-menu[hidden] {
    display: flex; /* JS با کلاس is-open کنترل می‌کنه، hidden فقط حالت اولیه‌ست */
}

.jg-mobile-menu__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-block-end: 1px solid #eee;
    font-weight: bold;
}

.jg-mobile-menu__close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
}

.jg-mobile-menu__list li {
    border-block-end: 1px solid #f2f2f2;
}

.jg-mobile-menu__list a {
    display: block;
    padding: 14px 16px;
    font-size: 14px;
}

.jg-mobile-menu__whatsapp {
    margin: 16px;
    margin-block-start: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #25d366;
    color: #fff;
    padding: 12px;
    border-radius: 8px;
}

.jg-mobile-menu__overlay,
.jg-cart-drawer__overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease;
}

.jg-mobile-menu__overlay.is-visible,
.jg-cart-drawer__overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

/* ===================== Drawer سبد خرید ===================== */
.jg-cart-drawer {
    position: fixed;
    top: 0;
    inset-inline-end: 0;
    height: 100dvh;
    width: min(380px, 90vw);
    background: #fff;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform .25s ease;
}

[dir="rtl"] .jg-cart-drawer {
    transform: translateX(-100%);
}

.jg-cart-drawer.is-open {
    transform: translateX(0);
}

.jg-cart-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-block-end: 1px solid #eee;
    font-weight: bold;
}

.jg-cart-drawer__close {
    background: none;
    border: none;
    font-size: 24px;
}

.jg-cart-drawer__content {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
}

.jg-cart-drawer__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-block: 10px;
    border-block-end: 1px solid #f2f2f2;
}

.jg-cart-drawer__item img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
}

.jg-cart-drawer__item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
}

.jg-cart-drawer__remove {
    font-size: 18px;
    color: #c00;
}

.jg-cart-drawer__footer {
    padding: 16px;
    border-block-start: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.jg-cart-drawer__subtotal {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
}

.jg-cart-drawer__empty {
    text-align: center;
    padding: 40px 10px;
    color: #888;
}

/* ===================== صفحه اصلی - عمومی ===================== */
.jg-section {
    padding-block: clamp(24px, 5vw, 48px);
}

.jg-section-title {
    font-size: clamp(18px, 2.2vw, 24px);
    font-weight: bold;
    margin-block: 0 18px;
    color: var(--jg-text-color, #222);
}

.jg-grid {
    display: grid;
    gap: clamp(10px, 2vw, 20px);
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 576px) {
    .jg-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 992px) {
    .jg-grid { grid-template-columns: repeat(4, 1fr); }
}

.jg-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow .2s ease, transform .2s ease;
}

.jg-card:hover {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* ===================== اسلایدر اصلی ===================== */
.jg-hero-slider {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    margin-block-start: 16px;
}

.jg-hero-slider__track {
    display: flex;
    transition: transform .4s ease;
}

.jg-hero-slider__slide {
    min-width: 100%;
}

.jg-hero-slider__slide img {
    width: 100%;
    aspect-ratio: 16/6;
    object-fit: cover;
}

.jg-hero-slider__prev,
.jg-hero-slider__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 18px;
}

.jg-hero-slider__prev { inset-inline-start: 12px; }
.jg-hero-slider__next { inset-inline-end: 12px; }

.jg-hero-slider__dots {
    position: absolute;
    bottom: 12px;
    inset-inline: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.jg-hero-slider__dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
}

.jg-hero-slider__dots span.is-active {
    background: #fff;
}

/* ===================== دسته‌بندی‌ها ===================== */
.jg-category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 14px;
    gap: 8px;
}

.jg-category-card img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.jg-category-card__name {
    font-size: 13px;
    font-weight: 600;
}

/* ===================== کارت محصول ===================== */
.jg-product-card {
    display: flex;
    flex-direction: column;
    position: relative;
}

.jg-product-card__link {
    display: block;
    padding: 10px;
}

.jg-product-card img {
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 8px;
}

.jg-badge {
    position: absolute;
    top: 10px;
    inset-inline-start: 10px;
    background: var(--jg-sale-badge-bg, var(--jg-primary-color, #ff6600));
    color: var(--jg-sale-badge-text, #fff);
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 6px;
}

.jg-product-card__title {
    font-size: 13px;
    font-weight: 600;
    margin-block: 8px 4px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.jg-product-card__price {
    font-size: 14px;
    font-weight: bold;
    color: var(--jg-price-color, var(--jg-primary-color, #ff6600));
}

.jg-product-card__price del {
    color: #999;
    font-weight: normal;
    font-size: 12px;
    margin-inline-end: 6px;
}

.jg-product-card__actions {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px 10px;
    margin-block-start: auto;
}

.jg-product-card__actions .button,
.jg-product-card__actions .add_to_cart_button {
    flex: 1;
    text-align: center;
    padding: 8px;
    border-radius: 6px;
    background: var(--jg-button-color, var(--jg-primary-color, #ff6600));
    color: #fff;
    font-size: 12px;
}

.jg-product-card__quickview {
    background: #f4f4f4;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    flex-shrink: 0;
}

/* ===================== برندها ===================== */
.jg-brands__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-around;
    gap: 24px;
}

.jg-brands__item img {
    max-height: 48px;
    width: auto;
    filter: grayscale(1);
    opacity: .7;
    transition: all .2s ease;
}

.jg-brands__item:hover img {
    filter: none;
    opacity: 1;
}

/* ===================== بنرها ===================== */
.jg-banners__row {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .jg-banners__row {
        grid-template-columns: 1fr 1fr;
    }
}

.jg-banners__item img {
    border-radius: 12px;
    width: 100%;
    aspect-ratio: 21/9;
    object-fit: cover;
}

/* ===================== تستیمونیال ===================== */
.jg-testimonials__row {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .jg-testimonials__row {
        grid-template-columns: repeat(3, 1fr);
    }
}

.jg-testimonials__item {
    background: #f8f8f8;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.jg-testimonials__avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    margin-inline: auto;
    margin-block-end: 10px;
}

.jg-testimonials__text {
    font-size: 13px;
    color: #555;
}

.jg-testimonials__name {
    font-size: 13px;
    font-weight: bold;
}

/* ===================== وبلاگ ===================== */
.jg-blog-card {
    padding-block-end: 12px;
}

.jg-blog-card__title {
    font-size: 14px;
    margin: 10px 12px 4px;
}

.jg-blog-card__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #888;
    margin: 0 12px 10px;
}

/* ===================== خبرنامه ===================== */
.jg-newsletter {
    background: var(--jg-secondary-color, #2b2b2b);
    color: #fff;
    padding: 30px clamp(16px, 4vw, 24px);
    border-radius: 12px;
    text-align: center;
}

.jg-newsletter--compact {
    background: transparent;
    color: inherit;
    padding: 0;
    text-align: start;
}

.jg-newsletter__form {
    display: flex;
    gap: 8px;
    max-width: 420px;
    margin-inline: auto;
    margin-block-start: 14px;
    flex-wrap: wrap;
}

.jg-newsletter--compact .jg-newsletter__form {
    margin-inline: 0;
}

.jg-newsletter__form input {
    flex: 1;
    min-width: 160px;
    padding: 10px 14px;
    border-radius: 8px;
    border: none;
}

.jg-newsletter__message {
    width: 100%;
    font-size: 12px;
    margin: 4px 0 0;
}

/* ===================== اینستاگرام ===================== */
.jg-instagram__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

@media (min-width: 768px) {
    .jg-instagram__grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.jg-instagram__item img {
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 8px;
}

/* ===================== سوالات متداول ===================== */
.jg-faq__item {
    border-block-end: 1px solid #eee;
}

.jg-faq__question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    padding: 14px 4px;
    font-size: 14px;
    font-weight: 600;
    text-align: start;
}

.jg-faq__icon {
    width: 8px;
    height: 8px;
    border-inline-end: 2px solid currentColor;
    border-block-end: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform .2s ease;
    flex-shrink: 0;
}

.jg-faq__question[aria-expanded="true"] .jg-faq__icon {
    transform: rotate(225deg);
}

.jg-faq__answer {
    padding: 0 4px 14px;
    font-size: 13px;
    color: #555;
}

/* ===================== فوتر ===================== */
.jg-footer {
    margin-block-start: 50px;
    background: var(--jg-footer-bg, #f7f7f7);
    color: var(--jg-footer-text, #666666);
}

body.jg-dark-mode .jg-footer {
    background: #181818;
}

.jg-footer__grid {
    display: grid;
    gap: 24px;
    grid-template-columns: 1fr;
    padding-block: 40px;
}

@media (min-width: 768px) {
    .jg-footer__grid {
        grid-template-columns: 2fr 1fr 1fr 1.4fr;
    }
}

.jg-footer__title {
    font-size: 15px;
    margin-block: 0 12px;
}

.jg-footer__col--about p {
    font-size: 13px;
    line-height: 1.9;
    color: inherit;
}

.jg-footer__social {
    display: flex;
    gap: 10px;
    margin-block-start: 10px;
}

.jg-footer__social a {
    font-size: 12px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.jg-footer__bottom-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-block: 16px;
    border-block-start: 1px solid #e5e5e5;
    font-size: 12px;
    color: #777;
}

/* ===================== بازگشت به بالا ===================== */
.jg-back-to-top {
    position: fixed;
    bottom: 20px;
    inset-inline-end: 20px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--jg-primary-color, #ff6600);
    color: #fff;
    border: none;
    font-size: 18px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease;
    z-index: 500;
}

.jg-back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
}

/* ===================== نوار پایین موبایل ===================== */
.jg-mobile-bottom-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    inset-inline: 0;
    background: #fff;
    border-block-start: 1px solid #eee;
    z-index: 900;
    padding-block: 6px;
}

@media (min-width: 992px) {
    .jg-mobile-bottom-bar {
        display: none;
    }
}

.jg-mobile-bottom-bar a,
.jg-mobile-bottom-bar button {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 10px;
    background: none;
    border: none;
    color: inherit;
    position: relative;
}

.jg-mobile-bottom-bar .jg-cart-count {
    top: -2px;
    inset-inline-end: 18%;
}

body:has(.jg-mobile-bottom-bar) {
    padding-block-end: 56px;
}

@media (min-width: 992px) {
    body:has(.jg-mobile-bottom-bar) {
        padding-block-end: 0;
    }
}

/* ===================== breadcrumb ===================== */
.jg-breadcrumb {
    padding-block: 12px;
    font-size: 12px;
    color: #888;
}

.jg-breadcrumb__list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.jg-breadcrumb__item:not(:last-child)::after {
    content: "/";
    margin-inline-start: 6px;
}

/* ===================== Quick View مودال ===================== */
.jg-quickview-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease;
}

.jg-quickview-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.jg-quickview-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.jg-quickview-modal__box {
    position: relative;
    background: #fff;
    border-radius: 12px;
    max-width: 720px;
    width: 92%;
    max-height: 86vh;
    overflow-y: auto;
    padding: 24px;
}

.jg-quickview-modal__close {
    position: absolute;
    top: 12px;
    inset-inline-end: 12px;
    background: none;
    border: none;
    font-size: 22px;
}

/* ===================== Skeleton Loading (Performance/UX) ===================== */
.jg-skeleton {
    background: linear-gradient(90deg, #eee 25%, #f5f5f5 37%, #eee 63%);
    background-size: 400% 100%;
    animation: jg-skeleton-loading 1.4s ease infinite;
    border-radius: 8px;
}

@keyframes jg-skeleton-loading {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

/* ===================== انیمیشن ورود ملایم برای بخش‌ها ===================== */
@media (prefers-reduced-motion: no-preference) {
    .jg-section {
        animation: jg-fade-in .5s ease both;
    }
}

@keyframes jg-fade-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===================== صفحات عمومی (تک‌پست/برگه/جستجو/۴۰۴/فروشگاه) ===================== */
.jg-shop__header,
.jg-single__header,
.jg-search-results h1 {
    padding-block: 20px 10px;
}

.jg-single__thumbnail img,
.jg-page__thumbnail img {
    border-radius: 12px;
    margin-block-end: 16px;
}

.jg-single__content,
.jg-page__content {
    font-size: 15px;
    line-height: 2;
}

.jg-single__meta time {
    font-size: 13px;
    color: #888;
}

.jg-404 {
    text-align: center;
    padding-block: 60px;
}

.jg-404 form {
    max-width: 380px;
    margin: 20px auto;
}

.jg-comments {
    margin-block-start: 40px;
    padding-block-start: 24px;
    border-block-start: 1px solid #eee;
}

.jg-comments__list {
    margin: 0;
    padding: 0;
}

.jg-shop__toolbar {
    margin-block-end: 16px;
}

/* ===================== Quick View داخلی ===================== */
.jg-quickview {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .jg-quickview {
        grid-template-columns: 1fr 1fr;
    }
}

.jg-quickview__price {
    font-size: 18px;
    font-weight: bold;
    color: var(--jg-primary-color, #ff6600);
    margin-block: 10px;
}

/* ===================== نوار پیشرفت موجودی (Stock Progress) ===================== */
.jg-stock-progress {
    margin: 6px 10px 0;
    background: #eee;
    border-radius: 6px;
    height: 6px;
    position: relative;
    overflow: hidden;
}

.jg-stock-progress__bar {
    height: 100%;
    width: var(--jg-stock-percent, 0%);
    background: linear-gradient(90deg, #ff6600, #ff2d2d);
    border-radius: 6px;
    transition: width .3s ease;
}

.jg-stock-progress__label {
    display: block;
    font-size: 11px;
    color: #d43c1f;
    margin-block-start: 4px;
    padding-inline: 10px;
}

/* ===================== امتیاز ستاره‌ای (ویجت نظرات مشتریان المنتور) ===================== */
.jg-testimonials__rating {
    font-size: 15px;
    letter-spacing: 2px;
    margin-block-end: 6px;
}

/* ===================== پیغام حالت خالی در ادیتور المنتور (مشترک بین همه‌ی ویجت‌ها) ===================== */
.jg-elementor-empty-notice {
    padding: 20px;
    text-align: center;
    background: #f5f5f5;
    border-radius: 8px;
    color: #888;
    font-size: 13px;
}

/* ===================== افکت شیشه‌ای همه‌جا (وقتی از تنظیمات قالب فعال بشه) ===================== */

/* دکمه‌های شیشه‌ای (Glass Button) */
body.jg-glass-everywhere .jg-btn {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(24px) saturate(220%) contrast(1.05) brightness(1.08);
    -webkit-backdrop-filter: blur(24px) saturate(220%) contrast(1.05) brightness(1.08);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    color: var(--jg-text-color, #111);
    box-shadow:
        0 1px 1px rgba(255, 255, 255, 0.6) inset,
        0 -1px 1px rgba(0, 0, 0, 0.05) inset,
        0 6px 16px rgba(0, 0, 0, 0.1);
    transition: background-color .25s ease, transform .25s ease, box-shadow .25s ease;
}

body.jg-glass-everywhere .jg-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(140% 160% at 20% -30%, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.1) 40%, rgba(255, 255, 255, 0) 65%);
    mix-blend-mode: overlay;
}

body.jg-glass-everywhere .jg-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
    box-shadow:
        0 1px 1px rgba(255, 255, 255, 0.7) inset,
        0 -1px 1px rgba(0, 0, 0, 0.05) inset,
        0 10px 24px rgba(0, 0, 0, 0.14);
}

body.jg-glass-everywhere.jg-dark-mode .jg-btn {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.14);
}

/* پنل‌های شیشه‌ای (کارت محصول/مقاله) - همون دستور هدر، با شعاع گوشه‌ی مناسب کارت */
body.jg-glass-everywhere .jg-product-card,
body.jg-glass-everywhere .jg-blog-card,
body.jg-glass-everywhere .jg-card {
    position: relative;
    overflow: hidden;
    background: var(--jg-glass-bg, rgba(255, 255, 255, 0.08));
    backdrop-filter: blur(var(--jg-glass-blur, 32px)) saturate(220%) contrast(1.05) brightness(1.08);
    -webkit-backdrop-filter: blur(var(--jg-glass-blur, 32px)) saturate(220%) contrast(1.05) brightness(1.08);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    box-shadow:
        0 1px 1px rgba(255, 255, 255, 0.6) inset,
        0 -1px 1px rgba(0, 0, 0, 0.05) inset,
        0 8px 16px rgba(0, 0, 0, 0.06),
        0 20px 40px rgba(0, 0, 0, 0.1);
}

/* لایه‌ی «لنز نور» بالای کارت - همون افکت منحنی هدر */
body.jg-glass-everywhere .jg-product-card::before,
body.jg-glass-everywhere .jg-blog-card::before,
body.jg-glass-everywhere .jg-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(140% 100% at 15% -20%, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.12) 35%, rgba(255, 255, 255, 0) 60%);
    mix-blend-mode: overlay;
}

body.jg-glass-everywhere.jg-dark-mode .jg-product-card,
body.jg-glass-everywhere.jg-dark-mode .jg-blog-card,
body.jg-glass-everywhere.jg-dark-mode .jg-card {
    background: rgba(18, 18, 20, 0.35);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow:
        0 1px 1px rgba(255, 255, 255, 0.12) inset,
        0 -1px 1px rgba(0, 0, 0, 0.4) inset,
        0 8px 16px rgba(0, 0, 0, 0.3),
        0 20px 40px rgba(0, 0, 0, 0.4);
}

body.jg-glass-everywhere.jg-dark-mode .jg-product-card::before,
body.jg-glass-everywhere.jg-dark-mode .jg-blog-card::before,
body.jg-glass-everywhere.jg-dark-mode .jg-card::before {
    background: radial-gradient(140% 100% at 15% -20%, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.05) 35%, rgba(255, 255, 255, 0) 60%);
}

/* ===================== بنر عنوان برگه ===================== */
.jg-page-title-banner {
    background-color: var(--jg-title-bg, #f7f7f7);
    color: var(--jg-title-color, #222);
    min-height: var(--jg-title-height, 140px);
    text-align: var(--jg-title-align, center);
    display: flex;
    align-items: center;
    margin-block-end: 30px;
}

.jg-page-title-banner.has-bg-image {
    background-image: var(--jg-title-bg-image);
    background-size: cover;
    background-position: center;
}

.jg-page-title-banner__heading {
    font-size: clamp(22px, 3vw, 32px);
    margin: 0 0 8px;
}

.jg-page-title-banner .jg-breadcrumb {
    padding-block: 0;
}

/* ===================== سوییچ گرید/لیست آرشیو محصولات ===================== */
.jg-shop__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.jg-view-switcher {
    display: flex;
    gap: 4px;
}

.jg-view-switcher__btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.jg-view-switcher__btn.is-active {
    background: var(--jg-primary-color, #ff6600);
    color: #fff;
    border-color: var(--jg-primary-color, #ff6600);
}

/* حالت لیست: کارت محصول به‌صورت افقی */
.jg-grid--list {
    grid-template-columns: 1fr !important;
}

.jg-grid--list .jg-product-card {
    flex-direction: row;
}

.jg-grid--list .jg-product-card__link {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    padding: 12px;
}

.jg-grid--list .jg-product-card__link img {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.jg-grid--list .jg-product-card__title {
    -webkit-line-clamp: unset;
}

.jg-archive-subcategories {
    margin-block-end: 24px;
    padding-block-end: 24px;
    border-block-end: 1px solid #eee;
}

/* ===================== نوار پیشرفت ارسال رایگان ===================== */
.jg-shipping-progress {
    padding: 12px;
    background: #f7f7f7;
    border-radius: 8px;
    margin-block-end: 14px;
}

.jg-shipping-progress__label {
    font-size: 12px;
    margin: 0 0 8px;
    text-align: center;
}

.jg-shipping-progress__label--done {
    color: #2e7d32;
    font-weight: 600;
}

.jg-shipping-progress__bar {
    height: 6px;
    background: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.jg-shipping-progress__fill {
    height: 100%;
    width: var(--jg-shipping-percent, 0%);
    background: linear-gradient(90deg, var(--jg-primary-color, #ff6600), #2e7d32);
    transition: width .3s ease;
}

/* ===================== شمارش معکوس محصول ===================== */
.jg-countdown {
    display: flex;
    gap: 8px;
    margin-block: 8px;
}

.jg-countdown__unit {
    background: var(--jg-secondary-color, #2b2b2b);
    color: #fff;
    border-radius: 6px;
    padding: 6px 8px;
    text-align: center;
    min-width: 44px;
}

.jg-countdown__unit span {
    display: block;
    font-size: 15px;
    font-weight: bold;
}

.jg-countdown__unit small {
    font-size: 9px;
    opacity: .8;
}

/* ===================== نوار اعلان بالای هدر ===================== */
.jg-announcement-bar {
    background: var(--jg-secondary-color, #2b2b2b);
    color: #fff;
    text-align: center;
    font-size: 13px;
    padding-block: 8px;
}

.jg-announcement-bar a {
    color: inherit;
}

/* ===================== برند محصول (تک‌محصول) ===================== */
.jg-product-brand {
    margin-block-end: 10px;
}

.jg-product-brand__link img {
    max-height: 32px;
    width: auto;
}

.jg-catalog-notice {
    color: #888;
    font-size: 13px;
    font-style: italic;
}
