@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --navy: #060e1a;
    --navy-light: #0b172a;
    --gold: #f4a100;
    --bg: #f5f6f8;
    --white: #ffffff;
    --text-dark: #1a1a1a;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --radius-lg: 12px;
    --radius-md: 8px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; color: var(--text-dark); background: var(--bg); font-size: 17px; line-height: 1.5; overflow-x: hidden; }
.container { max-width: 1360px; margin: 0 auto; padding: 0 20px; width: 100%; box-sizing: border-box; }

/* Utility Bar */
.utility-bar { background: var(--navy); color: #cbd5e1; padding: 8px 0; font-size: 11px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.utility-bar-inner { display: flex; justify-content: space-between; align-items: center; }
.utility-left { display: flex; gap: 20px; }
.utility-right a { color: #cbd5e1; text-decoration: none; margin-left: 15px; }

/* Main Header */
.site-header { background: var(--white); border-bottom: 1px solid var(--border); position: relative; z-index: 1000; }
.header-inner { display: flex; align-items: center; gap: 30px; padding: 16px 20px; }
.logo-block { text-decoration: none; }
.logo-block .logo { color: var(--navy); font-size: 24px; font-weight: 700; text-decoration: none; }
.logo-img { height: 50px; }

/* Menu Toggle Button Style */
.mobile-nav-toggle { 
    display: none; 
    background: transparent !important; 
    border: none !important; 
    font-size: 28px !important; 
    color: var(--navy) !important; 
    cursor: pointer !important; 
    outline: none !important;
    padding: 5px !important;
    line-height: 1 !important;
    width: auto !important;
    height: auto !important;
    box-shadow: none !important;
}

.header-search { flex: 1; display: flex; max-width: 680px; }
.header-category-select { border: 1px solid var(--border); border-right: none; background: #f9fafb; padding: 0 15px; font-size: 12px; border-radius: 6px 0 0 6px; }
.header-search input { flex: 1; padding: 12px 18px; border: 1px solid var(--border); font-size: 13px; }
.header-search input:focus { outline: none; }
.header-search button { background: #B9160A; border: 1px solid #B9160A; border-radius: 0 6px 6px 0; padding: 0 20px; cursor: pointer; font-size: 16px; border-left: none; }

.header-actions { display: flex; align-items: center; gap: 25px; }
.header-icon-link { display: flex; flex-direction: column; text-decoration: none; color: var(--text-dark); position: relative; }
.header-icon-link .icon-label { font-weight: 600; font-size: 14px; }
.header-icon-link small { color: var(--text-muted); font-size: 12px; }
.cart-count { position: absolute; top: -8px; right: -12px; background: var(--gold); color: var(--navy); font-size: 10px; font-weight: 700; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

/* Shop Dropdown Nav */
.shop-nav { background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.shop-nav-inner { display: flex; align-items: center; gap: 10px; padding: 0 20px; }
.category-dropdown { position: relative; }
.cat-dropbtn { background: var(--navy); color: var(--white); border: none; padding: 12px 20px; font-size: 16px; font-weight: 600; cursor: pointer; border-radius: 6px 6px 0 0; }
.main-shop-links { display: flex; gap: 15px; padding-left: 0px; font-size: 13px; font-weight: 500; }
.main-shop-links a { padding: 12px 0; font-size: 16px; font-weight: 500; text-decoration: none; color: #4b5563; }
.main-shop-links a:hover, .main-shop-links a.active { color: #B31A0D; }
.highlight-link { font-weight: 600; }
.hot-badge { background: #fee2e2; color: #ef4444; font-size: 9px; font-weight: 700; padding: 1px 4px; border-radius: 4px; margin-left: 3px; }

/* Hero Section Grid */
.homepage-hero-row { display: grid; grid-template-columns: 2.8fr 1.1fr; gap: 20px; margin: 20px 0; }
.hero-banner { background: var(--navy); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); color: #fff; width: 100%; }
.hero-banner-grid { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; padding: 50px; }
.hero-tag { color: var(--gold); font-size: 11px; font-weight: 700; letter-spacing: 1px; }
.hero-banner h1 { font-size: 42px; font-weight: 700; line-height: 1.1; margin: 15px 0; }
.hero-highlight { color: #B9160A; }
.hero-banner p { color: #cbd5e1; font-size: 15px; margin-bottom: 25px; }
.hero-features { display: flex; gap: 15px; margin-bottom: 30px; font-size: 11px; color: #94a3b8; }
.hero-buttons { display: flex; gap: 15px; }
.btn-primary { background: #76c102; color: var(--navy); padding: 12px 24px; border-radius: var(--radius-md); font-weight: 600; text-decoration: none; border: none; cursor: pointer; display: inline-block; text-align: center; }
.btn-outline-dark { border: 1px solid #fff; color: #fff; padding: 14px 28px; border-radius: var(--radius-md); font-weight: 600; text-decoration: none; text-align: center; }
.hero-banner-image img { max-width: 100%; max-height: 350px; object-fit: contain; }

/* Sidebar Widgets */
.homepage-sidebar { display: flex; flex-direction: column; gap: 16px; height: 100%; }
.sidebar-widget { background: var(--white); border-radius: var(--radius-lg); padding: 24px; text-decoration: none; color: var(--text-dark); display: flex; flex-direction: column; justify-content: center; box-shadow: var(--shadow-sm); border: 1px solid var(--border); flex: 1; transition: all 0.2s ease; }
.sidebar-widget:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #cbd5e1; }
.sidebar-widget strong { display: block; color: #fff; font-size: 20px; margin-bottom: 6px; font-weight: 700; }
.sidebar-widget p { font-size: 17px; color: #fff; line-height: 1.5; margin-bottom: 15px; }
.widget-link-btn { font-size: 13px; font-weight: 600; color: var(--white); background: var(--navy); padding: 8px 16px; border-radius: 6px; display: inline-block; align-self: flex-start; transition: background 0.2s; }
.sidebar-widget:hover .widget-link-btn { background: var(--gold); color: var(--navy); }
.widget-motherboard { background: #B9160A; border-color: #fef08a; }
.widget-storage-ssd { background: #B9160A; border-color: #bfdbfe; }

/* Categories Icon Row */
.category-icons-row { display: flex; gap: 18px; padding: 20px 0; overflow-x: auto; margin-bottom: 25px; }
.category-icon-item { text-align: center; flex-shrink: 0; width: 95px; text-decoration: none; }
.category-icon-circle { width: 68px; height: 68px; border-radius: 50%; background: var(--white); display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; box-shadow: var(--shadow-sm); overflow: hidden; border: 1px solid var(--border); }
.category-icon-circle img { width: 100%; height: 100%; object-fit: cover; }
.category-icon-item small { color: var(--text-dark); font-size: 14px; font-weight: 500; }

/* ---------- PRODUCTS LAYOUT & CARDS SETUP ---------- */
.section-heading-row { display: flex; justify-content: space-between; align-items: center; margin: 40px 0 20px; border-left: 4px solid var(--gold); padding-left: 12px; }
.section-title { font-size: 22px; font-weight: 700; color: var(--navy); }
.product-grid-layout { display: grid; grid-template-columns: 1fr; gap: 20px; margin-bottom: 20px; }
.product-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; width: 100%; }

/* Product Card Design */
.product-card { background: var(--white); border-radius: var(--radius-md); padding: 16px; border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: all 0.2s ease; display: flex; flex-direction: column; justify-content: space-between; position: relative; height: 100%; text-decoration: none; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #cbd5e1; }
.product-card-image-wrapper { width: 100%; height: 140px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; background: #fafafa; border-radius: 6px; padding: 8px; }
.product-card img { max-width: 100%; max-height: 100%; object-fit: contain; }
.product-card-body { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.product-card h4 { font-size: 14px; font-weight: 600; text-align: left; color: #111827; margin-bottom: 10px; line-height: 1.4; min-height: 40px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card-price-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 15px; }
.price-tag { font-size: 20px; font-weight: 700; color: #b31a0d; }
.price-strike { font-size: 15px; color: #9ca3af; text-decoration: line-through; }
.btn-card-buy { background: #b4190d; color: var(--white); width: 100%; padding: 10px 0; border: none; border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer; transition: background 0.2s; text-align: center; text-transform: uppercase; letter-spacing: 0.5px; margin-top: auto; display: block; }
.product-card:hover .btn-card-buy { background: #76C102; color: var(--navy); }
.buy-now-form { margin-top: auto; width: 100%; }
.buy-now-form .btn-card-buy { margin-top: 0; }

/* Course Grid */
.course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.course-card { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--white); box-shadow: var(--shadow-sm); transition: all 0.2s ease; display: flex; flex-direction: column; }
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.course-card img { width: 100%; height: 160px; object-fit: cover; }
.course-card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.course-card h4 { font-size: 15px; font-weight: 600; color: var(--text-dark); margin-bottom: 12px; }

/* Trust Badges */
.trust-badges { background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 30px 0; margin-top: 50px; }
.trust-badges-inner { display: grid; grid-template-columns: repeat(6, 1fr); gap: 15px; }
.trust-item { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.trust-item strong { display: block; font-size: 16px; color: #B4190D; }

/* Footer Style (Sleek Grid Alignment) */
.site-footer { background: #0b1120; color: #94a3b8; padding: 60px 0 0; font-size: 16px; font-weight: 500; margin-top: 0; text-align: left; }
.footer-grid { display: grid; grid-template-columns: 1.8fr 1fr 1fr 1fr 1.6fr; gap: 30px; padding-bottom: 40px; }
.footer-col h4 { color: #fff; font-size: 17px; margin-bottom: 18px; text-transform: uppercase; }
.footer-col a { display: block; color: #94a3b8; font-size: 16px; text-decoration: none; margin-bottom: 10px; }

/* Horizontal Social Alignment Rule */
.footer-social { display: flex !important; flex-direction: row !important; gap: 10px !important; margin-top: 10px; }
.footer-social a { font-size: 18px !important; text-decoration: none !important; margin: 0 !important; display: inline-block !important; }

/* ---------- DASHBOARD LAYOUT REPAIR ---------- */
.dashboard-layout { display: grid; grid-template-columns: 260px 1fr; gap: 30px; padding: 40px 0; align-items: flex-start; }
.dashboard-sidebar { background: var(--white); padding: 15px; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.dashboard-sidebar a { padding: 12px 16px; text-decoration: none; color: #374151; border-radius: var(--radius-md); font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 10px; transition: all 0.2s; }
.dashboard-sidebar a:hover, .dashboard-sidebar a.active { background: #f1f5f9; color: var(--navy); font-weight: 600; }
.dashboard-content { background: var(--white); padding: 30px; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); border: 1px solid var(--border); width: 100%; }
.dashboard-content h1 { font-size: 26px; color: var(--navy); margin-bottom: 25px; display: flex; align-items: center; gap: 10px; }
.dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin: 20px 0 35px; }
.dash-stat-card { background: #f8fafc; border-radius: var(--radius-md); padding: 24px; border: 1px solid var(--border); border-top: 4px solid var(--gold); text-align: left; }
.stat-number { font-size: 32px; font-weight: 700; color: var(--navy); line-height: 1; }
.stat-label { font-size: 16px; color: var(--text-muted); margin-top: 6px; font-weight: 500; }
.dashboard-content h3 { font-size: 18px; margin-bottom: 15px; color: var(--navy); border-bottom: 2px solid #f1f5f9; padding-bottom: 8px; }
.continue-learning-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; margin-bottom: 35px; }
.course-continue-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 15px; display: flex; gap: 15px; align-items: center; }
.course-continue-card img { width: 80px; height: 80px; object-fit: cover; border-radius: 6px; }
.course-continue-details { flex: 1; }
.course-continue-details h4 { font-size: 14px; font-weight: 600; margin-bottom: 5px; }
.course-continue-details p { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.btn-continue { background: var(--gold); color: var(--navy); padding: 8px 16px; border-radius: 6px; font-size: 12px; font-weight: 600; text-decoration: none; display: inline-block; }
.admin-table-wrapper { width: 100%; overflow-x: auto; margin-top: 10px; }
.admin-table { width: 100%; border-collapse: collapse; text-align: left; }
.admin-table th { background: #f8fafc; color: var(--navy); font-size: 12px; text-transform: uppercase; font-weight: 700; padding: 12px 16px; border-bottom: 2px solid var(--border); }
.admin-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 14px; color: #374151; }
.badge-status { padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; text-transform: capitalize; display: inline-block; }
.badge-processing { background: #fef3c7; color: #d97706; }
.badge-delivered { background: #d1fae5; color: #059669; }

/* ==========================================================================
   GLOBAL RESPONSIVE REPAIR & COLLAPSE BLOCK (SCREEN WIDTH 900PX AND BELOW)
   ========================================================================== */
@media (max-width: 900px) {
    .container { padding: 0 12px; }

    /* 1. Utility Top Bar Fixes */
    .utility-bar-inner { flex-direction: column; gap: 6px; text-align: center; }
    .utility-left { flex-wrap: wrap; justify-content: center; gap: 10px; }
    .utility-right { display: none; }

    /* 2. Mobile Center Logo Grid Config with Account + Cart Sync */
    .mobile-nav-toggle { 
        display: block !important; 
        grid-column: 1 !important; 
        justify-self: start !important;
    }
    
    .header-inner { 
        display: grid !important; 
        grid-template-columns: 40px 1fr 80px !important; /* Expanded right column space for 2 icons */
        align-items: center !important; 
        padding: 12px 15px !important; 
        gap: 10px !important; 
        width: 100% !important;
    }
    
    .logo-block { 
        grid-column: 2 !important; 
        text-align: center !important; 
        display: flex !important; 
        justify-content: center !important; 
        align-items: center !important;
        margin: 0 auto !important;
    }
    .logo-block .logo { font-size: 20px !important; display: block !important; }
    .logo-img { height: 32px; }

    .header-actions { 
        grid-column: 3 !important; 
        justify-content: flex-end !important; 
        display: flex !important;
        gap: 14px !important; /* Even gap spacing for Account + Cart row */
    }
    
    /* Display parameters for account triggers on mobile header */
    .header-icon-link.user-account-link { display: block !important; font-size: 18px !important; }
    .header-icon-link.user-account-link .icon-label { font-size: 0 !important; }
    .header-icon-link.user-account-link::before { content: "👤" !important; font-size: 20px !important; }
    
    .header-icon-link:not(.cart-icon-link):not(.user-account-link) { display: none !important; } 
    .header-search { display: none !important; }
    .header-contact-block { display: none !important; } 

    /* Drawer System Navigation Menu Bar */
    .shop-nav { position: fixed !important; top: 0; left: -280px; width: 280px; height: 100vh; background: var(--white); box-shadow: 4px 0 15px rgba(0,0,0,0.1); transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1); z-index: 9999; display: block; border: none; }
    .shop-nav.open { left: 0; }
    .shop-nav-inner { flex-direction: column; align-items: stretch; padding: 25px 20px; gap: 20px; }
    .category-dropdown { display: none; }
    
    .main-shop-links { flex-direction: column; gap: 5px; padding-left: 0; width: 100%; overflow-x: visible; white-space: normal; }
    .main-shop-links a { padding: 12px 16px; display: block; font-size: 15px; border-radius: 6px; border-bottom: none; background: #f8fafc; margin-bottom: 4px; }
    .main-shop-links a:hover { background: #f1f5f9; }

    /* 4. Content Content Breakdowns */
    .homepage-hero-row { grid-template-columns: 1fr; gap: 16px; }
    .hero-banner-grid { grid-template-columns: 1fr; padding: 30px 20px; text-align: center; }
    .hero-banner h1 { font-size: 28px; }
    .hero-banner p { font-size: 14px; }
    .hero-features { justify-content: center; flex-wrap: wrap; gap: 10px; }
    .hero-buttons { flex-direction: column; gap: 10px; }
    .hero-buttons a { width: 100%; }
    .hero-banner-image { display: none; }

    .homepage-sidebar { flex-direction: column; gap: 12px; }
    .sidebar-widget { width: 100%; }

    /* Exact 2 columns mobile responsive grid matrices */
    .product-grid, .course-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
    .product-card { padding: 12px; }
    .product-card-image-wrapper { height: 120px; }
    .product-card h4 { font-size: 13px; height: 38px; padding-bottom: 0; margin-bottom: 6px; }
    .price-tag { font-size: 16px; }
    .btn-card-buy { padding: 8px 0; font-size: 15px; }

    .category-icons-row { gap: 12px; padding: 10px 0; }
    .category-icon-item { width: 75px; }
    .category-icon-circle { width: 56px; height: 56px; }

    .trust-badges-inner { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .footer-grid { grid-template-columns: 1fr !important; gap: 25px; }

    /* 10. Dashboard Rescales */
    .dashboard-layout { display: flex !important; flex-direction: column !important; gap: 16px !important; padding: 15px 0 !important; }
    .dashboard-sidebar { flex-direction: row !important; overflow-x: auto !important; white-space: nowrap !important; width: 100% !important; padding: 8px !important; gap: 8px !important; background: #fff !important; border: 1px solid var(--border) !important; box-shadow: var(--shadow-sm) !important; -webkit-overflow-scrolling: touch; }
    .dashboard-sidebar::-webkit-scrollbar { display: none; }
    .dashboard-sidebar a { padding: 8px 14px !important; font-size: 13px !important; display: inline-flex !important; align-items: center; background: #f8fafc; border: 1px solid var(--border); flex-shrink: 0; }
    .dashboard-sidebar a.active { background: var(--navy) !important; color: #fff !important; }
    
    .dashboard-content { padding: 16px !important; border-radius: var(--radius-lg) !important; width: 100% !important; box-sizing: border-box !important; overflow: hidden !important; }
    .dashboard-content h1 { font-size: 20px !important; margin-bottom: 15px !important; }
    .dash-stats { grid-template-columns: 1fr !important; gap: 12px !important; margin-bottom: 20px !important; }
    .dash-stat-card { padding: 16px !important; }
    .stat-number { font-size: 26px !important; }
    
    .continue-learning-grid { grid-template-columns: 1fr !important; }
    .course-continue-card { padding: 12px !important; gap: 12px !important; }
    .course-continue-card img { width: 65px !important; height: 65px !important; }
    .admin-table-wrapper { margin-top: 5px; width: 100%; overflow-x: auto; }
    .admin-table th, .admin-table td { padding: 10px 12px !important; font-size: 13px !important; }
}

@media (max-width: 576px) {
    .course-continue-card { flex-direction: column; text-align: center; }
    .course-continue-card img { width: 100%; height: 140px; }
}

@media (max-width: 480px) {
    .product-grid, .course-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; }
    .dashboard-content { padding: 12px !important; }
}