/* ============================================================
   ریست و متغیرها
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --brand-bg: #470207;
    --brand-accent: #ffd9b3;
    --brand-soft: #ffb48a;
    --brand-white: #ffffff;
    --header-h: 90px;
    --train-duration: 0.6s;
    --train-stagger: 0.05s;
}

html, body {
    height: 100%;
    width: 100%;
    font-family: 'Vazirmatn', sans-serif;
    background-color: var(--brand-bg);
    color: #fff;
    overflow: hidden;
}

@media screen and (max-width: 850px) {
    html, body {
        overflow-y: auto;
        overflow-x: hidden;
    }
}

/* ============================================================
   کانتینر اصلی
   ============================================================ */
.site-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    width: 100vw;
background-color: transparent;
position: relative;
    overflow: hidden;
}

@media screen and (max-width: 850px) {
    .site-wrapper {
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        overflow: visible;
    }
}

/* ============================================================
   هدر
   ============================================================ */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4rem;
    height: var(--header-h);
    background-color: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    gap: 1rem;
    position: relative;
    z-index: 50;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    white-space: nowrap;
}

.logo i {
    color: var(--brand-accent);
    font-size: 2rem;
}

.logo span {
    font-weight: 300;
    font-size: 1.2rem;
    color: var(--brand-accent);
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.main-nav ul li a {
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.2s;
    opacity: 0.9;
    white-space: nowrap;
}

.main-nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: 0;
    width: 0;
    height: 2px;
    background-color: var(--brand-accent);
    transition: width 0.25s ease;
}

.main-nav ul li a:hover {
    color: var(--brand-accent);
    opacity: 1;
}

.main-nav ul li a:hover::after {
    width: 100%;
}

.contact-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 500;
    font-size: 1.1rem;
    white-space: nowrap;
    position: relative;
}

.contact-header i {
    color: var(--brand-accent);
    font-size: 1.3rem;
}

.contact-header .phone-number {
    direction: ltr;
    font-weight: 600;
    letter-spacing: 1px;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1.2rem;
    border-radius: 40px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: background 0.2s ease;
}

.contact-header .phone-number:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ============================================================
   بخش دسته‌بندی‌ها
   ============================================================ */
.categories-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem 3rem;
    min-height: 0;
    position: relative;
    overflow: visible;
}

@media screen and (max-width: 850px) {
    .categories-section {
        justify-content: flex-start;
        padding: 1rem 0.8rem 2rem;
        overflow: visible;
    }
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    width: 100%;
    min-height: 60px;
    flex-shrink: 0;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #fff;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    position: relative;
    display: inline-block;
    margin: 0;
    transition: opacity 0.25s ease;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    right: 50%;
    transform: translateX(50%);
    width: 80px;
    height: 3px;
    background: var(--brand-accent);
    border-radius: 4px;
    opacity: 0.7;
}

.back-button {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%) translateX(20px);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 0.6rem 1.2rem;
    border-radius: 40px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    white-space: nowrap;
}

.back-button i {
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.35);
}

.back-button:hover i {
    transform: translateX(-3px);
}

.back-button.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(-50%) translateX(0);
}

@media screen and (max-width: 850px) {
    .back-button {
        position: static;
        transform: none;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        max-height: 0;
        padding: 0;
        overflow: hidden;
        margin: 0;
        border-width: 0;
        transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .back-button.visible {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        max-height: 60px;
        padding: 0.6rem 1.2rem;
        margin: 0;
        border-width: 1px;
    }
}

/* ============================================================
   کانتینر ریل
   ============================================================ */
.rail-viewport {
    position: relative;
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
}

@media screen and (max-width: 850px) {
    .rail-viewport {
        flex: unset;
        min-height: auto;
        display: block;
    }
}

.categories-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 2rem;
    width: 100%;
    position: relative;
}

.exiting-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 2rem;
    pointer-events: none;
    z-index: 2;
}

/* ============================================================
   حالت محصولات (ریل افقی)
   ============================================================ */
.categories-grid.products {
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    gap: 1.4rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding: 0.5rem 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;
}

.categories-grid.products:active {
    cursor: grabbing;
}

.categories-grid.products::-webkit-scrollbar {
    display: none;
}

.rail-viewport.products-mode {
    padding: 0 50px;
}

/* فلش‌های ریل */
.rail-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(71, 2, 7, 0.15);
    color: var(--brand-bg);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    box-shadow: 0 8px 20px -5px rgba(0, 0, 0, 0.4);
    transition: background 0.2s, transform 0.2s, opacity 0.25s;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.rail-viewport.products-mode .rail-arrow {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.rail-arrow:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.08);
}

.rail-arrow:disabled,
.rail-arrow.disabled {
    opacity: 0.35;
    pointer-events: none;
    cursor: default;
}

.rail-arrow-prev { right: -8px; }
.rail-arrow-next { left: -8px; }

/* ============================================================
   کارت پایه
   ============================================================ */
.category-card {
    background-color: var(--brand-white);
    border-radius: 28px;
    width: 200px;
    height: 240px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    color: var(--brand-bg);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 1rem;
    text-align: center;
    user-select: none;
    will-change: transform, opacity;
    flex-shrink: 0;
}

.category-card:hover,
.category-card:focus-visible {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 30px 40px -15px rgba(0, 0, 0, 0.6);
    outline: none;
}

.category-icon {
    font-size: 3.5rem;
    color: var(--brand-bg);
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
    z-index: 1;
}

.category-card:hover .category-icon {
    transform: scale(1.1);
}

.category-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--brand-bg);
    margin-bottom: 0.25rem;
    z-index: 1;
}

.category-card p {
    font-size: 0.85rem;
    font-weight: 400;
    color: #9b6a6a;
    z-index: 1;
}

.card-line {
    width: 40px;
    height: 2px;
    background-color: var(--brand-bg);
    opacity: 0.2;
    margin-top: 0.8rem;
    border-radius: 10px;
    z-index: 1;
}

.categories-grid.subcategories .category-card {
    width: 180px;
    height: 200px;
    border-radius: 24px;
}

.categories-grid.subcategories .category-icon {
    font-size: 3rem;
}

.categories-grid.subcategories .category-card h3 {
    font-size: 1.2rem;
}

/* ============================================================
   کارت محصول
   ============================================================ */
.categories-grid.products .category-card {
    width: 200px;
    height: 290px;
    border-radius: 24px;
    padding: 0;
    justify-content: flex-start;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 150px;
    background: linear-gradient(135deg, #fdf4f0 0%, #f8e8e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.product-image .badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--brand-bg);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
}

.product-body {
    padding: 0.8rem 0.9rem 0.9rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
    text-align: right;
}

.product-body h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--brand-bg);
    margin-bottom: 0.2rem;
    line-height: 1.3;
}

.product-body .product-sub {
    font-size: 0.72rem;
    color: #9b6a6a;
    margin-bottom: 0.5rem;
}

.product-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    gap: 0.4rem;
}

.product-price {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
}

.product-price .old {
    font-size: 0.7rem;
    color: #b89a9a;
    text-decoration: line-through;
}

.product-price .new {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--brand-bg);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.product-price .new small {
    font-size: 0.6rem;
    font-weight: 400;
    color: #9b6a6a;
}

.add-to-cart-btn {
    background: var(--brand-bg);
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.15s;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}

.add-to-cart-btn:hover {
    background: #6b0309;
    transform: scale(1.08);
}

.add-to-cart-btn:active {
    transform: scale(0.94);
}

/* ============================================================
   انیمیشن ریل
   ============================================================ */
.category-card.entering {
    animation: railIn var(--train-duration) cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: calc(var(--i) * var(--train-stagger));
    opacity: 0;
}

@keyframes railIn {
    0% { opacity: 0; transform: translateX(-140%) scale(0.85); }
    40% { opacity: 1; }
    100% { opacity: 1; transform: translateX(0) scale(1); }
}

.category-card.leaving {
    animation: railOut var(--train-duration) cubic-bezier(0.5, 0, 0.75, 0) forwards;
    animation-delay: calc(var(--i) * var(--train-stagger));
}

@keyframes railOut {
    0% { opacity: 1; transform: translateX(0) scale(1); }
    30% { opacity: 1; }
    100% { opacity: 0; transform: translateX(140%) scale(0.85); }
}

/* ============================================================
   فوتر
   ============================================================ */
.footer {
    flex-shrink: 0;
    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.2rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    min-height: 80px;
    gap: 1rem;
    position: relative;
    z-index: 50;
}

.footer-menu { display: flex; gap: 2.5rem; list-style: none; flex-wrap: wrap; }

.footer-menu li a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.2s;
    font-size: 0.95rem;
    white-space: nowrap;
}

.footer-menu li a:hover { color: var(--brand-accent); }

.footer-social { display: flex; gap: 1.5rem; font-size: 1.3rem; }

.footer-social a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.2s, transform 0.2s;
}

.footer-social a:hover { color: var(--brand-accent); transform: translateY(-2px); }

.copyright { font-size: 0.8rem; opacity: 0.7; white-space: nowrap; }

/* ============================================================
   پاپ‌آپ محصول (عمومی)
   ============================================================ */
.product-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 0, 2, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    z-index: 200;
}

.product-overlay.open { opacity: 1; visibility: visible; }

.product-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.88);
    width: min(880px, 92vw);
    max-height: 95vh;
    background: #fff;
    color: var(--brand-bg);
    border-radius: 28px;
    box-shadow: 0 40px 90px -20px rgba(0, 0, 0, 0.7);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.45s cubic-bezier(0.22, 1.2, 0.36, 1);
    z-index: 201;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.product-modal.open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* دکمه بستن - داخل کادر، گوشه بالا-چپ */
.product-modal-close {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 38px;
    height: 38px;
    background: #fff;
    border: 1px solid rgba(71, 2, 7, 0.15);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    border-radius: 50%;
    color: var(--brand-bg);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    cursor: pointer;
    transition: all 0.2s ease;
}

.product-modal-close:hover { background: #fdf4f0; transform: rotate(90deg); }

@media screen and (max-width: 850px) {
    .product-modal-close { top: 10px; left: 10px; width: 34px; height: 34px; font-size: 0.9rem; }
}

.product-modal-body {
    display: flex;
    gap: 0;
    overflow: hidden;
    flex: 1;
    min-height: 0;
}
/* ============================================================
   رگال محصول - همه ۱۰ عکس در یک ردیف
   ============================================================ */
.product-modal-image {
    flex: 0 0 62%; /* عرض بیشتر برای جا شدن ۱۰ عکس در یک ردیف */
    background: linear-gradient(135deg, #fdf4f0 0%, #f8e8e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    min-height: 380px;
    padding: 0.5rem;
}

.hangers-layer {
    display: flex;
    flex-direction: row;    /* همه در یک ردیف */
    flex-wrap: nowrap;      /* هیچ‌کدوم به خط بعد نرن */
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    height: 100%;
    padding: 0 0.3rem;
    box-sizing: border-box;
}

/* هر لباس روی رگال */
.rack-hanger {
    position: relative;
    height: 85%;            /* ارتفاع ثابت */
    width: auto;            /* عرض بر اساس تصویر */
    flex: 1 1 0;            /* به صورت مساوی فضای موجود رو بگیرن */
    max-width: 90px;
    min-width: 0;
    cursor: pointer;
    transition: flex 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}



/* هاور یا انتخاب: نمایش روبرو */
.rack-hanger:hover,
.rack-hanger.active {
    flex: 1.8 1 0; /* لباس فعال بزرگ‌تر می‌شود */
    z-index: 5;
}

.rack-hanger:hover .hanger-img,

.rack-hanger:hover .hanger-front,
.rack-hanger.active .hanger-front {
    opacity: 1;
}

/* بقیه کوچک‌تر و محو */
.hangers-layer:hover .rack-hanger:not(:hover) {
    opacity: 0.5;
}

/* ============================================================
   گزینه‌های سایز و رنگ (ردیف‌های جداگانه)
   ============================================================ */
.product-modal-options-row {
    display: flex;
    flex-direction: column; /* زیر هم */
    gap: 0.9rem;
    width: 100%;
}

.product-modal-sizes,
.product-modal-colors {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    width: 100%;
}

.product-modal-sizes label,
.product-modal-colors label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--brand-bg);
}

.size-options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.size-option {
    min-width: 40px;
    height: 38px;
    padding: 0 0.7rem;
    border-radius: 10px;
    border: 1.5px solid rgba(71, 2, 7, 0.15);
    background: #fff;
    color: var(--brand-bg);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.size-option:hover { border-color: var(--brand-soft); }

.size-option.selected {
    background: var(--brand-bg);
    color: #fff;
    border-color: var(--brand-bg);
}

/* رنگ‌ها */
.color-options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    min-height: 38px;
}

.color-option {
    width: 30px;
    height: 30px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.25s ease, border-color 0.25s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
    padding: 0;
}

.color-option:hover { transform: scale(1.2); z-index: 2; }

.color-option.selected {
    border-color: var(--brand-bg);
    transform: scale(1.15);
    box-shadow: 0 0 0 3px rgba(71, 2, 7, 0.15);
}

.color-option.clear-color {
    background-color: #fff;
    border: 2px solid #e74c3c;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e74c3c;
    font-size: 14px;
}

.color-option.clear-color i { font-size: 14px; }
.color-option.clear-color:hover { background: #fdf2f2; transform: scale(1.15); }

/* فیلترهای رنگی */
.color-black { filter: brightness(0.2) grayscale(1); }
.color-red { filter: hue-rotate(340deg) saturate(3); }
.color-blue { filter: hue-rotate(180deg) saturate(2); }
.color-green { filter: hue-rotate(90deg) saturate(2); }
.color-yellow { filter: hue-rotate(40deg) saturate(3); }
.color-pink { filter: hue-rotate(300deg) saturate(2); }
.color-purple { filter: hue-rotate(250deg) saturate(2); }
.color-orange { filter: hue-rotate(20deg) saturate(3); }
.color-turquoise { filter: hue-rotate(150deg) saturate(2); }
.color-brown { filter: sepia(1) hue-rotate(330deg) saturate(1.5) brightness(0.7); }

/* ریسپانسیو */
@media screen and (max-width: 1000px) {
    .product-modal-image { flex: 0 0 auto; height: 300px; min-height: 300px; }
    .rack-hanger { max-width: 70px; }
    .rack-hanger:hover, .rack-hanger.active { flex: 1.8 1 0; }
}

@media screen and (max-width: 850px) {
    .product-modal-image { height: 280px; min-height: 280px; }
    .hangers-layer { gap: 0.3rem; }
    .rack-hanger { max-width: 55px; }
    .color-option { width: 26px; height: 26px; }
    .color-option.clear-color i { font-size: 12px; }
}

@media screen and (max-width: 600px) {
    .product-modal-image { height: 240px; min-height: 240px; }
    .rack-hanger { max-width: 45px; }
}

/* ============================================================
   فیلترهای رنگی
   ============================================================ */
.color-black { filter: brightness(0.2) grayscale(1); }
.color-red { filter: hue-rotate(340deg) saturate(3); }
.color-blue { filter: hue-rotate(180deg) saturate(2); }
.color-green { filter: hue-rotate(90deg) saturate(2); }
.color-yellow { filter: hue-rotate(40deg) saturate(3); }
.color-pink { filter: hue-rotate(300deg) saturate(2); }
.color-purple { filter: hue-rotate(250deg) saturate(2); }
.color-orange { filter: hue-rotate(20deg) saturate(3); }
.color-turquoise { filter: hue-rotate(150deg) saturate(2); }
.color-brown { filter: sepia(1) hue-rotate(330deg) saturate(1.5) brightness(0.7); }

/* ============================================================
   اطلاعات محصول در پاپ‌آپ
   ============================================================ */
.product-modal-image .badge {
    position: absolute;
    top: 18px;
    right: 18px;
    background: var(--brand-bg);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.9rem;
    border-radius: 30px;
    z-index: 20;
}

.product-modal-info {
    flex: 1;
    padding: 2rem 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow: hidden;
    min-width: 0;
}

.product-modal-info h2 {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--brand-bg);
    line-height: 1.3;
}

.product-modal-subtitle {
    font-size: 0.85rem;
    color: #9b6a6a;
    margin-top: -0.35rem;
}

.product-modal-rating {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: var(--brand-soft);
}

.product-modal-rating span {
    color: #9b6a6a;
    font-size: 0.8rem;
    margin-right: 0.25rem;
}

.product-modal-desc {
    font-size: 0.88rem;
    line-height: 1.75;
    color: #6b4a4a;
    padding: 0.6rem 0;
    border-top: 1px solid rgba(71, 2, 7, 0.08);
    border-bottom: 1px solid rgba(71, 2, 7, 0.08);
}

/* گزینه‌های سایز و رنگ */
.product-modal-options-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.product-modal-options-row .product-modal-sizes,
.product-modal-options-row .product-modal-colors {
    flex: 1;
    min-width: 140px;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.product-modal-sizes label,
.product-modal-colors label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--brand-bg);
}

.size-options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.size-option {
    min-width: 40px;
    height: 38px;
    padding: 0 0.7rem;
    border-radius: 10px;
    border: 1.5px solid rgba(71, 2, 7, 0.15);
    background: #fff;
    color: var(--brand-bg);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.size-option:hover { border-color: var(--brand-soft); }

.size-option.selected {
    background: var(--brand-bg);
    color: #fff;
    border-color: var(--brand-bg);
}

/* ============================================================
   دکمه‌های انتخاب رنگ
   ============================================================ */
.color-options {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    flex-wrap: wrap;
    min-height: 42px;
    padding: 0.3rem 0;
}

.color-option {
    width: 32px;
    height: 32px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.3s ease,
                opacity 0.3s ease,
                box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    flex-shrink: 0;
    padding: 0;
    outline: none;
}

.color-options:hover .color-option:not(:hover) {
    transform: scale(0.8);
    opacity: 0.5;
    box-shadow: none;
}

.color-option:hover {
    transform: scale(1.25);
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.color-option.selected {
    border-color: var(--brand-bg);
    transform: scale(1.15);
    box-shadow: 0 0 0 3px rgba(71, 2, 7, 0.15), 0 2px 8px rgba(0, 0, 0, 0.2);
}

.color-option.clear-color {
    background-color: #fff;
    border: 2px solid #e74c3c;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e74c3c;
    font-size: 16px;
    padding: 0;
}

.color-option.clear-color i {
    font-size: 16px;
    line-height: 1;
}

.color-option.clear-color:hover {
    background-color: #fdf2f2;
    transform: scale(1.2);
}

.color-option.clear-color.selected {
    background-color: #fdf2f2;
    border-color: #c0392b;
    transform: scale(1.15);
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2);
}

/* قیمت و دکمه خرید */
.product-modal-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 0.7rem;
    border-top: 1px solid rgba(71, 2, 7, 0.08);
    margin-top: auto;
    flex-wrap: wrap;
}

.product-modal-price {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.product-modal-price .old {
    font-size: 0.85rem;
    color: #b89a9a;
    text-decoration: line-through;
}

.product-modal-price .new {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--brand-bg);
}

.product-modal-price .new small {
    font-size: 0.85rem;
    font-weight: 400;
    color: #9b6a6a;
}

.product-modal-add {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--brand-bg);
    color: #fff;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 14px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    flex: 1;
    justify-content: center;
    max-width: 240px;
}

.product-modal-add:hover { background: #6b0309; }
.product-modal-add:active { transform: scale(0.97); }
.product-modal-add i { font-size: 1rem; }

/* ============================================================
   آیکون سبد خرید و پروفایل در هدر
   ============================================================ */
.cart-btn {
    position: relative;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: background 0.2s, transform 0.2s;
    margin-left: 0.5rem;
}

.cart-btn:hover { background: rgba(255, 255, 255, 0.18); transform: scale(1.05); }

.cart-badge {
    position: absolute;
    top: -5px;
    left: -5px;
    background: var(--brand-accent);
    color: var(--brand-bg);
    font-size: 0.7rem;
    font-weight: 800;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.22, 1.2, 0.36, 1);
}

.cart-badge.visible { opacity: 1; transform: scale(1); }

.profile-btn {
    position: relative;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: background 0.2s, transform 0.2s;
    margin-left: 0.5rem;
}

.profile-btn:hover { background: rgba(255, 255, 255, 0.18); transform: scale(1.05); }
.profile-btn.logged-in { background: var(--brand-accent); color: var(--brand-bg); }

.profile-btn i {
    display: inline-block !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    color: inherit;
}

/* منوی پروفایل */
.profile-menu {
    position: absolute;
    top: 60px;
    left: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    width: 200px;
    z-index: 100;
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(71, 2, 7, 0.1);
}

.profile-menu.open { display: flex; }

.profile-menu-header {
    padding: 12px 15px;
    background: #fdf4f0;
    border-bottom: 1px solid rgba(71, 2, 7, 0.1);
    color: var(--brand-bg);
    font-weight: 700;
    font-size: 0.9rem;
    text-align: right;
}

.profile-menu-header small {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    color: #9b6a6a;
    margin-top: 2px;
    direction: ltr;
    text-align: right;
}

.profile-menu-item {
    padding: 12px 15px;
    color: var(--brand-bg);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
    cursor: pointer;
    border-bottom: 1px solid rgba(71, 2, 7, 0.05);
}

.profile-menu-item:last-child { border-bottom: none; }
.profile-menu-item:hover { background: #fdf4f0; }
.profile-menu-item.logout { color: #e74c3c; }
.profile-menu-item i { width: 16px; text-align: center; color: inherit; }

/* ============================================================
   پاپ‌آپ سبد خرید
   ============================================================ */
.cart-modal {
    width: min(600px, 92vw);
    max-height: 85vh;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.cart-header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(71, 2, 7, 0.1);
}

.cart-header h2 {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--brand-bg);
}

.cart-body {
    flex: 1;
    overflow-y: auto;
    max-height: 55vh;
    min-height: 150px;
    padding: 0.5rem 0;
    scrollbar-width: thin;
}

.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem 1rem;
    color: #b89a9a;
    text-align: center;
}

.cart-empty i { font-size: 4rem; opacity: 0.4; }

/* آیتم سبد خرید */
.cart-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    border-radius: 14px;
    background: #fdf4f0;
    margin-bottom: 0.7rem;
    flex-wrap: nowrap;
}

.cart-item-img {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    background: #f8e8e0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.cart-item-img img { width: 100%; height: 100%; object-fit: contain; }

.cart-item-info { flex: 1; min-width: 0; }

.cart-item-info h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--brand-bg);
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-info .cart-item-meta { font-size: 0.75rem; color: #9b6a6a; }

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.cart-item-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: #fff;
    padding: 0.2rem;
    border-radius: 10px;
    border: 1px solid rgba(71, 2, 7, 0.1);
}

.qty-btn {
    background: transparent;
    border: none;
    color: var(--brand-bg);
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    font-size: 0.7rem;
}

.qty-btn:hover { background: var(--brand-bg); color: #fff; }
.qty-btn:active { transform: scale(0.9); }

.qty-value {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--brand-bg);
    min-width: 20px;
    text-align: center;
}

.cart-item-remove {
    background: rgba(231, 76, 60, 0.1);
    border: none;
    color: #e74c3c;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.cart-item-remove:hover { background: rgba(231, 76, 60, 0.2); transform: scale(1.05); }

.cart-item-price {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--brand-bg);
    white-space: nowrap;
    text-align: center;
}

.cart-item-price small { font-size: 0.6rem; font-weight: 400; color: #9b6a6a; }

.cart-footer {
    padding-top: 1rem;
    border-top: 1px solid rgba(71, 2, 7, 0.1);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    color: var(--brand-bg);
}

.cart-total strong { font-size: 1.3rem; font-weight: 800; }

.cart-checkout-btn {
    background: var(--brand-bg);
    color: #fff;
    border: none;
    padding: 0.9rem;
    border-radius: 14px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.cart-checkout-btn:hover { background: #6b0309; }

/* ============================================================
   فرم‌های تکمیل خرید
   ============================================================ */
.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0 1rem 1rem;
}

.form-row { display: flex; gap: 0.8rem; }
.form-row input { flex: 1; }

.checkout-form input {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    border: 1.5px solid rgba(71, 2, 7, 0.15);
    background: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--brand-bg);
    outline: none;
    transition: border-color 0.2s;
}

.checkout-form input:focus { border-color: var(--brand-accent); }

.back-step-btn {
    background: rgba(71, 2, 7, 0.05) !important;
    border: 1px solid rgba(71, 2, 7, 0.1) !important;
    color: var(--brand-bg) !important;
    font-family: 'Vazirmatn', sans-serif !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    padding: 0.4rem 0.9rem !important;
    border-radius: 20px !important;
    transition: all 0.2s ease !important;
    margin: 0 !important;
    line-height: 1.5 !important;
    text-decoration: none !important;
}

.back-step-btn:hover {
    background: rgba(71, 2, 7, 0.1) !important;
    color: var(--brand-bg) !important;
    text-decoration: none !important;
}

.back-step-btn i { font-size: 0.8rem !important; transition: transform 0.2s !important; }
.back-step-btn:hover i { transform: translateX(-3px) !important; }

/* ============================================================
   تب‌های ورود / ثبت‌نام
   ============================================================ */
.auth-tabs {
    display: flex;
    width: 100%;
    background: #fdf4f0;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 1rem;
    border: 1px solid rgba(71, 2, 7, 0.08);
    box-sizing: border-box;
}

.auth-tab {
    flex: 1;
    padding: 0.6rem 0;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: #9b6a6a;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.auth-tab.active {
    background: var(--brand-bg);
    color: #fff;
    box-shadow: 0 2px 8px rgba(71, 2, 7, 0.2);
}

.auth-tab:hover:not(.active) {
    background: rgba(71, 2, 7, 0.05);
    color: var(--brand-bg);
}

#cartStep5 .cart-header {
    padding-bottom: 0 !important;
    border-bottom: none !important;
    margin-bottom: 0.5rem !important;
}

#cartStep5 .auth-tabs {
    margin-bottom: 0.8rem !important;
    padding-bottom: 4px !important;
}

#cartStep5 .checkout-form {
    gap: 0.6rem;
    padding: 0.5rem 1rem 1rem;
}

#cartStep5 .form-row { gap: 0.6rem; }
#cartStep5 .checkout-form input { padding: 0.6rem 0.8rem; font-size: 0.85rem; }
#cartStep5 .cart-checkout-btn { padding: 0.6rem 1rem; font-size: 0.9rem; margin-top: 0.3rem; }
#cartStep5 .auth-tab-content p { margin-top: 0.5rem !important; font-size: 0.75rem !important; }

.auth-tab { padding: 0.5rem 1rem !important; font-size: 0.85rem !important; }

@media screen and (max-width: 600px) {
    #cartStep5 .checkout-form { gap: 0.5rem; }
    #cartStep5 .checkout-form input { padding: 0.5rem 0.7rem; font-size: 0.8rem; }
    #cartStep5 .form-row { flex-direction: row !important; gap: 0.5rem; }
}

/* ============================================================
   لیست آدرس‌ها
   ============================================================ */
#addressListSection { padding: 0.8rem 1rem; }
#addressList { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1rem; }

#addressList > div {
    background: #fdf4f0;
    padding: 0.8rem;
    border-radius: 10px;
    border: 2px solid rgba(71, 2, 7, 0.1);
    cursor: pointer;
    transition: all 0.2s;
}

#addressList > div:hover { background: #f8e8e0 !important; }
#confirmAddressBtn { width: 100%; display: block; margin: 0 auto 0.5rem; }

#newAddressBtn {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.4rem !important;
    background: rgba(71, 2, 7, 0.05) !important;
    color: var(--brand-bg) !important;
    padding: 0.6rem !important;
    border-radius: 10px !important;
    font-family: 'Vazirmatn', sans-serif !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    border: 1px solid rgba(71, 2, 7, 0.1) !important;
    transition: all 0.2s !important;
    margin-top: 0.5rem !important;
}

#newAddressBtn:hover { background: rgba(71, 2, 7, 0.1) !important; }

#addressForm { padding: 0 1rem 1rem; }
#addressForm .checkout-form { gap: 0.5rem; }
#addressForm .form-row { gap: 0.5rem; }
#addressForm input { padding: 0.6rem 0.8rem; font-size: 0.85rem; }

/* هدر مرحله ۲ و ۶ */
#cartStep2 .cart-header,
#cartStepPayment .cart-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding-bottom: 0.8rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(71, 2, 7, 0.08);
    position: relative;
}

#cartStep2 .cart-header h2,
#cartStepPayment .cart-header h2 {
    font-size: 1.2rem;
    margin: 0 !important;
    color: var(--brand-bg);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#cartStep2 .back-step-btn,
#cartStepPayment .back-step-btn { margin: 0 !important; }

@media screen and (min-width: 851px) {
    #cartStep2 .cart-header,
    #cartStepPayment .cart-header {
        flex-direction: row-reverse;
        justify-content: space-between;
        align-items: center;
    }
}

/* ============================================================
   مرحله صورت‌حساب و پرداخت
   ============================================================ */
#cartStepPayment {
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    padding: 1rem;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(71, 2, 7, 0.2) transparent;
}

#cartStepPayment::-webkit-scrollbar { width: 6px; }
#cartStepPayment::-webkit-scrollbar-thumb { background: rgba(71, 2, 7, 0.2); border-radius: 10px; }

#cartStepPayment .cart-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    padding-bottom: 0.8rem;
    margin-bottom: 0.8rem;
    border-bottom: 1px solid rgba(71, 2, 7, 0.1);
    flex-shrink: 0;
}

#cartStepPayment .cart-header h2 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--brand-bg);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Vazirmatn', sans-serif;
}

.payment-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.payment-box {
    background: #fdf4f0;
    padding: 0.9rem;
    border-radius: 14px;
    border: 1px solid rgba(71, 2, 7, 0.08);
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.payment-box-title {
    font-weight: 700;
    color: var(--brand-bg);
    margin-bottom: 0.6rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'Vazirmatn', sans-serif;
    flex-shrink: 0;
}

#invoiceItems {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
    max-height: 180px;
    padding-left: 4px;
    scrollbar-width: thin;
}

#invoiceItems::-webkit-scrollbar { width: 4px; }
#invoiceItems::-webkit-scrollbar-thumb { background: rgba(71, 2, 7, 0.2); border-radius: 10px; }

.invoice-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.4rem 0;
    border-bottom: 1px dashed rgba(71, 2, 7, 0.1);
}

.invoice-item:last-child { border-bottom: none; }

.invoice-item .item-title {
    font-weight: 700;
    color: var(--brand-bg);
    font-size: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.4rem;
    font-family: 'Vazirmatn', sans-serif;
}

.invoice-item .item-title .item-qty {
    background: var(--brand-bg);
    color: #fff;
    font-size: 0.65rem;
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    font-weight: 600;
    flex-shrink: 0;
    white-space: nowrap;
}

.invoice-item .item-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #9b6a6a;
    font-size: 0.72rem;
    gap: 0.4rem;
    font-family: 'Vazirmatn', sans-serif;
}

.invoice-item .item-details span:first-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.invoice-item .item-price {
    font-weight: 700;
    color: var(--brand-bg);
    font-size: 0.78rem;
    flex-shrink: 0;
}

.payment-box-info {
    text-align: center;
    justify-content: center;
    align-items: center;
}

.payment-amount-label {
    font-size: 0.8rem;
    color: #6b4a4a;
    margin-bottom: 0.2rem;
    font-family: 'Vazirmatn', sans-serif;
}

.payment-amount {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--brand-bg);
    margin-bottom: 0.6rem;
    font-family: 'Vazirmatn', sans-serif;
}

.card-number-label {
    font-size: 0.8rem;
    color: #6b4a4a;
    margin-bottom: 0.3rem;
    font-family: 'Vazirmatn', sans-serif;
}

.card-number-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    direction: ltr;
    margin-bottom: 0.2rem;
    flex-wrap: wrap;
}

.card-number {
    font-family: monospace;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--brand-bg);
}

#copyCardBtn {
    background: none;
    border: none;
    color: #9b6a6a;
    cursor: pointer;
    font-size: 0.8rem;
    transition: color 0.2s;
    padding: 0;
}

#copyCardBtn:hover { color: var(--brand-bg); }

.card-owner {
    font-size: 0.72rem;
    color: #9b6a6a;
    font-family: 'Vazirmatn', sans-serif;
}

.upload-section {
    background: #fdf4f0;
    padding: 0.8rem;
    border-radius: 14px;
    border: 1px solid rgba(71, 2, 7, 0.08);
    margin-bottom: 0.8rem;
    flex-shrink: 0;
}

.upload-section label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--brand-bg);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
    font-family: 'Vazirmatn', sans-serif;
}

#receiptFile {
    width: 100%;
    padding: 0.5rem;
    border: 1.5px dashed rgba(71, 2, 7, 0.2);
    border-radius: 10px;
    font-size: 0.8rem;
    background: #fff;
    cursor: pointer;
    color: var(--brand-bg);
    font-family: 'Vazirmatn', sans-serif;
}

#receiptPreview { display: none; text-align: center; margin-top: 0.5rem; }

#receiptImage {
    max-width: 100%;
    max-height: 100px;
    border-radius: 8px;
    border: 1px solid rgba(71, 2, 7, 0.1);
}

#submitPaymentBtn {
    width: 100%;
    padding: 0.85rem;
    font-size: 0.95rem;
    border-radius: 12px;
    background: var(--brand-bg);
    color: #fff;
    border: none;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

#submitPaymentBtn:hover { background: #6b0309; }

@media screen and (max-width: 600px) {
    .payment-row { grid-template-columns: 1fr; }
    #invoiceItems { max-height: 130px; }
    .payment-amount { font-size: 1.15rem; }
    .card-number { font-size: 0.85rem; }
}

/* ============================================================
   صفحه کد تایید
   ============================================================ */
#cartStep3 {
    padding: 1rem;
    overflow-y: auto;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    background: #fff;
}

#cartStep3 .cart-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding-bottom: 0.8rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(71, 2, 7, 0.1);
    flex-shrink: 0;
}

#cartStep3 .cart-header h2 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--brand-bg);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Vazirmatn', sans-serif;
}

#cartStep3 .back-step-btn {
    background: rgba(71, 2, 7, 0.05);
    border: 1px solid rgba(71, 2, 7, 0.1);
    color: var(--brand-bg);
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    transition: all 0.2s;
    margin: 0;
}

#cartStep3 .back-step-btn:hover { background: rgba(71, 2, 7, 0.1); }

@media screen and (min-width: 851px) {
    #cartStep3 .cart-header {
        flex-direction: row-reverse;
        justify-content: space-between;
        align-items: center;
    }
}

.otp-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 1rem 0.5rem;
    flex: 1;
}

.otp-message {
    font-size: 0.9rem;
    color: #6b4a4a;
    text-align: center;
    line-height: 1.7;
    font-family: 'Vazirmatn', sans-serif;
    max-width: 320px;
}

.otp-inputs {
    display: flex;
    gap: 0.6rem;
    direction: ltr;
    justify-content: center;
    flex-wrap: wrap;
}

.otp-digit {
    width: 60px;
    height: 70px;
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    color: var(--brand-bg);
    background: #fff;
    border: 2px solid rgba(71, 2, 7, 0.15);
    border-radius: 16px;
    outline: none;
    transition: all 0.25s ease;
    font-family: 'Vazirmatn', sans-serif;
    caret-color: var(--brand-bg);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.otp-digit:focus {
    border-color: var(--brand-bg);
    box-shadow: 0 0 0 4px rgba(71, 2, 7, 0.1);
    transform: scale(1.05);
}

.otp-digit.filled {
    background: #fdf4f0;
    border-color: var(--brand-bg);
    color: var(--brand-bg);
}

#verifyOtpBtn {
    background: var(--brand-bg);
    color: #fff;
    border: none;
    padding: 0.85rem 1.5rem;
    border-radius: 14px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 250px;
    margin-top: 0.5rem;
}

#verifyOtpBtn:hover { background: #6b0309; }
#verifyOtpBtn:active { transform: scale(0.97); }
#verifyOtpBtn i { font-size: 1rem; }

#otpError {
    color: #e74c3c;
    font-size: 0.85rem;
    text-align: center;
    font-family: 'Vazirmatn', sans-serif;
    margin-top: 0.5rem;
}

@media screen and (max-width: 600px) {
    .otp-digit { width: 50px; height: 60px; font-size: 1.6rem; border-radius: 12px; }
    .otp-inputs { gap: 0.4rem; }
    .otp-container { gap: 1.2rem; padding: 0.8rem 0.3rem; }
    .otp-message { font-size: 0.85rem; }
}

/* ============================================================
   باکس تاریخ تولد
   ============================================================ */
.birthday-box {
    background: linear-gradient(135deg, #fdf4f0 0%, #f8e8e0 100%);
    border-radius: 16px;
    padding: 1.5rem 1rem;
    width: 100%;
    max-width: 400px;
    border: 1px solid rgba(71, 2, 7, 0.1);
    margin-top: 0.5rem;
}

.birthday-box h3 {
    color: var(--brand-bg);
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
}

.birthday-box p {
    color: #6b4a4a;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.birthday-inputs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    justify-content: center;
}

.birthday-inputs select {
    flex: 1;
    max-width: 110px;
    padding: 0.6rem 0.4rem;
    border-radius: 10px;
    border: 1.5px solid rgba(71, 2, 7, 0.15);
    background: #fff;
    color: var(--brand-bg);
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
}

.birthday-inputs select:focus { border-color: var(--brand-bg); }

.success-title {
    color: #470207;
    font-size: 1.2rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    line-height: 1.6;
}

.success-title i { font-size: 1.4rem; color: #2ecc71; }

@media screen and (max-width: 600px) {
    .success-title { font-size: 1.05rem; }
    .success-title i { font-size: 1.2rem; }
}

/* ============================================================
   گردونه شانس
   ============================================================ */
#wheelModal {
    width: min(420px, 92vw) !important;
    background: #fff;
    padding: 1.5rem;
}

.wheel-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.wheel-wrapper {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 1rem auto;
}

.wheel-pointer {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-top: 24px solid var(--brand-bg);
    z-index: 10;
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.3));
}

.wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    background: conic-gradient(
        #ffd9b3 0deg 45deg,
        #e74c3c 45deg 90deg,
        #ffd9b3 90deg 135deg,
        #3498db 135deg 180deg,
        #ffd9b3 180deg 225deg,
        #2ecc71 225deg 270deg,
        #ffd9b3 270deg 315deg,
        #9b59b6 315deg 360deg
    );
    border: 8px solid #fff;
    box-shadow: 0 0 0 4px var(--brand-bg), 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 4s cubic-bezier(0.17, 0.67, 0.16, 1);
}

.wheel-segment {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50%;
    height: 50%;
    transform-origin: 0% 0%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 15px;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--brand-bg);
    pointer-events: none;
}

.wheel-segment span { transform: rotate(90deg); white-space: nowrap; }

.segment-1 { transform: rotate(22.5deg); }
.segment-2 { transform: rotate(67.5deg); }
.segment-3 { transform: rotate(112.5deg); }
.segment-4 { transform: rotate(157.5deg); }
.segment-5 { transform: rotate(202.5deg); }
.segment-6 { transform: rotate(247.5deg); }
.segment-7 { transform: rotate(292.5deg); }
.segment-8 { transform: rotate(337.5deg); }

.segment-1 span, .segment-2 span, .segment-3 span, .segment-4 span,
.segment-5 span, .segment-6 span, .segment-7 span, .segment-8 span {
    transform: rotate(90deg) translateX(30px);
}

.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #fff;
    border: 4px solid var(--brand-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--brand-bg);
    z-index: 5;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

@media screen and (max-width: 600px) {
    .wheel-wrapper { width: 220px; height: 220px; }
    .wheel-segment { font-size: 0.6rem; padding-left: 10px; }
    .segment-1 span, .segment-2 span, .segment-3 span, .segment-4 span,
    .segment-5 span, .segment-6 span, .segment-7 span, .segment-8 span {
        transform: rotate(90deg) translateX(20px);
    }
    .wheel-center { width: 50px; height: 50px; font-size: 1.2rem; }
}

/* ============================================================
   توست
   ============================================================ */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #fff;
    color: var(--brand-bg);
    padding: 0.9rem 1.8rem;
    border-radius: 50px;
    box-shadow: 0 15px 40px -10px rgba(0, 0, 0, 0.4);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    z-index: 300;
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.22, 1.2, 0.36, 1), opacity 0.3s;
    pointer-events: none;
}

.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast i { color: #2e8b57; font-size: 1.1rem; }

/* ============================================================
   ریسپانسیو نهایی
   ============================================================ */
@media screen and (max-height: 780px) and (min-width: 851px) {
    .header { height: 74px; padding: 0 2.5rem; }
    .logo { font-size: 1.5rem; }
    .logo span { font-size: 1rem; }
    .contact-header .phone-number { padding: 0.35rem 1rem; font-size: 0.9rem; }
    .main-nav ul { gap: 1.6rem; }
    .section-title { font-size: 1.7rem; }
    .section-header { margin-bottom: 1.2rem; min-height: 50px; }
    .back-button { font-size: 0.85rem; padding: 0.5rem 1rem; }
    .category-card { width: 165px; height: 200px; border-radius: 22px; }
    .category-icon { font-size: 2.8rem; }
    .category-card h3 { font-size: 1.15rem; }
    .category-card p { font-size: 0.78rem; }
    .categories-grid, .exiting-layer { gap: 1.5rem; }
    .rail-viewport { min-height: 220px; }
    .categories-grid.subcategories .category-card { width: 150px; height: 170px; }
    .categories-grid.subcategories .category-icon { font-size: 2.4rem; }
    .categories-grid.subcategories .category-card h3 { font-size: 1rem; }
    .categories-grid.products .category-card { width: 170px; height: 260px; }
    .product-image { height: 135px; }
    .footer { padding: 0.8rem 2.5rem; min-height: 66px; }
    .footer-menu { gap: 1.6rem; }
    .product-modal-info { padding: 1.5rem 1.4rem; gap: 0.6rem; }
    .product-modal-info h2 { font-size: 1.25rem; }
    .product-modal-price .new { font-size: 1.4rem; }
}

@media screen and (max-width: 1000px) {
    .header { padding: 0 2rem; }
    .main-nav ul { gap: 1.5rem; }
    .footer { padding: 1rem 2rem; }
    .categories-grid, .exiting-layer { gap: 1.5rem; }
    .product-modal-body { flex-direction: column; }
    .product-modal-image { flex: 0 0 auto; height: 380px; min-height: 380px; }
    .product-modal-info { padding: 1.4rem 1.4rem 1.6rem; }
    .rack-hanger { width: 12%; height: 72%; }
    .rack-hanger:hover { width: 18%; }
}

@media screen and (max-width: 850px) {
    .header { padding: 0.8rem 1.5rem; height: auto; flex-wrap: wrap; gap: 0.8rem; }
    .logo { font-size: 1.4rem; }
    .logo i { font-size: 1.6rem; }
    .main-nav { order: 3; width: 100%; }
    .main-nav ul { gap: 1rem; flex-wrap: wrap; justify-content: center; }
    .main-nav ul li a { font-size: 0.9rem; }
    .contact-header { font-size: 0.9rem; }
    .contact-header .phone-number { padding: 0.3rem 0.9rem; font-size: 0.82rem; }
    .categories-section { padding: 1.2rem 1.2rem 2rem; justify-content: flex-start; }
    .section-header { margin-bottom: 1.5rem; flex-direction: column; gap: 1rem; }
    .section-title { font-size: 1.6rem; }
    .back-button {
        position: static;
        transform: none;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        max-height: 0;
        padding: 0;
        overflow: hidden;
        margin: 0;
        border-width: 0;
        transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .back-button.visible {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        max-height: 60px;
        padding: 0.6rem 1.2rem;
        margin: 0;
        border-width: 1px;
    }
    .categories-grid:not(.products) {
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: flex-start !important;
        gap: 1rem !important;
        height: auto !important;
        overflow: visible !important;
        padding: 0.5rem 0 !important;
    }
    .rail-viewport { flex: unset; min-height: auto; display: block; }
    .rail-viewport.products-mode { padding: 0 40px; }
    .categories-grid.products {
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        height: auto !important;
        padding: 0.5rem 0 !important;
        touch-action: pan-y !important;
        cursor: grab !important;
    }
    .category-card { width: 150px; height: 180px; border-radius: 22px; }
    .category-icon { font-size: 2.4rem; }
    .category-card h3 { font-size: 1.1rem; }
    .category-card p { font-size: 0.78rem; }
    .categories-grid.subcategories .category-card { width: 140px; height: 160px; }
    .categories-grid.subcategories .category-icon { font-size: 2.1rem; }
    .categories-grid.subcategories .category-card h3 { font-size: 0.95rem; }
    .categories-grid.products .category-card { width: 150px; height: 245px; flex-shrink: 0; }
    .product-image { height: 115px; }
    .product-body h4 { font-size: 0.85rem; }
    .product-body .product-sub { font-size: 0.68rem; }
    .product-price .new { font-size: 0.88rem; }
    .add-to-cart-btn { width: 32px; height: 32px; font-size: 0.85rem; }
    .rail-arrow { width: 38px; height: 38px; font-size: 0.95rem; }
    .rail-arrow-prev { right: -4px; }
    .rail-arrow-next { left: -4px; }
    .product-modal {
        top: auto; bottom: 0; left: 0; right: 0;
        transform: translateY(100%);
        width: 100%; max-height: 92vh;
        border-radius: 26px 26px 0 0;
        transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .product-modal.open { transform: translateY(0); }
    .product-modal-body { flex-direction: column; }
    .product-modal-image { flex: 0 0 auto; height: 320px; min-height: 320px; }
    .product-modal-image .badge { top: 12px; right: 12px; font-size: 0.7rem; padding: 0.25rem 0.7rem; }
    .product-modal-info { padding: 1rem 1.1rem 1.2rem; gap: 0.55rem; }
    .product-modal-info h2 { font-size: 1.15rem; }
    .product-modal-subtitle { font-size: 0.78rem; }
    .product-modal-rating { font-size: 0.78rem; }
    .product-modal-desc { font-size: 0.8rem; line-height: 1.6; padding: 0.5rem 0; }
    .product-modal-sizes label, .product-modal-colors label { font-size: 0.78rem; }
    .size-option { min-width: 36px; height: 34px; font-size: 0.8rem; padding: 0 0.6rem; }
    .product-modal-price .new { font-size: 1.3rem; }
    .product-modal-price .new small { font-size: 0.75rem; }
    .product-modal-add { padding: 0.7rem 1.2rem; font-size: 0.88rem; max-width: none; }
    .rack-hanger { width: 12%; height: 70%; }
    .rack-hanger:hover { width: 20%; }
    .color-option { width: 28px; height: 28px; }
    .color-option.clear-color i { font-size: 14px; }
    .footer { flex-direction: column; align-items: center; text-align: center; padding: 1.2rem 1.5rem; gap: 1rem; }
    .footer-menu { justify-content: center; gap: 1.2rem; }
    .copyright { font-size: 0.75rem; }
    .product-modal-options-row { flex-direction: column; gap: 0.6rem; }
    .product-modal-options-row .product-modal-sizes,
    .product-modal-options-row .product-modal-colors { min-width: 100%; }
    .cart-modal {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        transform: translateY(100%);
        width: 100%;
        max-height: 90vh;
        border-radius: 28px 28px 0 0;
        transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .cart-modal.open { transform: translateY(0); }
    .cart-modal:not(.open) { opacity: 0; visibility: hidden; }
    .cart-body { max-height: 50vh; }
    .cart-item { gap: 0.5rem; padding: 0.6rem; }
    .cart-item-img { width: 45px; height: 45px; }
    .cart-item-info h4 { font-size: 0.8rem; }
    .cart-item-info .cart-item-meta { font-size: 0.65rem; }
    .cart-item-actions { gap: 0.3rem; }
    .cart-item-buttons { gap: 0.3rem; }
    .cart-item-controls { padding: 0.1rem; gap: 0.2rem; }
    .qty-btn { width: 22px; height: 22px; font-size: 0.65rem; }
    .qty-value { font-size: 0.75rem; min-width: 16px; }
    .cart-item-remove { width: 26px; height: 26px; font-size: 0.75rem; }
    .cart-item-price { font-size: 0.75rem; }
    .cart-item-price small { font-size: 0.55rem; }
    .exiting-layer { flex-wrap: wrap !important; justify-content: center !important; align-items: flex-start !important; overflow: visible !important; }
}

@media screen and (max-width: 600px) {
    .header { flex-direction: column; align-items: center; padding: 0.8rem 1rem; }
    .logo { align-self: center; font-size: 1.3rem; }
    .contact-header { align-self: center; }
    .categories-section { padding: 1rem 0.8rem 2rem; }
    .section-header { margin-bottom: 1.2rem; }
    .section-title { font-size: 1.35rem; }
    .section-title::after { width: 60px; }
    .back-button { font-size: 0.85rem; padding: 0.5rem 1rem; }
    .back-button.visible { padding: 0.5rem 1rem; }
    .categories-grid, .exiting-layer { gap: 0.9rem; }
    .rail-viewport.products-mode { padding: 0 36px; }
    .category-card { width: calc(50% - 0.9rem); max-width: 165px; height: 160px; border-radius: 18px; padding: 0.8rem; }
    .category-icon { font-size: 2rem; margin-bottom: 0.6rem; }
    .category-card h3 { font-size: 1rem; }
    .category-card p { font-size: 0.7rem; }
    .card-line { width: 30px; margin-top: 0.5rem; }
    .categories-grid.subcategories .category-card { width: calc(50% - 0.9rem); max-width: 165px; height: 145px; }
    .categories-grid.subcategories .category-icon { font-size: 1.8rem; }
    .categories-grid.subcategories .category-card h3 { font-size: 0.9rem; }
    .categories-grid.products .category-card { width: 140px; height: 230px; padding: 0; }
    .product-image { height: 105px; }
    .product-body { padding: 0.55rem 0.65rem 0.65rem; }
    .product-body h4 { font-size: 0.82rem; }
    .product-body .product-sub { font-size: 0.62rem; margin-bottom: 0.35rem; }
    .product-price .new { font-size: 0.82rem; }
    .product-price .old { font-size: 0.62rem; }
    .add-to-cart-btn { width: 30px; height: 30px; font-size: 0.8rem; border-radius: 9px; }
    .rail-arrow { width: 34px; height: 34px; font-size: 0.85rem; }
    .rail-arrow-prev { right: -2px; }
    .rail-arrow-next { left: -2px; }
    .footer-menu { gap: 0.9rem; font-size: 0.85rem; }
    .footer-social { font-size: 1.2rem; gap: 1.2rem; }
    .product-modal-info h2 { font-size: 1.05rem; }
    .product-modal-image { height: 280px; min-height: 280px; }
    .rack-hanger { width: 13%; height: 65%; }
    .rack-hanger:hover { width: 22%; }
    .color-option { width: 26px; height: 26px; }
    .color-option.clear-color i { font-size: 12px; }
    .cart-btn { width: 40px; height: 40px; }
    .cart-item-img { width: 45px; height: 45px; }
    .form-row { flex-direction: column; gap: 0.6rem; }
}

@media screen and (max-width: 380px) {
    .category-card { width: 100%; max-width: 240px; height: 150px; }
    .categories-grid.subcategories .category-card { width: 100%; max-width: 240px; height: 140px; }
    .categories-grid.products .category-card { width: 130px; height: 225px; }
    .product-image { height: 100px; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
    .category-card { opacity: 1 !important; transform: none !important; }
}

/* ============================================================
   بزرگ‌تر کردن پاپ‌آپ محصول (نسخه نهایی)
   ============================================================ */
.product-modal {
    width: min(1250px, 96vw) !important;  /* عرض کل بزرگ‌تر */
}

/* رگال: 60% عرض کل */
.product-modal-image {
    flex: 0 0 60% !important;
    min-height: 420px !important;
    padding: 0.6rem !important;
}

/* اطلاعات: 40% عرض کل با حداقل عرض مناسب */
.product-modal-info {
    flex: 1 !important;
    padding: 2rem 2rem !important;
    min-width: 380px !important;
}

/* بزرگ‌تر کردن هر لباس روی رگال */
.rack-hanger {
    max-width: 110px !important;
}

/* بزرگ‌تر شدن لباس فعال */
.rack-hanger:hover,
.rack-hanger.active {
    flex: 2 1 0 !important;
}

/* در تبلت */
@media screen and (max-width: 1000px) {
    .product-modal {
        width: 96vw !important;
    }
    .product-modal-image {
        flex: 0 0 auto !important;
        height: 340px !important;
        min-height: 340px !important;
    }
    .product-modal-info {
        min-width: 0 !important;
        padding: 1.5rem 1.5rem 1.6rem !important;
    }
    .rack-hanger {
        max-width: 80px !important;
    }
}

/* در موبایل */
@media screen and (max-width: 850px) {
    .product-modal {
        width: 100% !important;
    }
    .product-modal-image {
        height: 300px !important;
        min-height: 300px !important;
    }
    .product-modal-info {
        padding: 1rem 1.1rem 1.2rem !important;
    }
    .rack-hanger {
        max-width: 60px !important;
    }
}

@media screen and (max-width: 600px) {
    .product-modal-image {
        height: 250px !important;
        min-height: 250px !important;
    }
    .rack-hanger {
        max-width: 48px !important;
    }
}

/* ============================================================
   جدا کردن دکمه لغو از بقیه رنگ‌ها
   ============================================================ */
.color-options {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    min-height: 38px;
}

/* دکمه لغو: چسبیده به سمت راست (شروع در RTL) با فاصله بیشتر */
.color-option.clear-color {
    margin-left: 0.6rem; /* فاصله از اولین رنگ */
    background-color: #fff;
    border: 2px solid #e74c3c;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e74c3c;
    font-size: 14px;
    flex-shrink: 0;
}

.color-option.clear-color i {
    font-size: 14px;
    line-height: 1;
}

.color-option.clear-color:hover {
    background: #fdf2f2;
    transform: scale(1.15);
}

.color-option.clear-color.selected {
    background: #fdf2f2;
    border-color: #c0392b;
    transform: scale(1.15);
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2);
}

/* یک خط عمودی جداکننده بعد از دکمه لغو */
.color-option.clear-color + .color-option {
    position: relative;
    margin-right: 0.4rem;
}

.color-option.clear-color + .color-option::before {
    content: '';
    position: absolute;
    right: -0.6rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 20px;
    background: rgba(71, 2, 7, 0.15);
}

/* ============================================================
   بزرگ‌تر کردن عکس روبرو (هم‌اندازه با کنار)
   ============================================================ */
.hanger-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 1;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.hanger-front {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(3.5); /* بزرگ‌تر شد */
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.rack-hanger:hover .hanger-img,
.rack-hanger.active .hanger-img {
    opacity: 0;
}

.rack-hanger:hover .hanger-front,
.rack-hanger.active .hanger-front {
    opacity: 1;
}



/* ============================================================
   هدر رنگ‌ها (label + دکمه لغو کنار هم)
   ============================================================ */
.colors-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.4rem;
}

.colors-header label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--brand-bg);
    margin: 0;
}

/* دکمه لغو کنار label */
#clearColorBtn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #e74c3c;
    color: #e74c3c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s, background 0.2s;
    flex-shrink: 0;
}

#clearColorBtn i { font-size: 12px; line-height: 1; }

#clearColorBtn:hover {
    background: #fdf2f2;
    transform: scale(1.15);
}

#clearColorBtn.selected {
    background: #fdf2f2;
    border-color: #c0392b;
    transform: scale(1.1);
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
}

/* ============================================================
   استایل ردیف رنگ‌ها
   ============================================================ */
.color-options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    min-height: 38px;
}

.color-option {
    width: 30px;
    height: 30px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
    padding: 0;
}

.color-option:hover { transform: scale(1.2); z-index: 2; }

.color-option.selected {
    border-color: var(--brand-bg);
    transform: scale(1.15);
    box-shadow: 0 0 0 3px rgba(71, 2, 7, 0.15);
}

/* ============================================================
   دکمه بزرگ‌نمایی عکس محصول
   ============================================================ */
.zoom-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.8rem;
    padding: 0.7rem 1rem;
    background: rgba(71, 2, 7, 0.06);
    border: 1.5px solid rgba(71, 2, 7, 0.15);
    color: var(--brand-bg);
    border-radius: 12px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, border-color 0.2s;
}

.zoom-btn i {
    font-size: 1rem;
    color: var(--brand-bg);
}

.zoom-btn:hover {
    background: rgba(71, 2, 7, 0.12);
    border-color: rgba(71, 2, 7, 0.3);
    transform: translateY(-1px);
}

.zoom-btn:active {
    transform: scale(0.98);
}

/* ============================================================
   پاپ‌آپ بزرگ‌نمایی
   ============================================================ */
.zoom-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 0, 1, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    z-index: 400;
}

.zoom-overlay.open {
    opacity: 1;
    visibility: visible;
}

.zoom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 100001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}
.zoom-modal.open {
    display: flex;
}


.zoom-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    background: #fff;
    border: 1px solid rgba(71, 2, 7, 0.15);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    border-radius: 50%;
    color: var(--brand-bg);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    cursor: pointer;
    transition: all 0.2s ease;
}

.zoom-modal-close:hover {
    background: #fdf4f0;
    transform: rotate(90deg);
}

.zoom-image {
    width: 100%;
    height: auto;
    max-height: 75vh;
    object-fit: contain;
    padding: 2rem;
    display: block;
    margin: 0 auto;
}

.zoom-info {
    padding: 0.8rem 1.5rem 1.2rem;
    text-align: center;
    background: #fff;
    border-top: 1px solid rgba(71, 2, 7, 0.08);
}

.zoom-info span {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--brand-bg);
}

/* ریسپانسیو بزرگ‌نمایی */
@media screen and (max-width: 850px) {
    .zoom-modal {
        width: 96vw;
        max-height: 92vh;
        border-radius: 20px;
    }
    .zoom-image {
        max-height: 70vh;
        padding: 1.5rem 1rem;
    }
    .zoom-modal-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
    }
    .zoom-btn {
        font-size: 0.8rem;
        padding: 0.65rem 1rem;
    }
}

@media screen and (max-width: 600px) {
    .zoom-image {
        max-height: 65vh;
        padding: 1rem 0.5rem;
    }
    .zoom-info span {
        font-size: 0.85rem;
    }
}

/* ============================================================
   رفع مشکل اسکرول در پاپ‌آپ محصول - ریسپانسیو
   ============================================================ */

/* اجازه اسکرول در بخش اطلاعات محصول در همه حالت‌ها */
.product-modal-info {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: thin !important;
    scrollbar-color: rgba(71, 2, 7, 0.25) transparent !important;
    scroll-behavior: smooth !important;
    overscroll-behavior: contain !important;
}

/* اسکرول‌بار ظریف و قشنگ (وبکیت) */
.product-modal-info::-webkit-scrollbar {
    width: 6px !important;
}

.product-modal-info::-webkit-scrollbar-track {
    background: transparent !important;
}

.product-modal-info::-webkit-scrollbar-thumb {
    background: rgba(71, 2, 7, 0.2) !important;
    border-radius: 10px !important;
    transition: background 0.2s !important;
}

.product-modal-info::-webkit-scrollbar-thumb:hover {
    background: rgba(71, 2, 7, 0.4) !important;
}

/* در موبایل و تبلت: محدود کردن ارتفاع بدنه مودال تا اسکرول داخلی فعال بشه */
@media screen and (max-width: 1000px) {
    .product-modal-body {
        overflow: hidden !important;
        min-height: 0 !important;
    }

    .product-modal-info {
        max-height: calc(92vh - 340px) !important; /* ارتفاع عکس رو کم می‌کنیم */
        padding-bottom: 1.5rem !important;
    }
}

@media screen and (max-width: 850px) {
    .product-modal-info {
        max-height: calc(92vh - 320px) !important;
        padding-bottom: 1.5rem !important;
    }
}

@media screen and (max-width: 600px) {
    .product-modal-info {
        max-height: calc(92vh - 280px) !important;
    }
}

/* فاصله امن برای دکمه خرید که همیشه دیده بشه */
.product-modal-price-row {
    padding-bottom: 0.5rem !important;
    flex-shrink: 0 !important;
}

/* در موبایل، دکمه افزودن به سبد رو کامل و در دسترس نگه دار */
@media screen and (max-width: 850px) {
    .product-modal-add {
        width: 100% !important;
        max-width: none !important;
        padding: 0.8rem 1rem !important;
    }
}

.otp-digit.success {
    border-color: #2ecc71 !important;
    color: #2ecc71 !important;
    background: rgba(46, 204, 113, 0.1) !important;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.2) !important;
    transition: all 0.3s ease;
}



/* ============================================================
   آیتم منوی فعال
   ============================================================ */
.main-nav ul li a.active {
    color: #ffd9b3 !important;
    opacity: 1;
    font-weight: 700;
}

.main-nav ul li a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: 0;
    width: 100%;
    height: 2px;
    background-color: #ffd9b3 !important;
}

/* بدنه صفحات داینامیک (page.php) */
.page-body {
    background-color: var(--brand-bg);
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

.page-main {
    flex: 1;
    padding: 2rem 1rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.page-card {
    background: #fff;
    color: var(--brand-bg);
    border-radius: 22px;
    padding: 2.5rem;
    max-width: 900px;
    width: 100%;
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.5);
    line-height: 1.9;
}

.page-card h1 {
    color: var(--brand-bg);
    font-size: 1.9rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--brand-accent);
}

.page-card h2 { color: var(--brand-bg); margin: 1.5rem 0 0.8rem; font-size: 1.35rem; }
.page-card h3 { color: var(--brand-bg); margin: 1.2rem 0 0.6rem; font-size: 1.1rem; }
.page-card p { margin-bottom: 1rem; }
.page-card ul, .page-card ol { margin: 0.8rem 0 1rem 1.5rem; }
.page-card a { color: var(--brand-bg); }
.page-card img { max-width: 100%; height: auto; border-radius: 10px; }
.page-card code {
    background: #fdf4f0;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
}

@media (max-width: 768px) {
    .page-card { padding: 1.5rem; }
    .page-card h1 { font-size: 1.4rem; }
    .page-main { padding: 1rem 0.5rem; }
}

/* ============================================================
   استایل سفارشی اسکرول‌بار (مدرن و هماهنگ با تم سایت)
   ============================================================ */

/* برای مرورگرهای وب‌کیت (کروم، سافاری، اج) */
::-webkit-scrollbar {
    width: 12px; /* عرض اسکرول‌بار عمودی */
    height: 12px; /* ارتفاع اسکرول‌بار افقی */
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.15); /* پس‌زمینه شیار اسکرول */
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #ffd9b3; /* رنگ دستگیره اسکرول (کرم) */
    border-radius: 10px;
    border: 2px solid #470207; /* حاشیه زرشکی برای جدا شدن از پس‌زمینه */
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: #ffb48a; /* رنگ روشن‌تر هنگام هاور */
}

/* برای فایرفاکس */
* {
    scrollbar-width: thin;
    scrollbar-color: #ffd9b3 #470207;
}

/* ============================================================ */
/* کد تخفیف */
/* ============================================================ */
.discount-box {
    background: #fdf9f7;
    border: 1.5px solid #ffd9b3;
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
}
.discount-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    cursor: pointer;
    user-select: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--brand-bg, #470207);
    transition: background 0.2s;
}
.discount-box-header:hover { background: #fdf4f0; }
.discount-chevron { transition: transform 0.3s; font-size: 0.8rem; }
.discount-chevron.open { transform: rotate(180deg); }
.discount-box-body {
    padding: 0.8rem 1rem 1rem;
    border-top: 1px solid #ffe8d6;
}
.discount-input-wrap {
    display: flex;
    gap: 0.5rem;
}
#discountInput {
    flex: 1;
    padding: 0.6rem 0.8rem;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    direction: ltr;
    text-align: center;
}
#discountInput:focus { outline: none; border-color: var(--brand-bg, #470207); }
#discountInput:disabled { background: #f0f0f0; cursor: not-allowed; }
#discountApplyBtn {
    background: var(--brand-bg, #470207);
    color: #fff;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}
#discountApplyBtn:disabled { opacity: 0.6; cursor: not-allowed; }
.discount-msg {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    display: none;
}
.discount-msg.error {
    display: block;
    background: #ffebee;
    color: #c62828;
    border-right: 3px solid #c62828;
}
.discount-msg.success {
    display: block;
    background: #e8f5e9;
    color: #2e7d32;
    border-right: 3px solid #2e7d32;
}
.discount-applied {
    margin-top: 0.6rem;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
}
.discount-remove-btn {
    background: #c62828;
    color: #fff;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================ */
/* انتخاب روش ارسال */
/* ============================================================ */
.shipping-box {
    background: #fff;
    border: 1px solid #f0e4dc;
    border-radius: 12px;
    padding: 0.9rem;
    margin: 1rem 0;
}
.shipping-box-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--brand-bg, #470207);
    margin-bottom: 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.shipping-method {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.65rem 0.8rem;
    border: 2px solid rgba(71,2,7,0.08);
    border-radius: 10px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    background: #fdfaf7;
}
.shipping-method:last-child { margin-bottom: 0; }
.shipping-method:hover {
    border-color: rgba(71,2,7,0.25);
    background: #fdf4f0;
}
.shipping-method.selected {
    border-color: var(--brand-bg, #470207);
    background: #fdf4f0;
}
.shipping-method input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--brand-bg, #470207);
    cursor: pointer;
}
.shipping-method-info {
    flex: 1;
}
.shipping-method-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--brand-bg, #470207);
    margin-bottom: 0.15rem;
}
.shipping-method-desc {
    font-size: 0.75rem;
    color: #999;
}
.shipping-method-price {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--brand-bg, #470207);
    white-space: nowrap;
}

/* ============================================================ */
/* استایل selectهای استان و شهر در فرم‌های خرید */
/* ============================================================ */
.checkout-form .form-row select,
.auth-tab-content .form-row select,
#editAddressModal .form-row select {
    flex: 1;
    padding: 0.75rem 0.8rem;
    border: 1px solid #e0d5cf;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9rem;
    background: #fff;
    color: #470207;
    direction: rtl;
    text-align: right;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23470207' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 0.7rem center;
    background-size: 16px;
    padding-left: 2rem;
}

.checkout-form .form-row select:focus,
.auth-tab-content .form-row select:focus,
#editAddressModal .form-row select:focus {
    outline: none;
    border-color: #470207;
    box-shadow: 0 0 0 3px rgba(71, 2, 7, 0.08);
}

.checkout-form .form-row select:disabled,
.auth-tab-content .form-row select:disabled,
#editAddressModal .form-row select:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
    opacity: 0.7;
}

.checkout-form .form-row select option,
.auth-tab-content .form-row select option,
#editAddressModal .form-row select option {
    padding: 0.5rem;
    font-family: inherit;
    direction: rtl;
    text-align: right;
}

/* ============================================================ */
/* اسکرول در مودال سبد خرید */
/* ============================================================ */
.cart-modal {
    max-height: 90vh !important;
    overflow-y: auto !important;
    display: flex;
    flex-direction: column;
}

#cartStep2 {
    max-height: calc(90vh - 80px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 1rem;
    /* اسکرول نرم */
    scroll-behavior: smooth;
}

/* برای مرحله پرداخت هم (اگر بلند شد) */
#cartStepPayment {
    max-height: calc(90vh - 80px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 1rem;
}

/* اسکرول‌بار ظریف */
#cartStep2::-webkit-scrollbar,
#cartStepPayment::-webkit-scrollbar,
.cart-modal::-webkit-scrollbar {
    width: 6px;
}
#cartStep2::-webkit-scrollbar-thumb,
#cartStepPayment::-webkit-scrollbar-thumb,
.cart-modal::-webkit-scrollbar-thumb {
    background: rgba(71, 2, 7, 0.3);
    border-radius: 3px;
}
#cartStep2::-webkit-scrollbar-track,
#cartStepPayment::-webkit-scrollbar-track,
.cart-modal::-webkit-scrollbar-track {
    background: transparent;
}

/* ============================================================
   رگه‌های سفید کم‌رنگ مایل به طوسی روی بک‌گراند زرشکی
   ============================================================ */
html, body {
    /* رنگ پایه زرشکی */
    background-color: var(--brand-bg); 
    
    /* آدرس عکس در روت */
    background-image: url('color-back.png'); 
    
    /* 🔴 این دو خط باعث تکرار کنار هم می‌شوند */
    background-repeat: repeat !important; 
    background-size: 300px auto; /* 🔴 اندازه کاشی‌ها. عدد 300px را کم و زیاد کنید تا رگه‌ها ریزتر یا درشت‌تر شوند */
    
    /* 🔴 این خط باعث می‌شود رنگ زرشکی سایت با عکس ترکیب شود تا خطوط سفید/طوسی ملایم شوند */
    background-blend-mode: overlay; 
    
    /* ثابت ماندن بک‌گراند هنگام اسکرول */
    background-attachment: fixed;
}

    /* گالری محصول در پاپ‌آپ */
    .product-gallery {
        position: relative;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.5rem;
        box-sizing: border-box;
    }
    .product-gallery .gallery-slide {
        position: absolute;
        inset: 0.5rem;
        display: none;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
        overflow: hidden;
        background: #fafafa;
        cursor: zoom-in;
    }
    .product-gallery .gallery-slide.active {
        display: flex;
    }
    .product-gallery .gallery-image {
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
        border-radius: 12px;
        user-select: none;
    }
    .product-gallery .gallery-video {
        max-width: 100%;
        max-height: 100%;
        border-radius: 12px;
        cursor: default;
    }
    .product-gallery .gallery-video-badge {
        position: absolute;
        top: 12px;
        right: 12px;
        background: rgba(123, 31, 162, 0.85);
        color: #fff;
        padding: 0.3rem 0.6rem;
        border-radius: 20px;
        font-size: 0.7rem;
        display: flex;
        align-items: center;
        gap: 0.25rem;
        pointer-events: none;
    }
    .product-gallery .gallery-thumbs {
        position: absolute;
        bottom: 8px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        gap: 0.35rem;
        padding: 0.3rem 0.5rem;
        background: rgba(255, 255, 255, 0.85);
        backdrop-filter: blur(6px);
        border-radius: 20px;
        z-index: 20;
        max-width: 90%;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .product-gallery .gallery-thumbs::-webkit-scrollbar { display: none; }
    .product-gallery .gallery-thumb {
        width: 38px;
        height: 38px;
        border-radius: 8px;
        border: 2px solid transparent;
        padding: 0;
        cursor: pointer;
        overflow: hidden;
        position: relative;
        background: #f5f5f5;
        flex-shrink: 0;
        transition: all 0.2s;
    }
    .product-gallery .gallery-thumb.active {
        border-color: var(--brand-bg, #470207);
        transform: scale(1.08);
    }
    .product-gallery .gallery-thumb img {
        width: 100%; height: 100%; object-fit: cover;
    }
    .product-gallery .gallery-thumb-video {
        position: absolute;
        inset: 0;
        background: rgba(123, 31, 162, 0.55);
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.7rem;
    }
    .product-gallery .gallery-nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 36px;
        height: 36px;
        border-radius: 50%;
        border: none;
        background: rgba(255, 255, 255, 0.9);
        color: var(--brand-bg, #470207);
        font-size: 0.9rem;
        cursor: pointer;
        z-index: 21;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s;
    }
    .product-gallery .gallery-nav:hover { background: #fff; transform: translateY(-50%) scale(1.1); }
    .product-gallery .gallery-nav-prev { right: 10px; }
    .product-gallery .gallery-nav-next { left: 10px; }
    .product-modal-image { position: relative; }
    .product-modal-image .badge { z-index: 25; }
    
    
    @media (max-width: 600px) {
    .zoom-gallery {
        padding: 0.5rem !important;
        gap: 0.5rem !important;
    }
    .zoom-controls {
        top: 50px !important;
        left: 4px !important;
        padding: 0.2rem !important;
    }
    .zoom-controls button {
        width: 30px !important;
        height: 30px !important;
    }
    .zoom-thumbs {
        gap: 0.3rem !important;
        padding: 0.3rem 0.4rem !important;
    }
    .zoom-thumb {
        width: 36px !important;
        height: 36px !important;
    }
    .zoom-nav-prev,
    .zoom-nav-next {
        bottom: 60px !important;
        width: 32px !important;
        height: 32px !important;
    }
}