/**
 * Beauty Theme - Main CSS
 * قالب زیبایی و مراقبت از پوست
 */
@import 'core/variables.css';
@import 'core/base.css';
@import 'components/product-card.css';

/* Skip Link - دسترسی‌پذیری */
.skip-link {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.skip-link:focus {
    position: fixed;
    top: 1rem;
    right: 1rem;
    width: auto;
    height: auto;
    padding: 0.5rem 1rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    z-index: 9999;
    background: var(--tisa-primary, #C9A962);
    color: #fff;
    border-radius: 0.5rem;
    font-weight: 500;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.skip-link:focus:not(:focus-visible) {
    outline: none;
}
.skip-link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Visually hidden for screen readers - دسترسی‌پذیری */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Hero Slider — الگوی bonmano */
.tisa-hero-swiper {
    width: 100%;
    border-radius: 0;
    box-shadow: none;
}
.tisa-hero-swiper .swiper-slide {
    width: 100%;
}
.tisa-hp-hero {
    width: 100%;
    margin-bottom: 0;
    padding-bottom: 0;
}
.tisa-hp-hero-wrap {
    position: relative;
    width: 100%;
}
.tisa-hero-swiper--bonmano {
    overflow: hidden;
}
.tisa-hero-slide-item {
    width: 100%;
    max-width: 192rem;
    margin-inline: auto;
    display: block;
}
.tisa-hero-slide-link {
    display: block;
    width: 100%;
    line-height: 0;
}
.tisa-hero-slide-img {
    width: 100%;
    height: auto;
    display: block;
    vertical-align: top;
}
.tisa-hero-slide-placeholder {
    width: 100%;
    aspect-ratio: 2.4 / 1;
    background: #FDF6F0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tisa-primary, #C9A962);
    font-size: 1.25rem;
    font-weight: 500;
}
.tisa-hero-arrows.arrow--hero {
    --swiper-navigation-color: #fff;
    --swiper-navigation-sides-offset: min(5rem, 6vw);
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
}
.tisa-hero-arrows .tisa-hero-arr-c {
    pointer-events: auto;
    width: auto;
    height: auto;
    margin-top: 0;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #fff;
    transition: opacity 0.25s;
}
.tisa-hero-arrows .tisa-hero-arr-c:after {
    font-size: 2rem;
    font-weight: 700;
}
.tisa-hero-arrows .tisa-hero-arr-c:hover {
    opacity: 0.85;
}
.tisa-hp-hero-wrap .swiper-button-prev {
    left: var(--swiper-navigation-sides-offset);
    right: auto;
}
.tisa-hp-hero-wrap .swiper-button-next {
    right: var(--swiper-navigation-sides-offset);
    left: auto;
}
@media (max-width: 767px) {
    .tisa-hero-arrows .tisa-hero-arr-c {
        display: none;
    }
}

/* Carousel wrapper - فلش‌ها بیرون بزنند */
.tisa-carousel-wrap {
    overflow: visible;
}
/* کارت‌های محصول و مقاله یک اندازه */
.tisa-products-swiper .swiper-slide,
.tisa-new-products-swiper .swiper-slide,
.tisa-articles-swiper .swiper-slide {
    height: auto;
    display: flex;
}
.tisa-products-swiper .swiper-slide > *,
.tisa-new-products-swiper .swiper-slide > *,
.tisa-articles-swiper .swiper-slide > * {
    width: 100%;
}

/* دکمه‌های کاروسل سفارشی - 36×36، سفید، elevated، chevron 24×24 طلایی */
.tisa-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #fff;
    color: var(--tisa-gold, #C9A962);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.2s, transform 0.2s;
}
.tisa-carousel-btn:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.16);
}
.tisa-carousel-btn:active {
    transform: translateY(-50%) scale(0.96);
}
.tisa-carousel-chevron {
    width: 24px;
    height: 24px;
}
.tisa-carousel-prev {
    right: -18px;
    left: auto;
}
.tisa-carousel-next {
    left: -18px;
    right: auto;
}
/* مخفی در موبایل و تبلت - فقط دسکتاپ */
@media (max-width: 1023px) {
    .tisa-carousel-btn {
        display: none !important;
    }
}

.tisa-hp-tab-btn,
.tisa-hp-store-tab,
.tisa-hp-blog-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    border: 1px solid rgba(245, 208, 197, 0.8);
    background: #fff;
    color: #4A4A4A;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.tisa-hp-tab-btn.is-active,
.tisa-hp-store-tab.is-active,
.tisa-hp-blog-tab.is-active {
    background: var(--tisa-primary, #C9A962);
    border-color: var(--tisa-primary, #C9A962);
    color: #fff;
}
.tisa-hp-tab-visual {
    display: none;
}
.tisa-hp-tab-visual.is-active {
    display: block;
}
.tisa-hp-tab-panel:not(.is-active) {
    display: none;
}
.tisa-hp-cta-box {
    background: linear-gradient(135deg, #FDF6F0 0%, #fff 50%, #FDF6F0 100%);
    border: 1px solid rgba(245, 208, 197, 0.6);
}
.tisa-hp-product-swiper .swiper-slide {
    height: auto;
    display: flex;
}
.tisa-hp-product-swiper .swiper-slide > * {
    width: 100%;
}
.tisa-blog-swiper-latest .swiper-slide,
[class*="tisa-blog-swiper-"] .swiper-slide {
    height: auto;
    display: flex;
}
.tisa-blog-swiper-latest .swiper-slide > *,
[class*="tisa-blog-swiper-"] .swiper-slide > * {
    width: 100%;
}

/* بنرها - چیدمان‌های مختلف */
.tisa-banners-masonry {
    column-count: 1;
}
@media (min-width: 768px) {
    .tisa-banners-masonry {
        column-count: 2;
        column-gap: 1rem;
    }
    .tisa-banners-masonry > * {
        break-inside: avoid;
        margin-bottom: 1rem;
    }
}
.tisa-banners-strip > * {
    aspect-ratio: 1;
    min-height: 100px;
}
.tisa-banners-stacked > * {
    aspect-ratio: 21/9;
}

.tisa-hp-tab-btn,
.tisa-hp-store-tab,
.tisa-hp-blog-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border: 1px solid #F5D0C5;
    background: #fff;
    color: #4A4A4A;
    font-size: 0.875rem;
    transition: all 0.2s;
    cursor: pointer;
}
.tisa-hp-tab-btn.is-active,
.tisa-hp-store-tab.is-active,
.tisa-hp-blog-tab.is-active {
    background: var(--tisa-primary, #C9A962);
    border-color: var(--tisa-primary, #C9A962);
    color: #fff;
}

.tisa-hp-tab-panel { display: none; }
.tisa-hp-tab-panel.is-active { display: block; }

.tisa-hp-tab-visual { display: none; }
.tisa-hp-tab-visual.is-active { display: block; }

.tisa-hp-cta-box {
    background: linear-gradient(135deg, #FDF6F0 0%, #fff 100%);
    border: 1px solid rgba(245, 208, 197, 0.5);
}

.tisa-hp-video video { pointer-events: none; }

.tisa-hp-section .swiper-slide {
    height: auto;
    display: flex;
}
.tisa-hp-section .swiper-slide > * { width: 100%; }

/* دسته‌بندی‌ها - کاروسل با freeMode */
.tisa-categories-swiper .swiper-slide {
    width: auto;
    flex-shrink: 0;
}
.tisa-categories-swiper .swiper-slide > a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    min-width: 100px;
}

/* ── پدینگ مشترک صفحات cof (breadcrumb + shell) ── */
main:has(.cof-root){
    --cof-shell-px:clamp(16px,3vw,48px);
}
@media (max-width:639px){
    main:has(.cof-root){--cof-shell-px:12px;}
}
main:has(.cof-root) > .bg-white{
    border-color:#eef1f1!important;
    background:#fbfcfc!important;
}
main:has(.cof-root) > .bg-white > div{
    max-width:none!important;
    padding-inline:var(--cof-shell-px)!important;
    padding-block:11px 12px!important;
}
@media (max-width:639px){
    main:has(.cof-root) > .bg-white > div{padding-block:10px 11px!important;}
}

/* منوی کناری موبایل/تبلت */
#tisa-mobile-sidebar.tisa-sidebar-open #tisa-sidebar-backdrop {
    pointer-events: auto;
}

/* وقتی منو باز است، نوارهای ثابت پایین صفحه مخفی شوند تا فضای پدینگ پایین منو حفظ شود */
body.tisa-sidebar-active [data-product-mobile-bar],
body.tisa-sidebar-active #tisa-mobile-bottom-nav,
body.tisa-sidebar-active [data-cart-mobile-bottom],
body.tisa-sidebar-active [data-checkout-mobile-bottom],
body.tisa-sidebar-active [data-account-bottom-nav] {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* صفحه جزئیات محصول */
.tisa-product-gallery [data-gallery-main] {
    touch-action: manipulation;
}
/* گالری تامبنیل - کاروسل Free Mode */
.gallery-thumbs-swiper .swiper-slide {
    width: 64px;
    flex-shrink: 0;
}
.gallery-thumbs-swiper .swiper-slide button {
    width: 64px;
    height: 64px;
}
.variation-value-btn.selected,
.variation-value-btn.border-\[\#C9A962\] {
    border-color: #C9A962 !important;
}
.tisa-similar-carousel {
    overflow: visible;
}
.tisa-similar-swiper .swiper-slide {
    height: auto;
    display: flex;
}
.tisa-similar-swiper .swiper-slide > * {
    width: 100%;
}

/* Bottom Bar موبایل - صفحه محصول (پدینگ کامل در cof-p-mobile-bar) */

/* نوارهای پایین همیشه روی فوتر بمانند (بدون مخفی‌شدن هنگام اسکرول) */
@media (max-width: 1023px) {
    .tisa-mnav,
    [data-cart-mobile-bottom],
    [data-checkout-mobile-bottom],
    [data-account-bottom-nav],
    [data-product-mobile-bar] {
        transform: none !important;
    }
    body:not(.tisa-sidebar-active) .tisa-mnav,
    body:not(.tisa-sidebar-active) [data-cart-mobile-bottom],
    body:not(.tisa-sidebar-active) [data-checkout-mobile-bottom],
    body:not(.tisa-sidebar-active) [data-account-bottom-nav],
    body:not(.tisa-sidebar-active) [data-product-mobile-bar] {
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* Toast - صفحه محصول */
.tisa-product-toast {
    padding-top: max(1rem, env(safe-area-inset-top, 0));
}

/* فرم‌های ورود و ثبت نام - حالت خطا */
input.error {
    border-color: #ef4444 !important;
}
input.error:focus {
    border-color: #ef4444 !important;
    outline-color: #ef4444;
}
label.error {
    color: #ef4444;
}
