/* سایت عمومی: متن محتوا (مقاله/صفحه) — جایگزین افزونه‌ی typography */
body { font-family: 'Vazirmatn', Tahoma, sans-serif; }
.content-body { line-height: 2.1; font-size: 1rem; color: inherit; overflow-wrap: anywhere; }
.content-body > * + * { margin-top: 1.1rem; }
.content-body h2 { font-size: 1.5rem; font-weight: 800; margin-top: 2.2rem; line-height: 1.6; }
.content-body h3 { font-size: 1.2rem; font-weight: 700; margin-top: 1.8rem; line-height: 1.7; }
.content-body h4, .content-body h5 { font-weight: 700; margin-top: 1.4rem; }
.content-body ul { list-style: disc; padding-right: 1.5rem; }
.content-body ol { list-style: decimal; padding-right: 1.5rem; }
.content-body li + li { margin-top: .35rem; }
.content-body a { color: #4338ca; text-decoration: underline; text-underline-offset: 3px; }
.dark .content-body a { color: #a5b4fc; }
.content-body img { max-width: 100%; height: auto; border-radius: .75rem; margin-inline: auto; }
.content-body figure { text-align: center; }
.content-body figcaption { font-size: .85rem; opacity: .7; margin-top: .4rem; }
.content-body blockquote { border-right: 4px solid #818cf8; padding: .4rem 1rem; background: rgba(99,102,241,.07); border-radius: .5rem; }
.content-body table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.content-body th, .content-body td { border: 1px solid rgba(148,163,184,.5); padding: .5rem .75rem; text-align: right; }
.content-body th { background: rgba(148,163,184,.15); }
.content-body pre, .content-body code { direction: ltr; text-align: left; background: rgba(148,163,184,.15); border-radius: .4rem; }
.content-body code { padding: .1rem .35rem; font-size: .9em; }
.content-body pre { padding: .8rem 1rem; overflow-x: auto; }
.hero-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; }
.hero-track::-webkit-scrollbar { display: none; }
.hero-slide { flex: 0 0 100%; scroll-snap-align: start; }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details[open] > summary .chev { transform: rotate(180deg); }

/* ---------- لایه‌های موبایل: سایدبار از راست (.drawer) و شیت از پایین (.sheet) ---------- */
html.nav-lock { overflow: hidden; }
.layer { pointer-events: none; }
.layer.is-open { pointer-events: auto; }
.layer [data-layer-overlay] { opacity: 0; transition: opacity .25s ease; }
.layer.is-open [data-layer-overlay] { opacity: 1; }
.layer [data-layer-panel] { visibility: hidden; transition: transform .28s ease, visibility 0s linear .28s; }
.layer.drawer [data-layer-panel] { transform: translateX(100%); }
.layer.drawer-left [data-layer-panel] { transform: translateX(-100%); }
.layer.sheet [data-layer-panel] { transform: translateY(100%); height: 85vh; height: 85dvh; }
.layer.is-open [data-layer-panel] { transform: none; visibility: visible; transition-delay: 0s; }
@media (prefers-reduced-motion: reduce) {
    .layer [data-layer-overlay], .layer [data-layer-panel] { transition: none; }
}

/* نوار پایین موبایل (فوتر ناوبری): جا برای محتوا */
@media (max-width: 1023.98px) {
    body { padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- اسلایدر محصولات (Swiper) ---------- */
.ps-btn { width: 2.25rem; height: 2.25rem; display: inline-grid; place-items: center; border-radius: 9999px; color: #64748b; transition: background-color .15s, color .15s; }
.ps-btn:hover { background: rgba(100,116,139,.15); color: #0f172a; }
.dark .ps-btn:hover { color: #fff; }
.ps-btn.swiper-button-disabled { opacity: .3; pointer-events: none; }
.ps-btn.swiper-button-lock { display: none; }
.product-swiper .swiper-slide { height: auto; }

/* ---------- نوار برندها: سیاه‌وسفید ← رنگی با هاور؛ حرکت پیوسته‌ی آرام (Swiper) ---------- */
.brands-swiper { --swiper-wrapper-transition-timing-function: linear; }
.brands-swiper .swiper-wrapper { transition-timing-function: linear; align-items: center; }
.brands-swiper .brand-slide { width: 9rem; flex-shrink: 0; display: grid; place-items: center; }
.brands-swiper:not(.is-marquee) .swiper-wrapper { flex-wrap: wrap; justify-content: center; gap: 1.5rem 2rem; }
.brand-logo { display: grid; place-items: center; width: 100%; height: 4rem; padding: 0 .5rem; }
.brand-logo img { max-height: 3.25rem; max-width: 100%; width: auto; height: auto; object-fit: contain;
    filter: grayscale(1); opacity: .6; transition: filter .3s ease, opacity .3s ease, transform .3s ease; }
.brand-logo:hover img, .brand-logo:focus-visible img { filter: none; opacity: 1; transform: scale(1.06); }
@media (prefers-reduced-motion: reduce) { .brand-logo img { transition: none; } }

/* ---------- مودال مشاهده‌ی سریع (از سیستم لایه‌ها) ---------- */
.layer.modal [data-layer-panel] { opacity: 0; transform: scale(.97); transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s; }
.layer.modal.is-open [data-layer-panel] { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .layer.modal [data-layer-panel] { transition: none; } }

/* ---------- انتخاب واریانت دکمه‌ای: رنگ / متن (سایز) / تصویر (طرح، تمپ) ---------- */
.vp-opt { cursor: pointer; transition: box-shadow .15s, border-color .15s, background-color .15s, opacity .15s; }
.vp-opt:focus-visible { outline: 2px solid #e11d48; outline-offset: 2px; }
.vp-opt:disabled { opacity: .3; cursor: not-allowed; }
.vp-opt[data-oos] { opacity: .55; }
.vp-chip { padding: .45rem 1rem; border-radius: .6rem; border: 1px solid #cbd5e1; font-size: .875rem; background: #fff; color: #0f172a; }
.dark .vp-chip { background: #334155; border-color: #475569; color: #f1f5f9; }
.vp-chip[aria-pressed="true"] { border-color: #e11d48; color: #e11d48; box-shadow: 0 0 0 1px #e11d48; background: #fff1f2; }
.dark .vp-chip[aria-pressed="true"] { background: #4c0519; color: #fda4af; }
.vp-swatch { width: 2.25rem; height: 2.25rem; border-radius: 9999px; border: 2px solid #fff; box-shadow: 0 0 0 1px #cbd5e1; }
.vp-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px #e11d48; }
.vp-thumb { width: 4.5rem; padding: 3px; border-radius: .75rem; border: 2px solid #e2e8f0; background: #fff; text-align: center; color: #0f172a; }
.dark .vp-thumb { background: #334155; border-color: #475569; color: #f1f5f9; }
.vp-thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: .5rem; display: block; }
.vp-thumb span { display: block; font-size: 11px; line-height: 1.4; margin-top: 2px; }
.vp-thumb[aria-pressed="true"] { border-color: #e11d48; box-shadow: 0 0 0 1px #e11d48; }

/* ---------- گروه‌های محصولات: حباب رنگی با واکنش هاور ---------- */
.cat-tile .blob { border-radius: 60% 40% 55% 45% / 55% 45% 60% 40%; transition: border-radius .6s ease, transform .35s ease, box-shadow .35s ease; box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.cat-tile:hover .blob, .cat-tile:focus-visible .blob { border-radius: 45% 55% 40% 60% / 60% 40% 55% 45%; transform: translateY(-6px) scale(1.07) rotate(-4deg); box-shadow: 0 14px 26px rgba(0,0,0,.2); }
.cat-tile:hover .cat-name, .cat-tile:focus-visible .cat-name { color: #e11d48; }
.cat-tile:focus-visible { outline: 2px solid #e11d48; outline-offset: 6px; border-radius: .75rem; }
.blob-0 { background: linear-gradient(135deg, #ff6b6b, #ff9a5a); }
.blob-1 { background: linear-gradient(135deg, #4cc9b0, #3aa38c); }
.blob-2 { background: linear-gradient(135deg, #ffd86b, #ffb85c); }
.blob-3 { background: linear-gradient(135deg, #8fd3c4, #3f9a98); }
.blob-4 { background: linear-gradient(135deg, #ff9a9e, #ffb3b3); }
.blob-5 { background: linear-gradient(135deg, #6bb7e8, #5f9fd8); }
@media (prefers-reduced-motion: reduce) { .cat-tile .blob { transition: none; } .cat-tile:hover .blob { transform: none; } }

/* ---------- انتخابگر تعداد گرد (+ / −) ---------- */
.qty { display: inline-flex; align-items: center; gap: .75rem; }
.qty-btn { width: 2.5rem; height: 2.5rem; border-radius: 9999px; display: grid; place-items: center; box-shadow: 0 1px 5px rgba(15,23,42,.18); transition: transform .12s ease, background-color .15s, box-shadow .15s; flex-shrink: 0; }
.qty-btn:hover { transform: scale(1.06); box-shadow: 0 3px 9px rgba(15,23,42,.22); }
.qty-btn:active { transform: scale(.95); }
.qty-btn:focus-visible { outline: 2px solid #e11d48; outline-offset: 2px; }
.qty-input { width: 2.75rem; text-align: center; font-weight: 800; font-size: 1rem; background: transparent; border: 0; padding: 0; color: inherit; -moz-appearance: textfield; appearance: textfield; }
.qty-input:focus { outline: none; }
.qty-input::-webkit-inner-spin-button, .qty-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
/* همه‌جا (صفحه‌ی محصول، مودال، سبد): + سبز، − قرمز؛ در حداقل تعداد برای سبد − به سطل زباله تبدیل می‌شود */
.qty-plus { background: #16a34a; color: #fff; }
.qty-minus { background: #e11d48; color: #fff; }
.qty-minus .ico-trash { display: none; }
.qty[data-removable][data-at-min] .qty-minus .ico-minus { display: none; }
.qty[data-removable][data-at-min] .qty-minus .ico-trash { display: block; }
.qty:not([data-removable])[data-at-min] .qty-minus { opacity: .45; box-shadow: none; cursor: not-allowed; }
.qty:not([data-removable])[data-at-min] .qty-minus:hover { transform: none; }

/* ---------- پیام‌های کوتاه (Toast) ---------- */
#toastHost { position: fixed; z-index: 70; left: 50%; transform: translateX(-50%); bottom: 5.5rem; display: flex; flex-direction: column; gap: .5rem; align-items: center; width: min(92vw, 26rem); pointer-events: none; }
@media (min-width: 1024px) { #toastHost { bottom: 2rem; } }
.ms-toast { pointer-events: auto; display: flex; align-items: center; gap: .75rem; width: 100%; padding: .75rem 1rem; border-radius: .9rem; color: #fff; font-size: .875rem; line-height: 1.6; box-shadow: 0 10px 30px rgba(15,23,42,.28); animation: toast-in .25s ease both; }
.ms-toast--ok { background: #16a34a; }
.ms-toast--err { background: #e11d48; }
.ms-toast a { margin-right: auto; font-weight: 700; text-decoration: underline; white-space: nowrap; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ms-toast { animation: none; } }
