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

/**
 * SuperMercado PWA CSS
 * Estilo Dark Mode Inmersivo (Branding 2026)
 */

:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --primary-light: #d1fae5;
    --secondary: #f59e0b;
    --danger: #ef4444;
    --purple: #8b5cf6;
    --purple-light: rgba(139, 92, 246, 0.2);
    --bg: #111827;           /* Oscuro Inmersivo */
    --surface: #1f2937;      /* Superficies o Tarjetas Oscuras */
    --surface-glass: rgba(31, 41, 55, 0.7); /* Glassmorphism */
    --text: #f9fafb;         /* Blanco roto */
    --text-light: #9ca3af;   /* Gris claro */
    --border: #374151;       /* Gris oscuro para separaciones */
    --radius: 24px;          /* Curvas redondeadas grandes 2026 */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

/* Evitar scroll inncecesario si estamos en app mode PWA */
#app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
}

header {
    background-color: var(--surface-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.greeting-text { font-size: 0.875rem; color: var(--text-light); }
.user-name { font-size: 1.125rem; font-weight: 700; }

/* El Pill (Badget) Brillante del Saldo para Branding 2026 */
.points-badge {
    background: linear-gradient(135deg, rgba(139,92,246,0.3) 0%, rgba(13,166,242,0.3) 100%);
    border: 1px solid rgba(13,166,242,0.5);
    color: #0df2f2;
    padding: 0.5rem 0.75rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.875rem;
    box-shadow: 0 0 15px rgba(13,166,242,0.3);
}

/* Área Scrolleable principal que no tocará el Bottom Navigation */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 25px; /* Margen para no chocar con el nav */
}

/* Sistema de Vistas SPA */
.view { display: none; animation: fadeIn 0.3s ease; }
.view.active { display: block; }

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

/* Bottom Nav con estilo de isleta flotante Glassmorphic */
.bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background-color: var(--surface-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.08);
    display: flex;
    justify-content: space-around;
    padding: 1rem 0.5rem;
    border-radius: 30px;
    z-index: 50;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-light);
    font-size: 0.75rem;
    font-weight: 500;
    transition: color 0.2s;
}
.nav-item.active { color: var(--primary); }
.nav-icon { font-size: 1.5rem; }

/* Utilidades Layout */
.px-4 { padding-left: 1.25rem; padding-right: 1.25rem; }
.mt-4 { margin-top: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-6 { margin-bottom: 1.5rem; }

/* Banner Neón Teal + Purple 2026 */
.promo-banner {
    background: linear-gradient(135deg, #8b5cf6 0%, #0da6f2 100%);
    border-radius: var(--radius);
    padding: 1.5rem;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 30px -5px rgba(13, 166, 242, 0.4);
}
.promo-banner::after {
    content: ''; position: absolute; top: -50px; right: -50px;
    width: 150px; height: 150px; background: rgba(255,255,255,0.1); border-radius: 50%;
}

/* Tarjetas de Producto Dark/Glass */
.product-card {
    background-color: var(--surface);
    border-radius: var(--radius);
    padding: 1rem;
    min-width: 160px;
    border: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    scroll-snap-align: start;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    position: relative;
}

.product-img {
    width: 100%;
    height: 120px;
    object-fit: contain;
    background-color: #374151; /* Empty Background Gris */
    border-radius: 12px;
    margin-bottom: 0.75rem;
}

.product-title {
    font-size: 0.875rem; font-weight: 600; margin-bottom: 0.25rem; line-height: 1.3;
}
.product-desc { font-size: 0.75rem; color: var(--text-light); margin-bottom: 0.75rem; }

.price-container { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.price { font-weight: 700; color: #0df2f2; font-size: 1.1rem;}
.price-old { font-size: 0.75rem; color: var(--text-light); text-decoration: line-through; }

/* Botones */
.btn {
    background: linear-gradient(to right, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0.75rem;
    font-weight: 600;
    font-size: 0.875rem;
    width: 100%;
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
}
/* Scrollers */
.horizontal-scroll {
    display: flex; gap: 1rem; overflow-x: auto; padding-bottom: 1.5rem;
    margin: 0 -1.25rem; padding-left: 1.25rem; padding-right: 1.25rem;
    scroll-snap-type: x mandatory; scrollbar-width: none;
}
.horizontal-scroll::-webkit-scrollbar { display: none; }

/* Header de Secciones */
.section-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 1rem; }
.section-title { font-size: 1.125rem; font-weight: 700; }
