/* تنظیمات پایه */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    background-color: #f9f9f9;
    color: #333;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    line-height: 1.6;
}

body {
    padding-top: 150px;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

.header-logo img, .main-site-header img {
    height: 40px !important;
    width: auto !important;
    max-height: 40px !important;
    display: inline-block !important;
}

.site-content {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin: 15px auto;
}
.page-body img { max-width: 100%; height: auto; }

footer { background: #333; color: #fff; text-align: center; padding: 20px; margin-top: 40px; }

.main-site-header {
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99999;
}

.top-banner-bar {
    background: #ef394e;
    color: #fff;
    width: 100%;
    padding: 10px 0;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    display: block;
    text-decoration: none;
}
.banner-content {
    background: #2b7a62;
    padding: 4px 20px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.badge-discount { background: #0056b3; padding: 2px 6px; border-radius: 4px; font-size: 12px; }

.header-middle-row {
    padding: 10px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: #fff;
}
.header-logo h1 { font-size: 24px; color: #ef394e; margin: 0; }

.header-search-box {
    width: 400px;
    margin-right: 10px;
    margin-left: auto;
}
.header-search-box form { position: relative; display: flex; align-items: center; width: 100%; }
.header-search-box input {
    width: 100%;
    background: #f0f0f1;
    border: none;
    padding: 10px 45px 10px 15px;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
}
.header-search-box .search-icon { position: absolute; right: 15px; color: #707579; }

.header-actions { display: flex; align-items: center; gap: 15px; }
.login-register-btn {
    border: 1px solid #e0e0e0;
    padding: 6px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #3f4064;
    font-size: 13px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}
/* تنظیم موقعیت دکمه سبد خرید به عنوان مرجع */
.action-btn.cart-btn {
    position: relative !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

/* جابجایی دایره قرمز به گوشه کادر دکمه تا روی آیکون نیفتد */
.cart-badge {
    position: absolute !important;
    top: -10px !important;
    right: -20px !important;
    display: none !important; /* پیش‌فرض را روی عدم نمایش بگذارید تا با جی‌اس کنترل شود */
    align-items: center !important;
    justify-content: center !important;
    min-width: 20px;
    height: 20px;
    padding: 4px;
    background-color: #ef4444;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.header-bottom-row {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px 10px 20px;
    display: flex;
    align-items: center;
    border-top: 1px solid #f0f0f1;
    padding-top: 8px;
    background: #fff;
}
.right-nav-links { display: flex; align-items: center; gap: 25px; }
.quick-links ul { list-style: none; display: flex; gap: 20px; margin: 0; padding: 0; }
.quick-links a { text-decoration: none; color: #616161; font-size: 13px; display: flex; align-items: center; gap: 5px; }
.quick-links a:hover { color: #ef394e; }

.categories-dropdown-container { position: relative; }
.categories-dropdown-toggle { font-weight: bold; font-size: 14px; color: #23254e; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 8px 0; }

.categories-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 230px;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-radius: 8px;
    display: none;
    opacity: 0;
    visibility: hidden;
    padding: 6px 0;
    border: 1px solid #f0f0f1;
    z-index: 1100;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* اصلاح شد: فقط زمانی منو باز می‌شود که تگ ul (آیتم‌های دسته‌بندی) داخل آن وجود داشته باشد */
.categories-dropdown-container:hover .categories-dropdown-menu:has(ul) {
    display: block;
    opacity: 1;
    visibility: visible;
}

.categories-dropdown-menu ul { list-style: none; margin: 0; padding: 0; }
.categories-dropdown-menu li { position: relative; }

/* فشرده‌تر کردن ابعاد و پدینگ ردیف‌ها */
.categories-dropdown-menu li a {
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #333;
    font-size: 12.5px;
}
.categories-dropdown-menu li a:hover { background: #f9f9f9; color: #ef394e; }
.submenu-arrow { margin-right: auto; font-size: 10px; color: #707579; }

.categories-dropdown-menu .submenu {
    position: absolute;
    top: 0;
    right: 100%;
    width: 210px;
    background: #fff;
    box-shadow: 4px 4px 15px rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 6px 0;
    border: 1px solid #f0f0f1;
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    transition-delay: 0.2s;
}

.categories-dropdown-menu li.has-submenu:hover > .submenu {
    opacity: 1;
    visibility: visible;
    display: block;
}

/* اسلایدر اصلی دسکتاپ */
.main-slider-container {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    height: 400px;
    margin-top: 30px; 
    margin-bottom: 30px;
    overflow: hidden;
    background: #fff;
    direction: ltr;
}

.slider-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    transition: transform 0.5s ease-in-out;
    transform: translateX(0);
}

.slide {
    min-width: 100%;
    width: 100%;
    height: 100%;
    position: relative;
    flex-shrink: 0;
}

.slide a {
    display: block;
    width: 100%;
    height: 100%;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slider-controls-group {
    position: absolute;
    bottom: 15px;
    right: 25px;
    display: flex;
    gap: 5px;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.main-slider-container:hover .slider-controls-group {
    opacity: 1;
    visibility: visible;
}

.slider-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: background 0.2s, transform 0.2s;
}

.slider-btn:hover {
    background: #fff;
    transform: scale(1.05);
}

.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s, width 0.3s;
}

.dot.active {
    background: #ef394e;
    width: 22px;
    border-radius: 4px;
}

/* واکنش‌گرا: تبلت */
@media screen and (max-width: 1024px) {
    .main-slider-container {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: 280px;
        padding: 0 15px;
        box-sizing: border-box;
        overflow: hidden;
        margin-top: 35px !important;
    }
    .slide {
        min-width: 100% !important;
        width: 100% !important;
        padding: 0 5px;
        box-sizing: border-box;
    }
    .slide img {
        border-radius: 12px;
    }
    .slider-controls-group, .slider-dots {
        display: none !important;
    }
}

/* واکنش‌گرا: موبایل */
@media screen and (max-width: 768px) {
    body { padding-top: 110px; }
    .header-actions, .header-bottom-row, .header-logo { display: none !important; }
    .header-middle-row { flex-direction: column; gap: 5px; padding: 5px; }
    .header-search-box { width: 100%; margin: 0 !important; }
    
    .main-slider-container {
        width: 100vw !important;
        position: relative !important;
        left: 50% !important;
        right: 50% !important;
        margin-left: -50vw !important;
        margin-right: -50vw !important;
        height: 190px !important;
        margin-top: -5px !important;
        margin-bottom: 20px !important;
        padding: 0 !important;
        border-radius: 0 !important;
        overflow: hidden !important;
        direction: ltr !important;
    }

    .slider-wrapper {
        display: flex !important;
        padding: 0 15px !important; 
        box-sizing: border-box !important;
    }

    .slide {
        min-width: 99% !important; 
        width: 99% !important;
        padding: 0 3px !important; 
        box-sizing: border-box !important;
        flex-shrink: 0 !important;
    }

    .slide img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        border-radius: 12px !important;
    }
}

.profile-page { display: flex; padding: 40px 0; }
.profile-dashboard { display: flex; width: 100%; gap: 30px; }
.profile-sidebar { width: 280px; background: #f9f9f9; padding: 20px; border-radius: 12px; border: 1px solid #eee; }
.profile-sidebar a { display: flex; align-items: center; gap: 10px; padding: 15px; text-decoration: none; color: #444; border-bottom: 1px solid #eee; transition: 0.3s; }
.profile-sidebar a:hover { background: #fff; color: #000; border-radius: 8px; }
.profile-content { flex: 1; background: #fff; padding: 30px; border-radius: 12px; border: 1px solid #eee; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.text-danger { color: #d32f2f !important; }

@font-face {
    font-family: 'VazirmatnCustom';
    src: url('/assets/fonts/Vazirmatn-Medium.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* اعمال فونت به تمام بخش‌های پنل کاربری */
.profile-page, 
.profile-dashboard, 
.profile-sidebar, 
.profile-content, 
.profile-content *, 
.profile-sidebar * {
    font-family: 'VazirmatnCustom', Tahoma, sans-serif !important;
}

/* ==========================================
   استایل‌های منوی شناور پایین موبایل (Bottom Navigation)
   ========================================== */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 768px) {
    /* اضافه کردن فضای خالی در پایین صفحه موبایل تا محتوا پشت منو گم نشود */
    body {
        padding-bottom: 75px !important;
    }

    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 60px;
        background-color: #ffffff;
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.1);
        z-index: 99999;
        justify-content: space-around;
        align-items: center;
        border-top: 1px solid #eee;
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: #666;
        font-size: 11px;
        flex: 1;
        height: 100%;
        position: relative;
        transition: color 0.2s ease;
    }

    .mobile-nav-item i {
        font-size: 18px;
        margin-bottom: 4px;
    }

    .mobile-nav-item span {
        line-height: 1;
    }

    .mobile-nav-item:hover, 
    .mobile-nav-item.active {
        color: #ef394e; /* هماهنگ با رنگ سازمانی زئوس */
    }

    .mobile-cart-badge {
        position: absolute;
        top: 8px;
        right: 28%;
        background-color: #ef394e;
        color: #fff;
        font-size: 10px;
        font-weight: bold;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid #fff;
    }
}
/*
/* ==========================================
   استایل‌های اختصاصی فوتر (هماهنگ با ZEUS)
   ========================================== */
.dg-footer {
    background-color: #ffffff;
    color: #62666d;
    font-family: 'VazirmatnCustom', Tahoma, sans-serif;
    font-size: 13px;
    direction: rtl;
    border-top: 1px solid #e0e0e0;
    margin-top: 0; /* تغییر از 40px به 0 یا مقدار دلخواه کمتر */
}
.dg-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ۱. بخش مزایا و امکانات */
.dg-features {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
    border-bottom: 1px solid #f0f0f0;
    text-align: center;
    flex-wrap: wrap;
    gap: 20px;
}
.dg-feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 150px;
}
.dg-feature-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9;
    border-radius: 50%;
    font-size: 20px;
}
.dg-feature-text {
    font-size: 12px;
    color: #333;
    font-weight: 500;
}

/* ۲. ستون‌های اصلی لینک‌ها و خبرنامه */
.dg-links-section {
    display: flex;
    justify-content: space-between;
    padding: 40px 0;
    gap: 30px;
    flex-wrap: wrap;
}
.dg-col {
    flex: 1;
    min-width: 200px;
}
.dg-col h3 {
    font-size: 15px;
    color: #3f4064;
    margin-bottom: 20px;
    font-weight: bold;
}
.dg-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.dg-col ul li {
    margin-bottom: 12px;
}
.dg-col ul li a {
    color: #81858b;
    text-decoration: none;
    transition: color 0.2s ease;
}
.dg-col ul li a:hover {
    color: #ef394e;
}

/* فرم خبرنامه و شبکه‌های اجتماعی */
.dg-social-links {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}
.dg-social-links a {
    color: #81858b;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}
.dg-social-links a:hover {
    color: #ef394e;
}
.dg-newsletter-form {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.dg-newsletter-input {
    background: #f0f0f1;
    border: 1px solid transparent;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 12px;
    outline: none;
    flex-grow: 1;
    font-family: inherit;
}
.dg-newsletter-input:focus {
    border-color: #ef394e;
    background: #fff;
}
.dg-newsletter-btn {
    background-color: #ef394e;
    color: #white;
    border: none;
    padding: 0 20px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}
.dg-newsletter-btn:hover {
    background-color: #d32f2f;
}

/* ۳. نوار اپلیکیشن */
.dg-app-box-container {
    max-width: 1200px;
    margin: 0 auto 30px auto;
    padding: 0 20px;
}
.dg-app-box {
    background-color: #23253b;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-radius: 12px;
    flex-wrap: wrap;
    gap: 20px;
}
.dg-app-title {
    display: flex;
    align-items: center;
    gap: 12px;
}
.dg-app-icon-circle {
    width: 40px;
    height: 40px;
    background-color: #ef394e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.dg-app-stores {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.dg-store-btn {
    background-color: #191b2d;
    border: 1px solid #3f4064;
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    text-decoration: none;
    transition: background 0.2s;
}
.dg-store-btn:hover {
    background-color: #3f4064;
}

/* ۴. سئو و نمادها */
.dg-seo-section {
    display: flex;
    justify-content: space-between;
    padding: 30px 0;
    border-top: 1px solid #f0f0f0;
    align-items: flex-start;
    gap: 30px;
    flex-wrap: wrap;
}
.dg-seo-text {
    flex: 3;
    min-width: 280px;
    line-height: 24px;
    text-align: justify;
}
.dg-seo-text h2 {
    font-size: 15px;
    color: #3f4064;
    margin-bottom: 10px;
}
.dg-seo-text p {
    color: #81858b;
    font-size: 12px;
    margin: 0;
}
.dg-seo-text a {
    color: #008eb2;
    text-decoration: none;
    font-weight: bold;
}
.dg-symbols {
    flex: 1;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    min-width: 200px;
}
.dg-symbol-box {
    border: 1px solid #e0e0e0;
    padding: 10px;
    border-radius: 12px;
    background: #fff;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a0a0a0;
    font-size: 11px;
}

/* ۵. کپی‌رایت */
.dg-copyright {
    background-color: #f1f2f4;
    text-align: center;
    padding: 20px 0;
    color: #81858b;
    font-size: 11px;
    border-top: 1px solid #e0e0e0;
}

/* واکنش‌گرا برای موبایل */
@media (max-width: 768px) {
    .dg-features {
        flex-direction: column;
    }
    .dg-links-section {
        flex-direction: column;
    }
    .dg-seo-section {
        flex-direction: column;
    }
    .dg-symbols {
        justify-content: center;
        width: 100%;
    }
    .dg-app-box {
        flex-direction: column;
        text-align: center;
    }
    .dg-app-title {
        flex-direction: column;
    }
}
.header-search-box {
    position: relative;
}

.search-dropdown-popup {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 9999;
    display: none; /* در حالت عادی مخفی است */
    max-height: 350px;
    overflow-y: auto;
}

.search-dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #f2f2f2;
    text-decoration: none;
    color: #333;
    transition: background 0.2s ease;
}

.search-dropdown-item:last-child {
    border-bottom: none;
}

.search-dropdown-item:hover {
    background: #f8f9fa;
}

.search-dropdown-item img {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border-radius: 6px;
    margin-left: 12px;
    border: 1px solid #eee;
}

.search-dropdown-item .product-title {
    font-size: 13px;
    font-weight: 500;
    color: #222;
}

.search-no-result {
    padding: 15px;
    text-align: center;
    color: #777;
    font-size: 13px;
}
/* استایل پاپ‌آپ سبد خرید هدر */
.cart-dropdown-container {
    position: relative;
}
.header-cart-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 320px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    padding: 20px;
    /* تغییرات برای هاور روان و بدون پرش */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
    text-align: right;
}
/* نمایش پاپ‌آپ هنگام هاور یا فعال شدن با کلاس */
.cart-dropdown-container:hover .header-cart-dropdown,
.header-cart-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header-cart-items-list {
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: 15px;
    padding-left: 5px;
}

.header-cart-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.header-cart-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    background: #f8fafc;
}

.header-cart-item-info {
    flex: 1;
}

.header-cart-item-title {
    font-size: 13px;
    font-weight: bold;
    color: #1e293b;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.header-cart-item-price {
    font-size: 12px;
    color: #4f46e5;
}

.header-cart-footer {
    border-top: 1px solid #e2e8f0;
    padding-top: 12px;
}

.header-cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: bold;
    color: #1e293b;
    margin-bottom: 12px;
}

.header-cart-buttons {
    display: flex;
    gap: 8px;
}

.header-cart-buttons a {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-view-cart {
    background: #f1f5f9;
    color: #475569;
}

.btn-view-cart:hover {
    background: #e2e8f0;
}

.btn-checkout-cart {
    background: #4f46e5;
    color: #fff;
}

.btn-checkout-cart:hover {
    background: #4338ca;
}