/* ============================================
   KIDS SHELF - DESIGN SYSTEM
   Premium, Clean, Mobile-First
   ============================================ */

/* ============================================
   CSS RESET
   ============================================ */

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

/* ============================================
   DESIGN TOKENS
   ============================================ */

:root {
    /* ===== CALM PREMIUM: 60-30-10 ===== */
    /* 60% white, 30% soft rose, 10% soft accent blue */
    --color-white: #FFFFFF;
    --color-primary: #F66FA1;
    --color-primary-dark: #E2558C;
    --color-primary-light: #FFF7FA;
    --color-primary-pale: #FFE4EF;
    --color-accent: #BFD8FF;
    --color-accent-light: #E8F0FF;
    
    /* ===== TYPOGRAPHY SCALE ===== */
    --font-size-xs: 11px;
    --font-size-sm: 13px;
    --font-size-base: 15px;
    --font-size-md: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 22px;
    --font-size-2xl: 28px;
    --font-size-h3-desktop: 18px;
    --font-size-h2-desktop: 22px;
    --font-size-h1-desktop: 28px;
    
    /* Headings: Poppins or Nunito (bold); Body: Inter */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Poppins', 'Nunito', var(--font-body);
    --font-primary: var(--font-body);
    --font-display: var(--font-heading);
    
    /* Font Weights */
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    
    /* Line Heights */
    --line-height-tight: 1.2;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.6;
    
    /* ===== SPACING SCALE ===== */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-7: 28px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;
    
    /* Section padding: 80px desktop / 40px mobile; card gap 24px; internal 20px */
    --section-padding-mobile: 40px;
    --section-padding-desktop: 80px;
    --card-gap: 24px;
    --card-padding-internal: 20px;
    
    /* ===== COLOR PALETTE — Soft, warm, premium ===== */
    --color-text-primary: #2B2D42;
    --color-text-secondary: #6C757D;
    --color-text-muted: #6C757D;
    --color-bg-primary: #FFFFFF;
    --color-bg-soft: #FFF7FA;
    --color-bg-secondary: #FFF7FA;
    --color-bg-accent: #FFE4EF;
    --color-border: #F1F1F1;
    --color-border-light: #F1F1F1;
    
    /* Discount badge: soft, no strong green */
    --badge-discount-bg: #FFE4EF;
    --badge-discount-text: #F66FA1;
    
    /* Semantic */
    --color-success: #10B981;
    --color-info: #5DA9E9;
    --color-warning: #F59E0B;
    --color-error: #EF4444;
    
    /* Legacy aliases */
    --white: #FFFFFF;
    --black: #2B2D42;
    --gray-100: #FFF7FA;
    --gray-200: #F1F1F1;
    --gray-400: #9CA3AF;
    --gray-500: #6C757D;
    --gray-600: #4B5563;
    --gray-700: #2B2D42;
    --color-secondary: #BFD8FF;
    
    /* Gradients — soft, not loud */
    --gradient-primary: linear-gradient(135deg, #F66FA1 0%, #E2558C 100%);
    --gradient-soft: linear-gradient(180deg, #FFFFFF 0%, #FFF7FA 100%);
    --gradient-hero: linear-gradient(180deg, #FFF7FA 0%, #FFFFFF 50%, #FFF7FA 100%);
    
    /* ===== BORDER RADIUS ===== */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-btn: 12px;
    --radius-card: 16px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    
    /* ===== SHADOWS — Soft elevation only ===== */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 18px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.08);
    --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-card-hover: 0 8px 18px rgba(0, 0, 0, 0.08);
    
    /* ===== TRANSITIONS ===== */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;
    
    /* ===== CONTAINER ===== */
    --container-max: 1280px;
    --container-padding: 16px;
}

/* ============================================
   BASE TYPOGRAPHY
   ============================================ */

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

body {
    font-family: var(--font-body);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-normal);
    color: var(--color-text-primary);
    background: var(--color-bg-soft);
    overflow-x: hidden;
}

@media (min-width: 768px) {
    body {
        font-size: var(--font-size-base);
    }
}

/* Headings: Poppins/Nunito — normal weight on user side */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-tight);
    color: var(--color-text-primary);
    margin: 0;
}

h1 {
    font-size: var(--font-size-2xl);
}

h2 {
    font-size: var(--font-size-xl);
}

h3 {
    font-size: var(--font-size-lg);
}

@media (min-width: 768px) {
    h1 {
        font-size: var(--font-size-h1-desktop);
    }
    
    h2 {
        font-size: var(--font-size-h2-desktop);
    }
    
    h3 {
        font-size: var(--font-size-h3-desktop);
    }
}

p {
    margin: 0;
    line-height: var(--line-height-relaxed);
}

/* ============================================
   BASE ELEMENTS
   ============================================ */

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

a {
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-base);
}

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

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

::selection {
    background-color: var(--color-primary-light);
    color: var(--color-primary);
}

/* Soft scroll-in animation (fade + move up) */
.animate-fade-up {
    animation: fadeUp 0.5s ease-out forwards;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

.section {
    padding: var(--section-padding-mobile) 0;
}

@media (min-width: 768px) {
    .section {
        padding: var(--section-padding-desktop) 0;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

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

*:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
}
