/* ============================================
   BASE STYLES
   Reset, Design Tokens, Typography
   ============================================ */

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

/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
    /* Colors - Dark Theme (Default) */
    --bg-primary: #0A0A0A;
    --bg-secondary: #111111;
    --bg-tertiary: #1A1A1A;
    --text-primary: #FFFFFF;
    --text-secondary: #999999;
    --text-muted: #666666;
    --accent: #FFFFFF;
    --accent-hover: #E5E5E5;
    --accent-color: #3B82F6;  /* Blue accent */
    --accent-color-hover: #2563EB;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.16);
    
    /* Colors - Light Theme */
    --light-bg-primary: #FFFFFF;
    --light-bg-secondary: #FAFAFA;
    --light-bg-tertiary: #F5F5F5;
    --light-text-primary: #0A0A0A;
    --light-text-secondary: #666666;
    --light-text-muted: #999999;
    --light-accent: #0A0A0A;
    --light-accent-hover: #333333;
    --light-accent-color: #3B82F6;
    --light-accent-color-hover: #2563EB;
    --light-border-color: rgba(0, 0, 0, 0.06);
    --light-border-hover: rgba(0, 0, 0, 0.12);
    
    /* Spacing System */
    --space-xs: 0.5rem;     /* 8px */
    --space-sm: 1rem;       /* 16px */
    --space-md: 2rem;       /* 32px */
    --space-lg: 4rem;       /* 64px */
    --space-xl: 6rem;       /* 96px */
    
    /* Typography Scale */
    --font-size-xs: 0.75rem;    /* 12px */
    --font-size-sm: 0.875rem;   /* 14px */
    --font-size-base: 1rem;     /* 16px */
    --font-size-lg: 1.125rem;   /* 18px */
    --font-size-xl: 1.5rem;     /* 24px */
    --font-size-2xl: 2rem;      /* 32px */
    --font-size-3xl: 3rem;      /* 48px */
    --font-size-4xl: 4rem;      /* 64px */
    
    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Override */
[data-theme="light"] {
    --bg-primary: var(--light-bg-primary);
    --bg-secondary: var(--light-bg-secondary);
    --bg-tertiary: var(--light-bg-tertiary);
    --text-primary: var(--light-text-primary);
    --text-secondary: var(--light-text-secondary);
    --text-muted: var(--light-text-muted);
    --accent: var(--light-accent);
    --accent-hover: var(--light-accent-hover);
    --accent-color: var(--light-accent-color);
    --accent-color-hover: var(--light-accent-color-hover);
    --border-color: var(--light-border-color);
    --border-hover: var(--light-border-hover);
}

/* ============================================
   BASE STYLES
   ============================================ */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    font-size: var(--font-size-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition-base), color var(--transition-base);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* ============================================
   UTILITIES
   ============================================ */

/* Loading Spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl) 0;
    gap: var(--space-md);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 2px solid var(--border-color);
    border-top-color: var(--text-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.spin {
    animation: spin 1s linear infinite;
    display: inline-block;
}

.loading-spinner p {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

/* No Content Message */
.no-products {
    text-align: center;
    padding: var(--space-xl) 0;
    color: var(--text-secondary);
}

.no-products i {
    font-size: var(--font-size-3xl);
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.no-products h3 {
    font-size: var(--font-size-xl);
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

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

/* ============================================
   NOTIFICATION PERMISSION GATE
   ============================================ */
.notification-gate {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}.notification-gate.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}.notification-gate.notification-gate--fallback {
    align-items: flex-end;
    justify-content: flex-end;
    background: transparent;
    padding: 16px;
    pointer-events: none;
}

.notification-gate__content {
    text-align: center;
    max-width: 400px;
    padding: 40px;
    background: transparent;
}.notification-gate__icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--accent-color);
    animation: none;
    cursor: default;
    pointer-events: none;
    box-shadow: none;
}

@keyframes notification-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 20px rgba(59, 130, 246, 0); }
}

.notification-gate__title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}.notification-gate__text {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 30px;
}.notification-gate__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.notification-gate__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.notification-gate__btn:active {
    transform: translateY(0);
}

.notification-gate__hint {
    margin-top: 20px;
    font-size: 0.875rem;
    color: var(--text-muted);
    min-height: 20px;
}

.notification-gate__hint.error {
    color: #f87171;
}

.notification-gate--fallback .notification-gate__content {
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 24px;
    width: min(420px, 100%);
    pointer-events: auto;
}

.notification-gate--fallback .notification-gate__icon {
    display: none;
}

.notification-gate--fallback .notification-gate__title {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.notification-gate--fallback .notification-gate__text {
    margin-bottom: 16px;
}

.notification-gate--fallback .notification-gate__btn {
    width: 100%;
    justify-content: center;
}
