/* =====================================================
   ATB Tech Solutions Store – Global Stylesheet
   ===================================================== */

:root {
    --font-body: 'Inter', system-ui, sans-serif;
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background-color: #020617; /* slate-950 */
    color: #f1f5f9;
}

/* ── Custom Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0f172a; }
::-webkit-scrollbar-thumb { background: #4f46e5; border-radius: 99px; }

/* ── Selection ── */
::selection { background: rgba(99, 102, 241, 0.4); color: #fff; }

/* ── Buttons ── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-weight: 600;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s var(--ease-smooth);
    text-decoration: none;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.35);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #a5b4fc;
    font-weight: 600;
    border-radius: 0.75rem;
    border: 1px solid rgba(99, 102, 241, 0.5);
    cursor: pointer;
    transition: all 0.2s var(--ease-smooth);
    text-decoration: none;
}
.btn-outline:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: #6366f1;
    color: #fff;
}

.btn-success {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    font-weight: 600;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s var(--ease-smooth);
    text-decoration: none;
}
.btn-success:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.35);
}

/* ── Nav Links ── */
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border-radius: 10px;
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s var(--ease-smooth);
    background: none;
    border: none;
    cursor: pointer;
}
.nav-link:hover, .nav-link.active {
    background: rgba(99, 102, 241, 0.15);
    color: #ffffff;
}
.mobile-nav-link {
    display: block;
    padding: 10px 14px;
    border-radius: 10px;
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s;
}
.mobile-nav-link:hover { background: #1e293b; color: #fff; }

/* ── Footer links ── */
.footer-link {
    color: #64748b;
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.15s;
}
.footer-link:hover { color: #a5b4fc; }

/* ── Cards ── */
.product-card {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 1.25rem;
    overflow: hidden;
    transition: all 0.3s var(--ease-smooth);
    position: relative;
}
.product-card:hover {
    border-color: #6366f1;
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15);
}
.product-card .image-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
    background: #1e293b;
}
.product-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s var(--ease-smooth);
}
.product-card:hover img { transform: scale(1.05); }

.product-card .badge-sale {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 9999px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ── Category Cards ── */
.category-card {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 1.25rem;
    padding: 1.75rem;
    text-align: center;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s var(--ease-smooth);
    position: relative;
    overflow: hidden;
}
.category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--card-gradient, linear-gradient(135deg, rgba(99,102,241,0.06), transparent));
    transition: opacity 0.3s;
    opacity: 0;
}
.category-card:hover::before { opacity: 1; }
.category-card:hover {
    border-color: var(--card-color, #6366f1);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(var(--shadow-rgb, 99,102,241), 0.15);
}
.category-card .icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: var(--icon-bg, rgba(99,102,241,0.15));
    color: var(--card-color, #6366f1);
    transition: all 0.3s;
}
.category-card:hover .icon-wrap {
    background: var(--card-color, #6366f1);
    color: white;
}

/* ── Glass Cards ── */
.glass-card {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: 1.5rem;
}

/* ── Section Headers ── */
.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    padding: 6px 16px;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

/* ── Hero gradient orbs ── */
.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    animation: float 6s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* ── Grid pattern overlay ── */
.grid-pattern {
    background-image:
        linear-gradient(rgba(99,102,241,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99,102,241,0.04) 1px, transparent 1px);
    background-size: 64px 64px;
}

/* ── Stars / sparkle animation ── */
@keyframes sparkle {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}
.sparkle { animation: sparkle 2s ease-in-out infinite; }

/* ── Testimonial cards ── */
.testimonial-card {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 1.5rem;
    padding: 2rem;
    transition: all 0.3s var(--ease-smooth);
}
.testimonial-card:hover {
    border-color: rgba(99,102,241,0.4);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(99,102,241,0.1);
}

/* ── Feature icons ── */
.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* ── Table styles ── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
    background: #0f172a;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #1e293b;
}
.data-table td {
    padding: 14px 16px;
    color: #e2e8f0;
    font-size: 0.875rem;
    border-bottom: 1px solid #1e293b;
}
.data-table tr:hover td { background: rgba(99,102,241,0.04); }

/* ── Form elements ── */
.form-input {
    width: 100%;
    background: #0f172a;
    border: 1px solid #1e293b;
    color: #f1f5f9;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    font-family: var(--font-body);
}
.form-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.form-input::placeholder { color: #475569; }
.form-label {
    display: block;
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 6px;
}

/* ── Badge ── */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-completed { background: rgba(16,185,129,0.15); color: #34d399; }
.badge-pending { background: rgba(245,158,11,0.15); color: #fbbf24; }
.badge-failed { background: rgba(239,68,68,0.15); color: #f87171; }

/* ── Rating stars ── */
.star { color: #fbbf24; }
.star-empty { color: #334155; }

/* ── Price tag ── */
.price-main { font-size: 1.5rem; font-weight: 800; color: #f1f5f9; }
.price-sale { font-size: 1rem; color: #64748b; text-decoration: line-through; }

/* ── Page hero ── */
.page-hero {
    padding: 5rem 0 4rem;
    background: linear-gradient(180deg, rgba(99,102,241,0.08) 0%, transparent 100%);
    border-bottom: 1px solid rgba(99,102,241,0.1);
    position: relative;
    overflow: hidden;
}

/* ── Animations ── */
@keyframes gradient-x {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
.animate-gradient-x {
    background-size: 200% 200%;
    animation: gradient-x 4s ease infinite;
}

/* ── Loading spinner ── */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive helpers ── */
/* ── Light Mode Overrides ── */
.light-mode {
    background-color: #f8fafc; /* slate-50 */
    color: #0f172a; /* slate-950 */
}
.light-mode body { background-color: #f8fafc; color: #1e293b; }
.light-mode .glass-card { background: rgba(255, 255, 255, 0.8); border-color: rgba(0, 0, 0, 0.05); color: #1e293b; }
.light-mode .product-card, .light-mode .category-card, .light-mode .testimonial-card { background: #ffffff; border-color: #e2e8f0; }
.light-mode .product-card h3, .light-mode .category-card h3, .light-mode .testimonial-card h3 { color: #0f172a; }
.light-mode .btn-outline { color: #4f46e5; border-color: #c7d2fe; }
.light-mode .btn-outline:hover { background: #eef2ff; color: #4338ca; }
.light-mode .nav-link { color: #475569; }
.light-mode .nav-link:hover, .light-mode .nav-link.active { background: #eef2ff; color: #4f46e5; }
.light-mode .form-input { background: #ffffff; border-color: #cbd5e1; color: #0f172a; }
.light-mode .form-input:focus { border-color: #6366f1; }
.light-mode .data-table th { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.light-mode .data-table td { color: #334155; border-color: #f1f5f9; }
.light-mode .text-slate-400, .light-mode .text-slate-500 { color: #64748b; }
.light-mode .text-white { color: #0f172a; }
.light-mode .bg-slate-900, .light-mode .bg-slate-950 { background-color: #ffffff; }
.light-mode .border-slate-800 { border-color: #e2e8f0; }
.light-mode .bg-slate-950\/80 { background-color: rgba(255, 255, 255, 0.9); }
.light-mode #navbar { border-bottom: 1px solid #e2e8f0; }

@media (max-width: 640px) {
    .price-main { font-size: 1.25rem; }
}
