/* =======================================================================
   زیبایا | Zibaia - Base Styles (نسخه نهایی، شیک و مدرن)
   ======================================================================= */

/* =======================================================================
   ۱. متغیرهای رنگ و فونت
   ======================================================================= */
:root {
    --primary-color: #d63384;
    --primary-light: #fdf2f8;
    --primary-dark: #be185d;
    --secondary-color: #7c3aed;
    --secondary-light: #f3e8ff;
    --dark-bg: #1a1a2e;
    --frame-bg: #ffffff;
    --text-color: #374151;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --hover-bg: #fdf2f8;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
    --gradient-primary: linear-gradient(135deg, #d63384 0%, #7c3aed 100%);
    --gradient-gold: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =======================================================================
   ۲. ریست کامل
   ======================================================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    height: 100%;
}

body {
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, sans-serif;
    background: #fafafa;
    color: var(--text-color);
    line-height: 1.7;
    min-height: 100vh;
    direction: rtl;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

/* =======================================================================
   ۳. Navbar (طراحی شیک، مدرن و شیشه‌ای)
   ======================================================================= */
.zibaia-navbar {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    padding: 10px 0 !important;
    z-index: 1030;
    position: sticky;
    top: 0;
    width: 100%;
    transition: var(--transition);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0;
}

.brand-logo {
    width: 44px;
    height: 44px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    font-weight: 900;
    box-shadow: 0 4px 12px rgba(214, 51, 132, 0.25);
    transition: var(--transition);
}

.navbar-brand:hover .brand-logo {
    transform: rotate(-5deg) scale(1.05);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-name {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.brand-tagline {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.nav-link {
    color: var(--text-color) !important;
    font-weight: 500;
    padding: 8px 16px !important;
    border-radius: 10px;
    transition: var(--transition);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link:hover {
    background: var(--primary-light);
    color: var(--primary-color) !important;
    transform: translateY(-1px);
}

.nav-link i {
    font-size: 0.9rem;
    opacity: 0.8;
}

.navbar-icon-btn {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    padding: 0;
}

.navbar-icon-btn:hover {
    background: var(--primary-light);
    color: var(--primary-color);
    transform: scale(1.05);
}

.cart-badge,
.notification-badge-count {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    padding: 0 4px;
}

.bell-ring {
    animation: bellRing 0.5s ease;
}

@keyframes bellRing {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(-15deg); }
    75% { transform: rotate(15deg); }
}

.btn-login-zibaia {
    color: var(--text-color) !important;
    font-weight: 600;
    padding: 8px 20px !important;
    border-radius: 10px;
    transition: var(--transition);
}

.btn-login-zibaia:hover {
    background: var(--primary-light);
    color: var(--primary-color) !important;
}

.btn-register-zibaia {
    background: var(--gradient-primary) !important;
    color: white !important;
    font-weight: 600;
    padding: 10px 24px !important;
    border-radius: 50px;
    border: none;
    box-shadow: 0 4px 12px rgba(214, 51, 132, 0.25);
    transition: var(--transition);
    font-size: 0.95rem;
}

.btn-register-zibaia:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(214, 51, 132, 0.35);
    color: white !important;
}

.user-avatar-btn {
    cursor: pointer;
    padding: 4px !important;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.user-avatar-btn:hover {
    background: var(--primary-light);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.user-avatar-btn:hover .user-avatar {
    transform: scale(1.05);
}

.notifications-dropdown {
    width: 320px;
    max-height: 450px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    padding: 0;
    overflow: hidden;
    margin-top: 10px;
}

.notifications-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    background: #f9fafb;
}

.notifications-dropdown-header h6 {
    margin: 0;
    font-weight: 700;
    font-size: 14px;
}

.notification-item {
    display: block;
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    color: var(--text-color);
    transition: var(--transition);
}

.notification-item:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

.notification-item.unread {
    background: #fdf2f8;
    border-right: 3px solid var(--primary-color);
}

/* =======================================================================
   ۴. Sidebar Drawer
   ======================================================================= */
.user-sidebar-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(4px);
    z-index: 1040 !important;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease !important;
}

.user-sidebar-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
}

.user-sidebar {
    position: fixed !important;
    top: 0 !important;
    right: -420px !important;
    left: auto !important;
    width: 400px !important;
    max-width: 90vw !important;
    height: 100vh !important;
    background: white !important;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15) !important;
    z-index: 1050 !important;
    display: flex !important;
    flex-direction: column !important;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    overflow: hidden !important;
}

.user-sidebar.active {
    right: 0 !important;
}

.sidebar-header {
    background: var(--gradient-primary);
    color: white;
    padding: 28px 24px;
    position: relative;
    flex-shrink: 0;
}

.sidebar-close-btn {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}

.sidebar-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}

.sidebar-avatar-large {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 28px;
    border: 3px solid rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
}

.sidebar-user-details {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 14px;
    opacity: 0.9;
}

.sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 transparent;
}

.sidebar-body::-webkit-scrollbar {
    width: 6px;
}

.sidebar-body::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-body::-webkit-scrollbar-thumb {
    background-color: #cbd5e0;
    border-radius: 3px;
}

.sidebar-section {
    margin-bottom: 8px;
}

.sidebar-section-title {
    font-size: 11px;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 24px 8px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 24px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s;
    border-right: 3px solid transparent;
}

.sidebar-item:hover {
    background: linear-gradient(90deg, rgba(214, 51, 132, 0.06) 0%, transparent 100%);
    border-right-color: var(--primary-color);
    color: var(--primary-color);
}

.sidebar-item-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.icon-gradient-1 { background: linear-gradient(135deg, #d63384, #be185d); }
.icon-gradient-2 { background: linear-gradient(135deg, #f093fb, #f5576c); }
.icon-gradient-3 { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.icon-gradient-4 { background: linear-gradient(135deg, #fa709a, #fee140); }
.icon-gradient-5 { background: linear-gradient(135deg, #30cfd0, #330867); }
.icon-gradient-6 { background: linear-gradient(135deg, #a8edea, #fed6e3); color: #374151; }
.icon-gradient-7 { background: linear-gradient(135deg, #ff9a9e, #fecfef); color: #374151; }
.icon-gradient-8 { background: linear-gradient(135deg, #11998e, #38ef7d); }
.icon-gradient-9 { background: linear-gradient(135deg, #f6d365, #fda085); }
.icon-gradient-10 { background: linear-gradient(135deg, #ffecd2, #fcb69f); color: #374151; }
.icon-gradient-11 { background: linear-gradient(135deg, #84fab0, #8fd3f4); color: #374151; }
.icon-gradient-12 { background: linear-gradient(135deg, #a1c4fd, #c2e9fb); color: #374151; }

.sidebar-item-content {
    flex: 1;
    min-width: 0;
}

.sidebar-item-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}

.sidebar-item-desc {
    font-size: 12px;
    color: #9ca3af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-item-arrow {
    font-size: 12px;
    color: #d1d5db;
    transition: all 0.2s;
}

.sidebar-item:hover .sidebar-item-arrow {
    color: var(--primary-color);
    transform: translateX(3px);
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    background: #f9fafb;
    flex-shrink: 0;
}

.sidebar-logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.sidebar-logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
    color: white;
}

.sidebar-logout-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

/* =======================================================================
   . Main Content
   ======================================================================= */
.main-content {
    margin: 0 !important;
    padding: 20px 0 !important;
    min-height: auto !important;
    width: 100%;
}

.main-content > .container {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* =======================================================================
   ۶. Footer - طراحی شیشه‌ای مدرن (Glassmorphism)
   ======================================================================= */
.zibaia-footer {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-color);
    padding: 60px 0 25px;
    margin-top: 60px;
    width: 100%;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.03);
    position: relative;
}

.zibaia-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--primary-color) 50%, 
        transparent 100%);
    opacity: 0.2;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h4 {
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-light);
    display: inline-block;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-brand-logo {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: 900;
    box-shadow: 0 4px 12px rgba(214, 51, 132, 0.25);
    transition: var(--transition);
}

.footer-brand-logo:hover {
    transform: rotate(-5deg) scale(1.05);
}

.footer-brand-name {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary-color);
}

.footer-column p {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--primary-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 16px;
}

.footer-social a:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(214, 51, 132, 0.25);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 13px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-right: 5px;
}

.footer-links i {
    font-size: 10px;
    color: var(--primary-color);
}

.footer-contact li {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-contact i {
    color: var(--primary-color);
    width: 16px;
}

.trust-seal-box {
    background: rgba(255, 255, 255, 0.6);
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(8px);
}

.trust-seal-wrapper {
    text-align: center;
    margin-bottom: 16px;
}

.enamad-badge {
    background: white;
    padding: 8px;
    border-radius: var(--radius-sm);
    max-width: 100%;
    height: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.trust-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.trust-item i {
    color: var(--primary-color);
    font-size: 14px;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

.footer-bottom p {
    margin: 5px 0;
}

.footer-bottom a {
    color: var(--text-muted);
    margin: 0 8px;
    transition: var(--transition);
}

.footer-bottom a:hover {
    color: var(--primary-color);
}

/* =======================================================================
   ۷. Alerts
   ======================================================================= */
.alert {
    border-radius: var(--radius-md);
    border: none;
    font-size: 14px;
    padding: 14px 20px;
    margin-bottom: 20px;
}

.alert-success { background: #d1fae5; color: #065f46; }
.alert-error, .alert-danger { background: #fee2e2; color: #991b1b; }
.alert-warning { background: #fef3c7; color: #92400e; }
.alert-info { background: #dbeafe; color: #1e40af; }

/* =======================================================================
   ۸. Navbar Toggler
   ======================================================================= */
.navbar-toggler {
    border: none;
    padding: 8px;
    border-radius: var(--radius-sm);
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* =======================================================================
   ۹. Scrollbar
   ======================================================================= */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* =======================================================================
   ۱۰. Responsive
   ======================================================================= */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .user-sidebar {
        width: 380px !important;
    }
}

@media (max-width: 480px) {
    .user-sidebar {
        width: 100vw !important;
        max-width: 100vw !important;
        right: -100vw !important;
    }
    
    .sidebar-header {
        padding: 22px 18px;
    }
    
    .sidebar-avatar-large {
        width: 62px;
        height: 62px;
        font-size: 24px;
    }
    
    .sidebar-user-name {
        font-size: 18px;
    }
    
    .sidebar-item {
        padding: 12px 18px;
        gap: 14px;
    }
    
    .sidebar-item-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .zibaia-footer {
        padding: 40px 0 15px;
        margin-top: 30px;
    }
    
    .brand-name {
        font-size: 1.1rem;
    }
    
    .brand-tagline {
        font-size: 0.7rem;
    }
    
    .brand-logo {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

@media (max-width: 576px) {
    .footer-column h4 {
        font-size: 15px;
    }
}

@media (max-width: 991px) {
    .navbar-collapse {
        background: white;
        padding: 20px;
        border-radius: var(--radius-md);
        margin-top: 10px;
        box-shadow: var(--shadow-md);
    }
    
    .navbar-nav {
        gap: 5px;
    }
    
    .nav-link {
        padding: 12px 16px !important;
    }
    
    .btn-register-zibaia {
        margin-top: 10px;
        width: 100%;
        text-align: center;
    }
}