/* ============================================================
   KeXoT Shop — Main Stylesheet
   Design System: Dark luxury tech theme
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Outfit:wght@300;400;600;700;800;900&display=swap');

/* --- CSS Custom Properties --- */
:root {
    /* Colors */
    --bg-primary:     #080c14;
    --bg-secondary:   #0d1220;
    --bg-card:        #111827;
    --bg-card-hover:  #1a2235;
    --bg-glass:       rgba(255, 255, 255, 0.04);
    --bg-glass-hover: rgba(255, 255, 255, 0.07);

    /* Brand */
    --brand-primary:  #4f8ef7;
    --brand-light:    #7fb3ff;
    --brand-dark:     #2563eb;
    --brand-glow:     rgba(79, 142, 247, 0.35);

    /* Accent */
    --accent-cyan:    #06b6d4;
    --accent-purple:  #8b5cf6;
    --accent-amber:   #f59e0b;
    --accent-green:   #10b981;
    --accent-red:     #ef4444;

    /* Text */
    --text-primary:   #f0f4ff;
    --text-secondary: #8b9cbf;
    --text-muted:     #4d5f80;
    --text-white:     #ffffff;

    /* Borders */
    --border-subtle:  rgba(255, 255, 255, 0.06);
    --border-card:    rgba(255, 255, 255, 0.09);
    --border-active:  rgba(79, 142, 247, 0.4);

    /* Gradients */
    --grad-brand:     linear-gradient(135deg, #4f8ef7 0%, #8b5cf6 100%);
    --grad-dark:      linear-gradient(180deg, #0d1220 0%, #080c14 100%);
    --grad-card:      linear-gradient(145deg, #111827 0%, #0d1220 100%);
    --grad-hero:      linear-gradient(135deg, #080c14 0%, #0d1829 50%, #0a0f1e 100%);
    --grad-blue-glow: radial-gradient(ellipse at 50% 0%, rgba(79,142,247,0.15) 0%, transparent 70%);

    /* Shadows */
    --shadow-sm:   0 2px 8px rgba(0,0,0,0.4);
    --shadow-md:   0 4px 20px rgba(0,0,0,0.5);
    --shadow-lg:   0 8px 40px rgba(0,0,0,0.6);
    --shadow-glow: 0 0 30px rgba(79,142,247,0.2);
    --shadow-card: 0 4px 24px rgba(0,0,0,0.5), 0 1px 0 rgba(255,255,255,0.05);

    /* Spacing */
    --space-xs:  0.25rem;
    --space-sm:  0.5rem;
    --space-md:  1rem;
    --space-lg:  1.5rem;
    --space-xl:  2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Border Radius */
    --radius-sm:  6px;
    --radius-md:  12px;
    --radius-lg:  18px;
    --radius-xl:  24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast:   0.15s ease;
    --transition-base:   0.25s ease;
    --transition-slow:   0.4s ease;
    --transition-bounce: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Layout */
    --container-max: 1380px;
    --header-height: 72px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

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

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

ul, ol {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

input, select, textarea {
    font-family: inherit;
    outline: none;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
    background: var(--border-card);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--brand-primary);
}

/* --- Container --- */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

/* --- Section --- */
.section {
    padding: var(--space-3xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.section-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--brand-primary);
    margin-bottom: var(--space-sm);
    display: block;
}

.section-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    color: var(--text-white);
    line-height: 1.15;
    margin-bottom: var(--space-md);
}

.section-title span {
    background: var(--grad-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all var(--transition-base);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.07);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.btn:hover::before {
    opacity: 1;
}

.btn-primary {
    background: var(--grad-brand);
    color: #fff;
    box-shadow: 0 4px 20px var(--brand-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--brand-glow);
}

.btn-secondary {
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--border-card);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    border-color: var(--border-active);
    color: var(--brand-light);
    transform: translateY(-1px);
}

.btn-ghost {
    color: var(--brand-primary);
    font-weight: 600;
    padding: 0.5rem 0;
    transition: var(--transition-base);
}

.btn-ghost:hover {
    color: var(--brand-light);
    gap: 0.6rem;
}

.btn-icon {
    width: 42px;
    height: 42px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--bg-glass);
    border: 1px solid var(--border-card);
    color: var(--text-secondary);
    transition: all var(--transition-base);
}

.btn-icon:hover {
    background: var(--bg-glass-hover);
    color: var(--brand-primary);
    border-color: var(--border-active);
}

/* --- Badge --- */
.badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* --- Stars --- */
.stars {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    font-size: 0.85rem;
}

.star { color: var(--text-muted); }
.star-full, .star-half { color: var(--accent-amber); }

/* --- Glass card --- */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-card);
    transition: all var(--transition-base);
}

.glass-card:hover {
    border-color: var(--border-active);
    box-shadow: var(--shadow-card), var(--shadow-glow);
}

/* --- Divider --- */
.divider {
    border: none;
    border-top: 1px solid var(--border-subtle);
    margin: var(--space-xl) 0;
}

/* --- Breadcrumb --- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: var(--space-xl);
}

.breadcrumb a:hover { color: var(--brand-primary); }
.breadcrumb span { color: var(--text-secondary); }

/* --- Loading spinner --- */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-card);
    border-top-color: var(--brand-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 2rem auto;
}

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

/* --- Notification toast --- */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-active);
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    z-index: 9999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s var(--transition-bounce);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--grad-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

/* --- Page title block --- */
.page-hero {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-subtle);
    padding: var(--space-2xl) 0;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--grad-blue-glow);
    pointer-events: none;
}

.page-hero-content {
    position: relative;
    z-index: 1;
}

.page-hero h1 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.6rem, 3.5vw, 2.5rem);
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: var(--space-sm);
}

.page-hero p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* --- Empty state --- */
.empty-state {
    text-align: center;
    padding: var(--space-3xl) var(--space-xl);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: var(--space-lg);
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

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

/* --- Utility --- */
.text-gradient {
    background: var(--grad-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
}

/* --- Animations --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-12px); }
}

@keyframes shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(79,142,247,0.2); }
    50%       { box-shadow: 0 0 40px rgba(79,142,247,0.45); }
}

.anim-fade-up    { animation: fadeInUp 0.6s ease forwards; }
.anim-fade-in    { animation: fadeIn 0.6s ease forwards; }
.anim-float      { animation: float 4s ease-in-out infinite; }
.anim-pulse-glow { animation: pulse-glow 3s ease-in-out infinite; }

/* --- Reveal on scroll --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* --- Responsive --- */
@media (max-width: 1200px) {
    .container { padding: 0 var(--space-lg); }
}

@media (max-width: 768px) {
    .container  { padding: 0 var(--space-md); }
    .section    { padding: var(--space-2xl) 0; }
    :root { --header-height: 60px; }
}

@media (max-width: 480px) {
    .btn { padding: 0.65rem 1.25rem; font-size: 0.85rem; }
}
