/* Tipografía global y transiciones */
body {
    font-family: 'Poppins', sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
    background-color: #020617;
    color: #f8fafc;
}

/* --- MODO CLARO GLOBAL --- */
html.light, body.light {
    background-color: #f8fafc !important;
    color: #0f172a !important;
}

header, .bg-glass {
    background-color: #020617 !important; /* Color de fondo sólido oscuro exacto de la página */
    backdrop-filter: none !important;     /* Desactiva el desenfoque traslúcido */
}

/* --- MODO CLARO (Fondo sólido blanco/claro) --- */
html.light header, html.light .bg-glass {
    background-color: #ffffff !important;
    backdrop-filter: none !important;
    border-color: #e2e8f0 !important;
}

html.light header > div:nth-child(2) {
    background-color: #f1f5f9 !important; /* Fondo gris muy claro para la barra de categorías */
    border-color: #e2e8f0 !important;
}

html.light header button:not(.bg-brand-accent),
html.light header a {
    color: #1e293b !important;
}

html.light header button.text-brand-accent {
    color: #640291 !important;
}

html.light header button.text-brand-pink {
    color: #E6007E !important;
}

/* Buscador y Botones del Header en Modo Claro */
html.light #busqueda-input,
html.light #theme-toggle,
html.light #cart-btn {
    background-color: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

/* --- SLIDER PRINCIPAL EN MODO CLARO --- */
html.light #main-slider {
    background: linear-gradient(135deg, #ffffff 0%, #f3e8ff 100%) !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08) !important;
}

html.light #main-slider h1 {
    color: #0f172a !important;
}

html.light #main-slider p {
    color: #475569 !important;
}

/* Etiqueta de categoría dentro del slider en modo claro */
html.light #main-slider span.bg-slate-800 {
    background-color: #e2e8f0 !important;
    color: #334155 !important;
}

/* --- TARJETAS DE CATEGORÍAS CIRCULARES Y PRODUCTOS EN MODO CLARO --- */
html.light .bg-slate-900 {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.05) !important;
}

html.light .bg-slate-950 {
    background-color: #f1f5f9 !important;
}

html.light h1, html.light h2, html.light h3, html.light h4 {
    color: #0f172a !important;
}

html.light p, 
html.light span:not(.text-brand-accent):not(.text-brand-pink):not(.text-white):not(.text-indigo-400):not(.text-emerald-400), 
html.light li {
    color: #475569 !important;
}

/* Mantener texto blanco en botones primarios y badges */
html.light .bg-brand-accent,
html.light .bg-brand-accent *,
html.light #cart-count {
    color: #ffffff !important;
}

/* Barra de desplazamiento */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: inherit;
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 9999px;
}
html.light ::-webkit-scrollbar-thumb {
    background: #cbd5e1;
}
/* --- MODAL DE PRODUCTO EN MODO CLARO --- */
html.light #product-modal-card {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
}

html.light #qty-minus,
html.light #qty-plus,
html.light #close-modal-btn {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}

html.light #modal-cantidad {
    color: #0f172a !important;
}

/* --- MODAL CARRITO EN MODO CLARO --- */
html.light #cart-modal-card {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
}

html.light #cart-modal-card thead {
    background-color: #f1f5f9 !important;
}

html.light #cliente-nombre,
html.light #cliente-telefono {
    background-color: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

/* --- SECCIÓN CARRITO EN MODO CLARO --- */
html.light #carrito-seccion > div {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
}

/* Botón Ocultar */
html.light #cerrar-carrito-seccion-btn {
    background-color: #f1f5f9 !important;
    color: #1e293b !important;
    border: 1px solid #cbd5e1 !important;
}

/* Cabecera y filas de la tabla en modo claro */
html.light #carrito-seccion thead {
    background-color: #f1f5f9 !important;
}

html.light #carrito-seccion thead th {
    color: #475569 !important;
}

html.light #cart-items-body tr {
    background-color: #ffffff !important;
}

html.light #cart-items-body tr:hover {
    background-color: #f8fafc !important;
}

html.light #cart-items-body td,
html.light #cart-items-body td span {
    color: #0f172a !important;
}

/* Caja inferior de datos del cliente y total en modo claro */
html.light #carrito-seccion .bg-slate-950\/60 {
    background-color: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

html.light #carrito-seccion label,
html.light #carrito-seccion .text-lg,
html.light #carrito-seccion .text-lg span {
    color: #0f172a !important;
}

html.light #cliente-nombre,
html.light #cliente-telefono {
    background-color: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

/* Mantener el botón FINALIZAR COMPRA con texto blanco */
html.light #finalizar-compra-btn {
    color: #ffffff !important;
}