﻿:root {
    --gold-primary: #D4AF37;
    --gold-dark: #B8860B;
    --gold-light: #FFF8DC;
    --navy: #0F172A;
    --navy-light: #1E293B;
    --text-primary: #1F2937;
    --text-secondary: #64748B;
    --bg-page: #F8FAFC;
    --bg-card: #FFFFFF;
    --border-color: #E5E7EB;
    --shadow-sm: 0 4px 12px rgba(0,0,0,.05);
    --shadow-md: 0 10px 30px rgba(0,0,0,.08);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
}


/* ==========================
   Base
========================== */

html,
body {
    direction: rtl;
    text-align: right;
    background: var(--bg-page);
    font-family: "BNAZANIN", Tahoma, sans-serif;
}

body {
    min-height: 100vh;
    padding-top: 76px;
}

@media (max-width: 767.98px) {
    body {
        padding-top: 88px;
    }
}


/* ==========================
   Header
========================== */

.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1040;
}

.goldas-navbar {
    min-height: 72px;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

.goldas-logo {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--navy) !important;
    text-decoration: none;
}

    .goldas-logo:hover {
        color: var(--gold-dark) !important;
    }

.gold-icon {
    color: var(--gold-primary);
    margin-left: 6px;
}

.role-dashboard-link {
    align-items: center;
    border: 1px solid #e1e6f0;
    border-radius: 10px;
    color: #475569;
    display: inline-flex;
    gap: 6px;
    margin-left: 6px;
    padding: 7px 10px;
    text-decoration: none;
    transition: .2s ease;
}

.role-dashboard-link:hover {
    background: #f0edff;
    border-color: #d7ceff;
    color: #6546e8;
}

.role-dashboard-link--cart {
    border-color: #ccebdc;
    color: #16834e;
}

.role-dashboard-link--quick {
    border-color: #e4d9ff;
    color: #6d28d9;
}

.role-dashboard-link--wallet {
    border-color: #cfe7ff;
    color: #1d4ed8;
}

.role-dashboard-link--orders {
    border-color: #d7f0e0;
    color: #0f766e;
}

.role-dashboard-link--tracking {
    border-color: #ffe7c2;
    color: #b45309;
}

.role-dashboard-link--category {
    border-color: #e2e8f0;
    color: #334155;
}

.role-dashboard-link--logout {
    background: #fff;
    border-color: #fecaca;
    color: #b91c1c;
    cursor: pointer;
    font: inherit;
}

.role-dashboard-link--logout:hover {
    background: #fff1f2;
    border-color: #fda4af;
    color: #9f1239;
}

.role-dashboard-link--menu {
    border-color: #dbe2ee;
    color: #334155;
    padding: 6px 9px;
}

.role-mobile-menu .dropdown-menu {
    min-width: 180px;
    border-radius: 10px;
}

.role-mobile-menu .dropdown-item {
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.role-mobile-logout {
    color: #b91c1c;
}


/* ==========================
   Buttons
========================== */

.btn-gold {
    background: linear-gradient( 135deg, #D4AF37, #F7D14A);
    color: #111;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
}

    .btn-gold:hover {
        color: #111;
        opacity: .92;
    }

.header-user-section .btn {
    border-radius: var(--radius-md);
}


/* ==========================
   Dropdown
========================== */

.dropdown-menu {
    direction: rtl;
    text-align: right;
    border-radius: var(--radius-md);
    border: 1px solid #EEE;
    box-shadow: var(--shadow-md);
}

.dropdown-item {
    text-align: right;
}


/* ==========================
   Main Content
========================== */

main {
    min-height: calc(100vh - 180px);
}

/* ==========================
   Footer
========================== */

.goldas-footer {
    background: white;
    border-top: 1px solid var(--border-color);
    padding: 1rem;
    margin-top: 2rem;
    text-align: center;
    color: var(--text-secondary);
}


/* ==========================
   Category Panel
========================== */

#categoriesPanel {
    position: fixed;
    inset: 0;
    background: white;
    z-index: 1051;
    overflow-y: auto;
    opacity: 0;
    pointer-events: none;
    transition: .3s ease;
}

    #categoriesPanel.show {
        opacity: 1;
        pointer-events: auto;
    }

#overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 1050;
    opacity: 0;
    pointer-events: none;
    transition: .3s;
}

    #overlay.show {
        opacity: 1;
        pointer-events: auto;
    }


/* ==========================
   Mega Menu
========================== */

.mega-dropdown {
    background: white;
    border-radius: 0;
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

    .mega-dropdown h6 {
        font-weight: 700;
        margin-bottom: .75rem;
    }

    .mega-dropdown a {
        display: block;
        color: #333;
        text-decoration: none;
        padding: .25rem 0;
    }

        .mega-dropdown a:hover {
            color: var(--gold-dark);
        }


/* ==========================
   Mobile
========================== */

@media (max-width:768px) {

    body {
        padding-top: 65px;
    }

    .goldas-navbar {
        min-height: 60px;
    }

    .goldas-logo {
        font-size: 1.05rem;
    }

    .header-user-section .btn {
        font-size: .85rem;
        padding: .4rem .7rem;
    }

    .btn-gold {
        font-size: .85rem;
        padding: .4rem .75rem;
    }

    .navbar-nav {
        width: 100%;
    }

        .navbar-nav .btn {
            width: 100%;
        }
}




/* ================================
   🔹 Header
================================ */
/*header.site-header {
    position: relative;
}

html, body {
    direction: rtl;
    text-align: right;
    font-family: "Vazir, "IRANSans", sans-serif;";
}*/




/* ================================
   🔹 Mega Dropdown (نسخه نهایی)
================================ */

/* پایه */
/*.mega-dropdown {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 0 !important;
    padding: 2rem !important;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
    direction: rtl !important;
    text-align: right !important;
}*/

    /* ستون‌ها */
    /*.mega-dropdown .row {
        direction: rtl !important;
        text-align: right !important;
    }*/

    /* لینک‌ها */
    /*.mega-dropdown a {
        display: block;
        padding: 4px 0;
        color: #333;
    }

        .mega-dropdown a:hover {
            color: #0d6efd !important;
        }*/

    /* عنوان‌ها */
    /*.mega-dropdown h6 {
        font-weight: bold;
        margin-bottom: 10px;
        text-align: right !important;
    }*/

/* ================================
   🔹 Dropdown عمومی
================================ */
/*.dropdown-menu {
    right: 0 !important;
    left: auto !important;
    text-align: right !important;
    direction: rtl !important;
    transform: none !important;*/ /* جلوگیری از پرش */
    /*border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

.nav-item.dropdown.position-static .dropdown-menu {
    top: 100% !important;
}*/

/* ================================
   🔹 راست‌چین کردن کل منو
================================ */
/*.navbar,
.navbar * {
    direction: rtl !important;
    text-align: right !important;
}

.navbar-nav {
    margin-right: 0 !important;
    margin-left: auto !important;
}*/

/* ================================
   🔹 دکمه دسته‌بندی
================================ */
/*#toggleBtn {
    position: relative;
    top: 10px;
    right: 10px;
    z-index: 2000;
}*/

/* ================================
   🔹 پنل دسته‌بندی تمام‌صفحه
================================ */
/*#categoriesPanel {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: #212529;
    border-top: 2px solid #ffc107;
    overflow-y: auto;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 1051;
}

    #categoriesPanel.show {
        opacity: 1;
        pointer-events: auto;
    }*/

/* ================================
   🔹 Overlay
================================ */
/*#overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1050;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

    #overlay.show {
        opacity: 1;
        pointer-events: auto;
    }*/

/* ================================
   🔹 ViewComponent Wrapper
================================ */
/*#categoryTabsWrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
}

#mainCategoryTabsContent {
    min-height: 100vh;
}*/

/* ================================
   🔹 Ultra Minimal Mobile Header
=============================== */
@media (max-width: 767.98px) {
    body {
        padding-top: 58px !important;
    }

    .site-header .goldas-navbar {
        min-height: 50px;
        padding: 2px 6px;
    }

    .site-header .goldas-logo {
        font-size: 11px !important;
        line-height: 1;
        font-weight: 700;
        margin: 0;
        padding: 0;
        white-space: nowrap;
    }

    .site-header .navbar-brand {
        margin: 0;
    }

    .site-header .role-mobile-menu .role-dashboard-link--menu {
        min-height: 24px;
        padding: 2px 6px;
        margin: 0;
        border-radius: 6px;
        font-size: 8px;
        line-height: 1;
        gap: 2px;
    }

    .site-header .role-mobile-menu .role-dashboard-link--menu span {
        display: none;
    }

    .site-header .role-mobile-menu .role-dashboard-link--menu i {
        font-size: 10px;
        margin: 0;
    }

    .site-header .role-mobile-menu .dropdown-menu {
        position: fixed !important;
        inset: 52px 0 0 0 !important;
        width: 100vw;
        max-width: 100vw;
        height: calc(100dvh - 52px);
        min-height: calc(100dvh - 52px);
        margin: 0 !important;
        padding: 8px 6px 14px;
        border-radius: 14px 14px 0 0;
        border: 0;
        box-shadow: 0 -10px 30px rgba(15, 23, 42, .18);
        overflow-y: auto;
        font-size: 8px;
        z-index: 2000;
    }

    .site-header .role-mobile-menu .dropdown-item {
        font-size: 9px;
        padding: 8px 10px;
        gap: 6px;
        line-height: 1.2;
        border-radius: 8px;
    }

    .site-header .role-mobile-menu .dropdown-item i {
        font-size: 10px;
    }

    .site-header .role-mobile-menu .dropdown-divider {
        margin: 6px 2px;
    }

    .site-header .container-fluid {
        gap: 2px;
    }
}
