/* ===== TopHallazgos — Tema Limpio, Profesional y de Confianza ===== */

:root {
    /* Paleta Principal: Azul Confianza + Verde Conversión */
    --vacio: #f8fafc;             /* Fondo general (Gris muy claro) */
    --superficie: #ffffff;        /* Tarjetas y contenedores (Blanco puro) */
    --superficie-alta: #f1f5f9;   /* Inputs y áreas destacadas sencillas */
    
    --azul-principal: #1e3a8a;    /* Azul marino corporativo (Títulos, Header) */
    --azul-hover: #1e40af;        /* Azul interacción */
    
    --verde-exito: #059669;       /* Verde seguro para botones principales y compra */
    --verde-brillo: #10b981;      /* Hover de acción */
    
    --tinta: #0f172a;             /* Texto principal (Azul/Gris muy oscuro, no negro puro) */
    --tinta-tenue: #64748b;       /* Textos secundarios y labels */
    --borde: #e2e8f0;             /* Bordes suaves */
    --halo: #2563eb;              /* Azul de acento para enlaces y focus */
}

* { box-sizing: border-box; }

body {
    background: var(--vacio);
    color: var(--tinta);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--azul-principal);
}

h1 { font-size: 2rem; }

a {
    color: var(--halo);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover { color: var(--azul-hover); text-decoration: underline; }

/* Divisor limpio */
.divisor { display: flex; align-items: center; gap: 10px; margin: 28px 0; }
.divisor::before, .divisor::after { content: ""; flex: 1; height: 1px; background: var(--borde); }
.divisor span { font-size: 0.95rem; color: var(--tinta-tenue); font-weight: 500; }

/* Tarjetas */
.card {
    background: var(--superficie);
    border: 1px solid var(--borde);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    width: 100%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.card:hover { 
    border-color: #cbd5e1; 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Botón Genérico */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--azul-principal);
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}
.btn:hover { background: var(--azul-hover); transform: translateY(-1px); }

/* === BOTÓN PRINCIPAL DEL CATÁLOGO (Verde Seguro) === */
.btn-demonio-catalogo, .btn-demonio {
    background: var(--verde-exito) !important;
    color: #ffffff !important;
    border: none !important;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.2);
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.btn-demonio-catalogo:hover, .btn-demonio:hover {
    background: var(--verde-brillo) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    transform: translateY(-1px);
}

/* Formulario Limpio */
form p { margin-bottom: 14px; }
input, select, textarea {
    background: #ffffff;
    border: 1px solid var(--borde);
    color: var(--tinta);
    padding: 12px 14px;
    border-radius: 8px;
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus { 
    outline: none; 
    border-color: var(--halo); 
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
label { color: var(--tinta); font-size: 0.88rem; font-weight: 600; margin-bottom: 6px; display: block; }

/* Mensajes de Estado */
.mensaje-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 14px;
    font-size: 0.9rem;
}
.mensaje-exito {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 14px;
    font-size: 0.9rem;
}

.disponible { color: var(--verde-exito); font-weight: 600; }
.agotado { color: #dc2626; font-weight: 600; }

.subtitulo {
    color: var(--tinta-tenue);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* ===== Hero ===== */
.hero-ancho {
    text-align: center;
    padding: 32px 20px 16px;
    position: relative;
}
.hero-ancho .escudo {
    width: 160px;
    margin: 0 auto 10px;
}
.hero-ancho h1 { font-size: 2.2rem; margin: 4px 0 2px; }

/* ===== CONTENEDORES ===== */
.container, 
.container-ancho { 
    width: 100%;
    max-width: 820px; 
    margin: 0 auto; 
    padding: 10px 20px 80px; 
    position: relative; 
    z-index: 2; 
}

.card-info {
    width: 100%;
    margin-bottom: 20px;
}
.card-info h2 { font-size: 1.3rem; margin: 0 0 10px; }
.card-info p { font-size: 1rem; margin: 0 0 10px; line-height: 1.6; color: #334155; }

/* ===== SECCIÓN INFERIOR (BOTONES + QR) ===== */
.contenedor-inferior-simetrico {
    width: 100%;
    display: flex;
    gap: 16px;
    align-items: stretch;
    justify-content: space-between;
    margin-top: 20px;
}

.acciones-centradas {
    flex: 1.5;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--superficie);
    border: 1px solid var(--borde);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.qr-centrado {
    flex: 1;
    background: var(--superficie);
    border: 1px solid var(--borde);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Botón Destacado Principal (Llamado a la Acción) */
.btn-callout {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center;
    gap: 14px;
    padding: 16px 20px !important;
    border-radius: 10px !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
    text-decoration: none !important;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-callout:hover, .btn-callout:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(5, 150, 105, 0.35);
}

.btn-icono { font-size: 1.8rem; }

.btn-texto-box {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.btn-titulo {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.btn-subtexto {
    font-size: 0.85rem;
    color: #d1fae5;
    margin-top: 2px;
    font-weight: 400;
}

/* Botones Secundarios */
.btn-secundario-callout {
    background: var(--superficie-alta) !important;
    color: var(--tinta) !important;
    border: 1px solid var(--borde) !important;
    padding: 12px 16px !important;
    border-radius: 8px !important;
    text-align: center;
    font-size: 0.95rem !important;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-secundario-callout:hover {
    background: #e2e8f0 !important;
    color: var(--azul-principal) !important;
}

/* Caja del QR */
.qr-titulo {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--azul-principal);
}

.qr-centrado img {
    width: 120px;
    max-width: 100%;
    border-radius: 8px;
    border: 1px solid var(--borde);
}

.qr-centrado p {
    font-size: 0.8rem;
    margin: 6px 0 0 0;
    color: var(--tinta-tenue);
}

.qr-centrado .numero {
    color: var(--azul-principal);
    font-weight: 700;
}

/* Filtros y Navegación */
.filtros-categoria {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 20px;
}
.filtro-pill {
    padding: 8px 16px;
    border-radius: 20px;
    background: var(--superficie);
    border: 1px solid var(--borde);
    color: var(--tinta-tenue);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    display: inline-block;
    transition: all 0.2s;
}
.filtro-pill:hover {
    background: var(--azul-principal);
    color: #ffffff;
    border-color: var(--azul-principal);
}

.encabezado-catalogo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.encabezado-izq {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.encabezado-izq h1 { margin: 0; text-align: left; }
.botones-nav { display: flex; flex-wrap: wrap; gap: 8px; }

.btn-nav {
    padding: 10px 16px;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.enlace-sutil {
    font-size: 0.85rem;
    color: var(--tinta-tenue);
    text-decoration: underline;
}
.enlace-sutil:hover { color: var(--azul-principal); }

/* Adaptación Móvil */
@media (max-width: 720px) {
    .container, .container-ancho { padding: 10px 14px 60px; }
    .encabezado-catalogo { flex-direction: column; align-items: stretch; }
    .encabezado-izq h1 { text-align: center; }
    .botones-nav { justify-content: center; }
    .contenedor-inferior-simetrico { flex-direction: column !important; gap: 14px !important; }
    .acciones-centradas, .qr-centrado { flex: none !important; width: 100% !important; }
}

@media (max-width: 640px) {
    body { font-size: 16px; }
    .card { padding: 16px; }
    .btn { width: 100%; min-height: 48px; }
    input[type="number"], input[type="text"], input[type="email"], select, textarea { font-size: 1rem; padding: 12px; }
}

/* Input de archivo */
input[type="file"] {
    background: var(--superficie);
    border: 1px solid var(--borde);
    color: var(--tinta-tenue);
    padding: 10px;
    border-radius: 8px;
}

input[type="file"]::file-selector-button {
    background: var(--superficie-alta);
    color: var(--azul-principal);
    border: 1px solid var(--borde);
    border-radius: 6px;
    padding: 8px 14px;
    margin-right: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
input[type="file"]::file-selector-button:hover {
    background: #e2e8f0;
}

/* Botón de Reseñas (Azul Destacado Limpio) */
.btn-resena {
    background: #f1f5f9 !important;
    color: var(--azul-principal) !important;
    border: 1px solid #cbd5e1 !important;
    font-weight: 600 !important;
    transition: all 0.2s ease;
}

.btn-resena:hover {
    background: var(--azul-principal) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}