/* =========================================================
   ۱. معرفی صحیح فونت‌ها (آدرس‌دهی و سینتکس استاندارد شد)
========================================================= */
@font-face {
  font-family: 'Ravi';
  src: url('../ravi/Ravi-SemiBold.ttf') format('truetype');
  font-weight: normal;
}
@font-face {
  font-family: 'Ravi';
  src: url('../ravi/Ravi-Bold.ttf') format('truetype');
  font-weight: bold;
}
@font-face {
  font-family: 'Ravi';
  src: url('../ravi/Ravi-ExtraBold.ttf') format('truetype');
  font-weight: 900;
}

/* =========================================================
   ۲. متغیرهای پایه سایت (فونت‌ها روی راوی تنظیم شدند)
========================================================= */
:root {
    --primary: #ff007f;
    --secondary: #7b2cbf;
    --deep-purple: #240046;
    --card-bg: rgba(26, 11, 46, 0.6);
    --text-white: #ffffff;
    --text-gray: #b0b0b0;
    --font-heading: 'Ravi', sans-serif;
    --font-body: 'Ravi', sans-serif;
    --radius-lg: 30px;
    --radius-md: 15px;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: var(--font-body); }

body {
    background-color: #10002b;
    color: var(--text-white);
    direction: rtl;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background */
.bg-gradient {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: radial-gradient(circle at 80% 20%, var(--deep-purple) 0%, #000 90%);
    z-index: -1;
}
.bg-gradient::before {
    content: ''; position: absolute; width: 60vw; height: 60vw;
    background: var(--primary); filter: blur(180px); opacity: 0.15;
    border-radius: 50%; top: -20%; left: -20%;
    animation: float 12s infinite alternate;
}
@keyframes float { 0% { transform: translate(0,0); } 100% { transform: translate(50px,30px); } }

/* Navbar */
.navbar {
    position: fixed; top: 0; width: 100%; z-index: 1000; padding: 15px 0;
    background: rgba(15, 5, 24, 0.8); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255,255,255,0.05);
}
.nav-container { max-width: 1400px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: var(--font-heading); font-size: 1.8rem; color: #fff; }
.highlight { color: var(--primary); }
.nav-links { display: flex; list-style: none; gap: 30px; }
.nav-links a { color: var(--text-gray); text-decoration: none; font-weight: 500; transition: 0.3s; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-icons { display: flex; gap: 15px; }
.icon-box {
    width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative; transition: 0.3s;
}
.icon-box:hover { background: var(--primary); transform: translateY(-2px); }
.badge { position: absolute; top: -5px; right: -5px; background: var(--primary); font-size: 10px; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

/* Hero Slider */
.hero-wrapper { margin-top: 100px; padding: 0 20px; display: flex; justify-content: center; position: relative; z-index: 1; }
.swiper.mainSlider { width: 100%; max-width: 1400px; height: 450px; border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.1); }
.swiper-slide img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.6); }
.slide-inner { position: relative; width: 100%; height: 100%; }
.slide-content { position: absolute; bottom: 50px; right: 50px; z-index: 10; max-width: 500px; }
.slide-subtitle { display: inline-block; padding: 5px 15px; background: rgba(255,255,255,0.15); border-radius: 20px; font-size: 0.9rem; margin-bottom: 15px; backdrop-filter: blur(5px); }
.slide-title { font-family: var(--font-heading); font-size: 3rem; line-height: 1.1; margin-bottom: 25px; }
.text-gradient { background: linear-gradient(45deg, var(--primary), #d4af37); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.btn-primary { display: inline-flex; align-items: center; gap: 10px; background: var(--primary); color: #fff; padding: 12px 30px; border-radius: 30px; text-decoration: none; font-weight: bold; transition: 0.3s; }
.btn-primary:hover { background: #fff; color: var(--primary); box-shadow: 0 0 20px var(--primary); }

/* --- Categories Section (NEW) --- */
.categories-section { max-width: 1400px; margin: 80px auto; padding: 0 20px; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-header h3 { font-family: var(--font-heading); font-size: 2.5rem; margin-bottom: 5px; }
.section-desc { color: var(--text-gray); font-size: 1.1rem; }

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 کارت در یک ردیف */
    gap: 20px;
}

.cat-card {
    position: relative;
    height: 400px;
    border-radius: var(--radius-md);
    overflow: hidden;
    display: block;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.cat-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cat-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 5, 24, 0.9) 0%, rgba(15, 5, 24, 0.2) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px 20px;
    color: #fff;
    transition: 0.4s;
}

.cat-overlay h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 10px;
    color: #fff;
    transition: 0.3s;
}

.cat-link {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: bold;
    opacity: 0;
    transform: translateY(20px);
    transition: 0.4s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cat-card:hover img { transform: scale(1.1); }
.cat-card:hover .cat-overlay { background: linear-gradient(to top, rgba(255, 0, 127, 0.8) 0%, rgba(15, 5, 24, 0.4) 100%); }
.cat-card:hover .cat-overlay h3 { transform: translateY(-5px); }
.cat-card:hover .cat-link { opacity: 1; transform: translateY(0); }

/* --- Footer (NEW) --- */
.main-footer {
    background: rgba(15, 5, 24, 0.8);
    backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 60px 20px 20px;
    margin-top: auto;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    font-family: var(--font-heading);
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.footer-desc {
    color: var(--text-gray);
    line-height: 1.8;
    margin-top: 15px;
    font-size: 0.95rem;
    max-width: 400px;
}

.contact-info { list-style: none; }
.contact-info li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.6;
}
.contact-info i { color: var(--primary); margin-top: 5px; }
.phone-link { color: #fff; text-decoration: none; font-weight: bold; font-size: 1.2rem; transition: 0.3s; }
.phone-link:hover { color: var(--primary); }

.social-links {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.social-btn {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    text-decoration: none;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.social-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}
.whatsapp:hover { background: #25D366; border-color: #25D366; }
.telegram:hover { background: #0088cc; border-color: #0088cc; }
.instagram:hover { background: #E1306C; border-color: #E1306C; }

.trust-seals { background: #fff; padding: 10px; border-radius: 10px; display: inline-block; }
.enamad-img { height: 80px; object-fit: contain; }

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: var(--text-gray);
    font-size: 0.85rem;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-container { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero-wrapper { margin-top: 80px; padding: 0 15px; }
    .swiper.mainSlider { height: 300px; }
    .slide-title { font-size: 2rem; }
    .slide-content { right: 20px; bottom: 20px; }
    
    .category-grid { grid-template-columns: 1fr; gap: 15px; }
    .cat-card { height: 250px; }
    
    .footer-container { grid-template-columns: 1fr; gap: 30px; text-align: center; }
    .contact-info li { justify-content: center; }
    .footer-desc { margin: 15px auto; }
    .social-links { justify-content: center; }
}


/* =========================================================
   استایل گرید کارت‌های دسته‌بندی (برای صفحه اصلی و فروشگاه)
========================================================= */

.category-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
    gap: 30px !important;
    margin-top: 30px !important;
    width: 100% !important;
}

.cat-card {
    position: relative !important;
    border-radius: var(--radius, 20px) !important;
    overflow: hidden !important;
    display: block !important;
    aspect-ratio: 3 / 4 !important; /* نسبت تصویر جذاب مستطیلی */
    text-decoration: none !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    background: rgba(255, 255, 255, 0.02) !important;
}

.cat-card img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

/* افکت زوم شدن عکس موقع رفتن موس روی کارت */
.cat-card:hover img {
    transform: scale(1.1) !important;
}

/* لایه تاریک و شیشه‌ای روی عکس */
.cat-overlay {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(to top, rgba(15, 5, 24, 0.95) 0%, rgba(15, 5, 24, 0.4) 50%, rgba(15, 5, 24, 0) 100%) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    padding: 30px 20px !important;
    transition: 0.3s !important;
}

.cat-overlay h3 {
    color: #fff !important;
    font-family: var(--font-heading, 'Ravi', sans-serif) !important;
    font-size: 1.8rem !important;
    margin-bottom: 10px !important;
    text-shadow: 0 4px 10px rgba(0,0,0,0.5) !important;
}

.cat-link {
    color: var(--primary, #ff007f) !important;
    font-size: 1rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-weight: bold !important;
    font-family: var(--font-body, 'Ravi', sans-serif) !important;
    transition: 0.3s !important;
}

.cat-card:hover .cat-link {
    color: #fff !important;
    transform: translateX(-5px) !important; /* حرکت ریز و جذاب فلش به سمت چپ */
}

/* واکنش‌گرایی برای موبایل */
@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
        gap: 15px !important;
    }
    .cat-overlay h3 {
        font-size: 1.3rem !important;
    }
    .cat-link {
        font-size: 0.85rem !important;
    }
}

/* =======================================================
   محافظت از آیکون‌های فونت‌آوسام و اعمال فونت راوی
======================================================= */
body *:not(i):not([class*="fa-"]):not(.fas):not(.far):not(.fab) {
    font-family: 'Ravi', sans-serif !important;
}

/* =======================================================
   مخفی کردن عنوان مزاحم برگه در صفحه تشکر
======================================================= */
.woocommerce-checkout.woocommerce-order-received .page-title,
.woocommerce-checkout.woocommerce-order-received .entry-title,
.woocommerce-checkout.woocommerce-order-received header.entry-header {
    display: none !important;
}

/* =======================================================
   استایل‌های اختصاصی فرم محصول تکی ووکامرس (نسخه دارک)
======================================================= */
table.variations {
    width: 100% !important;
    border: none !important;
    margin-bottom: 20px !important;
}

table.variations tr {
    display: flex !important;
    flex-direction: column !important;
    margin-bottom: 15px !important;
}

table.variations td.label {
    padding: 0 0 10px 0 !important;
    text-align: right !important;
    color: #fff !important;
}

table.variations td.label label {
    font-family: 'Ravi', sans-serif !important;
    font-size: 1rem !important;
    font-weight: bold !important;
    color: #ff007f !important;
}

table.variations td.value {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
}

table.variations select {
    width: 100% !important;
    background: rgba(26, 11, 46, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    padding: 15px !important;
    border-radius: 12px !important;
    font-family: 'Ravi', sans-serif !important;
    font-size: 1rem !important;
    outline: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    cursor: pointer !important;
    transition: 0.3s !important;
}

table.variations select:focus {
    border-color: #ff007f !important;
    box-shadow: 0 0 15px rgba(255, 0, 127, 0.3) !important;
}

table.variations td.value::before {
    content: '\f107'; 
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900 !important;
    position: absolute !important;
    left: 15px !important;
    top: 15px !important;
    color: #ff007f !important;
    pointer-events: none !important;
}

.reset_variations {
    display: inline-block !important;
    margin-top: 12px !important;
    color: #ff0033 !important;
    font-size: 0.85rem !important;
    text-decoration: none !important;
    background: rgba(255, 0, 51, 0.1) !important;
    padding: 5px 12px !important;
    border-radius: 8px !important;
    transition: 0.3s !important;
}
.reset_variations:hover {
    background: #ff0033 !important;
    color: #fff !important;
}

.woocommerce-variation-add-to-cart {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    flex-wrap: wrap !important;
    margin-top: 25px !important;
}

.quantity input.qty {
    width: 70px !important;
    height: 55px !important;
    background: rgba(26, 11, 46, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    font-family: 'Ravi', sans-serif !important;
    font-size: 1.2rem !important;
    font-weight: bold !important;
    text-align: center !important;
    border-radius: 12px !important;
    outline: none !important;
    -moz-appearance: textfield !important;
}
.quantity input.qty::-webkit-outer-spin-button,
.quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

button.single_add_to_cart_button {
    height: 55px !important;
    flex: 1 !important;
    background: #ff007f !important;
    color: #fff !important;
    border: none !important;
    border-radius: 12px !important;
    font-family: 'Ravi', sans-serif !important;
    font-size: 1.2rem !important;
    font-weight: bold !important;
    cursor: pointer !important;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

button.single_add_to_cart_button:hover {
    background: #d6006b !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 10px 20px rgba(255, 0, 127, 0.4) !important;
}

.woocommerce-variation-price .price {
    color: #0ad3ee !important;
    font-size: 1.5rem !important;
    font-weight: bold !important;
    margin-bottom: 15px !important;
    display: block !important;
}

/* =======================================================
   استایل‌های اختصاصی فرم خلاصه سفارش (سبد خرید)
======================================================= */
.cart-collaterals .cart_totals {
    background: rgba(26, 11, 46, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 20px !important;
    padding: 30px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
    backdrop-filter: blur(10px) !important;
    width: 100% !important;
    float: none !important;
}

.cart-collaterals .cart_totals h2 {
    font-family: 'Ravi', sans-serif !important;
    color: #fff !important;
    font-size: 1.5rem !important;
    margin-bottom: 25px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding-bottom: 15px !important;
}

.cart-collaterals .shop_table {
    border: none !important;
    border-collapse: collapse !important;
    width: 100% !important;
    margin-bottom: 30px !important;
}

.cart-collaterals .shop_table th,
.cart-collaterals .shop_table td {
    border: none !important;
    padding: 15px 5px !important;
    color: #ccc !important;
    font-family: 'Ravi', sans-serif !important;
    vertical-align: middle !important;
}

.cart-collaterals .shop_table th {
    text-align: right !important;
    color: #fff !important;
    font-weight: bold !important;
    width: 35% !important;
}

.cart-collaterals .shop_table td {
    text-align: left !important;
}

.cart-collaterals .shop_table .amount {
    color: #0ad3ee !important;
    font-size: 1.1rem !important;
    font-weight: bold !important;
}

.cart-collaterals .order-total .amount {
    color: #0ad3ee !important;
    font-size: 1.5rem !important;
}

ul#shipping_method {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    text-align: right !important;
}

ul#shipping_method li {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 12px !important;
    padding: 12px 15px !important;
    margin-bottom: 10px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    color: #fff !important;
    transition: 0.3s !important;
}

ul#shipping_method li:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 0, 127, 0.3) !important;
}

ul#shipping_method input[type="radio"] {
    accent-color: #ff007f !important;
    width: 18px !important;
    height: 18px !important;
    cursor: pointer !important;
}

ul#shipping_method label {
    cursor: pointer !important;
    font-size: 0.95rem !important;
    flex: 1 !important;
}

.wc-proceed-to-checkout {
    padding: 0 !important;
    margin-top: 20px !important;
}

.wc-proceed-to-checkout a.checkout-button {
    display: block !important;
    width: 100% !important;
    background: #ff007f !important;
    color: #fff !important;
    font-family: 'Ravi', sans-serif !important;
    font-size: 1.2rem !important;
    font-weight: bold !important;
    text-align: center !important;
    padding: 15px !important;
    border-radius: 30px !important;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.wc-proceed-to-checkout a.checkout-button:hover {
    background: #d6006b !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 10px 20px rgba(255, 0, 127, 0.4) !important;
}   



/* =======================================================
   ترمیم فیلدهای فرم تسویه حساب (خوانا شدن متن‌ها)
======================================================= */
.woocommerce-checkout .form-row input.input-text,
.woocommerce-checkout .form-row textarea,
.woocommerce-checkout .select2-container--default .select2-selection--single {
    background-color: rgba(26, 11, 46, 0.8) !important;
    color: #ffffff !important; /* رنگ سفید برای متنی که کاربر تایپ می‌کند */
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 12px !important;
    padding: 12px 15px !important;
    font-family: 'Ravi', sans-serif !important;
    font-size: 1rem !important;
    outline: none !important;
    box-shadow: none !important;
    transition: 0.3s !important;
}

/* تغییر رنگ حاشیه موقع تایپ کردن */
.woocommerce-checkout .form-row input.input-text:focus,
.woocommerce-checkout .form-row textarea:focus {
    border-color: #ff007f !important;
    box-shadow: 0 0 10px rgba(255, 0, 127, 0.3) !important;
}

/* رنگ لیبل‌های بالای هر فیلد (نام، نام خانوادگی و ...) */
.woocommerce-checkout .form-row label {
    color: #fff !important;
    font-family: 'Ravi', sans-serif !important;
    font-weight: bold !important;
}

/* اصلاح رنگ پس‌زمینه فرمت کشویی شهر و استان (Select2) */
.select2-dropdown {
    background-color: #10002b !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}
.select2-container--default .select2-results__option {
    color: #ccc !important;
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #ff007f !important;
    color: #fff !important;
}

/* =======================================================
   تضمین قطعی و فورس‌ماژور برای باز شدن منوی همبرگری
======================================================= */
.mobile-menu.active {
    right: 0 !important;
}

.menu-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
}