/*!
 * public/css/layout.css
 *
 * استایل کامپوننت‌های مشترک سایت (هدر، فوتر، نوار ناوبری پایین).
 *
 * پیش‌تر این استایل‌ها به‌صورت inline داخل هر کامپوننت بودند و چون
 * کامپوننت‌ها در تمام صفحات رندر می‌شوند، حدود ۲۹ کیلوبایت CSS در
 * هر بار بارگذاری هر صفحه تکرار می‌شد و قابل کش شدن هم نبود.
 *
 * با انتقال به این فایل، مرورگر آن را یک بار دانلود و کش می‌کند.
 */

/* ==================== header ==================== */
:root {
        --bone-white: #FEFDFB;
        --cream-ultra-light: #FDFCF8;
        --gold-light: #C2A25F;
        --gold-medium: #B3955B;
        --charcoal-dark: #2B2B2B;
        --charcoal-medium: #3A3A3A;
        --charcoal-light: #4A4A4A;
        --text-on-gold: #FFFFFF;
        --text-muted: #5A5A5A;
        --shadow-luxury: 0 15px 35px rgba(43, 43, 43, 0.15);
        --shadow-gold: 0 4px 20px rgba(194, 162, 95, 0.20);
        --border-subtle: rgba(90, 90, 90, 0.12);
        --border-gold: rgba(194, 162, 95, 0.25);
        --radius-md: 10px;
        --radius-lg: 16px;
        --container-max-width: 1200px;
        --content-padding: 20px;
    }

    .header {
        background: linear-gradient(135deg, var(--charcoal-dark) 0%, var(--charcoal-medium) 50%, var(--charcoal-light) 100%);
        color: var(--text-on-gold);
        position: sticky;
        top: 0;
        z-index: 999;
        box-shadow: var(--shadow-luxury);
        width: 100%;
        backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border-gold);
        border-radius: 0;
    }

    @media (min-width: 768px) {
        .header {
            border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        }
    }

    .header-content {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px var(--content-padding);
        max-width: var(--container-max-width);
        margin: 0 auto;
        min-height: 76px;
    }

    .logo {
        display: flex;
        align-items: center;
        gap: 18px;
        font-weight: 700;
        font-size: 22px;
        text-decoration: none;
        color: var(--text-on-gold);
        flex-shrink: 0;
        letter-spacing: -0.02em;
    }

    .logo-icon {
        width: 44px;
        height: 44px;
        background: transparent;
        border-radius: var(--radius-md);
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: visible;
    }

    .logo-icon img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        transform: scale(2);
    }

    .search-container {
        flex: 1;
        max-width: 520px;
        margin: 0 24px;
        position: relative;
    }

    .search-input {
        width: 100%;
        padding: 14px 20px;
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-lg);
        font-size: 15px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        font-family: inherit;
        color: var(--charcoal-dark);
        font-weight: 400;
        letter-spacing: -0.01em;
    }

    .search-input::placeholder {
        color: var(--text-muted);
        font-weight: 400;
    }

    .search-input:focus {
        outline: none;
        background: var(--bone-white);
        box-shadow: var(--shadow-elegant);
        border-color: var(--border-gold);
        transform: translateY(-1px);
    }

    .header-actions {
        display: flex;
        align-items: center;
        gap: 12px;
        flex-shrink: 0;
    }

    .header-btn {
        background: rgba(255, 255, 255, 0.10);
        border: 1px solid var(--border-gold);
        color: var(--text-on-gold);
        padding: 10px 18px;
        border-radius: var(--radius-md);
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        backdrop-filter: blur(20px);
        white-space: nowrap;
        font-family: inherit;
        letter-spacing: -0.01em;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        height: 44px;
    }

    .header-btn:hover {
        background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-medium) 100%);
        border-color: var(--gold-medium);
        transform: translateY(-2px);
        box-shadow: var(--shadow-gold);
    }

    .header-btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }

    /* طراحی جدید مینیمال برای بخش کاربر */
    .user-minimal {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 6px 12px;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid var(--border-gold);
        border-radius: var(--radius-md);
        backdrop-filter: blur(20px);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        cursor: pointer;
        height: 40px;
        min-width: 120px;
    }

    .user-minimal:hover {
        background: rgba(255, 255, 255, 0.12);
        border-color: var(--gold-light);
        transform: translateY(-1px);
    }

    .user-avatar-mini {
        width: 28px;
        height: 28px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--gold-light), var(--gold-medium));
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        font-weight: 600;
        color: var(--text-on-gold);
        flex-shrink: 0;
        border: 1.5px solid rgba(255, 255, 255, 0.3);
    }

    .user-info-mini {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        flex: 1;
        min-width: 0;
    }

    .user-mobile-mini {
        font-size: 12px;
        font-weight: 600;
        direction: ltr;
        text-align: left;
        color: var(--text-on-gold);
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 80px;
    }

    .user-role-mini {
        font-size: 10px;
        font-weight: 500;
        color: rgba(255, 255, 255, 0.7);
        line-height: 1.2;
    }

    .mobile-logo {
        display: none;
    }

    .mobile-menu-toggle {
        display: none;
        background: rgba(255, 255, 255, 0.10);
        border: 1px solid var(--border-gold);
        color: var(--text-on-gold);
        width: 48px;
        height: 48px;
        border-radius: var(--radius-md);
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        backdrop-filter: blur(20px);
        font-family: inherit;
        font-size: 18px;
    }

    .mobile-menu-toggle:hover {
        background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-medium) 100%);
        border-color: var(--gold-medium);
        transform: scale(1.05);
    }

    /* استایل‌های منوی همبرگری دسکتاپ */
    .hamburger-menu {
        position: relative;
    }

    .hamburger-toggle {
        background: rgba(255, 255, 255, 0.10);
        border: 1px solid var(--border-gold);
        color: var(--text-on-gold);
        width: 48px;
        height: 48px;
        border-radius: var(--radius-md);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        backdrop-filter: blur(20px);
        font-family: inherit;
        font-size: 20px;
    }

    .hamburger-toggle:hover {
        background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-medium) 100%);
        border-color: var(--gold-medium);
        transform: scale(1.05);
    }

    .hamburger-dropdown {
        position: absolute;
        top: 100%;
        left: 0;
        background: linear-gradient(135deg, var(--charcoal-dark) 0%, var(--charcoal-medium) 100%);
        border: 1px solid var(--border-gold);
        border-radius: var(--radius-lg);
        padding: 12px;
        min-width: 280px;
        box-shadow: var(--shadow-luxury);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        margin-top: 8px;
    }

    .hamburger-menu.active .hamburger-dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .hamburger-items {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .hamburger-item {
        margin-bottom: 6px;
    }

    .hamburger-link {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 14px;
        color: var(--text-on-gold);
        text-decoration: none;
        font-size: 14px;
        font-weight: 500;
        border-radius: var(--radius-md);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        background: rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.10);
        width: 100%;
        text-align: right;
    }

    .hamburger-link:hover {
        background: rgba(255, 255, 255, 0.15);
        border-color: var(--border-gold);
        transform: translateX(-4px);
    }

    .hamburger-icon {
        font-size: 16px;
        width: 20px;
        text-align: center;
    }

    .hamburger-submenu {
        padding-right: 20px;
        margin-top: 4px;
    }

    .hamburger-submenu .hamburger-link {
        background: rgba(255, 255, 255, 0.05);
        font-size: 13px;
        padding: 8px 14px;
    }

    /* جداکننده برای دکمه خروج */
    .hamburger-divider {
        height: 1px;
        background: linear-gradient(90deg, transparent, var(--border-gold), transparent);
        margin: 10px 0;
        border: none;
    }

    /* استایل مخصوص دکمه خروج */
    .hamburger-logout {
        margin-top: 6px;
        padding-top: 6px;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
    }

    .hamburger-logout .hamburger-link {
        background: rgba(239, 68, 68, 0.15);
        border-color: rgba(239, 68, 68, 0.3);
        color: #FCA5A5;
        padding: 10px 14px;
    }

    .hamburger-logout .hamburger-link:hover {
        background: rgba(239, 68, 68, 0.25);
        border-color: rgba(239, 68, 68, 0.5);
        color: #FECACA;
    }

    .mobile-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(43, 43, 43, 0.6);
        backdrop-filter: blur(12px);
        z-index: 10000;
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .mobile-menu.active {
        opacity: 1;
        visibility: visible;
    }

    .mobile-menu-content {
        background: linear-gradient(135deg, var(--charcoal-dark) 0%, var(--charcoal-medium) 100%);
        width: 320px;
        height: 100%;
        padding: 20px;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        box-shadow: var(--shadow-luxury);
        margin-left: auto;
        border-left: 1px solid var(--border-gold);
    }

    .mobile-menu.active .mobile-menu-content {
        transform: translateX(0);
    }

    .mobile-menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 24px;
        padding-bottom: 20px;
        border-bottom: 1px solid var(--border-gold);
    }

    .mobile-menu-logo {
        display: flex;
        align-items: center;
        gap: 12px;
        font-weight: 700;
        font-size: 20px;
        color: var(--text-on-gold);
    }

    .mobile-menu-logo-icon {
        width: 40px;
        height: 40px;
        background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-medium) 100%);
        border-radius: var(--radius-md);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        font-weight: 800;
        color: var(--text-on-gold);
        box-shadow: var(--shadow-gold);
        border: 1px solid var(--border-gold);
    }

    .mobile-menu-close {
        background: rgba(255, 255, 255, 0.10);
        border: 1px solid var(--border-gold);
        color: var(--text-on-gold);
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        font-size: 18px;
        font-family: inherit;
    }

    .mobile-menu-close:hover {
        background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-medium) 100%);
        border-color: var(--gold-medium);
        transform: rotate(90deg);
    }

    .mobile-menu-search {
        margin-bottom: 24px;
    }

    .mobile-menu-search input {
        width: 100%;
        padding: 12px 16px;
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-lg);
        font-size: 15px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        font-family: inherit;
        color: var(--charcoal-dark);
    }

    .mobile-menu-search input:focus {
        outline: none;
        background: var(--bone-white);
        box-shadow: var(--shadow-elegant);
        border-color: var(--border-gold);
    }

    .mobile-menu-items {
        list-style: none;
    }

    .mobile-menu-item {
        margin-bottom: 8px;
    }

    .mobile-menu-link {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 12px 16px;
        color: var(--text-on-gold);
        text-decoration: none;
        font-size: 15px;
        font-weight: 500;
        border-radius: var(--radius-lg);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        background: rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.10);
        width: 100%;
        text-align: right;
    }

    .mobile-menu-link:hover {
        background: rgba(255, 255, 255, 0.15);
        border-color: var(--border-gold);
        transform: translateX(8px);
    }

    .mobile-menu-icon {
        font-size: 18px;
        width: 24px;
        text-align: center;
    }

    /* طراحی مینیمال برای بخش کاربر در موبایل */
    .mobile-user-minimal {
        padding: 16px;
        background: rgba(255, 255, 255, 0.08);
        border-radius: var(--radius-md);
        margin-bottom: 20px;
        border: 1px solid var(--border-gold);
        text-align: center;
    }

    .mobile-user-avatar-mini {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--gold-light), var(--gold-medium));
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        font-weight: 600;
        color: var(--text-on-gold);
        margin: 0 auto 8px;
        border: 2px solid rgba(255, 255, 255, 0.3);
    }

    .mobile-user-details-mini {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .mobile-user-phone-mini {
        font-size: 14px;
        font-weight: 600;
        direction: ltr;
        color: var(--text-on-gold);
        margin-bottom: 2px;
    }

    .mobile-user-role-mini {
        font-size: 11px;
        font-weight: 500;
        color: rgba(255, 255, 255, 0.7);
    }

    /* جداکننده برای دکمه خروج در موبایل */
    .mobile-logout-section {
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
    }

    .mobile-logout-btn {
        background: rgba(239, 68, 68, 0.15);
        border: 1px solid rgba(239, 68, 68, 0.3);
        color: #FCA5A5;
    }

    .mobile-logout-btn:hover {
        background: rgba(239, 68, 68, 0.25);
        border-color: rgba(239, 68, 68, 0.5);
        color: #FECACA;
    }

    .btn-spinner {
        display: inline-block;
        width: 14px;
        height: 14px;
        border: 2px solid rgba(255, 255, 255, 0.3);
        border-top-color: white;
        border-radius: 50%;
        animation: spin 0.6s linear infinite;
    }

    @keyframes spin {
        to { transform: rotate(360deg); }
    }

    @media (max-width: 767px) {
        .logo-icon {
            display: none;
        }

        .search-container {
            display: none;
        }

        .header-actions {
            display: none;
        }

        .hamburger-menu {
            display: none;
        }

        .mobile-menu-toggle {
            display: flex;
        }

        .mobile-logo {
            display: block;
            position: absolute;
            left: 50%;
            height: 44px;
            object-fit: contain;
            top: 50%;
            transform: translate(-50%, -50%) scale(2);
        }
    }

    @media (min-width: 768px) {
        .mobile-menu-toggle {
            display: none;
        }
    }


    .search-suggest {
        position: absolute; top: calc(100% + 6px); inset-inline-start: 0; inset-inline-end: 0;
        background: #fff; border: 1px solid rgba(0,0,0,.1); border-radius: 12px;
        box-shadow: 0 12px 30px -14px rgba(0,0,0,.35); z-index: 999; overflow: hidden; display: none;
    }
    .search-suggest.open { display: block; }
    .ss-group { padding: 8px 0; }
    .ss-title { font-size: 11.5px; color: #9A9A9A; padding: 4px 14px; font-weight: 700; }
    .ss-item { display: flex; justify-content: space-between; gap: 10px; padding: 9px 14px;
               text-decoration: none; color: #2B2B2B; font-size: 13.5px; }
    .ss-item:hover { background: #FAF8F5; }
    .ss-item small { color: #8A8A8A; font-size: 11.5px; }
    .ss-more { display: block; text-align: center; padding: 10px; background: #FAF8F5;
               color: #8A6F30; font-weight: 700; font-size: 13px; text-decoration: none; }
    .ss-empty { padding: 14px; text-align: center; color: #9A9A9A; font-size: 13px; }

/* ==================== footer ==================== */
:root {
        --charcoal-dark: #2B2B2B;
        --charcoal-medium: #3A3A3A;
        --charcoal-light: #4A4A4A;
        --gold-light: #C2A25F;
        --gold-medium: #B3955B;
        --text-on-gold: #FFFFFF;
        --shadow-luxury: 0 15px 35px rgba(43, 43, 43, 0.15);
        --shadow-gold: 0 4px 20px rgba(194, 162, 95, 0.20);
        --border-gold: rgba(194, 162, 95, 0.25);
        --radius-md: 10px;
        --container-max-width: 1200px;
        --content-padding: 20px;
    }

    .footer {
        background: linear-gradient(135deg, var(--charcoal-dark) 0%, var(--charcoal-medium) 50%, var(--charcoal-light) 100%);
        color: var(--text-on-gold);
        padding: 60px 0 0 0;
        margin-top: 60px;
        width: 100%;
        position: relative;
        border-top: 1px solid var(--border-gold);
        border-radius: 0;
    }

    .footer-content {
        max-width: var(--container-max-width);
        margin: 0 auto;
        padding: 0 var(--content-padding);
        position: relative;
    }

    .footer-main {
        display: grid;
        grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
        gap: 50px;
        margin-bottom: 30px;
    }

    .footer-section {
        display: flex;
        flex-direction: column;
    }

    .footer-logo-section {
        padding-left: 30px;
        position: relative;
    }

    .footer-logo {
        display: flex;
        align-items: center;
        gap: 18px;
        margin-bottom: 24px;
        text-decoration: none;
        color: var(--text-on-gold);
    }

    .footer-logo-container {
        display: flex;
        align-items: center;
        gap: 18px;
    }

    .footer-logo-icon {
        width: 52px;
        height: 52px;
        background: transparent;
        border-radius: var(--radius-md);
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: visible;
        flex-shrink: 0;
    }

    .footer-logo-icon img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        border-radius: var(--radius-md);
    }

    .footer-logo-text {
        font-size: 24px;
        font-weight: 700;
        letter-spacing: -0.02em;
    }

    .footer-description {
        font-size: 15px;
        line-height: 1.8;
        color: rgba(255, 255, 255, 0.85);
        margin-bottom: 28px;
        font-weight: 400;
    }

    .footer-title {
        font-size: 18px;
        font-weight: 700;
        margin-bottom: 24px;
        position: relative;
        padding-bottom: 12px;
        letter-spacing: -0.01em;
        color: var(--text-on-gold);
    }

    .footer-title::after {
        content: '';
        position: absolute;
        bottom: 0;
        right: 0;
        width: 40px;
        height: 3px;
        background: linear-gradient(90deg, var(--gold-light), var(--gold-medium));
        border-radius: 2px;
    }

    .footer-links {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .footer-link-item {
        margin-bottom: 14px;
    }

    .footer-link {
        color: rgba(255, 255, 255, 0.8);
        text-decoration: none;
        font-size: 15px;
        font-weight: 400;
        transition: all 0.3s ease;
        display: inline-block;
    }

    .footer-link:hover {
        color: var(--gold-light);
        transform: translateX(-8px);
    }

    .footer-link-button {
        background: none;
        border: none;
        color: rgba(255, 255, 255, 0.8);
        text-decoration: none;
        font-size: 15px;
        font-weight: 400;
        transition: all 0.3s ease;
        cursor: pointer;
        padding: 0;
        font-family: inherit;
        text-align: right;
        display: inline-block;
    }

    .footer-link-button:hover {
        color: var(--gold-light);
        transform: translateX(-8px);
    }

    .footer-link-button:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

    .footer-bottom {
        background: rgba(0, 0, 0, 0.3);
        padding: 28px 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .footer-bottom-content {
        max-width: var(--container-max-width);
        margin: 0 auto;
        padding: 0 var(--content-padding);
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 20px;
    }

    .footer-copyright {
        font-size: 14px;
        color: rgba(255, 255, 255, 0.7);
        font-weight: 400;
    }

    .btn-spinner {
        display: inline-block;
        width: 12px;
        height: 12px;
        border: 2px solid rgba(255, 255, 255, 0.3);
        border-top-color: white;
        border-radius: 50%;
        animation: spin 0.6s linear infinite;
        margin-left: 6px;
    }

    /* استایل‌های جدید برای بخش شبکه‌های اجتماعی و مجوزها */
    .footer-social-certifications {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
        margin: 20px 0;
        padding: 20px 0;
    }

    .social-media {
        display: flex;
        gap: 12px;
        flex: 1;
    }

    .social-icon {
        width: 50px;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        transition: all 0.3s ease;
        text-decoration: none;
        color: var(--text-on-gold);
        padding: 4px;
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    .social-icon:hover {
        background: var(--gold-light);
        transform: translateY(-2px);
        box-shadow: var(--shadow-gold);
    }

    .social-logo {
        width: 100%;
        height: 100%;
        object-fit: contain;
        border-radius: 50%;
        transition: transform 0.3s ease;
    }

    /* استایل‌های جدید برای بخش مجوزها */
    .footer-certifications {
        display: flex;
        gap: 25px;
        align-items: center;
        justify-content: flex-end;
        flex: 1;
    }

    .certification-logo {
        width: 120px;
        height: 120px;
        object-fit: contain;
        border-radius: 10px;
        transition: transform 0.3s ease;
        background: #ffffff;
        padding: 8px;
        border: 1px solid rgba(255, 255, 255, 0.3);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .certification-logo:hover {
        transform: scale(1.05);
        background: #ffffff;
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    }

    .footer-contact-info {
        margin-bottom: 20px;
    }

    .footer-contact-item {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 10px;
        color: rgba(255, 255, 255, 0.85);
        font-size: 14px;
    }

    /* استایل جدید برای دکمه تماس */
    .contact-phone-button {
        display: inline-block;
        background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-medium) 100%);
        color: var(--text-on-gold);
        text-decoration: none;
        padding: 8px 16px;
        border-radius: var(--radius-md);
        font-weight: 600;
        font-size: 14px;
        border: none;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: var(--shadow-gold);
        margin-right: 8px;
    }

    .contact-phone-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(194, 162, 95, 0.4);
        color: var(--text-on-gold);
    }

    @keyframes spin {
        to { transform: rotate(360deg); }
    }

    @media (max-width: 991px) {
        .footer-main {
            grid-template-columns: repeat(2, 1fr);
            gap: 30px;
            margin-bottom: 25px;
        }

        .footer-logo-section {
            padding-left: 0;
        }
        
        .footer-social-certifications {
            flex-direction: column;
            align-items: center;
            gap: 25px;
            text-align: center;
            margin: 15px 0;
        }
        
        .social-media {
            justify-content: center;
            width: 100%;
        }
        
        .footer-certifications {
            justify-content: center;
            width: 100%;
        }
        
        .certification-logo {
            width: 100px;
            height: 100px;
        }

        .social-icon {
            width: 45px;
            height: 45px;
        }
    }

    @media (max-width: 640px) {
        .footer-main {
            grid-template-columns: 1fr;
            gap: 30px;
            margin-bottom: 20px;
        }
        
        .footer-logo {
            flex-direction: column;
            align-items: flex-start;
            gap: 15px;
        }
        
        .footer-logo-container {
            gap: 15px;
        }
        
        .footer-social-certifications {
            align-items: center;
            gap: 20px;
            margin: 15px 0;
        }
        
        .social-media {
            justify-content: center;
            flex-wrap: wrap;
        }
        
        .footer-certifications {
            flex-wrap: wrap;
            justify-content: center;
        }
        
        .certification-logo {
            width: 90px;
            height: 90px;
        }

        .social-icon {
            width: 40px;
            height: 40px;
        }
        
        .contact-phone-button {
            padding: 6px 12px;
            font-size: 13px;
        }
    }

/* ==================== bottom-nav ==================== */
.bottom-nav-container {
            position: fixed;
            bottom: calc(20px + env(safe-area-inset-bottom, 0px));
            left: 50%;
            transform: translateX(-50%);
            
            width: calc(100% - 32px);
            max-width: 480px;
            height: 70px; /* ارتفاع ثابت */
            
            /* تنظیمات شیشه‌ای */
            background-color: rgba(255, 255, 255, 0.75);
            backdrop-filter: saturate(180%) blur(20px);
            -webkit-backdrop-filter: saturate(180%) blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.6);
            box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15), 0 4px 8px rgba(0, 0, 0, 0.05);
            
            border-radius: 9999px; /* کپسولی */
            z-index: 9999;
            
            display: flex;
            align-items: center;
            justify-content: space-around;
            padding: 0 16px;
        }

        .nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center; /* تراز عمودی مرکز */
            text-decoration: none;
            color: #6B7280;
            flex: 1;
            height: 100%;
            cursor: pointer;
            transition: all 0.3s ease;
            -webkit-tap-highlight-color: transparent;
            padding-top: 6px; /* کمی پدینگ از بالا برای تعادل */
        }

        .nav-item.active {
            color: #C2A25F;
        }
        
        .nav-item:active {
            transform: scale(0.92);
        }

        .nav-icon-wrapper {
            height: 24px;
            width: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 4px; /* فاصله آیکون تا متن */
            transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        .nav-item.active .nav-icon-wrapper {
            transform: translateY(-2px); /* حرکت جزئی آیکون به بالا */
            filter: drop-shadow(0 4px 6px rgba(194, 162, 95, 0.4));
        }

        /* سایز آیکون‌ها */
        .nav-icon.emoji { font-size: 22px; line-height: 1; }
        .nav-icon.image { width: 22px; height: 22px; object-fit: contain; }
        .nav-icon.svg svg { width: 22px; height: 22px; fill: currentColor; }

        .nav-label {
            font-size: 11px;
            font-weight: 600;
            line-height: 1.2;
            white-space: nowrap;
            opacity: 0.9;
        }

        .nav-item.active .nav-label {
            opacity: 1;
            font-weight: 800;
        }

        /* استایل خط نشانگر زیر متن */
        .active-indicator-line {
            width: 0; /* در حالت عادی مخفی */
            height: 3px;
            background-color: #C2A25F;
            border-radius: 10px; /* لبه‌های گرد خط */
            margin-top: 4px; /* فاصله خط از زیر متن */
            transition: width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
            opacity: 0;
            box-shadow: 0 2px 4px rgba(194, 162, 95, 0.4);
        }

        /* وقتی اکتیو شد، عرض خط زیاد شود */
        .nav-item.active .active-indicator-line {
            width: 20px; /* طول خط */
            opacity: 1;
        }
        
        body {
            padding-bottom: 120px !important;
        }

        @media (min-width: 1024px) {
            .bottom-nav-container {
                max-width: 500px;
                bottom: 30px;
                backdrop-filter: saturate(180%) blur(25px);
                -webkit-backdrop-filter: saturate(180%) blur(25px);
            }
            .nav-item:hover {
                color: #B3955B;
                background-color: rgba(255, 255, 255, 0.2);
                border-radius: 16px;
            }
        }


/* ---------- app ---------- */
:root {
            --bone-white: #FEFDFB;
            --cream-ultra-light: #FDFCF8;
            --ivory: #FDFAF7;
            --shadow-luxury: 0 15px 35px rgba(43, 43, 43, 0.15);
            --radius-xl: 24px;
            --container-max-width: 1200px;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        *, *::before, *::after, input, button, select, textarea {
            font-family: inherit;
        }

        html {
            scroll-behavior: smooth;
        }

        body {
            font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background: linear-gradient(135deg, var(--bone-white) 0%, var(--cream-ultra-light) 50%, var(--ivory) 100%);
            color: #2B2B2B;
            line-height: 1.7;
            font-weight: 400;
            letter-spacing: -0.01em;
            min-height: 100vh;
        }

        .page-wrapper {
            width: 100%;
            min-height: 100vh;
            background: linear-gradient(135deg, var(--bone-white) 0%, var(--cream-ultra-light) 50%, var(--ivory) 100%);
        }

        .main-container {
            width: 100%;
            max-width: var(--container-max-width);
            margin: 0 auto;
            background: var(--bone-white);
            min-height: 100vh;
            position: relative;
            box-shadow: var(--shadow-luxury);
            border-radius: 0;
            overflow: hidden;
        }

        @media (min-width: 768px) {
            .main-container {
                margin: 24px auto;
                border-radius: var(--radius-xl);
            }
        }

        main {
            min-height: calc(100vh - 180px);
        }

        #loading-screen {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: #ffffff;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 9999;
            transition: opacity 0.3s ease-out;
        }
        
        #loading-screen.fade-out {
            opacity: 0;
            pointer-events: none;
        }
        
        .loading-spinner {
            width: 48px;
            height: 48px;
            border: 3px solid #e5e7eb;
            border-top-color: #C2A25F;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }
        
        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        .offline-indicator {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            background: #ef4444;
            color: white;
            padding: 0.75rem;
            text-align: center;
            z-index: 9998;
            font-size: 0.875rem;
            font-weight: 500;
            animation: slideDown 0.3s ease-out;
        }
        
        @keyframes slideDown {
            from { transform: translateY(-100%); }
            to { transform: translateY(0); }
        }

        .hidden {
            display: none !important;
        }

        .alert-success {
            display: flex;
            align-items: center;
            padding: 1rem;
            color: #065f46;
            background-color: #ecfdf5;
            border: 1px solid #a7f3d0;
            border-radius: 0.5rem;
            margin-bottom: 1rem;
        }
        
        .alert-error {
            display: flex;
            align-items: center;
            padding: 1rem;
            color: #991b1b;
            background-color: #fef2f2;
            border: 1px solid #fecaca;
            border-radius: 0.5rem;
            margin-bottom: 1rem;
        }

/* ---------- add-to-cart-btn ---------- */
.add-to-cart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #C2A25F 0%, #B3955B 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(194, 162, 95, 0.3);
    font-family: inherit;
    width: 100%;
    max-width: 400px;
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(194, 162, 95, 0.4);
}

.add-to-cart-btn:active {
    transform: translateY(0);
}

.add-to-cart-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-icon {
    font-size: 20px;
}

.btn-text {
    flex: 1;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .add-to-cart-btn {
        padding: 12px 24px;
        font-size: 14px;
        max-width: 100%;
    }
}

/* ---------- notification-button ---------- */
.notification-wrapper {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 1000;
}

.notification-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #C2A25F, #A58A4E);
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(194, 162, 95, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.notification-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(194, 162, 95, 0.4);
}

.notification-toggle.subscribed {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.notification-toggle.subscribed:hover {
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.notification-status {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ef4444;
    border: 2px solid white;
}

.notification-toggle.subscribed .notification-status {
    background: #22c55e;
}

.notification-popup {
    position: absolute;
    bottom: 70px;
    left: 0;
    width: 300px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 0;
    display: none;
    border: 1px solid #e5e7eb;
}

.notification-popup.show {
    display: block;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-popup-header {
    padding: 15px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border-radius: 12px 12px 0 0;
}

.notification-popup-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #374151;
}

.close-popup {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-popup:hover {
    color: #374151;
}

.notification-popup-body {
    padding: 15px;
}

.notification-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.notification-actions .btn {
    flex: 1;
    min-width: 120px;
    font-size: 12px;
    padding: 8px 12px;
}

/* رسپانسیو */
@media (max-width: 768px) {
    .notification-wrapper {
        bottom: 20px;
        left: 20px;
    }
    
    .notification-toggle {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .notification-popup {
        width: 280px;
        left: -110px;
    }
}

/* ---------- product-card ---------- */
.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(43, 43, 43, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(43, 43, 43, 0.12);
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%;
    background: #f5f5f5;
    overflow: hidden;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
}

.discount-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #f44336 0%, #e91e63 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}

.product-type-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(43, 43, 43, 0.8);
    color: white;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.product-card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    color: #2B2B2B;
    margin-bottom: 8px;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-seller {
    font-size: 13px;
    color: #5A5A5A;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.product-price-section {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.price-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.original-price {
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
}

.discount-price {
    font-size: 18px;
    font-weight: 700;
    color: #C2A25F;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: #2B2B2B;
}

.stock-status {
    margin-top: 8px;
    font-size: 12px;
}

.in-stock {
    color: #4A8B57;
    font-weight: 600;
}

.out-of-stock {
    color: #D32F2F;
    font-weight: 600;
}

@media (max-width: 768px) {
    .product-card-body {
        padding: 12px;
    }
    
    .product-name {
        font-size: 14px;
    }
    
    .discount-price,
    .product-price {
        font-size: 16px;
    }
}

/* ---------- sidebar ---------- */
/* استایل‌های سایدبار */
    .dashboard-sidebar {
        background: linear-gradient(135deg, #FAF8F5 0%, #F9F7F4 100%);
        border-radius: 24px;
        border: 1px solid rgba(90, 90, 90, 0.12);
        box-shadow: 0 2px 8px rgba(43, 43, 43, 0.08), 0 1px 4px rgba(43, 43, 43, 0.06);
        padding: 24px;
        height: fit-content;
        position: sticky;
        top: 100px;
    }

    .user-profile-card {
        text-align: center;
        margin-bottom: 32px;
        padding-bottom: 24px;
        border-bottom: 1px solid rgba(90, 90, 90, 0.12);
    }

    .user-avatar {
        width: 80px;
        height: 80px;
        border-radius: 50%;
        background: linear-gradient(135deg, #C2A25F, #B3955B);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 32px;
        margin: 0 auto 16px;
        box-shadow: 0 4px 20px rgba(194, 162, 95, 0.20);
        border: 3px solid #FEFDFB;
    }

    .user-name {
        font-size: 20px;
        font-weight: 700;
        margin-bottom: 8px;
        color: #2B2B2B;
    }

    .user-email {
        font-size: 14px;
        color: #5A5A5A;
        direction: ltr;
        margin-bottom: 4px;
        word-break: break-all;
    }

    .activity-time {
        font-size: 13px;
        color: #6A6A6A;
        margin-top: 8px;
        line-height: 1.5;
    }

    .user-join-date {
        font-size: 12px;
        color: #6A6A6A;
        margin-top: 8px;
        opacity: 0.7;
    }

    .sidebar-menu {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .menu-item {
        margin-bottom: 8px;
        position: relative;
    }

    .menu-link {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 14px 16px;
        color: #3A3A3A;
        text-decoration: none;
        border-radius: 16px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        font-weight: 500;
        cursor: pointer;
        border: none;
        background: none;
        width: 100%;
        text-align: right;
        font-family: inherit;
        position: relative;
    }

    .menu-link:hover, .menu-link.active {
        background: rgba(194, 162, 95, 0.1);
        color: #A48651;
        transform: translateX(-4px);
    }

    .menu-icon {
        font-size: 20px;
        width: 24px;
        text-align: center;
        flex-shrink: 0;
    }

    .badge {
        background: linear-gradient(135deg, #D32F2F, #C62828);
        color: white;
        border-radius: 12px;
        padding: 2px 8px;
        font-size: 11px;
        font-weight: 600;
        min-width: 20px;
        height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: auto;
        box-shadow: 0 2px 4px rgba(211, 47, 47, 0.2);
    }

    /* استایل‌های رسپانسیو */
    @media (max-width: 991px) {
        .dashboard-sidebar {
            position: static;
        }
    }

    @media (max-width: 767px) {
        .dashboard-sidebar {
            padding: 20px;
        }

        .user-avatar {
            width: 64px;
            height: 64px;
            font-size: 26px;
        }

        .user-name {
            font-size: 17px;
        }

        .user-email {
            font-size: 13px;
        }

        .activity-time {
            font-size: 12px;
        }

        .user-join-date {
            font-size: 11px;
        }

        .menu-link {
            padding: 12px 14px;
            font-size: 14px;
        }

        .menu-icon {
            font-size: 18px;
        }

        .badge {
            font-size: 10px;
            padding: 1px 6px;
            min-width: 18px;
            height: 18px;
        }
    }

/* ---------- seller-sidebar ---------- */
.seller-sidebar {
        background: #fff;
        border-radius: 16px;
        padding: 24px;
        box-shadow: 0 2px 8px rgba(43, 43, 43, .08);
        position: sticky;
        top: 20px;
        height: fit-content;
    }

    .sidebar-header {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding-bottom: 20px;
        border-bottom: 2px solid #FAF8F5;
        margin-bottom: 20px;
    }

    .sidebar-avatar {
        width: 80px;
        height: 80px;
        border-radius: 50%;
        background: linear-gradient(135deg, #C2A25F, #B3955B);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 32px;
        margin-bottom: 12px;
        box-shadow: 0 4px 12px rgba(194, 162, 95, .25);
    }

    .sidebar-shop-name { font-size: 18px; font-weight: 700; color: #2B2B2B; margin-bottom: 4px; }
    .sidebar-seller-name { font-size: 13px; color: #5A5A5A; }

    .seller-status-badge {
        display: inline-block; padding: 4px 12px; border-radius: 12px;
        font-size: 11px; font-weight: 600;
        background: rgba(74, 139, 87, .1); color: #4a8b57; margin-top: 8px;
    }

    .badge-gold-mini {
        display: inline-block; padding: 4px 12px; border-radius: 12px;
        font-size: 11px; font-weight: 700; margin-top: 6px;
        background: linear-gradient(135deg, #F4D97B, #C2A25F); color: #4A3A10;
    }

    .sidebar-section-title {
        font-size: 11.5px; font-weight: 700; color: #A0A0A0;
        margin: 18px 0 8px; padding-inline-start: 6px; letter-spacing: .2px;
    }

    .sidebar-menu { list-style: none; padding: 0; margin: 0; }
    .sidebar-menu-item { margin-bottom: 6px; }

    .sidebar-menu-link {
        display: flex; align-items: center; gap: 12px;
        padding: 11px 14px; border-radius: 10px; text-decoration: none;
        color: #3A3A3A; font-size: 14px; font-weight: 500;
        transition: all .2s cubic-bezier(.4, 0, .2, 1);
    }

    .sidebar-menu-link:hover { background: #FAF8F5; color: #2B2B2B; transform: translateX(-2px); }

    .sidebar-menu-link.active {
        background: linear-gradient(135deg, rgba(194, 162, 95, .1), rgba(179, 149, 91, .15));
        color: #A48651; font-weight: 600;
    }

    .sidebar-menu-icon { font-size: 19px; min-width: 24px; text-align: center; }

    .menu-count {
        margin-inline-start: auto; background: #D32F2F; color: #fff;
        font-size: 11px; font-weight: 700; min-width: 20px; height: 20px;
        border-radius: 10px; display: grid; place-items: center; padding: 0 6px;
    }
    .menu-count.soft { background: rgba(194, 162, 95, .9); color: #2B2B2B; }

    .sidebar-divider { height: 1px; background: #F0EDE6; margin: 16px 0; }