* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: #f0f2f5;
    color: #333;
    -webkit-tap-highlight-color: transparent;
}

#app {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

/* PANTALLAS CON TRANSICIÓN */
.pantalla {
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    transform: translateX(30px);
    pointer-events: none;
    transition: all 0.3s ease;
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.pantalla.activa {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
    position: relative;
}

/* TÍTULOS */
/* Solo el título de la feria en la pantalla del mapa */
#pantalla-mapa h1 {
    color: #FF8C00 !important;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000 !important;
}

#pantalla-mapa h1::after {
    background: linear-gradient(90deg, #FF8C00, #FFB347, #FF8C00) !important;
}

h2 {
    color: #FF8C00 !important;
    margin: 15px 0;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000 !important;
}

/* BOTONES */
.btn-volver {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    margin-bottom: 15px;
    transition: background 0.2s;
}
.btn-volver:hover { background: #7f8c8d; }

.botones-accion {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    justify-content: center;
}

.btn-primario {
    background: #3498db;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    flex: 1;
    max-width: 200px;
    transition: all 0.3s ease;
}
.btn-primario:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 8px 25px rgba(52,152,219,0.4); }

.selector-planta {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 15px 0;
}

.btn-planta {
    background: #ecf0f1;
    color: #7f8c8d;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    transition: all 0.3s;
}
.btn-planta:hover { background: #d5dbdb; }
.btn-planta.activo { background: #2c3e50; color: white; box-shadow: 0 4px 12px rgba(0,0,0,0.2); }

/* TARJETAS DE FERIAS */
.feria-card {
    background: white;
    padding: 40px 25px;
    margin: 20px 0;
    border-radius: 20px;
    cursor: pointer;
    border-left: 8px solid;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
    transition: all 0.35s ease;
}
.feria-card:hover { transform: translateY(-8px) scale(1.02); box-shadow: 0 15px 40px rgba(0,0,0,0.2); }
.feria-card:active { transform: scale(0.98); }
.feria-card:nth-child(1) { border-left-color: #FF6B6B; background: linear-gradient(135deg, #ffffff 0%, #fff5f5 100%); animation-delay: 0.1s; }
.feria-card:nth-child(2) { border-left-color: #4ECDC4; background: linear-gradient(135deg, #ffffff 0%, #f0fffe 100%); animation-delay: 0.2s; }
.feria-card:nth-child(3) { border-left-color: #45B7D1; background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%); animation-delay: 0.3s; }
.feria-card h3 { font-size: 32px; font-weight: 800; margin: 0; letter-spacing: -0.5px; text-align: center; line-height: 1.3; }
.feria-card:nth-child(1) h3 { color: #FF6B6B; }
.feria-card:nth-child(2) h3 { color: #4ECDC4; }
.feria-card:nth-child(3) h3 { color: #45B7D1; }
.feria-card::after { content: ""; position: absolute; top: -30px; right: -30px; width: 80px; height: 80px; border-radius: 50%; opacity: 0.15; }
.feria-card:nth-child(1)::after { background: #FF6B6B; }
.feria-card:nth-child(2)::after { background: #4ECDC4; }
.feria-card:nth-child(3)::after { background: #45B7D1; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* SECCIONES */
.slogan {
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 4px;
    margin: 10px 0 5px 0;
    text-transform: uppercase;
    color: #FF8C00 !important;
    -webkit-text-fill-color: #FF8C00 !important;
    background: none !important;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000 !important;
}

.horarios {
    text-align: center;
    margin: 10px 0 25px 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.horario-badge {
    background: rgba(0, 0, 0, 0.7);
    color: #FF8C00;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid rgba(255,140,0,0.3);
    transition: transform 0.2s;
}
.horario-badge:last-child { background: #FF8C00; color: white; border: none; font-weight: 700; }

.titulo-seccion {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 5px;
    color: #FF8C00;
    background: rgba(0,0,0,0.3);
    display: inline-block;
    padding: 8px 25px;
    border-radius: 25px;
    margin: 20px auto 15px auto;
    text-align: center;
    border-top: none;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

/* DESTACADOS */
#seccion-destacados {
    margin: 20px 0;
    position: relative;
    z-index: 1;
}
#seccion-destacados h2 { color: #FF8C00 !important; text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000 !important; }

.scroll-horizontal {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 15px 0;
    -webkit-overflow-scrolling: touch;
}
.scroll-horizontal::-webkit-scrollbar { height: 6px; }
.scroll-horizontal::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 10px; }
.scroll-horizontal::-webkit-scrollbar-thumb { background: #bdc3c7; border-radius: 10px; }
.scroll-horizontal::-webkit-scrollbar-thumb:hover { background: #95a5a6; }

.destacado-card {
    min-width: 250px;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex-shrink: 0;
}
.destacado-card:hover { transform: scale(1.05); box-shadow: 0 10px 25px rgba(0,0,0,0.2); }
.destacado-card img { width: 100%; height: 200px; object-fit: cover; background: #f0f0f0; }
.destacado-info { padding: 15px; }
.destacado-info strong { display: block; margin-bottom: 5px; color: #2c3e50; }
.destacado-info span { font-size: 20px; font-weight: bold; color: #e74c3c; }

/* MAPA */
#mapa-grid { overflow: auto; max-height: 70vh; -webkit-overflow-scrolling: touch; }
.mapa-plano { display: flex; flex-direction: column; gap: 10px; padding: 15px; background: #e8ecf1; border-radius: 12px; }
.fila-pasillo { display: flex; align-items: flex-start; gap: 0; background: white; border-radius: 8px; padding: 4px; }
.lado-pasillo { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.lado-izq { align-items: flex-end; }
.lado-der { align-items: flex-start; }
.centro-pasillo { width: 40px; min-width: 40px; background: #2c3e50; color: white; font-size: 11px; font-weight: bold; text-align: center; padding: 15px 0; border-radius: 6px; margin: 0 5px; }
.cuadro-puesto { width: 38px; height: 28px; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: bold; border-radius: 4px; cursor: pointer; border: 1px solid rgba(0,0,0,0.1); color: #2c3e50; transition: transform 0.15s, box-shadow 0.15s; }
.cuadro-puesto:hover { transform: scale(1.15); box-shadow: 0 4px 12px rgba(0,0,0,0.3); z-index: 10; }

/* LEYENDA Y RUBROS */
.leyenda-colores { display: flex; flex-wrap: wrap; gap: 10px; margin: 15px 0; padding: 15px; background: white; border-radius: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.leyenda-item { display: flex; align-items: center; gap: 8px; }
.color-box { width: 20px; height: 20px; border-radius: 4px; border: 1px solid rgba(0,0,0,0.2); }
#lista-rubros { display: flex; flex-wrap: wrap; gap: 10px; margin: 15px 0; }
.btn-rubro { padding: 12px 24px; border: none; border-radius: 25px; color: white; font-weight: bold; cursor: pointer; transition: transform 0.2s; box-shadow: 0 2px 8px rgba(0,0,0,0.15); text-shadow: 1px 1px 2px rgba(0,0,0,0.3); }
.btn-rubro:hover { transform: scale(1.05); }
.resultado-item { display: flex; align-items: center; gap: 15px; background: white; padding: 15px; margin: 10px 0; border-radius: 12px; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.1); transition: transform 0.2s; }
.resultado-item:hover { transform: translateX(5px); }
.color-rubro { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; }

/* MODAL */
.modal-oculto { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.75); z-index: 1000; overflow-y: auto; padding: 20px; -webkit-overflow-scrolling: touch; }
.modal-contenido { background: white; margin: 20px auto; padding: 30px; width: 90%; max-width: 600px; border-radius: 20px; position: relative; animation: slideIn 0.3s ease; }
@keyframes slideIn { from { transform: translateY(-30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.cerrar-modal { position: absolute; right: 20px; top: 15px; font-size: 35px; cursor: pointer; color: #95a5a6; transition: color 0.2s; line-height: 1; z-index: 10; }
.cerrar-modal:hover { color: #e74c3c; }
/* Título del local en el modal (Zapatillas Juan) */
#modal-body h2 {
    color: #2c3e50 !important;
    text-shadow: none !important;
}

#modal-body p { margin: 5px 0; color: #7f8c8d; }

/* GALERÍA DE FOTOS - SCROLL HORIZONTAL */
.galeria-fotos {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 10px;
    margin: 15px 0;
    -webkit-overflow-scrolling: touch;
}

.foto-producto {
    width: 85%;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
    background: #f0f0f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    flex-shrink: 0;
    scroll-snap-align: center;
}

/* PRODUCTO CARD */
.producto-card { border: 1px solid #ecf0f1; border-radius: 12px; padding: 15px; margin: 15px 0; background: #fafafa; }
.producto-card strong { font-size: 18px; color: #2c3e50; display: block; margin-bottom: 5px; }
.producto-precio { font-size: 24px; color: #e74c3c; font-weight: bold; margin: 10px 0; }

/* WHATSAPP */
.btn-whatsapp { display: inline-block; background: #25D366; color: white; padding: 15px 30px; border-radius: 30px; text-decoration: none; font-weight: bold; font-size: 16px; margin-top: 20px; text-align: center; transition: transform 0.2s, box-shadow 0.2s; box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3); }
.btn-whatsapp:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(37, 211, 102, 0.4); color: white; }

/* MENÚ */
#menu-opciones { animation: fadeInMenu 0.2s ease; }
@keyframes fadeInMenu { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* UTILIDADES */
.oculto { display: none; }
hr { border: none; border-top: 1px solid #ecf0f1; margin: 20px 0; }

/* FONDO SOLO PARA INDEX */
body.home {
    background: url('imagenes/fondo.jpg') no-repeat center center fixed;
    background-size: cover;
}
/* Overlay más suave (menos opaco, sin blur) */
body.home::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Reducido de 0.5 a 0.4 */
    backdrop-filter: blur(2px); /* Reducido de 4px a 2px */
    z-index: 0;
}

/* RESPONSIVE */
@media (max-width: 600px) {
    .botones-accion { flex-direction: column; align-items: center; }
    .btn-primario { max-width: 100%; }
    .feria-card { padding: 25px 20px; }
    .feria-card h3 { font-size: 24px; }
    .slogan { font-size: 18px; letter-spacing: 3px; }
    .horario-badge { font-size: 12px; padding: 6px 12px; }
    .foto-producto { height: 250px; }
    .modal-contenido { margin: 10px auto; padding: 20px; width: 95%; }
    .destacado-card { min-width: 200px; }
}

/* ============================================ */
/* NUEVAS REGLAS PARA RESALTADO DEL MAPA (azul) */
/* ============================================ */

/* Resaltado de local seleccionado en el mapa */
.local-resaltado {
    animation: pulse 0.5s ease-in-out;
    position: relative;
    z-index: 10 !important;
}

/* Animación de pulso para el resaltado */
@keyframes pulse {
    0% { 
        transform: scale(1); 
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.7);
    }
    50% { 
        transform: scale(1.1); 
        box-shadow: 0 0 0 5px rgba(52, 152, 219, 0.3);
    }
    100% { 
        transform: scale(1.05); 
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0);
    }
}

/* Mejora para todos los cuadritos del mapa */
#mapa-grid div[style*="cursor:pointer"] {
    transition: all 0.2s ease;
    position: relative;
}

/* Efecto hover para todos los cuadritos */
#mapa-grid div[style*="cursor:pointer"]:hover {
    transform: scale(1.05);
    border: 2px solid #3498db !important;
    z-index: 5;
    position: relative;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

/* Estilo adicional para el resaltado - borde azul brillante */
.local-resaltado {
    border: 3px solid #3498db !important;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.8);
}

/* Scroll suave para la navegación */
html {
    scroll-behavior: smooth;
}