:root {
    --accent: #E11B22;
    --accent-dark: #B30000;
    --accent-light: #FF3B30;
    --primary: #E11B22;
    --primary-dark: #B30000;
    --primary-light: #FF3B30;
    --secondary: #1e1b4b;
    --bg: #f5f5f5;
    --card-bg: #ffffff;
    --text: #111827;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --error: #ef4444;
    --success: #22c55e;
    --warning: #f59e0b;
    --border: #e5e7eb;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --transition: 0.2s ease;
}

body {
    background: var(--bg);
    color: var(--text);
}

.card, .admin-content, .admin-section, .navbar, .modal-content {
    background: var(--card-bg);
    color: var(--text);
    transition: background-color 0.3s;
}

.product-card, .data-table {
    background: var(--card-bg);
    color: var(--text);
    transition: background-color 0.3s;
}

.data-table th {
    background: #f3f4f6;
    color: #374151;
    border-color: #e5e7eb;
}

.data-table td {
    border-color: #e5e7eb;
}

.form-input, .form-select {
    background: #ffffff;
    color: #111827;
    border-color: #d1d5db;
    transition: background-color 0.3s, border-color 0.3s, color 0.3s;
}

.form-input::placeholder {
    color: #9ca3af;
}

.nav-links a, .navbar {
    color: #2B2B2B;
}

.nav-links a:hover {
    background: #f3f4f6;
}

.dropdown {
    background: #ffffff;
    border-color: #e5e7eb;
}

.dropdown a {
    color: #2B2B2B;
}

.dropdown a:hover {
    background: #f3f4f6;
}

.btn-primary {
    background: #E11B22;
}

.admin-tabs {
    background: #ffffff;
}

.admin-tabs a {
    color: #374151;
}

.admin-tabs a:hover {
    background: #f3f4f6;
}

.admin-tabs a.active {
    background: #E11B22;
    color: #ffffff;
}

@media (max-width: 768px) {
    /* Base mobile reset */
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Dashboard layout - full width */
    .dashboard-layout {
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
    
    /* Main content - full width, no sidebar margin */
    .main-content {
        margin-left: 0 !important;
        padding: 60px 12px 20px !important;
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
    
    /* Container - full width on mobile */
    .container {
        max-width: 100% !important;
        padding: 0 10px !important;
    }
    
    /* Hide desktop sidebar, show as slide-in drawer */
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 280px !important;
        max-width: 85vw !important;
        height: 100vh !important;
        transform: translateX(-100%) !important;
        transition: transform 0.3s ease-in-out !important;
        z-index: 1001 !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .sidebar.show {
        transform: translateX(0) !important;
    }
    
    /* Sidebar overlay */
    .sidebar-overlay {
        display: none !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        background: rgba(0, 0, 0, 0.6) !important;
        z-index: 1000 !important;
        opacity: 0;
        transition: opacity 0.3s ease-in-out;
    }
    
    .sidebar-overlay.show {
        display: block !important;
        opacity: 1;
    }
    
    /* Hamburger menu button */
    .mobile-sidebar-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        position: fixed !important;
        top: 10px !important;
        left: 10px !important;
        width: 44px !important;
        height: 44px !important;
        background: #E11B22 !important;
        color: white !important;
        border: none !important;
        border-radius: 8px !important;
        cursor: pointer !important;
        z-index: 1002 !important;
        box-shadow: 0 2px 8px rgba(225, 27, 34, 0.4) !important;
    }
    
    .mobile-sidebar-toggle i {
        font-size: 20px !important;
    }
    
    /* Sidebar close button */
    .sidebar-close {
        display: flex !important;
        align-items: center;
        justify-content: center;
        position: absolute !important;
        top: 10px !important;
        right: 10px !important;
        width: 36px !important;
        height: 36px !important;
        background: rgba(255, 255, 255, 0.1) !important;
        border: none !important;
        border-radius: 6px !important;
        color: white !important;
        cursor: pointer !important;
        font-size: 18px !important;
    }
    
    /* Lock body scroll when sidebar is open */
    body.locked {
        overflow: hidden !important;
        height: 100vh !important;
        position: fixed !important;
    }
    
    /* Product info - prevent overflow */
    .product-info {
        max-width: 100% !important;
        overflow: hidden !important;
    }
    
    .product-info p {
        max-width: 100% !important;
        white-space: normal !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    /* Welcome banner */
    .welcome-banner {
        flex-direction: column !important;
        text-align: center !important;
        padding: 15px !important;
        gap: 10px !important;
    }
    
    .welcome-logo {
        display: none !important;
    }
    
    /* Balance card - full width */
    .user-balance-card {
        width: 100% !important;
        padding: 15px !important;
    }
    
    /* Category filters - horizontal scroll */
    .shortcuts-grid {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        padding: 8px 0 !important;
        gap: 8px !important;
    }
    
    .shortcuts-grid::-webkit-scrollbar {
        display: none !important;
    }
    
    .shortcut-btn {
        flex: 0 0 auto !important;
        min-height: 44px !important;
        padding: 10px 14px !important;
        white-space: nowrap !important;
    }
    
    /* Search and filters - stacked */
    .search-filter-bar {
        flex-direction: column !important;
        gap: 10px !important;
        padding: 10px !important;
    }
    
    .search-form {
        width: 100% !important;
    }
    
    .filter-controls {
        width: 100% !important;
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    .filter-controls select {
        width: 100% !important;
        min-height: 44px !important;
    }
    
    /* Product rows - card layout */
    .product-row {
        display: flex !important;
        flex-direction: column !important;
        padding: 12px !important;
        margin: 8px 0 !important;
        border: 1px solid #eee !important;
        border-radius: 10px !important;
        background: #fff !important;
        gap: 10px !important;
    }
    
    .product-row .product-icon {
        width: 100% !important;
        height: 50px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: #f5f5f5 !important;
        border-radius: 8px !important;
    }
    
    .product-row .product-info h4 {
        font-size: 14px !important;
    }
    
    .product-row .product-actions {
        width: 100% !important;
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    .product-row .product-actions .btn-install,
    .product-row .product-actions .btn-preview {
        width: 100% !important;
        min-height: 44px !important;
        justify-content: center !important;
    }
    
    /* Category header */
    .category-header {
        flex-direction: column !important;
        gap: 8px !important;
        padding: 10px !important;
        text-align: center !important;
    }
    
    .category-header-right {
        width: 100% !important;
        justify-content: center !important;
    }
    
    /* Recent purchases */
    .recent-purchases-section {
        padding: 12px !important;
        text-align: center !important;
    }
    
    /* Telegram floating button - smaller */
    .telegram-float {
        bottom: 12px !important;
        right: 12px !important;
        padding: 10px 16px !important;
        font-size: 13px !important;
    }
    
    /* Touch-friendly buttons */
    .btn, button, .btn-install, .btn-preview, 
    .btn-login, .btn-register, .shortcut-btn, 
     .nav-item, .category-header a {
         min-height: 44px !important;
     }
}

/* ============================================
   DESKTOP STYLES (min-width: 769px)
   ============================================ */
@media (min-width: 769px) {
    .mobile-sidebar-toggle,
    .sidebar-close,
    .sidebar-overlay {
        display: none !important;
    }
    
    .sidebar {
        transform: none !important;
    }
}

/* Ensure mobile toggle is always visible on mobile */
@media (max-width: 768px) {
    .mobile-sidebar-toggle {
        display: flex !important;
    }
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #16a34a;
}

.btn-error {
    background: var(--error);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

.alert {
    padding: 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* Navbar */
.navbar {
    background: var(--card-bg);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-form {
    flex: 1;
    max-width: 500px;
    display: flex;
    background: var(--bg);
    border-radius: var(--radius);
    overflow: hidden;
}

.search-form input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    font-size: 14px;
}

.search-form button {
    padding: 12px 20px;
    background: var(--primary);
    border: none;
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

.search-form button:hover {
    background: var(--primary-dark);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links a {
    font-weight: 500;
    color: var(--text);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

.cart-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--error);
    color: white;
    font-size: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-menu {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 500;
}

.dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card-bg);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius);
    min-width: 200px;
    display: none;
    z-index: 100;
}

.user-menu:hover .dropdown {
    display: block;
}

.dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text);
    transition: var(--transition);
}

.dropdown a:hover {
    background: var(--bg);
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary-dark) 100%);
    padding: 80px 0;
    color: white;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero h1 span {
    color: var(--accent);
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 50px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
}

.stat-label {
    opacity: 0.8;
    font-size: 14px;
}

/* Section Styles */
section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    color: var(--secondary);
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.category-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 24px;
    color: white;
}

.category-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.product-count {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Products Grid */
.products-section {
    background: var(--bg);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.product-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.product-info {
    padding: 20px;
}

.category-tag {
    display: inline-block;
    background: var(--bg);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    margin-bottom: 10px;
}

.product-info h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    line-height: 1.4;
}

.product-info h3 a {
    color: var(--text);
}

.product-info h3 a:hover {
    color: var(--primary);
}

.seller {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 15px;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Poppins', sans-serif;
}

.view-all {
    text-align: center;
    margin-top: 40px;
}

/* Features Section */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature {
    text-align: center;
    padding: 30px;
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
    color: white;
}

.feature h3 {
    margin-bottom: 10px;
}

.feature p {
    color: var(--text-secondary);
}



/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 40px 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    opacity: 0.8;
}

.breadcrumb a:hover {
    color: var(--primary-light);
}

/* Products Page */
.products-page {
    padding: 40px 0;
}

.products-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
}

.filters-sidebar {
    background: var(--card-bg);
    padding: 25px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.filter-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.filter-group {
    margin-bottom: 25px;
}

.filter-group h4 {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    cursor: pointer;
}

.checkbox-label input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-inputs input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.filter-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: white;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.results-count {
    color: var(--text-secondary);
}

.no-products {
    text-align: center;
    padding: 60px;
    color: var(--text-secondary);
}

.no-products i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

/* Product Detail Page */
.product-detail-page {
    padding: 40px 0;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

.main-image {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.main-image img {
    width: 100%;
    height: auto;
}

.product-info-box h1 {
    font-size: 2rem;
    margin: 15px 0;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
    color: var(--text-secondary);
}

.product-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rating i.filled {
    color: #f59e0b;
}

.price-box {
    display: flex;
    align-items: baseline;
    gap: 15px;
    margin-bottom: 25px;
}

.price-box .price {
    font-size: 2.5rem;
}

.license {
    color: var(--text-secondary);
}

.add-to-cart-btn {
    width: 100%;
    margin-bottom: 25px;
}

.product-features {
    background: var(--bg);
    padding: 25px;
    border-radius: var(--radius-lg);
}

.product-features h3 {
    margin-bottom: 15px;
}

.product-features ul {
    list-style: none;
}

.product-features ul li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.product-features ul li i {
    color: var(--success);
}

/* Product Tabs */
.product-tabs {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

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

.tab {
    flex: 1;
    padding: 20px;
    background: none;
    border: none;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.tab.active {
    background: var(--primary);
    color: white;
}

.tab-content {
    display: none;
    padding: 30px;
}

.tab-content.active {
    display: block;
}

.description-content {
    line-height: 1.8;
    color: var(--text-secondary);
}

/* Reviews */
.review-card {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.review-card:last-child {
    border-bottom: none;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.review-rating i {
    color: #ddd;
}

.review-rating i.filled {
    color: #f59e0b;
}

.review-date {
    font-size: 12px;
    color: var(--text-secondary);
}

.no-reviews {
    text-align: center;
    color: var(--text-secondary);
    padding: 30px;
}

/* Auth Pages */
.auth-page {
    padding: 60px 0;
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
}

.auth-container {
    max-width: 450px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.auth-header p {
    color: var(--text-secondary);
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.auth-form input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    transition: var(--transition);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.forgot-link {
    color: var(--primary);
    font-size: 14px;
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 500;
}

/* Cart Page */
.cart-page {
    padding: 40px 0;
}

.cart-page h1 {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.empty-cart {
    text-align: center;
    padding: 80px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
}

.empty-cart i {
    font-size: 5rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

.empty-cart h2 {
    margin-bottom: 10px;
}

.empty-cart p {
    color: var(--text-secondary);
    margin-bottom: 25px;
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

.cart-items {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow);
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

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

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius);
}

.item-details {
    flex: 1;
}

.item-details h3 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.item-details .price {
    font-size: 1rem;
}

.remove-btn {
    color: var(--error);
    padding: 10px;
    transition: var(--transition);
}

.remove-btn:hover {
    transform: scale(1.1);
}

.cart-summary {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow);
    height: fit-content;
}

.cart-summary h3 {
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

.summary-row.total {
    border-bottom: none;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

.wallet-info {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    background: var(--bg);
    border-radius: var(--radius);
    color: var(--text-secondary);
}

/* Dashboard */
.dashboard-page {
    padding: 40px 0;
}

.dashboard-header {
    margin-bottom: 30px;
}

.dashboard-header h1 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.stat-icon.balance { background: var(--primary); }
.stat-icon.purchases { background: var(--accent); }
.stat-icon.transactions { background: #f59e0b; }
.stat-icon.tickets { background: #8b5cf6; }

.stat-info {
    flex: 1;
}

.stat-label {
    display: block;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
}

.stat-link {
    color: var(--primary);
    font-size: 14px;
    font-weight: 500;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.dashboard-section {
    background: var(--card-bg);
    padding: 25px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.dashboard-section h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
}

.no-data {
    text-align: center;
    color: var(--text-secondary);
    padding: 30px;
}

.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-deposit, .badge-pending { background: #fef3c7; color: #92400e; }
.badge-purchase, .badge-completed { background: #dcfce7; color: #166534; }
.badge-refund, .badge-rejected { background: #fee2e2; color: #991b1b; }
.badge-withdrawal { background: #dbeafe; color: #1e40af; }
.badge-user { background: #e0e7ff; color: #4338ca; }
.badge-admin { background: #1e1b4b; color: white; }
.badge-active { background: #dcfce7; color: #166534; }
.badge-inactive { background: #fee2e2; color: #991b1b; }
.badge-open { background: #dbeafe; color: #1e40af; }
.badge-closed { background: #e5e7eb; color: #374151; }

.settings-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.settings-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.settings-item:hover {
    background: var(--bg);
}

.settings-item i:first-child {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-item span {
    flex: 1;
    font-weight: 500;
}

.settings-item i:last-child {
    color: var(--text-light);
}

/* Wallet Page */
.wallet-page {
    padding: 40px 0;
    color: var(--text);
}

.wallet-page h1 {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wallet-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.wallet-balance-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 40px;
    border-radius: var(--radius-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.balance-header .label {
    display: block;
    opacity: 0.8;
    margin-bottom: 10px;
}

.balance-amount {
    font-size: 3rem;
}

.balance-icon {
    font-size: 5rem;
    opacity: 0.3;
}

.topup-form-card {
    background: var(--card-bg);
    color: var(--text);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.topup-form-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
}

.topup-form-card .form-group {
    margin-bottom: 20px;
}

.topup-form-card label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.topup-form-card input,
.topup-form-card select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.topup-form-card .note {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 15px;
}

.transactions-section {
    background: var(--card-bg);
    color: var(--text);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.transactions-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
}

.amount.positive { color: var(--success); }
.amount.negative { color: var(--error); }

/* Support Page */
.support-page {
    padding: 40px 0;
    color: var(--text);
}

.support-page h1 {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.support-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.new-ticket-section,
.my-tickets-section {
    background: var(--card-bg);
    color: var(--text);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.new-ticket-section h3,
.my-tickets-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
}

.new-ticket-section .form-group {
    margin-bottom: 20px;
}

.new-ticket-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.new-ticket-section input,
.new-ticket-section textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
}

.tickets-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ticket-card {
    padding: 20px;
    background: var(--bg);
    color: var(--text);
    border-radius: var(--radius);
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.ticket-header h4 {
    font-size: 1rem;
}

.ticket-date {
    font-size: 12px;
    color: var(--text-secondary);
}

.contact-info {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.contact-info h4 {
    margin-bottom: 15px;
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

/* FAQ Page */
.faq-page {
    padding: 40px 0;
    color: var(--text);
}

.faq-page h1 {
    text-align: center;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.faq-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 40px;
}

.faq-item {
    background: var(--card-bg);
    color: var(--text);
    padding: 25px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.faq-question {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.faq-question i {
    color: var(--primary);
    margin-top: 3px;
}

.faq-answer {
    padding-left: 35px;
    color: var(--text-secondary);
}

.faq-contact {
    text-align: center;
    background: var(--card-bg);
    color: var(--text);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.faq-contact h3 {
    margin-bottom: 10px;
}

.faq-contact p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* Purchases Page */
.purchases-page {
    padding: 40px 0;
}

.purchases-page h1 {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.purchases-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.purchase-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 25px;
    align-items: center;
}

.purchase-image img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius);
}

.purchase-info h3 {
    margin-bottom: 8px;
}

.purchase-info p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 10px;
}

.purchase-date {
    font-size: 12px;
    color: var(--text-secondary);
    display: block;
    margin-right: 10px;
}

.purchase-actions {
    text-align: right;
}

.purchase-actions .price {
    display: block;
    margin-bottom: 15px;
}

.empty-state {
    text-align: center;
    padding: 80px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
}

.empty-state i {
    font-size: 5rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

.empty-state h2 {
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 25px;
}

/* Admin Page */
.admin-page {
    padding: 40px 0;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

.admin-header h1 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
}

.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    background: var(--card-bg);
    padding: 15px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.admin-tabs a {
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-tabs a:hover {
    background: var(--bg);
}

.admin-tabs a.active {
    background: var(--primary);
    color: white;
}

.admin-content {
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.admin-section {
    color: var(--text);
}

.admin-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.admin-stats .stat-card {
    flex-direction: column;
    text-align: center;
}

.admin-stats .stat-info {
    text-align: center;
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.pending-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pending-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--bg);
    border-radius: var(--radius);
    transition: var(--transition);
}

.pending-item:hover {
    background: #e0e7ff;
}

.admin-form {
    max-width: 500px;
    margin-bottom: 30px;
}

.admin-form .form-group {
    margin-bottom: 20px;
}

.admin-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

/* Error Page */
.error-page {
    padding: 100px 0;
    text-align: center;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-code {
    font-size: 10rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    font-family: 'Poppins', sans-serif;
}

.error-content h1 {
    margin-bottom: 15px;
}

.error-content p {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.error-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Responsive */
@media (max-width: 1024px) {
    .products-layout {
        grid-template-columns: 1fr;
    }
    
    .filters-sidebar {
        position: static;
    }
    
    .product-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .cart-layout {
        grid-template-columns: 1fr;
    }
    
    .wallet-grid,
    .support-grid,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); width: 80vw; max-width: 300px; height: 100vh; position: fixed; top: 0; left: 0; z-index: 1000; background: #1e1e1e; transition: transform 0.3s ease; }
    .sidebar.show { transform: translateX(0); display: flex; }
    .navbar .container {
        flex-wrap: wrap;
    }
    
    .search-form {
        order: 3;
        max-width: 100%;
        flex: 100%;
    }
    
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .purchase-card {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .error-code {
        font-size: 6rem;
    }
}

@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .auth-container {
        padding: 25px;
    }
}

/* ========================
   NEW PRODUCT PAGE STYLES
   ======================== */

/* Hero Section */
.hero-section {
    background: var(--card-bg);
    padding: 60px 20px 40px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
    line-height: 1.2;
}

.hero-title .accent {
    color: var(--accent);
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 30px;
}

/* Search Bar */
.search-bar {
    max-width: 600px;
    margin: 0 auto 25px;
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 4px 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.search-bar:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.search-bar i {
    color: var(--text-light);
    margin-right: 12px;
}

.search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 0;
    font-size: 1rem;
    color: var(--text);
    outline: none;
}

.search-bar input::placeholder {
    color: var(--text-light);
}

/* Feature Badges */
.feature-badges {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.feature-badges span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.feature-badges i {
    color: var(--accent);
}

/* Category Filters */
.category-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 25px 0;
    margin-bottom: 10px;
}

.category-pill {
    padding: 8px 20px;
    border-radius: 50px;
    background: var(--bg);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid transparent;
}

.category-pill:hover {
    background: var(--border);
    color: var(--text);
}

.category-pill.active {
    background: var(--accent);
    color: white;
}

/* Products Grid */
.products-page {
    padding: 20px 0 60px;
    background: var(--bg);
    min-height: 60vh;
}

.results-count {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 25px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Product Card */
.product-card {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    border: 1px solid var(--border);
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.product-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.product-icon i {
    font-size: 20px;
    color: white;
}

.stock-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.stock-badge.in-stock {
    background: #d1fae5;
    color: #065f46;
}

.stock-badge.out-of-stock {
    background: #f3f4f6;
    color: #6b7280;
}

.stock-badge-empty {
    background: #fee2e2 !important;
    color: #991b1b !important;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.product-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.5;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.product-rating i {
    color: #fbbf24;
}

.product-rating .sold {
    color: var(--text-light);
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

.btn-buy {
    background: var(--accent);
    color: white;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-buy:hover {
    background: var(--accent-dark);
    transform: scale(1.02);
}

/* No Products */
.no-products {
    text-align: center;
    padding: 60px 20px;
}

.no-products i {
    font-size: 3rem;
    color: var(--text-light);
    margin-bottom: 15px;
}

.no-products h3 {
    color: var(--text);
    margin-bottom: 8px;
}

.no-products p {
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .feature-badges {
        gap: 15px;
    }
    
    .feature-badges span {
        font-size: 0.8rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .product-card {
        padding: 16px;
    }
    
    .product-title {
        font-size: 0.95rem;
    }
    
    .price {
        font-size: 1.2rem;
    }
    
    .btn-buy {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 40px 15px 30px;
    }
    
    .category-filters {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding: 15px 10px;
        margin: 0 -10px;
    }
    
    .category-pill {
        flex-shrink: 0;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================
   ADDITIONAL DASHBOARD STYLES
   ======================== */

/* Sidebar User Section */
.sidebar-user {
    padding: 15px;
    border-top: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.user-info i {
    font-size: 28px;
    color: #E11B22;
}

.user-info div {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 13px;
    font-weight: 500;
}

.user-balance {
    font-size: 11px;
    color: #10b981;
}

.logout-btn {
    color: #C9C9C9;
    padding: 8px;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    color: #E11B22;
}

.sidebar-login {
    padding: 15px;
    border-top: 1px solid #333;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.login-btn, .register-btn {
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
}

.login-btn {
    background: transparent;
    border: 1px solid #E11B22;
    color: #E11B22;
}

.login-btn:hover {
    background: #E11B22;
    color: white;
}

.register-btn {
    background: #E11B22;
    color: white;
}

.register-btn:hover {
    background: #C4161C;
}

/* User Balance Card */
.user-balance-card {
    background: linear-gradient(135deg, #E11B22, #B30000);
    padding: 15px 25px;
    border-radius: 8px;
    text-align: center;
    color: white;
}

.user-balance-card .balance-label {
    display: block;
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 5px;
}

.user-balance-card .balance-amount {
    display: block;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
}

.top-up-btn {
    background: white;
    color: #E11B22;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.top-up-btn:hover {
    transform: scale(1.05);
}

/* Recent Orders Section */
.recent-orders-section {
    background: white;
    border-radius: 6px;
    box-shadow: 0px 1px 4px rgba(0,0,0,0.08);
    padding: 20px;
    margin-bottom: 25px;
}

.recent-orders-section h3 {
    font-size: 16px;
    color: #2B2B2B;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.recent-orders-section h3 i {
    color: #E11B22;
}

.orders-timeline {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: #F9F9F9;
    border-radius: 6px;
}

.order-item .order-icon {
    width: 32px;
    height: 32px;
    background: #d1fae5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.order-item .order-icon i {
    color: #065f46;
    font-size: 12px;
}

.order-item .order-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.order-item .order-title {
    font-size: 13px;
    font-weight: 500;
    color: #2B2B2B;
}

.order-item .order-time {
    font-size: 11px;
    color: #A0A0A0;
}

.order-item .order-price {
    font-weight: 600;
    color: #10b981;
}

/* Popular Shortcuts Section */
.popular-shortcuts {
    background: white;
    border-radius: 6px;
    box-shadow: 0px 1px 4px rgba(0,0,0,0.08);
    padding: 20px;
    margin-bottom: 25px;
}

.popular-shortcuts h3 {
    font-size: 16px;
    color: #2B2B2B;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.popular-shortcuts h3 i {
    color: #E11B22;
}

.shortcuts-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.shortcut-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #F5F5F5;
    border-radius: 20px;
    font-size: 13px;
    color: #2B2B2B;
    text-decoration: none;
    transition: all 0.2s ease;
}

.shortcut-btn:hover {
    background: #E11B22;
    color: white;
}

/* Search form in shortcuts */
.search-form-shortcut {
    flex: 0 0 auto;
    min-width: 120px;
    display: flex;
    align-items: center;
}

.search-form-shortcut input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 13px;
    outline: none;
    transition: all 0.2s ease;
}

.search-form-shortcut input:focus {
    border-color: #E11B22;
    box-shadow: 0 0 0 2px rgba(225, 27, 34, 0.1);
}

.shortcut-btn i {
    font-size: 14px;
}

/* Specific platform colors */
.shortcut-btn.instagram { border-left: 3px solid #E1306C; }
.shortcut-btn.tiktok { border-left: 3px solid #000000; }
.shortcut-btn.youtube { border-left: 3px solid #FF0000; }
.shortcut-btn.twitter { border-left: 3px solid #1DA1F2; }
.shortcut-btn.facebook { border-left: 3px solid #1877F2; }
.shortcut-btn.whatsapp { border-left: 3px solid #25D366; }
.shortcut-btn.spotify { border-left: 3px solid #1DB954; }
.shortcut-btn.netflix { border-left: 3px solid #E50914; }

/* Profile Page Styles */
.profile-page {
    background: var(--card-bg);
    border-radius: 6px;
    box-shadow: var(--shadow);
    padding: 30px;
    color: var(--text);
}

.profile-page h2 {
    font-size: 20px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-page h2 i {
    color: #E11B22;
}

.profile-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.profile-form .form-group {
    margin-bottom: 20px;
}

.profile-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text);
    font-size: 14px;
}

.profile-form input,
.profile-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: var(--bg);
    color: var(--text);
}

.profile-form input:focus,
.profile-form textarea:focus {
    outline: none;
    border-color: #E11B22;
}

/* Footer fix */
.content-footer {
    margin-top: 40px;
    padding: 20px;
     background: white;
     border-radius: 6px;
     box-shadow: 0px 1px 4px rgba(0,0,0,0.08);
     display: flex;
     justify-content: space-between;
     align-items: center;
     flex-wrap: wrap;
     gap: 15px;
 }

.content-footer .footer-links a {
    color: #6B6B6B;
    font-size: 13px;
    margin-right: 20px;
    text-decoration: none;
}

.content-footer .footer-links a:hover {
    color: #E11B22;
}

.content-footer .copyright {
    color: #A0A0A0;
    font-size: 13px;
}

@media (max-width: 768px) {
    .content-footer {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-form .form-row {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   DASHBOARD LAYOUT STYLES (Goodluck Store)
   ========================================== */

.dashboard-layout {
    display: flex;
    min-height: 100vh;
    background: #F5F5F5;
}

.sidebar {
    width: 220px;
    background: #1E1E1E;
    position: fixed;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow: visible;
}

.sidebar-close {
    display: none;
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    z-index: 1001;
}

.mobile-sidebar-toggle {
    display: none;
}

.sidebar-logo {
    padding: 20px;
    color: white;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #333;
}

.sidebar-logo i { color: #E11B22; }

.sidebar-nav { flex: 1; padding: 15px 0; overflow-y: auto; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    color: #C9C9C9;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
    text-decoration: none;
}

.nav-item:hover { background: #2C2C2C; color: white; }

.nav-item.active { background: #E11B22; color: white; border-left: 4px solid white; }

.nav-item i { width: 20px; }

/* OTP Dropdown Styles */
.sidebar .nav-dropdown { position: relative; z-index: 101; }

.sidebar .nav-dropdown .nav-item { cursor: pointer; }

.sidebar .nav-dropdown .nav-dropdown-menu {
    display: none !important;
    position: absolute;
    left: 0;
    top: 100%;
    background: #1a1a2e;
    min-width: 200px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1001;
    overflow: visible;
}

.sidebar .nav-dropdown .nav-dropdown-menu.show {
    display: block !important;
}

.sidebar .nav-dropdown .nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    color: #C9C9C9;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: all 0.2s ease;
}

.sidebar .nav-dropdown .nav-dropdown-item:last-child { border-bottom: none; }

.sidebar .nav-dropdown .nav-dropdown-item:hover { background: rgba(255,255,255,0.1); color: white; }

.sidebar .nav-dropdown .nav-dropdown-item.active { background: #E11B22; color: white; }

.sidebar-user {
    padding: 15px;
    border-top: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info { display: flex; align-items: center; gap: 10px; color: white; }
.user-info i { font-size: 28px; color: #E11B22; }
.user-info div { display: flex; flex-direction: column; }
.user-name { font-size: 13px; font-weight: 500; }
.user-balance { font-size: 11px; color: #10b981; }

.logout-btn { color: #C9C9C9; padding: 8px; transition: all 0.2s ease; }
.logout-btn:hover { color: #E11B22; }

.sidebar-login { padding: 15px; border-top: 1px solid #333; display: flex; flex-direction: column; gap: 10px; }
.login-btn, .register-btn { padding: 10px; border-radius: 6px; text-align: center; font-weight: 500; transition: all 0.2s ease; text-decoration: none; }
.login-btn { background: transparent; border: 1px solid #E11B22; color: #E11B22; }
.login-btn:hover { background: #E11B22; color: white; }
.register-btn { background: #E11B22; color: white; }
.register-btn:hover { background: #C4161C; }

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 220px;
    padding: 25px;
    padding-bottom: 80px;
    max-width: calc(100% - 220px);
    overflow-x: hidden;
}

/* CRITICAL: Ensure full width on mobile */
@media (max-width: 1024px) {
    .main-content {
        margin-left: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        padding: 70px 15px 30px !important;
        overflow-x: hidden;
    }
    
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }
    
    .dashboard-layout {
        overflow-x: hidden;
    }
}

/* Welcome Banner */
.welcome-banner {
    background: var(--card-bg);
    border-radius: 6px;
    box-shadow: var(--shadow);
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    overflow-x: hidden;
    color: var(--text);
}

.welcome-text { text-align: center; flex: 1; }
.welcome-to { font-family: 'Poppins', sans-serif; font-size: 18px; color: var(--text-secondary); }
.welcome-banner h1 { font-size: 36px; font-weight: 700; color: #E11B22; margin: 5px 0; }
.welcome-subtitle { color: var(--text-light); font-size: 14px; }

.welcome-logo {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #E11B22, #B30000);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.welcome-logo i { font-size: 24px; color: white; }

/* User Balance Card */
.user-balance-card {
    background: linear-gradient(135deg, #E11B22, #B30000);
    padding: 15px 25px;
    border-radius: 8px;
    text-align: center;
    color: white;
}

.user-balance-card .balance-label { display: block; font-size: 12px; opacity: 0.9; margin-bottom: 5px; }
.user-balance-card .balance-amount { display: block; font-size: 24px; font-weight: 700; margin-bottom: 10px; }
.top-up-btn { background: white; color: #E11B22; padding: 6px 16px; border-radius: 20px; font-size: 12px; font-weight: 600; text-decoration: none; transition: all 0.2s ease; }
.top-up-btn:hover { transform: scale(1.05); }

/* Search & Filter */
.search-filter-bar { display: flex; gap: 15px; margin-bottom: 20px; }
.search-form { flex: 1; max-width: 60%; position: relative; }
.search-form i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #A0A0A0; }
.search-form input { width: 100%; height: 38px; padding: 0 14px 0 40px; border: 1px solid #E5E5E5; border-radius: 6px; font-size: 14px; background: white; }
.search-form input:focus { outline: none; border-color: #E11B22; }
.filter-controls { display: flex; gap: 10px; }
.filter-controls select { height: 38px; padding: 0 12px; border: 1px solid #E5E5E5; border-radius: 6px; background: white; font-size: 13px; cursor: pointer; }
.results-count { color: #6B6B6B; font-size: 14px; margin-bottom: 20px; }

/* Popular Shortcuts */
.popular-shortcuts { background: var(--card-bg); border-radius: 6px; box-shadow: var(--shadow); padding: 20px; margin-bottom: 25px; overflow-x: hidden; color: var(--text); }
.popular-shortcuts h3 { font-size: 16px; color: var(--text); margin-bottom: 15px; display: flex; align-items: center; gap: 10px; }
.popular-shortcuts h3 i { color: #E11B22; }
.shortcuts-grid { display: flex; flex-wrap: wrap; gap: 10px; overflow-x: hidden; }
.shortcut-btn { display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--bg); border-radius: 20px; font-size: 13px; color: var(--text); text-decoration: none; transition: all 0.2s ease; }
.shortcut-btn:hover { background: #E11B22; color: white; }
.shortcut-btn.instagram { border-left: 3px solid #E1306C; }
.shortcut-btn.tiktok { border-left: 3px solid #000; }
.shortcut-btn.youtube { border-left: 3px solid #FF0000; }
.shortcut-btn.twitter { border-left: 3px solid #1DA1F2; }
.shortcut-btn.facebook { border-left: 3px solid #1877F2; }
.shortcut-btn.whatsapp { border-left: 3px solid #25D366; }
.shortcut-btn.spotify { border-left: 3px solid #1DB954; }
.shortcut-btn.netflix { border-left: 3px solid #E50914; }
.shortcut-btn.all-btn { background: #E11B22; color: white; border-left: 3px solid #B30000; }

/* Category Section */
.category-section { margin-bottom: 25px; overflow-x: hidden; }

/* Old category-header hidden - using modern version now */
.category-header { display: none; }
.category-header-right { display: none; }
.see-more-header-btn { display: none; }
.latest-tag { background: #000; color: #FFF; font-size: 11px; border-radius: 4px; padding: 3px 8px; }
.product-list { background: white; border-radius: 0 0 6px 6px; box-shadow: 0px 1px 4px rgba(0,0,0,0.08); }
.see-more-wrapper { background: white; padding: 16px; text-align: center; border-top: 1px solid #eee; border-radius: 0 0 6px 6px; }
.see-more-btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 28px; background: linear-gradient(135deg, #E11B22, #B30000); color: white; text-decoration: none; border-radius: 25px; font-size: 14px; font-weight: 600; transition: all 0.3s ease; box-shadow: 0 2px 8px rgba(225, 27, 34, 0.3); }
.see-more-btn:hover { background: linear-gradient(135deg, #C4161C, #990000); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(225, 27, 34, 0.4); }
.see-more-btn i { transition: transform 0.3s; }
.see-more-btn:hover i { transform: translateX(4px); }

/* Product Row */
.product-row { display: flex; align-items: center; padding: 14px; margin-bottom: 8px; background: white; border-bottom: 1px solid #f0f0f0; transition: all 0.2s ease; }
.product-row:last-child { border-bottom: none; margin-bottom: 0; }
.product-row:hover { background: #FAFAFA; }
.product-row .product-icon { width: 36px; height: 36px; background: linear-gradient(135deg, #E11B22, #B30000); border-radius: 6px; display: flex; align-items: center; justify-content: center; margin-right: 14px; flex-shrink: 0; }
.product-row .product-icon i { color: white; font-size: 14px; }
.product-info { flex: 1; min-width: 0; }
.product-info h4 { font-size: 14px; font-weight: 600; color: #222; margin-bottom: 2px; }
.product-info p { font-size: 12px; color: #777; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 400px; }

/* ============================================
   MODERN PRODUCT CARD DESIGN
   ============================================ */

/* Category Header - Red Gradient */
.category-header-modern {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #1e1e1e 100%);
    border-radius: 12px 12px 0 0;
    margin-bottom: 0;
}

.category-title {
    color: white;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.see-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: white;
    color: #dc2626;
    text-decoration: none;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.see-all-btn:hover {
    background: #f5f5f5;
    transform: scale(1.05);
}

.see-all-btn i {
    font-size: 11px;
}

/* Modern Product Card */
.product-list {
    background: white;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    padding: 0;
}

.product-card-modern {
    display: flex;
    align-items: center;
    padding: 16px;
    margin-bottom: 12px;
    background: #f8f8f8;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.product-card-modern:last-child {
    margin-bottom: 0;
}

.product-card-modern:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #d5d5d5;
}

/* Left - Facebook Icon */
.product-card-left {
    flex-shrink: 0;
    margin-right: 16px;
}

.product-icon-square {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #1877f2, #0d5bbd);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-icon-square i {
    color: white;
    font-size: 24px;
}

/* Center - Title & Description */
.product-card-center {
    flex: 1;
    min-width: 0;
    padding-right: 16px;
}

.product-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    line-height: 1.4;
}

.product-desc {
    font-size: 12px;
    color: #666;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Right - Info Boxes & Buy Button */
.product-card-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.info-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    min-width: 60px;
}

.info-label {
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
    font-weight: 500;
    margin-bottom: 2px;
}

.info-value {
    font-size: 14px;
    font-weight: 700;
    color: #333;
}

.info-value.out-of-stock {
    color: #ef4444;
}

.info-value.price {
    color: #059669;
}

.buy-box {
    display: flex;
    align-items: center;
}

.btn-buy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-buy:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btn-buy:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-buy i {
    font-size: 14px;
}

/* Mobile Responsive - Modern Cards */
@media (max-width: 768px) {
    .category-header-modern {
        padding: 12px 16px;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .category-title {
        font-size: 12px;
    }
    
    .product-card-modern {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px;
    }
    
    .product-card-left {
        margin-right: 0;
        margin-bottom: 12px;
    }
    
    .product-icon-square {
        width: 48px;
        height: 48px;
    }
    
    .product-icon-square i {
        font-size: 20px;
    }
    
    .product-card-center {
        padding-right: 0;
        margin-bottom: 14px;
        width: 100%;
    }
    
    .product-title {
        font-size: 13px;
    }
    
    .product-desc {
        font-size: 11px;
        -webkit-line-clamp: 3;
    }
    
    .product-card-right {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }
    
    .info-box {
        padding: 6px 10px;
        min-width: 50px;
    }
    
    .info-label {
        font-size: 9px;
    }
    
    .info-value {
        font-size: 12px;
    }
    
    .btn-buy {
        padding: 12px 24px;
        font-size: 13px;
        min-width: 100px;
    }
}
.product-stats { display: flex; gap: 8px; margin-right: 15px; }
.stat-badge { background: #F2F2F2; padding: 4px 8px; border-radius: 4px; font-size: 11px; color: #555; white-space: nowrap; }
.stat-badge i { color: #fbbf24; margin-right: 3px; }
.product-actions { display: flex; gap: 8px; flex-shrink: 0; }
.btn-preview { background: #EEF2F7; color: #333; padding: 6px 10px; border-radius: 4px; font-size: 12px; text-decoration: none; transition: all 0.2s ease; }
.btn-preview:hover { background: #E0E5ED; transform: translateY(-1px); }
.btn-install { background: #E11B22; color: white; padding: 6px 12px; border-radius: 4px; font-size: 12px; font-weight: 600; text-decoration: none; border: none; cursor: pointer; transition: all 0.2s ease; display: inline-flex; align-items: center; gap: 6px; }
.btn-install:hover { background: #C4161C; transform: translateY(-1px); }

/* No Products */
.no-products { text-align: center; padding: 60px; background: white; border-radius: 6px; box-shadow: 0px 1px 4px rgba(0,0,0,0.08); }
.no-products i { font-size: 3rem; color: #A0A0A0; margin-bottom: 15px; }
.no-products h3 { color: #2B2B2B; margin-bottom: 8px; }
.no-products p { color:

/* Admin Section Improvements */
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.btn-add { background: #E11B22; color: white; padding: 10px 20px; border-radius: 6px; text-decoration: none; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.btn-add:hover { background: #C4161C; }
.table-responsive { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; background: white; }
.data-table th, .data-table td { padding: 12px; text-align: left; border-bottom: 1px solid #eee; }
.data-table th { background: #f9f9f9; font-weight: 600; font-size: 13px; }
.data-table tr:hover { background: #fafafa; }
.btn-xs { padding: 4px 8px; font-size: 11px; border-radius: 4px; border: none; cursor: pointer; }
.btn-success { background: #10b981; color: white; }
.btn-secondary { background: #6b7280; color: white; }
.btn-error { background: #ef4444; color: white; }
.no-data { text-align: center; padding: 40px; color: #6b7280; }
.no-data a { color: #E11B22; }

/* Bulk Upload */
.bulk-form { max-width: 600px; }
.bulk-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.bulk-form .form-group { margin-bottom: 20px; }
.bulk-form label { display: block; margin-bottom: 8px; font-weight: 500; }
.bulk-form input, .bulk-form select { width: 100%; padding: 12px; border: 1px solid #E5E5E5; border-radius: 6px; }
.bulk-form small { display: block; margin-top: 6px; color: #999; font-size: 12px; }
.sample-csv { margin-top: 30px; padding: 20px; background: #f9f9f9; border-radius: 6px; }
.sample-csv h4 { margin-bottom: 10px; }
.sample-csv pre { background: #333; color: #fff; padding: 15px; border-radius: 6px; font-size: 12px; overflow-x: auto; }

/* ==========================================
   MOBILE-FIRST RESPONSIVE STYLES
   ========================================== */

/* Base styles for all devices */
.welcome-banner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 25px;
}

.welcome-text {
    text-align: left;
    flex: 1;
}

.shortcuts-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
}

.product-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 15px 20px;
    gap: 15px;
}

.product-stats, .product-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.search-filter-bar {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    gap: 15px;
}

.admin-tabs {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

/* Touch-friendly buttons - minimum 44px */
.btn, button, .btn-install, .btn-preview, .btn-login, .btn-register, 
.shortcut-btn, .nav-item, .admin-tabs a, .category-header a {
    min-height: 44px;
    min-width: 44px;
}

/* Tablet breakpoint - 1024px */
@media (max-width: 1024px) {
    /* Convert sidebar to slide menu */
    .dashboard-layout {
        flex-direction: column;
    }
    
    .mobile-sidebar-toggle {
        display: block;
        position: fixed;
        top: 12px;
        left: 12px;
        z-index: 1001;
        background: #E11B22;
        color: white;
        border: none;
        width: 44px;
        height: 44px;
        border-radius: 8px;
        cursor: pointer;
        font-size: 20px;
        box-shadow: 0 2px 8px rgba(225, 27, 34, 0.4);
    }
    
    /* Ensure header hamburger is visible on mobile (≤1024px) */
    .mobile-menu-btn { display: block; }
    
    .sidebar {
        display: none;
        width: 100%;
        height: 100vh;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1000;
        overflow-y: auto;
    }
    
    .sidebar.show {
        display: flex;
        animation: slideIn 0.3s ease;
    }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
    
    @keyframes slideIn {
        from { transform: translateX(-100%); }
        to { transform: translateX(0); }
    }
    
    .sidebar-close {
        display: block;
        position: absolute;
        top: 15px;
        right: 15px;
        background: none;
        border: none;
        color: white;
        font-size: 24px;
        cursor: pointer;
        width: 44px;
        height: 44px;
        border-radius: 8px;
    }
    
    .sidebar-close:hover {
        background: rgba(255,255,255,0.1);
    }
    
    .main-content {
        margin-left: 0 !important;
        padding: 70px 20px 30px !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .welcome-banner {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .welcome-logo {
        display: none;
    }
    
    .shortcuts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* End of Mobile Responsive Styles */

/* Mobile-first adjustments for ≤768px - off-canvas sidebar and mobile header */ 
@media (max-width: 768px) {
  aside.sidebar {
    transform: translateX(-100%);
    width: 80vw;
    max-width: 300px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    background: linear-gradient(135deg, #1e1e1e 0%, #0b0b0b 100%);
    display: block;
    transition: transform 0.3s ease;
  }
  aside.sidebar.show {
    transform: translateX(0);
  }
  .sidebar-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.5);
    z-index: 999;
  }
  .sidebar-close {
    display: block;
    color: white;
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
  }
  .mobile-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: #fff; position: sticky; top: 0; z-index: 1001; border-bottom: 1px solid #eee; }
  .wallet-chip { padding: 6px 12px; border-radius: 999px; background: #fff; border:1px solid #eee; font-size:12px; }
  .avatar { width: 28px; height: 28px; border-radius: 50%; display:inline-flex; align-items:center; justify-content:center; background:#ddd; font-size:14px; }
  .main-content { margin-left: 0 !important; padding: 12px; }
  .product-row { display: block; border: 1px solid #eee; padding: 12px; border-radius: 8px; margin: 8px 0; }
  .product-row .product-icon { width: 100%; height: 60px; display:flex; align-items:center; justify-content:center; background:#f5f5f5; border-radius:6px; margin-bottom:8px; }
  .section-header { padding: 6px 8px; font-size: 13px; }
  .see-more-header-btn { padding: 6px 10px; font-size: 11px; }
  .telegram-float { bottom: 12px; right: 12px; padding: 12px 16px; font-size: 14px; }
  
  /* Mobile OTP Dropdown - Bottom Sheet Style */
  .sidebar .nav-dropdown .nav-dropdown-menu {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: 100%;
    max-height: 40vh;
    border-radius: 16px 16px 0 0;
    z-index: 2000;
    display: none;
    background: #1a1a2e;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
  }
  
  .sidebar .nav-dropdown .nav-dropdown-menu.show {
    display: block !important;
  }
  
  .sidebar .nav-dropdown .mobile-dropdown-handle {
    width: 40px;
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    margin: 12px auto 8px;
  }
  
  .sidebar .nav-dropdown .mobile-dropdown-header {
    text-align: center;
    color: #888;
    font-size: 12px;
    padding: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
  }
  
  .sidebar .nav-dropdown .nav-dropdown-item {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
}

/* Additional robust mobile off-canvas for 768px and below */
@media (max-width: 768px) {
  aside.sidebar {
    transform: translateX(-100%);
    width: 80vw;
    max-width: 300px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    background: #1e1e1e;
    display: block;
    transition: transform 0.3s ease;
  }
  aside.sidebar.show {
    transform: translateX(0);
  }
  .sidebar-overlay {
    display: none;
  }
  .sidebar-overlay.show {
    display: block;
  }
  body.locked { overflow: hidden; }
  .mobile-menu-btn { display: block; }
  .main-content { margin-left: 0 !important; }
}

/* Mobile breakpoint - 768px */
@media (max-width: 768px) {
    /* Base typography */
    body {
        font-size: 14px;
        line-height: 1.5;
    }
    
    /* Header/navbar */
    .navbar .container {
        padding: 8px 12px;
    }
    
    .navbar .logo {
        font-size: 16px;
    }
    
    /* Mobile menu */
    .mobile-menu-btn {
        display: block;
        width: 44px;
        height: 44px;
        background: none;
        border: none;
        font-size: 22px;
        cursor: pointer;
        color: #333;
    }
    
    .navbar .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 10px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        z-index: 999;
        gap: 0;
    }
    
    .navbar .nav-links.show {
        display: flex;
    }
    
    .navbar .nav-links a,
    .navbar .nav-links .btn-login,
    .navbar .nav-links .btn-register {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 14px;
        min-height: 44px;
        border-radius: 6px;
        margin: 2px 0;
    }
    
    /* Welcome section */
    .welcome-banner {
        padding: 12px;
    }
    
    .welcome-banner h1 {
        font-size: 22px;
    }
    
    .welcome-to {
        font-size: 13px;
    }
    
    /* Shortcuts - 2 columns */
    .shortcuts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .shortcut-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 12px 10px;
        min-height: 44px;
        font-size: 12px;
        border-radius: 8px;
    }
    
    /* Category chips horizontally scrollable */
    .popular-shortcuts {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .popular-shortcuts::-webkit-scrollbar {
        display: none;
    }
    
    /* Search and filters - stacked */
    .search-filter-bar {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }
    
    .search-form {
        width: 100%;
    }
    
    .search-form input {
        width: 100%;
        padding: 12px;
        min-height: 44px;
    }
    
    .filter-controls {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .filter-controls select {
        flex: 1;
        min-width: 140px;
        padding: 12px;
        min-height: 44px;
    }
    
    /* Category header - stacked */
    .category-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 15px;
    }
    
    .category-header-right {
        width: 100%;
        display: flex;
        justify-content: center;
        gap: 10px;
    }
    
    .see-more-header-btn {
        font-size: 12px;
        padding: 8px 16px;
    }
    
    /* Product rows - card layout */
    .product-row {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
        gap: 12px;
        border-radius: 8px;
        margin-bottom: 10px;
    }
    
    .product-icon {
        width: 100% !important;
        height: 60px !important;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
    }
    
    .product-info {
        width: 100% !important;
        text-align: center;
    }
    
    .product-info h4 {
        font-size: 15px;
        margin-bottom: 5px;
    }
    
    .product-stats {
        flex-direction: column;
        gap: 8px;
    }
    
    .product-actions {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    
    .product-actions .btn-install,
    .product-actions .btn-preview {
        width: 100%;
        justify-content: center;
        min-height: 44px;
    }
    
    /* Admin tabs - horizontal scroll */
    .admin-tabs {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 5px;
    }
    
    .admin-tabs a {
        flex-shrink: 0;
        padding: 12px 16px;
        min-width: 120px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Admin stats - 2 columns */
    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-card {
        padding: 15px;
        min-height: 100px;
    }
    
    .stat-card h4 {
        font-size: 12px;
    }
    
    .stat-card .stat-value {
        font-size: 24px;
    }
    
    /* Tables - horizontal scroll */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .data-table {
        font-size: 12px;
        min-width: 600px;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 8px;
    }
    
    /* Forms */
    .form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px;
        min-height: 44px;
    }
    
    /* Modal */
    .modal-content {
        margin: 10px;
        padding: 20px;
        width: calc(100% - 20px) !important;
        max-width: none !important;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 20px;
    }
    
    /* Telegram float button */
    .telegram-float {
        bottom: 20px;
        right: 20px;
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* Small mobile - 480px */
@media (max-width: 480px) {
    /* Smaller fonts */
    h1 { font-size: 20px; }
    h2 { font-size: 18px; }
    h3 { font-size: 16px; }
    
    /* Compact navbar */
    .navbar .logo {
        font-size: 14px;
    }
    
    .navbar .logo i {
        font-size: 18px;
    }
    
    /* Welcome banner */
    .welcome-banner h1 {
        font-size: 18px;
    }
    
    /* Shortcuts - full width */
    .shortcuts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Admin stats - 1 column */
    .admin-stats {
        grid-template-columns: 1fr;
    }
    
    /* Product actions */
    .product-actions {
        flex-direction: column;
    }
    
    /* Auth forms */
    .auth-container {
        padding: 20px;
        margin: 10px;
    }
    
    /* Cart */
    .cart-item {
        flex-direction: column;
        text-align: center;
    }
    
    /* Purchases */
    .purchase-card {
        padding: 15px;
    }
    
    .purchase-header {
        flex-direction: column;
        gap: 5px;
    }
    
    .purchase-content {
        flex-direction: column;
    }
    
    /* Buttons - extra touch-friendly */
    .btn, button, input[type="submit"] {
        min-height: 48px;
        padding: 12px 20px;
        font-size: 14px;
        border-radius: 8px;
    }
    
    /* Card gaps */
    .category-section {
        margin-bottom: 20px;
    }
    
    /* Touch areas */
    a, button {
        touch-action: manipulation;
    }
    
    /* Prevent text selection on mobile */
    body {
        -webkit-tap-highlight-color: transparent;
    }
}
    
    .mobile-sidebar-toggle {
        display: block;
        position: fixed;
        top: 10px;
        left: 10px;
        z-index: 1001;
        background: #E11B22;
        color: white;
        border: none;
        padding: 10px 15px;
        border-radius: 6px;
        cursor: pointer;
        font-size: 18px;
    }
    
    .sidebar {
        display: none;
        width: 100%;
/* Mobile: top-right login/register in header */
@media (max-width: 1024px) {
  .auth-top-right.mobile-only {
    display: flex;
    gap: 8px;
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 1001;
  }
  .auth-top-right.mobile-only .btn-login,
  .auth-top-right.mobile-only .btn-register {
    padding: 8px 12px;
    font-size: 12px;
  }
}

/* Mobile Drawer (≤768px) */ 
@media (max-width: 768px) {
  .sidebar { 
     transform: translateX(-100%);
     width: 80vw;
     max-width: 300px;
     height: 100vh;
     position: fixed;
     top: 0;
     left: 0;
     z-index: 1000;
     background: #1e1e1e;
     display: block;
     transition: transform 0.3s ease;
  }
  .sidebar.show { transform: translateX(0); }
  .sidebar-overlay {
     display: none;
     position: fixed;
     top: 0;
     left: 0;
     width: 100%;
     height: 100%;
     background: rgba(0,0,0,0.5);
     z-index: 999;
  }
  .sidebar-overlay.show { display: block; }
  .sidebar-close {
     display: block;
     top: 8px;
     right: 8px;
     position: absolute;
     color: white;
     background: none;
     border: none;
     font-size: 20px;
     cursor: pointer;
  }
  .sidebar .nav-item.active {
     background: linear-gradient(90deg, #E11B22 0%, #B30000 100%);
     color: white;
     border-left: none;
  }
  body.locked { overflow: hidden; height: 100%; }
  .mobile-menu-btn { display: block; }
  .mobile-sidebar-toggle { display: flex !important; }
  .main-content { margin-left: 0 !important; }
}
/* Mobile Drawer (≤768px) — off-canvas left panel */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 70vw;
    max-width: 280px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999 !important;
    background: #1e1e1e;
    display: flex !important;
    flex-direction: column;
    transition: transform 0.3s ease;
    box-shadow: 4px 0 20px rgba(0,0,0,0.3);
  }
  .sidebar.show { 
    transform: translateX(0); 
  }
  .dashboard-layout.has-sidebar-open > *:not(.sidebar):not(.sidebar-overlay):not(.mobile-sidebar-toggle) {
    pointer-events: none;
    opacity: 0.5;
  }
  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9998 !important;
  }
  .sidebar-overlay.show { display: block; cursor: pointer; }
  .sidebar-close {
    display: block;
    color: white;
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
  }
  .sidebar .nav-item.active {
    background: linear-gradient(90deg, #E11B22 0%, #B30000 100%);
    color: white;
  }
  body.locked { overflow: hidden; height: 100%; }
  .mobile-menu-btn { display: block; }
  .main-content { margin-left: 0 !important; }
}

/* ==========================================
   CONSOLIDATED MOBILE RESPONSIVE STYLES
   Mobile < 640px | Tablet 640-1024px | Desktop > 1024px
   ========================================== */

/* Modal Base Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    text-align: center;
}

.modal-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 28px;
}

.modal-icon.success { background: #D1FAE5; color: #059669; }
.modal-icon.error { background: #FEE2E2; color: #DC2626; }
.modal-icon.warning { background: #FEF3C7; color: #D97706; }
.modal-icon.info { background: #DBEAFE; color: #2563EB; }

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 12px;
}

.modal-message {
    color: #6B7280;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.modal-actions .btn {
    min-width: 100px;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-actions .btn-primary {
    background: #E11B22;
    color: white;
    border: none;
}

.modal-actions .btn-primary:hover {
    background: #B30000;
}

.modal-actions .btn-danger {
    background: #DC2626;
    color: white;
    border: none;
}

.modal-actions .btn-danger:hover {
    background: #B91C1C;
}

/* TABLET: 640px - 1024px */
@media (max-width: 1024px) {
  /* Sidebar becomes collapsible hamburger menu */
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    background: linear-gradient(180deg, #1E1E1E 0%, #0a0a0a 100%);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    overflow-y: auto;
  }
  
  .sidebar.show {
    transform: translateX(0);
  }
  
  .sidebar-close {
    display: block;
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    font-size: 20px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    z-index: 1001;
  }
  
  .mobile-sidebar-toggle {
    display: flex !important;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1002;
    background: #E11B22;
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(225,27,34,0.4);
  }
  
  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 999;
  }
  
  .sidebar-overlay.show {
    display: block;
  }
  
  .main-content {
    margin-left: 0 !important;
    padding: 70px 15px 30px !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .nav-item.active {
    background: linear-gradient(90deg, #E11B22 0%, #B30000 100%) !important;
    color: white !important;
    border-left: none !important;
  }
  
  body.locked {
    overflow: hidden;
  }
  
  /* Welcome banner stacking */
  .welcome-banner {
    flex-direction: column;
    text-align: center;
    padding: 20px;
    gap: 15px;
  }
  
  .welcome-logo {
    display: none;
  }
  
  /* Category filters - horizontal scroll */
  .shortcuts-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 8px;
    gap: 8px;
  }
  
  .shortcuts-grid::-webkit-scrollbar {
    display: none;
  }
  
  .shortcut-btn {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 10px 16px;
    font-size: 12px;
    white-space: nowrap;
  }
  
  /* Search in shortcuts - mobile */
  .search-form-shortcut {
    min-width: 100px;
  }
  
  .search-form-shortcut input {
    padding: 10px 12px;
    font-size: 12px;
    min-height: 44px;
  }
  }
  
  /* Search and filters stacked */
  .search-filter-bar {
    flex-direction: column;
    gap: 12px;
    padding: 12px;
  }
  
  .search-form {
    width: 100%;
  }
  
  .filter-controls {
    width: 100%;
    flex-wrap: wrap;
  }
  
  .filter-controls select {
    flex: 1;
    min-width: 140px;
    min-height: 44px;
  }
  
  /* Admin stats */
  .admin-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* MOBILE: < 640px */
@media (max-width: 639px) {
  /* Reset and base */
  html, body {
    overflow-x: hidden;
    font-size: 14px;
  }
  
  /* Sidebar - off-canvas drawer */
  .sidebar {
    width: 85vw;
    max-width: 300px;
    z-index: 1001;
  }
  
  .mobile-sidebar-toggle {
    top: 8px;
    left: 8px;
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  
  /* Main content */
  .main-content {
    padding: 60px 12px 20px !important;
  }
  
  /* Welcome section - stacked */
  .welcome-banner {
    padding: 15px;
    gap: 12px;
  }
  
  .welcome-banner h1 {
    font-size: 20px;
  }
  
  .welcome-to {
    font-size: 12px;
  }
  
  .user-balance-card {
    width: 100%;
    padding: 15px;
  }
  
  .balance-amount {
    font-size: 20px;
  }
  
  /* Category filters - horizontal scroll */
  .popular-shortcuts {
  
  .popular-shortcuts {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 8px 0;
  }
  
  .popular-shortcuts::-webkit-scrollbar {
    display: none;
  }
  
  .shortcuts-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding: 4px 8px;
  }
  
  .shortcut-btn {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 10px 14px;
    font-size: 12px;
    white-space: nowrap;
  }
  
  /* Search and filters - fully stacked */
  .search-filter-bar {
    padding: 10px;
    gap: 10px;
  }
  
  .search-form input {
    min-height: 44px;
    padding: 12px;
  }
  
  .filter-controls {
    flex-direction: column;
  }
  
  .filter-controls select {
    width: 100%;
    min-height: 44px;
    font-size: 14px;
  }
  
  /* Product cards - stacked layout */
  .product-row {
    display: flex !important;
    flex-direction: column;
    padding: 12px !important;
    margin: 8px 0 !important;
    border: 1px solid #eee !important;
    border-radius: 10px !important;
    background: #fff !important;
    gap: 10px;
  }
  
  .product-row .product-icon {
    width: 100% !important;
    height: 60px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f5 0%, #eee 100%) !important;
    border-radius: 8px !important;
    margin-bottom: 4px;
  }
  
  .product-row .product-info {
    flex: 1;
  }
  
  .product-row .product-info h4 {
    font-size: 15px;
    margin-bottom: 4px;
  }
  
  .product-row .product-info p {
    font-size: 12px;
    display: none;
  }
  
  .product-row .product-stats {
    order: 3;
  }
  
  .product-row .product-actions {
    order: 4;
    width: 100%;
    flex-direction: column;
    gap: 8px;
  }
  
  .product-row .product-actions .btn-install,
  .product-row .product-actions .btn-preview {
    width: 100%;
    min-height: 44px;
    justify-content: center;
    font-size: 14px;
  }
  
  /* Section headers */
  .category-header {
    padding: 10px 12px !important;
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
  
  .category-header h3 {
    font-size: 14px;
  }
  
  .category-header-right {
    width: 100%;
    justify-content: center;
  }
  
  .see-more-header-btn {
    padding: 8px 14px;
    font-size: 12px;
  }
  
  /* Recent purchases */
  .recent-purchases-section {
    padding: 12px !important;
    text-align: center;
  }
  
  .recent-purchases-section h3 {
    font-size: 13px;
    justify-content: center;
  }
  
  .purchase-ticker {
    height: auto;
    min-height: 32px;
  }
  
  .purchase-item {
    flex-wrap: wrap;
    justify-content: center;
    font-size: 12px;
    padding: 4px;
  }
  
  .purchase-product {
    max-width: 150px;
  }
  
  /* Floating support button - smaller on mobile */
  .telegram-float {
    bottom: 12px !important;
    right: 12px !important;
    padding: 10px 16px !important;
    font-size: 13px !important;
  }
  
  /* Modal adjustments */
  .modal-content {
    width: 95%;
    padding: 15px;
    margin: 10px;
  }
  
  .modal-footer {
    flex-direction: column;
  }
  
  .btn-cancel, .btn-confirm {
    width: 100%;
    min-height: 44px;
  }
  
  /* Touch-friendly buttons */
  .btn, button, .btn-install, .btn-preview, 
  .btn-login, .btn-register, .shortcut-btn, 
  .nav-item, .category-header a {
    min-height: 44px;
  }
  
  /* Footer */
  .content-footer {
    flex-direction: column;
    text-align: center;
    padding: 15px;
    gap: 10px;
  }
}

/* Ensure overlay is properly hidden/shown */
@media (min-width: 1025px) {
  .sidebar-overlay,
  .mobile-sidebar-toggle,
  .sidebar-close {
    display: none !important;
  }
  
  .sidebar {
    transform: none !important;
  }
}

/* Admin Panel Mobile Responsive */
@media (max-width: 768px) {
  .admin-page {
    padding: 15px 10px;
  }
  
  .admin-header h1 {
    font-size: 1.3rem;
    margin-bottom: 15px;
  }
  
  .admin-tabs {
    display: flex;
    gap: 8px;
    padding: 10px;
    margin-bottom: 15px;
  }
  
  .admin-tabs a {
    padding: 8px 12px;
    font-size: 11px;
    white-space: nowrap;
    border-radius: 6px;
  }
  
.admin-tabs a i {
  width: 24px;
  font-size: 14px;
}

/* Hide tab text on very small screens */
.tab-text {
  display: inline;
}

@media (max-width: 480px) {
  .tab-text {
    display: none;
  }
}

/* Table mobile card view */
@media (max-width: 600px) {
  .data-table {
    display: none;
  }
  
  .table-card-view {
    display: block;
  }
  
  .table-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 10px;
    box-shadow: var(--shadow);
  }
  
  .table-card-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
  }
  
  .table-card-row:last-child {
    border-bottom: none;
  }
  
  .table-card-label {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 12px;
  }
  
  .table-card-value {
    color: var(--text);
    font-size: 13px;
    text-align: right;
  }
  
  /* Action buttons in card view */
  .table-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
  }
  
  .table-card-actions .btn {
    flex: 1;
    padding: 8px;
    font-size: 12px;
  }
}

/* Hide card view by default */
.table-card-view {
  display: none;
}

/* Admin stats - stack on mobile */
@media (max-width: 480px) {
  .admin-stats {
    grid-template-columns: 1fr;
  }
}
  
  .admin-content {
    padding: 15px;
    border-radius: 10px;
  }
  
  .admin-section h3 {
    font-size: 1rem;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .btn-add {
    width: 100%;
    text-align: center;
  }
  
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  
  .stat-card {
    padding: 12px;
  }
  
  .stat-card h4 {
    font-size: 12px;
  }
  
  .stat-card .stat-value {
    font-size: 1.2rem;
  }
  
  .data-table {
    font-size: 11px;
  }
  
  .data-table th,
  .data-table td {
    padding: 8px 4px;
  }
  
  .table-responsive {
    overflow-x: auto;
  }
  
  .form-grid {
    grid-template-columns: 1fr !important;
  }
  
  .form-row {
    grid-template-columns: 1fr !important;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .form-actions .btn {
    width: 100%;
    text-align: center;
  }
}

/* Mobile Tab Toggle Button */
.admin-tabs-toggle {
  display: none;
  width: 100%;
  padding: 12px 16px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 10px;
  align-items: center;
  justify-content: space-between;
}

.admin-tabs-toggle i {
  transition: transform 0.3s;
}

.admin-tabs-toggle.active i {
  transform: rotate(180deg);
}

@media (max-width: 768px) {
  .admin-tabs-toggle {
    display: flex;
  }
  
  .admin-tabs {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    margin-bottom: 10px;
    background: var(--bg);
    border-radius: var(--radius);
  }
  
  .admin-tabs.show {
    display: flex;
  }
  
  .admin-tabs a {
    padding: 12px 16px;
    font-size: 14px;
    text-align: left;
    justify-content: flex-start;
    background: var(--card-bg);
    border-radius: var(--radius);
  }
  
  .admin-tabs a.active {
    background: var(--primary);
  }
  
  .admin-tabs a i {
    width: 24px;
    font-size: 14px;
  }
}

/* ==========================================
   MOBILE RESPONSIVE FOR ADMIN & INDEX PAGES
   ========================================== */

/* Admin Page Mobile */
@media (max-width: 768px) {
  .admin-page {
    padding: 15px 10px !important;
  }
  
  .admin-header h1 {
    font-size: 1.2rem !important;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .admin-tabs {
    display: flex !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    gap: 5px !important;
    padding: 8px !important;
    margin-bottom: 15px !important;
    -webkit-overflow-scrolling: touch;
  }
  
  .admin-tabs a {
    padding: 8px 12px !important;
    font-size: 11px !important;
    flex-shrink: 0;
  }
  
  .admin-tabs a i {
    margin-right: 4px;
  }
  
  .admin-content {
    padding: 12px !important;
    border-radius: 8px !important;
  }
  
  .admin-section h3 {
    font-size: 1rem !important;
    margin-bottom: 12px !important;
  }
  
  .section-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
  }
  
  .btn-add {
    width: 100%;
    text-align: center;
  }
  
  .stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }
  
  .stat-card {
    padding: 12px !important;
    text-align: center;
  }
  
  .stat-card h4 {
    font-size: 11px !important;
    margin-bottom: 5px;
  }
  
  .stat-card .stat-value {
    font-size: 1.1rem !important;
  }
  
  .data-table {
    font-size: 10px !important;
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  
  .data-table th,
  .data-table td {
    padding: 6px 4px !important;
    min-width: 60px;
  }
  
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
  }
  
  .form-row {
    grid-template-columns: 1fr !important;
  }
  
  .form-actions {
    flex-direction: column !important;
  }
  
  .form-actions .btn {
    width: 100% !important;
    text-align: center;
  }
  
  .product-form {
    padding: 15px !important;
  }
  
  .form-group {
    margin-bottom: 12px !important;
  }
  
  .form-group label {
    font-size: 13px !important;
  }
  
  .form-group input,
  .form-group textarea,
  .form-group select {
    padding: 8px 10px !important;
    font-size: 13px !important;
  }
  
  .alert {
    padding: 10px !important;
    font-size: 13px !important;
  }
  
  .icon-grid {
    grid-template-columns: repeat(5, 1fr) !important;
    max-height: 100px !important;
  }
  
  .modal-overlay {
    padding: 10px !important;
  }
  
  .modal-content {
    padding: 15px !important;
    border-radius: 8px !important;
  }
  
  .modal-header h3 {
    font-size: 1rem !important;
  }
}

/* Index Page Mobile - Sidebar & Main Content */
@media (max-width: 768px) {
  .dashboard-layout {
    flex-direction: column !important;
  }
  
  .sidebar {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    width: 80% !important;
    max-width: 280px !important;
    height: 100vh !important;
    transform: translateX(-100%) !important;
    z-index: 9999 !important;
  }
  
  .sidebar.show {
    transform: translateX(0) !important;
  }
  
  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
  }
  
  .sidebar-overlay.show {
    display: block;
  }
  
  .main-content {
    margin-left: 0 !important;
    padding: 60px 10px 30px !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .mobile-sidebar-toggle {
    display: flex !important;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 10000;
    background: #E11B22;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
  
  .navbar {
    padding: 10px !important;
  }
  
  .navbar .container {
    padding: 0 10px !important;
  }
  
  .top-bar {
    flex-direction: column !important;
    gap: 8px !important;
    padding: 8px 10px !important;
  }
  
  .search-section {
    padding: 10px !important;
  }
  
  .search-bar {
    flex-wrap: wrap;
    padding: 8px 10px !important;
  }
  
  .search-bar input {
    width: 100% !important;
    min-width: 60%;
  }
  
  .search-btn {
    padding: 10px 14px !important;
  }
  
  .category-select {
    width: 100% !important;
    margin-top: 8px;
  }
  
  .category-pills {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 8px;
    -webkit-overflow-scrolling: touch;
  }
  
  .pill {
    padding: 6px 12px !important;
    font-size: 12px !important;
    white-space: nowrap;
    flex-shrink: 0;
  }
  
  .products-grid {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
  }
  
  .product-card {
    padding: 10px !important;
  }
  
  .product-card img {
    height: 150px !important;
  }
  
  .recent-orders-section {
    margin-top: 15px !important;
  }
  
  .recent-orders-card {
    border-radius: 10px !important;
  }
  
  .order-row {
    padding: 10px 12px !important;
    flex-direction: column;
    gap: 5px;
  }
  
  .order-time {
    margin-left: 0 !important;
    font-size: 10px !important;
  }
  
  .footer-links {
    flex-direction: column !important;
    gap: 10px !important;
  }
  
  .copyright {
    font-size: 12px !important;
  }
}

/* Very Small Screens */
@media (max-width: 480px) {
  .admin-tabs a {
    padding: 6px 10px !important;
    font-size: 10px !important;
  }
  
  .stats-grid {
    grid-template-columns: 1fr !important;
  }
  
  .stat-card {
    padding: 10px !important;
  }
  
  .main-content {
    padding: 55px 8px 20px !important;
  }
  
  .products-grid {
    gap: 10px !important;
  }
  
  .btn {
    padding: 10px 16px !important;
    font-size: 13px !important;
  }
  
  .purchase-modal {
    padding: 15px !important;
    border-radius: 10px !important;
  }
  
  .purchase-total {
    padding: 12px 15px !important;
  }
  
  .purchase-total span:last-child {
    font-size: 1.2rem !important;
  }
  
  .purchase-buttons {
    flex-direction: column !important;
  }
  
  .btn-cancel, .btn-confirm {
    width: 100% !important;
  }
}

/* ==========================================
   OTP DROPDOWN STYLES - Scrollable & Favorites
   ========================================== */

/* Scrollable dropdown container */
.search-select {
  position: relative;
}

.select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  max-height: 300px;
  overflow-y: auto;
  display: none;
}

.select-dropdown.show {
  display: block;
}

/* Dropdown sections */
.dropdown-section {
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #E5E7EB;
  background: #F9FAFB;
}

.dropdown-section:last-child {
  border-bottom: none;
}

/* Favorite items */
.select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid #F3F4F6;
}

.select-option:last-child {
  border-bottom: none;
}

.select-option:hover {
  background: #F3F4F6;
}

.select-option .item-content {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.select-option .item-icon {
  font-size: 16px;
}

.select-option .item-name {
  color: #111827;
  font-size: 14px;
}

.select-option .item-name .favorited {
  color: #F59E0B;
  margin-left: 4px;
}

/* Favorite star button */
.favorite-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px 8px;
  color: #9CA3AF;
  transition: color 0.2s, transform 0.2s;
  border-radius: 4px;
}

.favorite-btn:hover {
  color: #F59E0B;
  transform: scale(1.1);
  background: #FEF3C7;
}

.favorite-btn.active {
  color: #F59E0B;
}

.favorite-btn .star-filled {
  color: #F59E0B;
}

/* Favorites section header */
.favorites-header {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #F59E0B;
}

/* Scrollbar styling for dropdown */
.select-dropdown::-webkit-scrollbar {
  width: 6px;
}

.select-dropdown::-webkit-scrollbar-track {
  background: #F3F4F6;
  border-radius: 3px;
}

.select-dropdown::-webkit-scrollbar-thumb {
  background: #D1D5DB;
  border-radius: 3px;
}

.select-dropdown::-webkit-scrollbar-thumb:hover {
  background: #9CA3AF;
}
