/* ==========================================================
   BLOOMSTUDIO - VARIABLES GLOBALES Y RESET RESPONSIVE
   ========================================================== */

/* 1. Importar fuentes de Google (Garantiza que se vean igual en todos los dispositivos) */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* 2. Variables de Diseño (Valores por defecto, el usuario puede cambiar el accent-color desde el perfil) */
:root {
    /* Colores Base */
    --bg-primary: #080608;
    --bg-secondary: #120d13;
    --bg-glass: rgba(255, 255, 255, 0.03);
    --bg-glass-border: rgba(229, 178, 165, 0.15);
    
    /* Tipografía */
    --text-primary: #f8f8f8;
    --text-secondary: #a89a9e;
    --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Cinzel', serif;
    
    /* Acentos (El --accent-color se sobreescribe dinámicamente desde main.php) */
    --accent-color: #e5b2a5;
    --accent-light: #f5d5ca;
    --accent-secondary: #8a4baf;
    
    /* Estados */
    --success: #4ade80;
    --warning: #fbbf24;
    --error: #f87171;
    
    /* Efectos */
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.4);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

/* 3. Reset Global y Normalización (Evita diferencias entre navegadores) */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%; /* Evita zoom de texto en iOS */
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden; /* Previene scroll horizontal no deseado */
}

/* 4. Imágenes y Medios Responsivos */
img, video, canvas, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 5. Tipografía Fluida (Se adapta al tamaño de pantalla) */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 0.5em;
}

h1 { font-size: clamp(1.75rem, 5vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }

p {
    margin-bottom: 1em;
    color: var(--text-secondary);
}

/* 6. Enlaces */
a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}
a:hover {
    color: var(--accent-light);
    text-decoration: underline;
}

/* 7. Utilidades de Scrollbar (Para que se vea elegante en todos los navegadores) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-glass-border);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* 8. Correcciones específicas para móviles */
@media (max-width: 768px) {
    /* Asegura que los inputs no hagan zoom automático en iPhone */
    input, select, textarea {
        font-size: 16px !important;
    }
    
    /* Previene que el texto se desborde en contenedores pequeños */
    .glass-panel, .receipt-container {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}