/* ============ CSS VARIABLES ============ */
:root {
    --color-gold: #c9a227;
    --color-gold-light: #ffd700;
    --color-gold-dark: #8b6914;
    --color-adult-bg: #1a1a2e;
    --color-adult-card: #16213e;
    --color-adult-text: #f0f0f0;
    --color-adult-accent: #c9a227;
    --color-child-bg: #fff0f5;
    --color-child-card: #ffffff;
    --color-child-text: #4a4a4a;
    --color-child-accent: #ff69b4;
    --color-child-pink: #ffb6c1;
    --radius: 1.25rem;
    --radius-sm: 0.75rem;
    --shadow-card: 0 4px 10px rgba(0,0,0,0.08);
    --shadow-card-hover: 0 8px 30px rgba(0,0,0,0.12);

}


/* ============ GLOBAL ============ */
* {
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Vazirmatn', system-ui, sans-serif;
}

/* FONTS */
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn/Vazirmatn-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
/* FONTS */

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* ============ ANIMATIONS ============ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes pulse-soft {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes priceUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); color: #22c55e; }
    100% { transform: scale(1); }
}
@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.animate-fadeInUp { animation: fadeInUp 0.6s ease-out forwards; }
.animate-fadeIn { animation: fadeIn 0.4s ease-out forwards; }
.animate-slideInRight { animation: slideInRight 0.5s ease-out forwards; }
.price-updated { animation: priceUpdate 0.4s ease; }

/* Stagger children */
.stagger-children > * { opacity: 0; animation: fadeInUp 0.5s ease-out forwards; }
.stagger-children > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(7) { animation-delay: 0.35s; }
.stagger-children > *:nth-child(8) { animation-delay: 0.4s; }

/* ============ FORM ELEMENTS ============ */
.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-sm);
    border: 1.5px solid #e5e7eb;
    background: #fff;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    outline: none;
    font-family: inherit;
    text-align: right;
}
.form-input:focus {
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15);
}
.form-input::placeholder { color: #9ca3af; }

.form-select {
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-sm);
    border: 1.5px solid #e5e7eb;
    background: #fff;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    outline: none;
    font-family: inherit;
    cursor: pointer;
}
.form-select:focus {
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15);
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-error {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* ============ BUTTONS ============ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #c9a227, #8b6914);
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(201, 162, 39, 0.3);
    position: relative;
    overflow: hidden;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 162, 39, 0.4);
}
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-sm);
    background: #f3f4f6;
    color: #374151;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1.5px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-secondary:hover { background: #e5e7eb; }
.btn-secondary:active { transform: scale(0.98); }

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 9999px;
    background: rgba(255,255,255,0.15);
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    border: 1.5px solid rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}
.btn-outline:hover { background: rgba(255,255,255,0.25); border-color: rgba(255,255,255,0.5); }

/* ============ CARDS ============ */
.product-card {
    background: white;
    border-radius: var(--radius);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    will-change: transform;
    backface-visibility: hidden;
    display: flex;                  
    flex-direction: column;
    height: 100%;                   
}

.product-card .card-flag {
    position: absolute;
    top: 10px;
    left: 0;                              
    font-size: 0.58rem;
    font-weight: 800;
    padding: 4px 10px 4px 6px;
    border-radius: 0 999px 999px 0;       
    white-space: nowrap;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    color: white;
    background: rgba(13, 27, 62, 0.85);  
    z-index: 2;
}

.product-card--child .card-flag {
    background: #880e4f; 
}

.product-card .card-flag--discount {
    left: auto;
    right: 0;                             
    border-radius: 999px 0 0 999px;      
    padding: 4px 6px 4px 10px;
    background: #ef4444;                  
}

.product-card:hover {
    transform: translateY(-6px);
}

.product-card .image-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    border-radius: var(--radius) var(--radius) 0 0;
    flex-shrink: 0;               
}

.product-card .image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    display: block;
}

.product-card:hover .image-wrapper img {
    transform: scale(1.08);
}

.product-card .card-body {
    padding: 10px;
    display: flex;
    flex-direction: column;
    flex: 1;     
    min-height: 90px;                   
}

.product-card .card-category {
    font-size: 0.65rem;
    color: #9ca3af;
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-card .card-name {
    font-size: clamp(1rem, 2vw, 2);
    font-weight: 700;
    color: #1f2937;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;                        
    margin-bottom: 8px;
}

.price-tag {
    font-weight: 700;
    letter-spacing: -0.02em;
}
.price-old {
    text-decoration: line-through;
    color: #9ca3af;
    font-size: 0.85em;
}
.price-new {
    color: #c9a227;
    font-size: 3.1em;
}

.product-card .card-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    margin-top: auto;              
    flex-wrap: nowrap;
}

.product-card .price-old {
    font-size: 0.65rem;
    color: #9ca3af;
    text-decoration: line-through;
    white-space: nowrap;
    display: block;
    margin-bottom: 2px;
}

.product-card .price-new {
    font-size: clamp(0.85rem, 2.5vw, 1rem);
    font-weight: 800;
    background: linear-gradient(90deg, #92400e, #d97706, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
    min-width: 0;
    flex-shrink: 1;
}

.product-card .price-new span {
    font-size: 1rem;
    font-weight: 400;
    color: #9ca3af;
}

.product-card .card-badge {
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 999px;
    background: #fefce8;
    color: #92400e;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    border: 1px solid #fde68a;
}


/* ============ SWIPER CUSTOM ============ */
.swiper-pagination-bullet {
    background: #fff;
    opacity: .5;
    width: 6px;
    height: 6px;
    transition: all .3s ease;
}

.swiper-pagination-bullet-active {
    background:#facc15!important;
    opacity: 1;
    width: 20px;
    height: 6px;
    border-radius: 5px;
}

.swiper-button-next,
.swiper-button-prev {
    width: 34px !important;
    height: 34px !important;
    color: white;
    background: rgba(0,0,0,.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 9999px;
    top: 50% !important;
    margin-top: 0 !important;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 14px !important;
    font-weight: bold;
}

@media (max-width:640px) {
    .swiper-button-next,
    .swiper-button-prev {
        width: 26px !important;
        height: 26px !important;
    }
    .swiper-button-next:after,
    .swiper-button-prev:after {
        font-size: 11px !important;
    }
}

/* ============ CATEGORIES ============ */
.cat-card__bg {
    background-image: var(--cat-bg, none);
    will-change: transform; 
    transform: translateZ(0);
    transition: transform 0.6s ease;
}
.group:hover .cat-card__bg { 
    transform: scale(1.04) translateZ(0);
}

.cat-card--adult,
.cat-card--child {
    transform: translateY(0);
    will-change: transform;
    isolation: isolate;
    contain: layout style;
    backface-visibility: hidden; 
    -webkit-backface-visibility: hidden;
    transition: transform 0.35s cubic-bezier(0.25,0.46,0.45,0.94),
                box-shadow 0.35s ease;
}
.cat-card--adult:hover,
.cat-card--child:hover { transform: translateY(-5px); }

.cat-card--adult {
    background: linear-gradient(145deg, #0d1b3e 0%, #1a2a5e 55%, #0d1b3e 100%);
    box-shadow: 0 20px 50px rgba(13,27,62,0.5), inset 0 1px 0 rgba(255,255,255,0.06);
}
.cat-card--child {
    background: linear-gradient(145deg, #fce4ec 0%, #f8bbd0 55%, #fce4ec 100%);
    box-shadow: 0 20px 50px rgba(236,64,122,0.2);
}

.cat-card--adult .cat-card__overlay {
    background: linear-gradient(to bottom,
        rgba(13,27,62,0.12) 0%,
        rgba(13,27,62,0.48) 40%,
        rgba(10,18,42,0.94) 100%);
}
.cat-card--child .cat-card__overlay {
    background: linear-gradient(to bottom,
        transparent 0%,
        rgba(219, 112, 147, 0.25) 45%,
        rgba(185, 55, 100, 0.88) 100%);
}

.cat-card__glass {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transform: translateZ(0);
    will-change: backdrop-filter;
    -webkit-mask-image: linear-gradient(
        to top,
        black 0%,
        black 35%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to top,
        black 0%,
        black 35%,
        transparent 100%
    );
}
.cat-card--adult .cat-card__glass {
    background: linear-gradient(to bottom,
        transparent 0%,
        rgba(13,27,62,0.3) 35%,
        rgba(10,18,42,0.6) 100%);
}
.cat-card--child .cat-card__glass {
    background: linear-gradient(to bottom,
        transparent 0%,
        rgba(248,187,208,0.35) 35%,
        rgba(244,143,177,0.68) 100%);
}

.cat-cta--adult {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.15);
}
.group:hover .cat-cta--adult {
    background: linear-gradient(135deg, #c9a84c 0%, #e8cc7a 50%, #c9a84c 100%);
    color: #0d1b3e;
    border-color: transparent;
    box-shadow: 0 8px 32px rgba(201,168,76,0.45),
                inset 0 1px 0 rgba(255,255,255,0.3);
}

.cat-cta--adult,
.cat-cta--child {
    transition: background 0.5s ease,
                color 0.45s ease,
                border-color 0.45s ease,
                box-shadow 0.5s ease;
}

.cat-cta--child { 
    background: rgba(255, 255, 255, 0.35);
    color: #7b1040;
    border: 1px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.group:hover .cat-cta--child {
    background: linear-gradient(135deg, #880e4f 0%, #c2185b 50%, #880e4f 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 8px 28px rgba(136,14,79,0.45),
                inset 0 1px 0 rgba(255,255,255,0.2);
}

/* ============ THEME SYSTEM - COMPLETE ============ */

/* ===== ADULT THEME ===== */
.theme-adult {
    background-color: #1a1a2e !important;
    color: #f0f0f0 !important;
    min-height: 100vh;
}

.theme-adult .product-card {
    background: #16213e !important;
    color: #f0f0f0 !important;
    border: none !important;
}

.theme-adult .product-card .card-name {
    color: #ffffff !important;
}

.theme-adult .product-card .card-category {
    color: #9ca3af !important;
}

.theme-adult .product-card .price-new {
    background: linear-gradient(90deg, #f59e0b, #fbbf24) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

.theme-adult .product-card .price-old {
    color: #6b7a94 !important;
}

/* ===== CHILD THEME ===== */
.theme-child {
    background-color: #fff0f5 !important;
    color: #4a4a4a !important;
    min-height: 100vh;
}

.theme-child .product-card {
    background: #ffffff !important;
    border: 1px solid #ffe4e1 !important;
    color: #4a4a4a !important;
}

.theme-child .product-card .card-name {
    color: #1f2937 !important;
}

.theme-child .product-card .card-category {
    color: #9ca3af !important;
}

.theme-child .product-card .price-new {
    color: #db2777 !important;
    background: none !important;
    -webkit-text-fill-color: #db2777 !important;
}

.theme-child .product-card .price-old {
    color: #9ca3af !important;
}

/* ===== استایل‌های اضافی برای تم کودک ===== */
.theme-child h1,
.theme-child h2,
.theme-child h3 {
    color: #4a4a4a !important;
}

.theme-child .text-gray-800 {
    color: #4a4a4a !important;
}

.theme-child .text-gray-900 {
    color: #1f2937 !important;
}

.theme-child .border-pink-100 {
    border-color: #ffe4e1 !important;
}

.theme-child .bg-pink-50 {
    background-color: #fdf2f8 !important;
}

.theme-child .bg-pink-100 {
    background-color: #fce7f3 !important;
}

.theme-child .text-pink-400 {
    color: #f472b6 !important;
}

.theme-child .text-pink-500 {
    color: #ec4899 !important;
}

.theme-child .text-pink-600 {
    color: #db2777 !important;
}

.theme-child .hover\\:text-pink-600:hover {
    color: #db2777 !important;
}

/* ===== استایل‌های اضافی برای تم بزرگسال ===== */
.theme-adult h1,
.theme-adult h2,
.theme-adult h3 {
    color: #f0f0f0 !important;
}

.theme-adult .text-gray-800 {
    color: #e5e7eb !important;
}

.theme-adult .text-gray-900 {
    color: #f3f4f6 !important;
}

.theme-adult .border-gray-200 {
    border-color: #1e3a5f !important;
}

.theme-adult .bg-gray-50 {
    background-color: #0f1a30 !important;
}

.theme-adult .bg-gray-100 {
    background-color: #16213e !important;
}

.theme-adult .text-gray-400 {
    color: #6b7a94 !important;
}

.theme-adult .text-gray-500 {
    color: #8b9bb5 !important;
}

.theme-adult .text-gray-600 {
    color: #a0b0c8 !important;
}

.theme-adult .hover\\:text-yellow-400:hover {
    color: #f59e0b !important;
}

/* ============================================================
   ============ OVERRIDE FOR PRODUCT DETAIL ============
   ============================================================ */

/* اطمینان از اعمال تم روی بدنه اصلی */
.theme-adult,
.theme-child {
    transition: background-color 0.3s ease;
}

/* استایل‌های مربوط به جعبه قیمت در تم‌های مختلف */
.theme-adult #product-price-box .text-gray-500 {
    color: #6b7a94 !important;
}

.theme-child #product-price-box .text-gray-500 {
    color: #9ca3af !important;
}

.theme-adult #product-price-box .text-gray-400 {
    color: #8b9bb5 !important;
}

.theme-child #product-price-box .text-gray-400 {
    color: #9ca3af !important;
}

/* استایل‌های مربوط به breadcrumb */
.theme-adult .breadcrumb-text {
    color: #9ca3af !important;
}

.theme-child .breadcrumb-text {
    color: #f472b6 !important;
}

/* ============================================================
   ============ QTY STEPPER - THEME OVERRIDES ============
   ============================================================ */

.theme-adult .qty-stepper {
    background: #0f1a30 !important;
    border-color: #1e3a5f !important;
}

.theme-adult .qty-stepper:hover {
    border-color: #f59e0b !important;
}

.theme-adult .qty-stepper input {
    color: white !important;
}

.theme-adult .qty-stepper button {
    color: #6b7a94 !important;
}

.theme-adult .qty-stepper button:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #f59e0b !important;
}

.theme-child .qty-stepper {
    border-color: #ffb6c1 !important;
    background: white !important;
}

.theme-child .qty-stepper:hover {
    border-color: #ff69b4 !important;
}

.theme-child .qty-stepper input {
    color: #4a4a4a !important;
}

.theme-child .qty-stepper button {
    color: #9ca3af !important;
}

.theme-child .qty-stepper button:hover {
    background: #fdf2f8 !important;
    color: #ff69b4 !important;
}

/* ============================================================
   ============ MEDIA THUMBNAILS - THEME OVERRIDES ============
   ============================================================ */

.theme-adult .media-thumb {
    background: #16213e !important;
    border-color: #1e3a5f !important;
}

.theme-adult .media-thumb.active-thumb {
    border-color: #f59e0b !important;
}

.theme-child .media-thumb {
    background: white !important;
    border-color: #ffe4e1 !important;
}

.theme-child .media-thumb.active-thumb {
    border-color: #f59e0b !important;
}
/* ============ TOAST ============ */

/* ===== BANNER GLASS ===== */
.banner-glass {
    position: relative;
    min-height: 160px;
    padding: 2rem 1.75rem 1.5rem;
    overflow: hidden;
    isolation: isolate;
}

.banner-glass::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    mask-image: linear-gradient(
        to top,
        black 0%,
        black 40%,
        rgba(0,0,0,0.85) 60%,
        rgba(0,0,0,0.3) 80%,
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        to top,
        black 0%,
        black 40%,
        rgba(0,0,0,0.85) 60%,
        rgba(0,0,0,0.3) 80%,
        transparent 100%
    );
}

.banner-glass::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.72) 0%,
        rgba(10, 8, 5, 0.55) 45%,
        rgba(20, 15, 5, 0.15) 80%,
        transparent 100%
    );
}

@media (max-width: 640px) {
    .banner-glass {
        min-height: 100px;
        padding: 1.25rem 1rem 1rem;
    }
    .banner-glass::before {
        backdrop-filter: blur(22px) saturate(180%);
        -webkit-backdrop-filter: blur(22px) saturate(180%);
        mask-image: linear-gradient(
            to top,
            black 0%,
            black 50%,
            rgba(0,0,0,0.7) 70%,
            transparent 100%
        );
        -webkit-mask-image: linear-gradient(
            to top,
            black 0%,
            black 50%,
            rgba(0,0,0,0.7) 70%,
            transparent 100%
        );
    }
}

/* ===== PAGINATION DOTS ===== */
.swiper-pagination-bullet {
    width: 6px;
    height: 6px;
    background: rgba(255, 215, 0, 0.35);
    opacity: 1;
    border: 1px solid rgba(212, 175, 55, 0.4);
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    width: 22px;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, #D4AF37, #FFD700);
    border-color: transparent;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
}

/* ============ FEATURE PRODUCTS ============ */
.featured-products-swiper {
    overflow: hidden;
    padding: 8px 4px 16px;
}
.featured-products-swiper .swiper-slide {
    height: auto;
    opacity: 0.45;
    transform: scale(0.93);
    transform-origin: center center;
    transition: opacity 0.35s ease, transform 0.35s ease;
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.featured-products-swiper .swiper-slide-next,
.featured-products-swiper .swiper-slide-prev {
    opacity: 0.45;
    transform: scale(0.93);
}
.featured-products-swiper .swiper-slide .product-card {
    transition: transform 0.3s ease;
    transform: scale(0.95);
    transform-origin: center center;
    will-change: transform;
    backface-visibility: hidden;
}

.featured-products-swiper .swiper-slide-active {
    opacity: 1;
    transform: scale(1);
}

.featured-products-swiper .swiper-button-next,
.featured-products-swiper .swiper-button-prev {
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
    color: #ca8a04;
    top: 40%;
    transition: box-shadow 0.2s ease;
}

.featured-products-swiper .swiper-button-next:hover,
.featured-products-swiper .swiper-button-prev:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.18);
}

.featured-products-swiper .swiper-button-next:after,
.featured-products-swiper .swiper-button-prev:after {
    font-size: 0.85rem;
    font-weight: 900;
}

.featured-products-swiper .swiper-button-prev {
    left: 0;
}
.featured-products-swiper .swiper-button-next {
    right: 0;
}

/* ============ NEW PRODUCTS ============ */
.new-products-swiper {
    overflow: hidden;
    width: 100%;
}
.new-products-swiper .swiper-wrapper {
    transition-timing-function: linear !important;
}
.new-products-swiper .swiper-slide {
    height: auto;
}

/* ============ TOAST ============ */
.toast {
    background: white;
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 280px;
    animation: slideInToast 0.4s ease-out forwards;
    pointer-events: auto;
    border-right: 4px solid #22c55e;
}
.toast.error { border-right-color: #ef4444; }
.toast.warning { border-right-color: #f59e0b; }
@keyframes slideInToast {
    from { opacity: 0; transform: translateY(-20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.toast-exit { animation: toastOut 0.3s ease-in forwards !important; }
@keyframes toastOut {
    to { opacity: 0; transform: translateY(-10px) scale(0.95); }
}

/* ============ SEARCH DROPDOWN ============ */
.search-result-item {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #f3f4f6;
}
.search-result-item:hover { background: #f9fafb; }
.search-result-item:last-child { border-bottom: none; }
.search-result-item img { border-radius: 0.5rem; object-fit: cover; }

/* ============ LOADER ============ */
.loader {
    width: 24px;
    height: 24px;
    border: 3px solid #e5e7eb;
    border-top-color: var(--color-gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ MISC ============ */
.text-shadow { text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.pb-safe { padding-bottom: env(safe-area-inset-bottom, 0px); }

/* Discount badge */
.badge-discount {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
}

/* Auth card */
.auth-card {
    background: white;
    border-radius: 2rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    overflow: hidden;
    position: relative;
}
.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #c9a227, #8b6914, #c9a227);
}
.auth-step-indicator {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}
.auth-step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e5e7eb;
    transition: all 0.3s ease;
}
.auth-step-dot.active { background: #c9a227; width: 24px; border-radius: 4px; }

/* OTP Inputs */
.otp-input-group {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    direction: ltr;
}
.otp-input-group input {
    width: 3rem;
    height: 3.5rem;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: 0.75rem;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
    outline: none;
}
.otp-input-group input:focus {
    border-color: #c9a227;
    box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.15);
    transform: scale(1.05);
}

/* ============================================================
   ============ PRODUCT DETAIL SPECIFIC ============
   ============================================================ */

/* Quantity stepper - product detail override */
.qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
    background: white;
    transition: border-color 0.3s ease;
}

.qty-stepper:hover {
    border-color: #f59e0b;
}

.qty-stepper button {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s;
    font-size: 1.25rem;
    font-weight: 700;
    user-select: none;
}

.qty-stepper button:hover {
    background: #f3f4f6;
    color: #f59e0b;
}

.qty-stepper button:active {
    transform: scale(0.9);
}

.qty-stepper input {
    width: 2.5rem;
    text-align: center;
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    outline: none;
    background: transparent;
    -moz-appearance: textfield;
}

.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Theme Adult - qty stepper */
.theme-adult .qty-stepper {
    background: #0f1a30;
    border-color: #1e3a5f;
}
.theme-adult .qty-stepper:hover {
    border-color: #f59e0b;
}
.theme-adult .qty-stepper input {
    color: white;
}
.theme-adult .qty-stepper button {
    color: #6b7a94;
}
.theme-adult .qty-stepper button:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #f59e0b;
}

/* Theme Child - qty stepper */
.theme-child .qty-stepper {
    border-color: #ffb6c1;
}
.theme-child .qty-stepper:hover {
    border-color: #ff69b4;
}
.theme-child .qty-stepper input {
    color: #4a4a4a;
}
.theme-child .qty-stepper button:hover {
    color: #ff69b4;
}

/* Media Thumbnails */
.media-thumb {
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.media-thumb img {
    transition: transform 0.3s ease;
}

.media-thumb:hover img {
    transform: scale(1.05);
}

.media-thumb.active-thumb {
    border-color: #f59e0b !important;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

/* Product Price Box */
#product-price-box {
    transition: all 0.3s ease;
}

#product-price-box [data-live-price] {
    transition: color 0.3s ease, transform 0.3s ease;
}

/* Gallery Modal */
#gallery-modal {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.92);
}

#gallery-modal:not(.hidden) {
    animation: modalFadeIn 0.25s ease-out;
}

#gallery-modal .modal-thumb {
    transition: all 0.3s ease;
    cursor: pointer;
    opacity: 0.55;
}

#gallery-modal .modal-thumb:hover {
    opacity: 0.85;
    transform: scale(1.05);
}

#gallery-modal .modal-thumb.border-yellow-500 {
    opacity: 1;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

/* Modal thumbs scrollbar */
#modal-thumbs::-webkit-scrollbar {
    height: 4px;
}
#modal-thumbs::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
}
#modal-thumbs::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}
#modal-thumbs::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Modal images */
#modal-img {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

#modal-swipe-area {
    transform: translateZ(0);
}

/* Product grid */
.product-grid {
    display: grid;
    gap: 1rem;
}

@media (min-width: 640px) {
    .product-grid {
        gap: 1.25rem;
    }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 640px) {
    .product-card { border-radius: 1rem; }
    .auth-card { border-radius: 1.5rem; }
    .btn-primary { padding: 0.75rem 1.25rem; font-size: 0.9rem; }
    .paddingbottom_0 {
        padding-bottom: 0!important;
    }
    .qty-stepper button {
        width: 2rem;
        height: 2rem;
        font-size: 1rem;
    }
    .qty-stepper input {
        width: 2rem;
        font-size: 0.8rem;
    }
    #gallery-modal .modal-thumb {
        width: 3rem;
        height: 3rem;
    }
}

@media (min-width: 768px) {
    #gallery-modal .modal-thumb {
        width: 4rem;
        height: 4rem;
    }
}

@media (min-width: 1024px) {
    .product-grid { grid-template-columns: repeat(4, 1fr); }
    .category-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 767px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .category-grid { grid-template-columns: 1fr; }
}

.min-height {
    min-height: 130.4px !important;
}

/* Toast Animation */
@keyframes slideInRight {
    from { transform: translateX(-120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
#searchResults {
    transition: opacity 0.3s ease;
}

/* ============ ADMIN FORMS ============ */
/* فرم‌های داشبورد - استایل عمومی */
form input[type="text"],
form input[type="number"],
form input[type="url"],
form input[type="email"],
form input[type="tel"],
form input[type="password"],
form select,
form textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.875rem;
    color: #334155;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    direction: rtl;
    transition: all 0.15s ease;
    font-family: inherit;
}

form input[type="text"]:focus,
form input[type="number"]:focus,
form input[type="url"]:focus,
form input[type="email"]:focus,
form input[type="tel"]:focus,
form input[type="password"]:focus,
form select:focus,
form textarea:focus {
    outline: none;
    background-color: #ffffff;
    border-color: #f59e0b !important;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15) !important;
}

form input::placeholder,
form textarea::placeholder {
    color: #cbd5e1;
}

form textarea {
    min-height: 110px;
    resize: vertical;
}

form select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: none !important;
    cursor: pointer;
    padding-left: 40px;
}

form select option {
    background-color: white;
    color: #334155;
    padding: 8px;
}

form input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    accent-color: #f59e0b;
    cursor: pointer;
}

form input[type="file"] {
    display: none;
}

/* فرم دسته‌بندی */
#categoryForm input[type="text"],
#categoryForm input[type="number"],
#categoryForm select,
#categoryForm textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.875rem;
    color: #334155;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    direction: rtl;
    transition: all 0.15s ease;
}

#categoryForm input[type="text"]:focus,
#categoryForm input[type="number"]:focus,
#categoryForm select:focus,
#categoryForm textarea:focus {
    outline: none;
    background-color: #ffffff;
    border-color: #f59e0b !important;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15) !important;
}

#categoryForm textarea {
    min-height: 110px;
    resize: vertical;
}

#categoryForm select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: none !important;
    cursor: pointer;
    padding-left: 40px;
}

#categoryForm select option {
    background-color: white;
    color: #334155;
    padding: 8px;
}

#categoryForm input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    accent-color: #f59e0b;
    cursor: pointer;
}

/* فرم بنر */
#bannerForm input[type="text"],
#bannerForm input[type="number"],
#bannerForm input[type="url"],
#bannerForm select,
#bannerForm textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.875rem;
    color: #334155;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    direction: rtl;
    transition: all 0.15s ease;
}

#bannerForm input[type="text"]:focus,
#bannerForm input[type="number"]:focus,
#bannerForm input[type="url"]:focus,
#bannerForm select:focus,
#bannerForm textarea:focus {
    outline: none;
    background-color: #ffffff;
    border-color: #f59e0b !important;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15) !important;
}

#bannerForm select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: none !important;
    cursor: pointer;
    padding-left: 40px;
}

#bannerForm select option {
    background-color: white;
    color: #334155;
    padding: 8px;
}

#bannerForm input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    accent-color: #f59e0b;
    cursor: pointer;
}

/* فرم محصول */
#productForm input[type="text"],
#productForm input[type="number"],
#productForm select,
#productForm textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.875rem;
    color: #334155;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    direction: rtl;
    transition: all 0.15s ease;
}

#productForm input[type="text"]:focus,
#productForm input[type="number"]:focus,
#productForm select:focus,
#productForm textarea:focus {
    outline: none;
    background-color: #ffffff;
    border-color: #f59e0b !important;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15) !important;
}

#productForm textarea {
    min-height: 110px;
    resize: vertical;
}

#productForm select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: none !important;
    cursor: pointer;
    padding-left: 40px;
}

#productForm select option {
    background-color: white;
    color: #334155;
    padding: 8px;
}

#productForm input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    accent-color: #f59e0b;
    cursor: pointer;
}

/* ============ CONTACT US ROWS ============ */
.row-base {
    border: 1px solid;
    transition: background-color .3s ease, border-color .3s ease;
}
.row-pink {
    background: rgba(236,72,153,.045);
    border-color: rgba(236,72,153,.16);
}
.row-pink:hover {
    background: rgba(236,72,153,.10);
    border-color: rgba(236,72,153,.38);
}
.row-blue {
    background: rgba(59,130,246,.045);
    border-color: rgba(59,130,246,.16);
}
.row-blue:hover {
    background: rgba(59,130,246,.10);
    border-color: rgba(59,130,246,.38);
}
.row-green {
    background: rgba(34,197,94,.045);
    border-color: rgba(34,197,94,.16);
}
.row-green:hover {
    background: rgba(34,197,94,.10);
    border-color: rgba(34,197,94,.38);
}
.row-red {
    background: rgba(239,68,68,.045);
    border-color: rgba(239,68,68,.16);
}
.row-red:hover {
    background: rgba(239,68,68,.10);
    border-color: rgba(239,68,68,.38);
}
.row-emerald {
    background: rgba(16,185,129,.045);
    border-color: rgba(16,185,129,.16);
}
.row-emerald:hover {
    background: rgba(16,185,129,.10);
    border-color: rgba(16,185,129,.38);
}

/* login section */


.box{
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    /* background: transparent; */
}

.box::before{
    content: '';
    position: absolute;
    inset: -120%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        transparent 220deg,
        rgba(208,135,0,.15) 260deg,
        /* #ffd230 300deg, */
        #ffd230 280deg,
        rgba(208,135,0,.15) 350deg,
        rgba(208,135,0,.15) 330deg,
        transparent 360deg
    );
    animation: rotate 5s linear infinite;
    z-index: 0;
}
/* fffcf6 */
.box::after{
    content: '';
    position: absolute;
    inset: 4px;
    background: #fffcf6;
    border-radius: 14px;
    z-index: 1;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

@keyframes rotate{
    from{
        transform: rotate(0deg);
    }
    to{
        transform: rotate(360deg);
    }
}

.box > *{
    position: relative;
    z-index: 2;
}

.eye-icon {
    transition: transform .3s ease;
    transform-origin: center;
}

.Btn-submit {
    background: linear-gradient(to right, #f5b237, #ffd737, #ffc037, #eec831, #c09027);
    border: none;
    color: #3d2e0e;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 4px 15px rgba(245, 178, 55, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: all 0.3s ease;
    background-size: 300% 300%;
}

.Btn-submit:hover {
    transform: scale(0.98);
    box-shadow: 
        0 6px 25px rgba(245, 178, 55, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    background-position: 100% 100%;
    animation: goldShine 3s ease infinite;
}

@keyframes goldShine {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.bg-gold-gradient {
    background: 
        radial-gradient(ellipse 90% 60% at 50% -9%, rgba(255,218,103,.75) 0%, rgba(255,240,202,.35) 35%, transparent 75%),
        radial-gradient(ellipse 90% 70% at 15% 110%, rgba(255,217,106,.75) 0%, rgba(255,245,224,.35) 35%, transparent 75%),
        radial-gradient(circle at 50% 50%, #ffffff 0%, #fffdf8 70%, #fffaf0 100%);
}

#password-input, #phone-input{
    text-align: left;
}

/* =========================================
   Global Form Loading Spinner Styles
   ========================================= */
.Btn-submit button, 
button[type="submit"].is-loading,
input[type="submit"].is-loading {
    --spinner-color: #ffffff; /* پیش‌فرض سفید */
}

.is-loading {
    position: relative;
    pointer-events: none;
    color: transparent !important;
}

.is-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--spinner-color, #ffffff);
    border-radius: 50%;
    animation: spin-loading 0.8s linear infinite;
    z-index: 10;
}

@keyframes spin-loading {
    to { transform: rotate(360deg); }
}