/**
 * fullzciti Custom Styles - COMPLETE FILE
 * All custom styling for header, sidebar, dashboard, and components
 * WITH MOBILE FIXES FOR BOTH SIDEBAR AND MENU PANEL
 * 
 * @package fullzciti_Child
 */

/* ============================================
   GLOBAL STYLES & VARIABLES
   ============================================ */

:root {
    --primary-color: #667eea;
    --secondary-color: #f6ad55;
    --gold-color: #fbbf24;
    --dark-bg: #1a202c;
    --darker-bg: #171923;
    --text-light: #ffffff;
    --text-dark: #2d3748;
    --gray-100: #f7fafc;
    --gray-200: #edf2f7;
    --gray-300: #e2e8f0;
    --gray-400: #cbd5e0;
    --gray-500: #a0aec0;
    --gray-600: #718096;
    --gray-700: #4a5568;
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
    --header-height: 80px;
    --transition-speed: 0.3s;
}

/* ============================================
   HEADER STYLES
   ============================================ */

.fxs-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1100;
    transition: all var(--transition-speed) ease;
}

.fxs-header-container {
    height: 100%;
    max-width: 100%;
    padding: 0 20px;
}

/* Desktop Header */
.fxs-header-desktop {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: 30px;
}

.fxs-header-left,
.fxs-header-center,
.fxs-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.fxs-header-left {
    flex: 0 0 auto;
}

.fxs-header-center {
    flex: 1 1 auto;
    max-width: 600px;
}

.fxs-header-right {
    flex: 0 0 auto;
}

/* Mobile Header */
.fxs-header-mobile {
    display: none;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 15px;
}

.fxs-mobile-left,
.fxs-mobile-center,
.fxs-mobile-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Logo */
.fxs-logo {
    text-decoration: none;
    display: flex;
    align-items: center;
    font-weight: 800;
    font-size: 24px;
    letter-spacing: -0.5px;
    transition: all var(--transition-speed) ease;
}

.fxs-logo-text {
    color: var(--primary-color);
}

.fxs-logo-domain {
    color: var(--gold-color);
}

.fxs-logo:hover {
    transform: scale(1.05);
}

/* Sidebar Toggle Button */
.fxs-sidebar-toggle {
    background: var(--gray-100);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    color: var(--gray-700);
}

.fxs-sidebar-toggle:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Search Form */
.fxs-search-form {
    width: 100%;
}

.fxs-search-wrapper {
    position: relative;
    background: white;
    border: 2px solid var(--gray-300);
    border-radius: 12px;
    overflow: hidden;
    transition: all var(--transition-speed) ease;
}

.fxs-search-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.fxs-search-input {
    width: 100%;
    padding: 12px 50px 12px 16px;
    border: none;
    outline: none;
    font-size: 15px;
    color: var(--text-dark);
}

.fxs-search-button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    color: white;
}

.fxs-search-button:hover {
    background: var(--gold-color);
    transform: translateY(-50%) scale(1.05);
}

/* Header Items */
.fxs-header-item {
    position: relative;
}

.fxs-icon-button {
    background: var(--gray-100);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    color: var(--gray-700);
    font-size: 18px;
    position: relative;
}

.fxs-icon-button:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.fxs-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Wallet Display */
.fxs-wallet-display {
    background: linear-gradient(135deg, var(--primary-color), var(--gold-color));
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
}

.fxs-wallet-amount {
    font-size: 16px;
}

/* User Menu */
.fxs-user-trigger {
    background: var(--gray-100);
    border: none;
    padding: 8px 16px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.fxs-user-trigger:hover {
    background: var(--gray-200);
    transform: translateY(-2px);
}

.fxs-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid white;
}

.fxs-username {
    font-weight: 600;
    color: var(--text-dark);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Dropdowns */
.fxs-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-speed) ease;
    z-index: 1100;
    min-width: 280px;
}

.fxs-header-item:hover .fxs-dropdown,
.fxs-user-menu:hover .fxs-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.fxs-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-dark);
    text-decoration: none;
    transition: all var(--transition-speed) ease;
}

.fxs-dropdown-item:hover {
    background: var(--gray-100);
    color: var(--primary-color);
}

.fxs-dropdown-item i {
    width: 20px;
    text-align: center;
}

.fxs-dropdown-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 8px 0;
}

/* Cart Dropdown */
.fxs-cart-dropdown-content {
    min-width: 350px;
    max-width: 400px;
}

.fxs-cart-tabs {
    display: flex;
    border-bottom: 1px solid var(--gray-200);
}

.fxs-cart-tab {
    flex: 1;
    padding: 15px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-weight: 600;
    color: var(--gray-600);
    transition: all var(--transition-speed) ease;
}

.fxs-cart-tab.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.fxs-cart-content {
    max-height: 400px;
    overflow-y: auto;
}

.fxs-tab-panel {
    display: none;
    padding: 20px;
}

.fxs-tab-panel.active {
    display: block;
}

.fxs-empty-message {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-500);
}

.fxs-order-item {
    padding: 15px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fxs-order-item:last-child {
    border-bottom: none;
}

.fxs-order-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.fxs-order-number {
    font-weight: 600;
    color: var(--text-dark);
}

.fxs-order-status {
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 4px;
    background: var(--gray-100);
    color: var(--gray-600);
    display: inline-block;
}

.fxs-order-status.processing {
    background: #fef3c7;
    color: #d97706;
}

.fxs-order-status.completed {
    background: #d1fae5;
    color: #059669;
}

.fxs-order-total {
    font-weight: 700;
    color: var(--primary-color);
}

/* Mobile Search */
.fxs-mobile-search {
    display: none;
    padding: 15px;
    background: white;
    border-top: 1px solid var(--gray-200);
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    z-index: 950;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    transition: transform var(--transition-speed) ease;
}

.fxs-mobile-search.active {
    display: block;
    transform: translateY(0);
}

/* Mobile Panel */
.fxs-mobile-panel {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 950;
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    transform: translateY(-100%);
    transition: transform var(--transition-speed) ease;
}

.fxs-mobile-panel.active {
    display: block;
    transform: translateY(0);
}

.fxs-mobile-panel-content {
    padding: 20px;
}

.fxs-mobile-panel-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-dark);
    transition: all var(--transition-speed) ease;
    margin-bottom: 10px;
    border: 1px solid var(--gray-200);
}

.fxs-mobile-panel-item:hover {
    background: var(--gray-100);
    border-color: var(--primary-color);
}

.fxs-mobile-panel-item i {
    font-size: 20px;
    color: var(--primary-color);
    width: 24px;
    text-align: center;
}

.fxs-mobile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
}

.fxs-mobile-panel-item .fxs-badge {
    margin-left: auto;
}

.fxs-mobile-panel-item .fxs-wallet-amount {
    margin-left: auto;
    font-weight: 700;
    color: var(--primary-color);
}

/* ============================================
   SIDEBAR STYLES
   ============================================ */

.fxs-sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    background: var(--dark-bg);
    transition: all var(--transition-speed) ease;
    z-index: 1000;
    overflow: hidden;
}

body.sidebar-collapsed .fxs-sidebar {
    width: var(--sidebar-collapsed-width);
}

.fxs-sidebar-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Sidebar Logo */
.fxs-sidebar-logo {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

body.sidebar-collapsed .fxs-sidebar-logo {
    justify-content: center;
}

.fxs-sidebar-logo .fxs-logo {
    font-size: 20px;
}

body.sidebar-collapsed .fxs-sidebar-logo .fxs-logo-domain,
body.sidebar-collapsed .fxs-sidebar-close {
    display: none;
}

.fxs-sidebar-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all var(--transition-speed) ease;
}

.fxs-sidebar-close:hover {
    background: var(--gold-color);
}

/* Sidebar Navigation */
.fxs-sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.fxs-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.fxs-nav-item {
    position: relative;
}

.fxs-nav-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: all var(--transition-speed) ease;
    position: relative;
    overflow: hidden;
}

body.sidebar-collapsed .fxs-nav-link {
    justify-content: center;
    padding: 15px 10px;
}

.fxs-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--gold-color);
    transform: scaleY(0);
    transition: all var(--transition-speed) ease;
}

.fxs-nav-link:hover,
.fxs-nav-item.active .fxs-nav-link {
    background: rgba(251, 191, 36, 0.1);
    color: var(--gold-color);
}

.fxs-nav-link:hover::before,
.fxs-nav-item.active .fxs-nav-link::before {
    transform: scaleY(1);
}

.fxs-nav-link i {
    font-size: 20px;
    min-width: 20px;
    color: var(--gold-color);
}

.fxs-nav-text {
    font-weight: 500;
    font-size: 15px;
    white-space: nowrap;
}

body.sidebar-collapsed .fxs-nav-text {
    display: none;
}

/* Sidebar Bottom */
.fxs-sidebar-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
}

.fxs-logout,
.fxs-login {
    color: rgba(255, 255, 255, 0.7) !important;
}

.fxs-logout:hover,
.fxs-login:hover {
    color: #ef4444 !important;
}

/* Sidebar Overlay (Mobile) */
.fxs-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-speed) ease;
    pointer-events: none;
}

body.sidebar-open .fxs-sidebar-overlay {
    display: block;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

@media (max-width: 1024px) {
    .fxs-header-center {
        max-width: 400px;
    }
    
    .fxs-username {
        display: none;
    }
}

@media (max-width: 768px) {
    /* Show mobile header, hide desktop */
    .fxs-header-desktop {
        display: none !important;
    }
    
    .fxs-header-mobile {
        display: flex !important;
    }
    
    /* Mobile header styling */
    .fxs-mobile-left,
    .fxs-mobile-center,
    .fxs-mobile-right {
        flex: 1;
        display: flex !important;
        align-items: center;
    }
    
    .fxs-mobile-left {
        justify-content: flex-start;
    }
    
    .fxs-mobile-center {
        justify-content: center;
    }
    
    .fxs-mobile-right {
        justify-content: flex-end;
        gap: 10px;
    }
    
    /* CRITICAL: Mobile sidebar button */
    .fxs-mobile-sidebar-btn {
        background: var(--primary-color) !important;
        color: white !important;
        border: none !important;
        width: 40px !important;
        height: 40px !important;
        border-radius: 8px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        transition: all var(--transition-speed) ease !important;
        z-index: 1101 !important;
    }
    
    .fxs-mobile-sidebar-btn:hover {
        background: #5568d3 !important;
    }
    
    /* CRITICAL: Mobile menu toggle button */
    .fxs-mobile-menu-toggle {
        background: var(--gold-color) !important;
        border: none !important;
        width: 40px !important;
        height: 40px !important;
        border-radius: 8px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        transition: all var(--transition-speed) ease !important;
        color: white !important;
        z-index: 1101 !important;
    }
    
    .fxs-mobile-menu-toggle:hover {
        background: #f59e0b !important;
    }
    
    .fxs-mobile-search-toggle {
        background: var(--gray-100);
        border: none;
        width: 40px;
        height: 40px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all var(--transition-speed) ease;
        color: var(--gray-700);
    }
    
    .fxs-mobile-search-toggle:hover {
        background: var(--gray-200);
        color: var(--primary-color);
    }
    
    /* CRITICAL: Sidebar hidden by default on mobile */
    .fxs-sidebar {
        transform: translateX(-100%) !important;
        width: 280px !important;
        z-index: 1000 !important;
        display: block !important;
        visibility: visible !important;
    }
    
    /* CRITICAL: Sidebar open state */
    body.sidebar-open .fxs-sidebar {
        transform: translateX(0) !important;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3) !important;
    }
    
    /* CRITICAL: Mobile panel */
    .fxs-mobile-panel {
        position: fixed !important;
        top: var(--header-height) !important;
        left: 0 !important;
        right: 0 !important;
        background: white !important;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
        z-index: 950 !important;
        max-height: calc(100vh - var(--header-height)) !important;
        overflow-y: auto !important;
        transform: translateY(-100%) !important;
        transition: transform 0.3s ease !important;
        display: block !important;
    }
    
    /* CRITICAL: Mobile panel open state */
    .fxs-mobile-panel.active {
        transform: translateY(0) !important;
    }
    
    /* CRITICAL: Content full width on mobile */
    .site-content {
        margin-left: 0 !important;
        padding: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Prevent body scroll when sidebar open */
    body.sidebar-open {
        overflow: hidden !important;
    }
    
    /* Overlay for sidebar */
    body.sidebar-open .fxs-sidebar-overlay {
        display: block !important;
    }
}

/* ============================================
   CART DROPDOWN ITEMS
   ============================================ */

.fxs-cart-item {
    display: flex;
    gap: 12px;
    padding: 15px;
    border-bottom: 1px solid var(--gray-200);
    align-items: center;
    transition: all 0.3s ease;
}

.fxs-cart-item:hover {
    background: var(--gray-100);
}

.fxs-cart-item-image {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.fxs-cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fxs-cart-item-details {
    flex: 1;
    min-width: 0;
}

.fxs-cart-item-name {
    margin: 0 0 5px 0;
    font-size: 14px;
    font-weight: 600;
}

.fxs-cart-item-name a {
    color: var(--text-dark);
    text-decoration: none;
}

.fxs-cart-item-name a:hover {
    color: var(--primary-color);
}

.fxs-cart-item-price {
    font-size: 13px;
    color: var(--gray-600);
}

.fxs-cart-item-remove {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    transition: all 0.3s ease;
    text-decoration: none;
    border: 1px solid var(--gray-200);
}

.fxs-cart-item-remove:hover {
    background: #fee2e2;
    color: #ef4444;
    border-color: #ef4444;
}

.fxs-cart-totals {
    padding: 15px;
    border-top: 2px solid var(--gray-200);
    background: var(--gray-100);
}

.fxs-cart-subtotal {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-weight: 600;
}

.fxs-cart-actions {
    display: flex;
    gap: 10px;
}

.fxs-cart-actions .fxs-btn {
    flex: 1;
    justify-content: center;
    font-size: 13px;
    padding: 10px 16px;
}

.fxs-loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-500);
}

.fxs-error-message {
    text-align: center;
    padding: 30px 20px;
    color: #ef4444;
    background: #fee2e2;
    border-radius: 8px;
    margin: 10px;
}