/* =========================================
   ScriptifyZone - Main Stylesheet
   Brand Colors from Logo:
   Logo Cyan: #00C4D4
   Deep Navy: #0A1628
   Brand Navy: #1A2B5E
   Logo Amber: #F5A914
   Brand Orange: #F97316
   Cyber Teal: #00E5F2
   Pure White: #FFFFFF
   ========================================= */

:root {
    /* Brand Colors */
    --cyan: #00C4D4;
    --deep-navy: #0A1628;
    --brand-navy: #1A2B5E;
    --amber: #F5A914;
    --orange: #F97316;
    --teal: #00E5F2;
    --white: #FFFFFF;
    
    /* Dark Mode (Default) */
    --bg-primary: #0A1628;
    --bg-secondary: #0f1f38;
    --bg-card: #132240;
    --bg-card-hover: #1a2d52;
    --bg-input: #0f1f38;
    --text-primary: #FFFFFF;
    --text-secondary: #8892a4;
    --text-muted: #5a6578;
    --border-color: rgba(0, 196, 212, 0.15);
    --border-hover: rgba(0, 196, 212, 0.35);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --gradient-primary: linear-gradient(135deg, #00C4D4, #00E5F2);
    --gradient-amber: linear-gradient(135deg, #F5A914, #F97316);
    --gradient-navy: linear-gradient(135deg, #1A2B5E, #0A1628);
    --glass-bg: rgba(19, 34, 64, 0.8);
    --glass-border: rgba(0, 196, 212, 0.1);
    --overlay: rgba(10, 22, 40, 0.9);
    --success: #10b981;
    --danger: #ef4444;
    --warning: #F5A914;
    --info: #00C4D4;

    /* Spacing */
    --nav-height: 70px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

/* Light Mode */
[data-theme="light"] {
    --bg-primary: #f0f4f8;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --bg-input: #f0f4f8;
    --text-primary: #0A1628;
    --text-secondary: #4a5568;
    --text-muted: #8892a4;
    --border-color: rgba(26, 43, 94, 0.12);
    --border-hover: rgba(26, 43, 94, 0.25);
    --shadow-color: rgba(0, 0, 0, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(26, 43, 94, 0.1);
    --overlay: rgba(240, 244, 248, 0.95);
}

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.4s ease, color 0.4s ease;
    min-height: 100vh;
}

a { color: var(--cyan); text-decoration: none; transition: all 0.3s ease; }
a:hover { color: var(--teal); }

img { max-width: 100%; height: auto; display: block; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--brand-navy); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--cyan); }

/* ===== PARTICLES CANVAS ===== */
#particles-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-height);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: var(--overlay);
    box-shadow: 0 4px 30px var(--shadow-color);
}

.nav-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.nav-logo .logo-icon {
    width: 38px; height: 38px;
    background: var(--gradient-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--deep-navy);
    font-weight: 900;
}

.nav-logo .brand-highlight { 
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
    border-radius: 1px;
}

.nav-links a:hover, .nav-links a.active { color: var(--cyan); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Theme Toggle */
.theme-toggle {
    width: 44px; height: 44px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--amber);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    border-color: var(--amber);
    transform: rotate(30deg);
}

/* Search */
.nav-search {
    position: relative;
}

.nav-search input {
    width: 220px;
    padding: 10px 15px 10px 40px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    outline: none;
}

.nav-search input:focus {
    width: 280px;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(0, 196, 212, 0.1);
}

.nav-search i {
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ===== MOBILE NAV ===== */
.mobile-menu-btn {
    display: none;
    width: 44px; height: 44px;
    border: none;
    background: transparent;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.mobile-menu-btn span {
    width: 24px; height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    bottom: 0;
    background: var(--overlay);
    backdrop-filter: blur(20px);
    z-index: 999;
    padding: 20px;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
}

.mobile-nav.active { display: flex; }

.mobile-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    color: var(--text-primary);
    font-size: 1.05rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.mobile-nav a:hover, .mobile-nav a.active {
    background: var(--bg-card);
    color: var(--cyan);
}

.mobile-nav a i { width: 24px; text-align: center; color: var(--cyan); }

/* Mobile Bottom Nav */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 65px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.mobile-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    position: relative;
}

.mobile-bottom-nav a i { font-size: 1.2rem; }

.mobile-bottom-nav a.active,
.mobile-bottom-nav a:hover {
    color: var(--cyan);
}

.mobile-bottom-nav a.active::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 20px; height: 3px;
    background: var(--gradient-primary);
    border-radius: 0 0 3px 3px;
}

.mobile-bottom-nav .cart-badge {
    position: absolute;
    top: 2px; right: 2px;
    width: 18px; height: 18px;
    background: var(--orange);
    border-radius: 50%;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before { left: 100%; }

.btn-primary {
    background: var(--gradient-primary);
    color: var(--deep-navy);
    box-shadow: 0 4px 20px rgba(0, 196, 212, 0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 196, 212, 0.4);
    color: var(--deep-navy);
}

.btn-amber {
    background: var(--gradient-amber);
    color: var(--deep-navy);
    box-shadow: 0 4px 20px rgba(245, 169, 20, 0.3);
}
.btn-amber:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(245, 169, 20, 0.4);
    color: var(--deep-navy);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--cyan);
    color: var(--cyan);
}
.btn-outline:hover {
    background: var(--cyan);
    color: var(--deep-navy);
    transform: translateY(-2px);
}

.btn-ghost {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}
.btn-ghost:hover {
    border-color: var(--cyan);
    color: var(--cyan);
}

.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }
.btn-block { width: 100%; }

.btn-icon {
    width: 44px; height: 44px;
    padding: 0;
    border-radius: var(--radius-md);
}

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: calc(var(--nav-height) + 40px) 24px 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
}

.hero-bg .glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 8s ease-in-out infinite;
}

.hero-bg .glow-orb:nth-child(1) {
    width: 400px; height: 400px;
    background: var(--cyan);
    top: 10%; left: 10%;
    animation-delay: 0s;
}

.hero-bg .glow-orb:nth-child(2) {
    width: 300px; height: 300px;
    background: var(--amber);
    top: 50%; right: 10%;
    animation-delay: 2s;
}

.hero-bg .glow-orb:nth-child(3) {
    width: 250px; height: 250px;
    background: var(--brand-navy);
    bottom: 10%; left: 30%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(20px, -30px); }
    50% { transform: translate(-20px, 20px); }
    75% { transform: translate(30px, 10px); }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(0, 196, 212, 0.1);
    border: 1px solid rgba(0, 196, 212, 0.2);
    border-radius: var(--radius-full);
    color: var(--cyan);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    animation: fadeInDown 0.8s ease;
}

.hero-badge .pulse-dot {
    width: 8px; height: 8px;
    background: var(--teal);
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -1px;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero h1 .gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero h1 .amber-text {
    background: var(--gradient-amber);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 36px;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.hero-stats {
    display: flex;
    gap: 40px;
    justify-content: center;
    margin-top: 60px;
    animation: fadeInUp 0.8s ease 0.8s both;
}

.hero-stat {
    text-align: center;
}

.hero-stat .stat-num {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-stat .stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===== SECTION LAYOUT ===== */
.section {
    position: relative;
    padding: 80px 24px;
    z-index: 1;
}

.section-container {
    max-width: 1320px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header .section-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(0, 196, 212, 0.1);
    border: 1px solid rgba(0, 196, 212, 0.15);
    border-radius: var(--radius-full);
    color: var(--cyan);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== CATEGORY CARDS ===== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.category-card:hover::before { transform: scaleX(1); }

.category-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px var(--shadow-color);
}

.category-card .cat-icon {
    width: 56px; height: 56px;
    margin: 0 auto 14px;
    background: rgba(0, 196, 212, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--cyan);
    transition: all 0.3s ease;
}

.category-card:hover .cat-icon {
    background: var(--gradient-primary);
    color: var(--deep-navy);
    transform: scale(1.1);
}

.category-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.category-card .cat-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===== PRODUCT CARDS ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 24px;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.4s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-hover);
    box-shadow: 0 20px 60px var(--shadow-color);
}

.product-card .product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.product-card .product-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img { transform: scale(1.08); }

.product-card .product-badges {
    position: absolute;
    top: 12px; left: 12px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.product-badge {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-gpl { background: rgba(0, 196, 212, 0.2); color: var(--cyan); }
.badge-featured { background: rgba(245, 169, 20, 0.2); color: var(--amber); }
.badge-sale { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.badge-new { background: rgba(16, 185, 129, 0.2); color: #10b981; }

.product-card .product-actions-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 12px;
    background: linear-gradient(transparent, rgba(10, 22, 40, 0.9));
    display: flex;
    gap: 8px;
    justify-content: center;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.product-card:hover .product-actions-overlay {
    opacity: 1;
    transform: translateY(0);
}

.product-card .product-body {
    padding: 18px;
}

.product-card .product-category {
    font-size: 0.75rem;
    color: var(--cyan);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.product-card .product-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .product-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.product-card .product-meta i { color: var(--amber); }

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

.product-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.product-price .current-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--teal);
}

.product-price .original-price {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
}

.form-control:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(0, 196, 212, 0.1);
}

.form-control::placeholder { color: var(--text-muted); }

textarea.form-control { min-height: 120px; resize: vertical; }

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238892a4' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.form-help {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-error {
    font-size: 0.8rem;
    color: var(--danger);
    margin-top: 4px;
}

/* ===== CARDS ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all 0.3s ease;
}

.card-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
}

/* ===== AUTH PAGES ===== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
}

.auth-container {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 2;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: 0 20px 60px var(--shadow-color);
}

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

.auth-header .auth-logo {
    width: 56px; height: 56px;
    margin: 0 auto 16px;
    background: var(--gradient-primary);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--deep-navy);
    font-weight: 900;
}

.auth-header h1 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== FLASH MESSAGES ===== */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeInDown 0.4s ease;
}

.alert-success { background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.2); color: var(--success); }
.alert-danger { background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.2); color: var(--danger); }
.alert-warning { background: rgba(245, 169, 20, 0.1); border: 1px solid rgba(245, 169, 20, 0.2); color: var(--warning); }
.alert-info { background: rgba(0, 196, 212, 0.1); border: 1px solid rgba(0, 196, 212, 0.2); color: var(--info); }

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 60px 24px 24px;
    position: relative;
    z-index: 1;
}

.footer-grid {
    max-width: 1320px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 14px 0 20px;
    line-height: 1.7;
}

.footer-socials {
    display: flex;
    gap: 10px;
}

.footer-socials a {
    width: 40px; height: 40px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.footer-socials a:hover {
    background: var(--cyan);
    color: var(--deep-navy);
    border-color: var(--cyan);
    transform: translateY(-3px);
}

.footer-col h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 18px;
    color: var(--text-primary);
}

.footer-col a {
    display: block;
    padding: 5px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-col a:hover {
    color: var(--cyan);
    padding-left: 5px;
}

.footer-bottom {
    max-width: 1320px;
    margin: 0 auto;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 40px;
}

.pagination a, .pagination span {
    width: 40px; height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pagination a:hover {
    border-color: var(--cyan);
    color: var(--cyan);
}

.pagination .active {
    background: var(--gradient-primary);
    color: var(--deep-navy);
    border-color: transparent;
}

/* ===== TABLE ===== */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

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

.table th {
    background: var(--bg-secondary);
    padding: 14px 16px;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

.table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--bg-card-hover); }

/* Status badges */
.status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-success { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.status-pending { background: rgba(245, 169, 20, 0.15); color: #F5A914; }
.status-failed { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.status-active { background: rgba(0, 196, 212, 0.15); color: #00C4D4; }

/* ===== LOADING ===== */
.spinner {
    width: 40px; height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes shimmer { to { background-position: -200% 0; } }

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

.animate-up { animation: fadeInUp 0.6s ease both; }
.animate-down { animation: fadeInDown 0.6s ease both; }
.animate-in { animation: fadeIn 0.6s ease both; }
.animate-scale { animation: scaleIn 0.6s ease both; }

/* Stagger animations */
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.1s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.2s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(6) { animation-delay: 0.3s; }
.stagger > *:nth-child(7) { animation-delay: 0.35s; }
.stagger > *:nth-child(8) { animation-delay: 0.4s; }

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(10, 22, 40, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

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

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    animation: scaleIn 0.3s ease;
}

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

.modal-header h3 { font-size: 1.1rem; font-weight: 700; }

.modal-close {
    width: 36px; height: 36px;
    border: none;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.modal-body { padding: 24px; }
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ===== TOAST ===== */
.toast-container {
    position: fixed;
    top: calc(var(--nav-height) + 16px);
    right: 16px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 30px var(--shadow-color);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 300px;
    animation: slideInRight 0.4s ease;
    font-size: 0.9rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .hero-stats { gap: 24px; }
}

@media (max-width: 768px) {
    :root { --nav-height: 60px; }
    
    .nav-links, .nav-search { display: none; }
    .mobile-menu-btn { display: flex; }
    .mobile-bottom-nav { display: flex; }
    
    body { padding-bottom: 65px; }
    
    .hero { min-height: auto; padding: calc(var(--nav-height) + 30px) 16px 60px; }
    .hero h1 { font-size: 2rem; }
    .hero-stats { flex-wrap: wrap; gap: 16px; }
    .hero-stat .stat-num { font-size: 1.5rem; }
    
    .section { padding: 50px 16px; }
    .section-header h2 { font-size: 1.5rem; }
    
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .product-card .product-body { padding: 12px; }
    .product-card .product-title { font-size: 0.9rem; }
    .product-card .product-image { height: 140px; }
    .product-price .current-price { font-size: 1rem; }
    
    .categories-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .category-card { padding: 16px 10px; }
    .category-card .cat-icon { width: 44px; height: 44px; font-size: 1.2rem; }
    .category-card h3 { font-size: 0.8rem; }
    
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
    
    .auth-card { padding: 28px 20px; }
    
    /* Mobile card style */
    .product-card .product-actions-overlay { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
    .products-grid { grid-template-columns: 1fr; }
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-buttons { flex-direction: column; align-items: center; }
    .hero-buttons .btn { width: 100%; max-width: 280px; }
}

/* ===== ADMIN PANEL SPECIFIC ===== */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    overflow-y: auto;
    z-index: 100;
    transition: transform 0.3s ease;
}

.admin-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.admin-sidebar-nav { padding: 12px; }

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-bottom: 2px;
}

.admin-nav-item:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.admin-nav-item.active {
    background: rgba(0, 196, 212, 0.1);
    color: var(--cyan);
}

.admin-nav-item i { width: 20px; text-align: center; }

.admin-main {
    flex: 1;
    margin-left: 260px;
    padding: 24px;
    min-height: 100vh;
}

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.admin-topbar h1 { font-size: 1.5rem; font-weight: 800; }

/* Stats cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px var(--shadow-color);
}

.stat-card .stat-icon {
    width: 52px; height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.stat-icon.cyan { background: rgba(0, 196, 212, 0.15); color: var(--cyan); }
.stat-icon.amber { background: rgba(245, 169, 20, 0.15); color: var(--amber); }
.stat-icon.orange { background: rgba(249, 115, 22, 0.15); color: var(--orange); }
.stat-icon.teal { background: rgba(0, 229, 242, 0.15); color: var(--teal); }

.stat-card .stat-info h3 { font-size: 1.5rem; font-weight: 800; }
.stat-card .stat-info p { font-size: 0.85rem; color: var(--text-muted); }

/* Admin responsive */
@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
        z-index: 1001;
    }
    .admin-sidebar.active { transform: translateX(0); }
    .admin-main { margin-left: 0; padding: 16px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
}

/* ===== CLIENT DASHBOARD ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    max-width: 1320px;
    margin: 0 auto;
    padding: calc(var(--nav-height) + 24px) 24px 100px;
}

.dashboard-sidebar {
    position: sticky;
    top: calc(var(--nav-height) + 24px);
    height: fit-content;
}

.dashboard-sidebar .user-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    margin-bottom: 16px;
}

.dashboard-sidebar .user-avatar {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--deep-navy);
    font-weight: 800;
    margin: 0 auto 12px;
}

.dashboard-sidebar .dash-nav {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.dashboard-sidebar .dash-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.dashboard-sidebar .dash-nav a:last-child { border-bottom: none; }

.dashboard-sidebar .dash-nav a:hover,
.dashboard-sidebar .dash-nav a.active {
    color: var(--cyan);
    background: rgba(0, 196, 212, 0.05);
}

.dashboard-sidebar .dash-nav a i { width: 20px; text-align: center; }

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        padding: calc(var(--nav-height) + 16px) 16px 80px;
    }
    .dashboard-sidebar { position: static; }
}

/* ===== PRODUCT DETAIL PAGE ===== */
.product-detail {
    max-width: 1320px;
    margin: 0 auto;
    padding: calc(var(--nav-height) + 30px) 24px 80px;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
}

.product-gallery {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.product-gallery .main-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.product-gallery .gallery-thumbs {
    display: flex;
    gap: 8px;
    padding: 12px;
    overflow-x: auto;
}

.product-gallery .gallery-thumbs img {
    width: 80px; height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.product-gallery .gallery-thumbs img:hover,
.product-gallery .gallery-thumbs img.active {
    opacity: 1;
    border-color: var(--cyan);
}

.product-sidebar-card {
    position: sticky;
    top: calc(var(--nav-height) + 24px);
    height: fit-content;
}

@media (max-width: 768px) {
    .product-detail {
        grid-template-columns: 1fr;
        padding: calc(var(--nav-height) + 16px) 16px 80px;
        gap: 20px;
    }
    .product-gallery .main-image { height: 240px; }
    .product-sidebar-card { position: static; }
}

/* ===== UTILITY ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-cyan { color: var(--cyan); }
.text-amber { color: var(--amber); }
.text-orange { color: var(--orange); }
.text-teal { color: var(--teal); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-muted); }
.fw-bold { font-weight: 700; }
.fw-extra { font-weight: 800; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.w-full { width: 100%; }
.hidden { display: none !important; }
