/**
 * ============================================
 * CAPA DE PRESENTACIÓN - BASE
 * ============================================
 * Variables CSS, reset y utilidades globales
 * Estética Kawaii: colores pastel, formas suaves, tipografía amigable
 */

/* ============================================
   IMPORTS - TIPOGRAFÍA CHEWY
   ============================================ */
/* Chewy: Fuente principal para todo el sitio */
@import url('https://fonts.googleapis.com/css2?family=Chewy&display=swap');

/* Nunito: Fuente secundaria para textos pequeños si se necesita legibilidad extra */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap');

/* ============================================
   VARIABLES CSS
   ============================================ */
:root {
    /* ============================================
       COLORES BEEAUTY NOTE - Basados en el logo
       ============================================ */
    
    /* Colores principales */
    --color-primary: #fcb807;           /* Amarillo/naranja - Principal */
    --color-primary-dark: #e5a600;      /* Amarillo oscuro - Hover */
    --color-primary-light: #fcd873;     /* Amarillo dorado - Acentos */
    --color-secondary: #f98d9c;         /* Rosa/salmon - Secundario */
    --color-secondary-dark: #e87a89;    /* Rosa oscuro - Hover */
    --color-accent: #cfebf1;            /* Celeste - Color alas */
    --color-accent-dark: #b8dce4;       /* Celeste oscuro - Hover */
    --color-accent-2: #fff575;          /* Amarillo pastel - Highlight */
    --color-accent-3: #7a5342;          /* Marrón - Usar poco */
    
    /* Colores de fondo */
    --color-bg: #FFFCF5;                /* Fondo crema cálido */
    --color-bg-alt: #FFFEF0;            /* Fondo amarillento */
    --color-card: #FFFFFF;              /* Blanco cards */
    --color-card-yellow: #FFF9E6;       /* Card amarilla */
    --color-card-blue: #F0F9FC;         /* Card celeste */
    
    /* Colores de texto */
    --color-text: #4A3F35;              /* Marrón oscuro - Principal */
    --color-text-light: #7A6B5A;        /* Marrón medio - Secundario */
    --color-text-muted: #A89B8C;        /* Marrón claro - Terciario */
    
    /* Bordes y sombras */
    --color-border: #F0E6D2;            /* Borde crema */
    --color-border-yellow: #FFE4B5;     /* Borde amarillo */
    --color-border-blue: #D4EDF2;       /* Borde celeste */
    --shadow-sm: 0 2px 8px rgba(74, 63, 53, 0.08);
    --shadow-md: 0 4px 20px rgba(74, 63, 53, 0.12);
    --shadow-lg: 0 8px 40px rgba(74, 63, 53, 0.15);
    --shadow-hover: 0 12px 50px rgba(252, 184, 7, 0.25);
    --shadow-blue: 0 8px 30px rgba(207, 235, 241, 0.4);
    
    /* ============================================
       TIPOGRAFÍA CHEWY - JERARQUÍA COMPLETA
       ============================================ */
    
    /* Familias de fuente */
    --font-primary: 'Chewy', cursive;
    --font-secondary: 'Nunito', sans-serif;
    
    /* Jerarquía de títulos con Chewy */
    --font-hero: 'Chewy', cursive;        /* Títulos enormes (hero section) */
    --font-h1: 'Chewy', cursive;          /* Títulos principales */
    --font-h2: 'Chewy', cursive;          /* Títulos de sección */
    --font-h3: 'Chewy', cursive;          /* Subtítulos */
    --font-h4: 'Chewy', cursive;          /* Títulos de cards */
    --font-body: 'Chewy', cursive;        /* Texto general */
    --font-small: 'Nunito', sans-serif;   /* Textos pequeños/legales (más legible) */
    --font-button: 'Chewy', cursive;      /* Botones */
    --font-nav: 'Chewy', cursive;         /* Navegación */
    --font-price: 'Chewy', cursive;       /* Precios */
    --font-badge: 'Chewy', cursive;       /* Badges/etiquetas */
    
    /* ============================================
       ESCALA TIPOGRÁFICA CON CHEWY
       ============================================ */
    
    /* Tamaños base (1rem = 16px por defecto) */
    --text-xs: 0.75rem;        /* 12px - Caption, tags */
    --text-sm: 0.875rem;       /* 14px - Texto pequeño, precios en cards */
    --text-base: 1.125rem;     /* 18px - Texto body (ligeramente más grande para Chewy) */
    --text-lg: 1.375rem;       /* 22px - Lead text, descripciones */
    --text-xl: 1.625rem;       /* 26px - H4, precios destacados */
    --text-2xl: 2rem;          /* 32px - H3, títulos cards */
    --text-3xl: 2.5rem;        /* 40px - H2, títulos sección */
    --text-4xl: 3.25rem;       /* 52px - H1, títulos página */
    --text-5xl: 4rem;          /* 64px - Hero, títulos enormes */
    --text-6xl: 5rem;          /* 80px - Display, hero especial */
    
    /* Espaciado */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    
    /* Bordes redondeados */
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 30px;
    --radius-xl: 50px;
    --radius-full: 50%;
    
    /* Transiciones */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Layout */
    --container-max: 1400px;
    --header-height: 120px;
}

/* ============================================
   RESET Y BASE
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-base);
}

button {
    font-family: var(--font-button);
    cursor: pointer;
    border: none;
    background: none;
    letter-spacing: 0.5px;
}

ul, ol {
    list-style: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* ============================================
   UTILIDADES
   ============================================ */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-4);
}

@media (min-width: 640px) {
    .container {
        padding: 0 var(--space-6);
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 var(--space-8);
    }
}

/* Texto */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-heading { font-family: var(--font-heading); }
.font-decorative { font-family: var(--font-decorative); }

.text-gradient {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Espaciado */
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }

.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }

/* Grid */
.grid {
    display: grid;
    gap: var(--space-6);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Flexbox */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

/* Ocultar/mostrar */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 768px) {
    .hide-mobile { display: none !important; }
}

@media (min-width: 769px) {
    .hide-desktop { display: none !important; }
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.animate-fadeIn { animation: fadeIn 0.5s ease forwards; }
.animate-fadeInUp { animation: fadeInUp 0.6s ease forwards; }
.animate-bounce { animation: bounce 2s infinite; }
.animate-pulse { animation: pulse 2s infinite; }
.animate-float { animation: float 3s ease-in-out infinite; }

/* Stagger delays */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* ============================================
   BOTONES
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--text-base);
    border-radius: var(--radius-xl);
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 183, 197, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 183, 197, 0.5);
}

.btn-secondary {
    background: white;
    color: var(--color-text);
    border: 2px solid var(--color-border);
}

.btn-secondary:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-accent {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
    color: var(--color-text);
    box-shadow: 0 4px 15px rgba(168, 230, 207, 0.4);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(168, 230, 207, 0.5);
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-lg);
}

.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================
   SECCIONES COMUNES
   ============================================ */
.section {
    padding: var(--space-16) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-12);
}

.section-title {
    font-family: var(--font-heading);
    font-size: var(--text-4xl);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-4);
}

.section-subtitle {
    font-size: var(--text-lg);
    color: var(--color-text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    font-weight: 700;
    border-radius: var(--radius-xl);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-pink { background: var(--color-primary); color: white; }
.badge-purple { background: var(--color-secondary); color: white; }
.badge-green { background: var(--color-accent); color: var(--color-text); }
.badge-yellow { background: var(--color-accent-2); color: var(--color-text); }


/* ============================================
   TIPOGRAFÍA CHEWY - CLASES DE JERARQUÍA
   ============================================ */

/* Display / Hero - Títulos enormes (80px) */
.text-display,
.text-hero {
    font-family: var(--font-hero);
    font-size: var(--text-6xl);
    line-height: 1.1;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .text-display,
    .text-hero {
        font-size: var(--text-5xl);
    }
}

@media (max-width: 480px) {
    .text-display,
    .text-hero {
        font-size: var(--text-4xl);
    }
}

/* H1 - Títulos principales de página (52px) */
h1, .text-h1 {
    font-family: var(--font-h1);
    font-size: var(--text-4xl);
    line-height: 1.2;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    h1, .text-h1 {
        font-size: var(--text-3xl);
    }
}

/* H2 - Títulos de sección (40px) */
h2, .text-h2 {
    font-family: var(--font-h2);
    font-size: var(--text-3xl);
    line-height: 1.25;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    h2, .text-h2 {
        font-size: var(--text-2xl);
    }
}

/* H3 - Subtítulos (32px) */
h3, .text-h3 {
    font-family: var(--font-h3);
    font-size: var(--text-2xl);
    line-height: 1.3;
}

@media (max-width: 768px) {
    h3, .text-h3 {
        font-size: var(--text-xl);
    }
}

/* H4 - Títulos de cards, productos (26px) */
h4, .text-h4 {
    font-family: var(--font-h4);
    font-size: var(--text-xl);
    line-height: 1.4;
}

/* Body / Texto general (18px) */
.text-body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.7;
}

/* Lead / Texto destacado (22px) */
.text-lead {
    font-family: var(--font-body);
    font-size: var(--text-lg);
    line-height: 1.6;
}

/* Small / Texto pequeño (14px) - Usa Nunito para legibilidad */
.text-small,
.text-caption {
    font-family: var(--font-small);
    font-size: var(--text-sm);
    line-height: 1.5;
}

/* Extra small / Tags, labels (12px) */
.text-xs {
    font-family: var(--font-small);
    font-size: var(--text-xs);
    line-height: 1.4;
}

/* Precios - Destacados con Chewy */
.text-price {
    font-family: var(--font-price);
    font-size: var(--text-2xl);
    letter-spacing: 0.5px;
}

.text-price-lg {
    font-family: var(--font-price);
    font-size: var(--text-3xl);
    letter-spacing: 0.5px;
}

/* Navegación */
.text-nav {
    font-family: var(--font-nav);
    font-size: var(--text-base);
    letter-spacing: 0.5px;
}

/* Botones */
.text-button {
    font-family: var(--font-button);
    font-size: var(--text-base);
    letter-spacing: 1px;
}

/* Badges / Etiquetas */
.text-badge {
    font-family: var(--font-badge);
    font-size: var(--text-xs);
    letter-spacing: 1px;
}

/* Peso de fuente - Chewy solo tiene regular (400) */
/* Pero usamos text-shadow para simular bold si es necesario */
.text-shadow {
    text-shadow: 1px 1px 2px rgba(90, 74, 92, 0.1);
}

/* Transformaciones de texto */
.text-uppercase { text-transform: uppercase; }
.text-lowercase { text-transform: lowercase; }
.text-capitalize { text-transform: capitalize; }

/* Espaciado entre letras */
.tracking-tight { letter-spacing: -0.5px; }
.tracking-normal { letter-spacing: 0; }
.tracking-wide { letter-spacing: 1px; }
.tracking-wider { letter-spacing: 2px; }

/* Aplicar Chewy a elementos específicos por defecto */
.logo-text {
    font-family: var(--font-primary);
    letter-spacing: 1px;
}

.nav-link {
    font-family: var(--font-nav);
    letter-spacing: 0.5px;
}

.product-name {
    font-family: var(--font-h4);
}

.product-price {
    font-family: var(--font-price);
}

.btn {
    font-family: var(--font-button);
    letter-spacing: 1px;
    font-weight: 400; /* Chewy no tiene bold */
}

.section-title {
    font-family: var(--font-h2);
}

.feature-card h3 {
    font-family: var(--font-h3);
}

.category-card h3 {
    font-family: var(--font-h4);
}

.footer-links h4,
.footer-contact h4,
.footer-newsletter h5 {
    font-family: var(--font-h4);
}

.cart-drawer-header h2 {
    font-family: var(--font-h3);
}

.checkout-card h1 {
    font-family: var(--font-h2);
}

/* ============================================
   AJUSTES ESPECÍFICOS PARA CHEWY
   ============================================ */

/* Chewy es una fuente display/script, necesita más espacio */
body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.7; /* Más espacio entre líneas para legibilidad */
    letter-spacing: 0.3px;
}

/* Inputs y formularios usan Nunito para mejor legibilidad al escribir */
input,
textarea,
select {
    font-family: var(--font-small);
    font-size: var(--text-base);
}

/* Placeholders pueden usar Chewy */
::placeholder {
    font-family: var(--font-body);
    opacity: 0.7;
}

/* Toast notifications */
#toast-container > div {
    font-family: var(--font-body);
    letter-spacing: 0.5px;
}

/* Responsive adjustments para Chewy */
@media (max-width: 480px) {
    body {
        font-size: 1rem; /* Ligeramente más pequeño en mobile */
    }
    
    .btn {
        letter-spacing: 0.5px; /* Menos espaciado en mobile */
    }
}
