/* --- /public_html/landing.css --- */
/* v7.0 - ESTÁNDAR UX DELIVERY (PDF) */
/* Cumplimiento estricto: Gap 8px, Momentum Scroll, Card Vertical, Sin Snap */

:root {
    --primary: #002d72;
    --accent: #ffcc00;
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --card-bg: #ffffff;
    --radius-card: 12px; /* PDF Punto 2: 10-12px */
}

/* --- CONTENEDOR CARRUSEL (Punto 4: Continuidad) --- */
.categories-section {
    background: var(--white);
    padding: 10px 0 15px 0;
    position: sticky;
    top: 60px;
    z-index: 40;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    border-bottom: 1px solid #f0f0f0;
}

.container-width {
    max-width: 1200px;
    margin: 0 auto;
    /* PDF Punto 4: Padding lateral para que el primer/último elemento respire */
    padding: 0 16px; 
}

.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

/* --- COMPORTAMIENTO DE SCROLL (Punto 3 del PDF) --- */
.categories-scroll {
    display: flex;
    
    /* PDF Punto 2: Separación de 8px en mobile */
    gap: 8px; 
    
    /* PDF Punto 3: Scroll horizontal libre, NO paginado */
    overflow-x: auto;
    
    /* PDF Punto 3: Inercia natural (Momentum Scrolling) */
    -webkit-overflow-scrolling: touch; 
    scroll-behavior: smooth;
    
    /* PDF Punto 7: EVITAR Snap rígido (scroll-snap-type: none) */
    scroll-snap-type: none; 
    
    /* Ajustes visuales */
    padding: 5px 2px; /* Espacio para la sombra */
    scrollbar-width: none; 
    -ms-overflow-style: none;
    
    /* UX PC: Cursor de arrastre sugerido */
    cursor: grab;
    user-select: none;
}
.categories-scroll::-webkit-scrollbar { display: none; }

/* --- CARD DE CATEGORÍA (Punto 2 del PDF) --- */
.cat-chip {
    /* Estructura Vertical: Imagen Arriba, Texto Abajo */
    display: flex;
    flex-direction: column;
    
    /* Dimensiones: Ancho fijo para consistencia */
    min-width: 95px; 
    height: 100px;
    
    background: var(--card-bg);
    border: 1px solid #f3f4f6; /* Borde muy sutil */
    border-radius: var(--radius-card); /* 12px */
    
    /* Sin padding interno, la imagen manda */
    padding: 0;
    
    cursor: pointer;
    overflow: hidden; 
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    
    flex-shrink: 0; /* Evita deformación */
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

/* Estado Activo */
.cat-chip.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary);
}
.cat-chip.active .cat-name {
    background-color: var(--primary);
    color: white;
    font-weight: 700;
}

/* Hover en Desktop */
@media (hover: hover) {
    .cat-chip:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 12px rgba(0,0,0,0.08);
    }
}

/* --- IMAGEN (Full Image Top) --- */
.cat-img-box {
    width: 100%;
    height: 70%; /* La imagen domina la tarjeta */
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cat-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Llena el espacio sin deformar */
    transition: transform 0.3s ease;
    pointer-events: none; /* Evita arrastre fantasma de imagen */
}

.cat-chip:hover .cat-img-box img { transform: scale(1.05); }

/* --- TEXTO (Punto 2: 1 Línea Inferior) --- */
.cat-name {
    height: 30%; /* El 30% restante */
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    
    background-color: #ffffff;
    padding: 0 4px;
    border-top: 1px solid #f0f0f0;
    
    font-size: 0.7rem; /* Texto pequeño y nítido */
    font-weight: 600;
    color: var(--text-dark);
    text-align: center;
    line-height: 1;
    
    /* Truncado a 1 línea como pide el PDF */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- FLECHAS DE NAVEGACIÓN (Punto 5 del PDF) --- */
.nav-arrow {
    /* Por defecto OCULTAS (Mobile First) */
    display: none; 
    
    background: white;
    border: 1px solid #eee;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 10;
    color: var(--text-dark);
    position: absolute;
}

/* Visibles SOLO en Desktop y al hacer Hover (Punto 5) */
@media (min-width: 1024px) {
    .carousel-wrapper:hover .nav-arrow { display: flex; }
    .nav-arrow:hover { background: var(--bg-light); color: var(--primary); }
    .nav-arrow.left { left: -12px; }
    .nav-arrow.right { right: -12px; }
    
    /* En desktop aumentamos el gap para elegancia */
    .categories-scroll { gap: 12px; }
}

/* --- GRID RESTAURANTES (Sin cambios, estilo base) --- */
.restaurants-section { padding: 10px 16px 40px; }
.restaurants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}
.rest-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: block;
    text-decoration: none;
    color: inherit;
    border: 1px solid #f3f4f6;
}
.rest-card:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0,0,0,0.08); }
.img-container { position: relative; height: 180px; overflow: hidden; background: #e5e7eb; }
.rest-cover { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.rest-info { padding: 12px; position: relative; }
.rest-logo-mini { width: 48px; height: 48px; border-radius: 8px; position: absolute; top: -24px; right: 12px; border: 2px solid var(--white); background: var(--white); object-fit: cover; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.rest-header { margin-top: 0; }
.rest-name { margin: 0; font-size: 1.1rem; font-weight: 700; color: var(--text-dark); line-height: 1.2; padding-right: 60px; }
.rest-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag-badge { font-size: 0.75rem; background: #f3f4f6; padding: 2px 8px; border-radius: 4px; color: var(--text-gray); font-weight: 500; }
.tag-promo { background: #ecfdf5; color: #059669; }
.rest-meta { display: flex; align-items: center; gap: 12px; font-size: 0.8rem; color: var(--text-gray); margin-top: 12px; padding-top: 12px; border-top: 1px solid #f3f4f6; }

/* --- FILTROS --- */
.filters-section { margin-top: 0; padding-bottom: 10px; }
.search-container { margin-bottom: 10px; }
.search-input { background: #f3f4f6; border: none; padding: 10px 12px 10px 40px; }
.search-input:focus { background: #fff; box-shadow: 0 0 0 2px var(--primary); }

/* --- SKELETON (Ajustado al tamaño UX) --- */
.cat-skeleton { width: 95px; height: 100px; background: #e5e7eb; border-radius: 12px; animation: pulse 1.5s infinite; flex-shrink: 0; }
@keyframes pulse { 0% { opacity: 0.5; } 50% { opacity: 1; } 100% { opacity: 0.5; } }