/* ===== WELCOME / HOME PAGE ===== */
/* Inspired by Uber Eats landing experience */

:root {
    --welcome-primary: #FFD100;
    --welcome-primary-hover: #F0C400;
    --welcome-accent: #FFA600;
    --welcome-green: #34C759;
    --welcome-dark: #1F2937;
    --welcome-text: #1F2937;
    --welcome-text-secondary: #6B7280;
    --welcome-bg: #F8F9FC;
    --welcome-card: #FFFFFF;
    --welcome-radius: 16px;
    --welcome-radius-sm: 12px;
    --welcome-shadow: 0 2px 12px rgba(0,0,0,0.05);
    --welcome-shadow-hover: 0 8px 28px rgba(0,0,0,0.1);
    --welcome-transition: 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ===== HERO SECTION ===== */
.welcome-hero {
    background: #FFFDF8;
    position: relative;
    overflow: hidden; /* Cortar imagen que sobresale - evita tapar secciones de abajo */
    min-height: 310px;
    height: auto;
    padding-bottom: 16px;
    margin-top: 2px; /* Baja el welcome principal 2 píxeles */
    display: flex;
    align-items: center;
}

.welcome-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 70% 50%, #FFF4D9 0%, #FFFDF8 65%);
    pointer-events: none;
    z-index: 0;
}

/* Contenedor solo para el texto - ocupa el lado izquierdo */
.welcome-hero-container {
    position: relative;
    z-index: 2; /* Encima de la imagen */
    width: 60%; /* Limitar a 60% en escritorio/tablet */
    padding-left: max(60px, 8%);
    padding-right: 20px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.welcome-hero-content {
    text-align: left;
    width: 100%;
    margin-top: 40px;
    max-width: 650px;
}

.welcome-hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: #1F2937;
    letter-spacing: -0.5px;
    margin: 0 0 12px;
    line-height: 1.15;
    /* Reservar siempre la altura de 2 líneas para que no salte el layout al rotar palabras */
    min-height: calc(2.2rem * 1.15 * 2);
}

@media (min-width: 768px) {
    .welcome-hero h1 {
        font-size: 3.2rem;
        min-height: calc(3.2rem * 1.15 * 2);
    }
}

@media (min-width: 992px) {
    .welcome-hero h1 {
        font-size: 3.6rem;
        min-height: calc(3.6rem * 1.15 * 2);
    }
}

.text-primary-color {
    color: #F59E0B;
    display: inline-block;
    transition: all 0.3s ease-in-out;
}

.text-fade-out {
    opacity: 0;
    transform: translateY(-10px);
}
.text-fade-in {
    opacity: 1;
    transform: translateY(0);
}

.welcome-hero p {
    font-size: 1.05rem;
    color: #6B7280;
    margin: 0 0 24px;
}

@media (min-width: 768px) {
    .welcome-hero p {
        font-size: 1.15rem;
        margin: 0 0 35px;
    }
}

.welcome-search {
    position: relative;
    width: 100%;
    margin: 0 0 24px;
    border-radius: 50px;
    box-shadow: 0 12px 35px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.03);
    background: #fff;
}

.welcome-search input {
    width: 100%;
    padding: 18px 65px 18px 56px;
    border: 1px solid rgba(0,0,0,0.02);
    border-radius: 50px;
    background: transparent;
    color: #1F2937;
    font-size: 1.05rem;
    outline: none;
    transition: var(--welcome-transition);
}

.welcome-search input:focus {
    box-shadow: 0 0 0 4px rgba(255,179,0,0.15);
}

.welcome-search-icon {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 1.3rem;
}

.welcome-search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #FFB300;
    color: #ffffff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--welcome-transition);
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(255,179,0,0.3);
}

.welcome-search-btn:hover {
    background: #e6a200;
    transform: translateY(-50%) scale(1.05);
}

.popular-searches {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px; /* Bajar un poco los filtros */
    position: relative;
    z-index: 10; /* Mantener siempre por encima de la imagen */
}

@media (min-width: 768px) {
    .popular-searches {
        margin-top: 24px;
    }
}

.popular-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #4B5563;
}

.popular-pills {
    display: flex;
    flex-wrap: nowrap; /* Mantener en una sola l├¡nea */
    flex-direction: row;
    gap: 10px;
    padding-bottom: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Ocultar barra en Firefox */
}

.popular-pills::-webkit-scrollbar {
    display: none;
}

.popular-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #ffffff;
    padding: 6px 14px;
    border-radius: 50px;
    text-decoration: none;
    color: #4B5563;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.popular-pill:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    color: #1F2937;
}

.pill-icon {
    font-size: 1.1rem;
}

.welcome-hero-image {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 45%; /* Un poco más delgado el contenedor */
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    pointer-events: none;
}

.hero-food-img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Cambiado a contain para que no se corte en tablets */
    object-position: right center;
    pointer-events: all;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.6s ease;
}

.hero-food-img:hover {
    transform: scale(1.01) translateY(-3px); /* Hover mucho más suave y ligero */
    filter: drop-shadow(-10px 10px 20px rgba(0,0,0,0.12));
}

@media (min-width: 768px) and (max-width: 1024px) {
    .welcome-hero-image {
        width: 50%; /* En tablets un poco más para que se note */
    }
    .welcome-hero-container {
        width: 65%; /* El texto se superpondrá a la imagen (fondo transparente) si es necesario */
        padding-left: 30px;
    }
}

.home-section {
    padding: 20px 20px 32px;
    max-width: 1280px;
    margin: 0 auto;
}

.home-section:last-child {
    padding-bottom: 40px;
}

.home-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.home-section-header h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--welcome-dark);
    margin: 0;
    letter-spacing: -0.3px;
}

.home-section-header a {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--welcome-primary);
    text-decoration: none;
}

.home-section-header a:hover {
    text-decoration: underline;
}

/* Categories now handled in categoria.css */

/* Swiper navigation buttons */
.swiper-nav-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #6B7280;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.swiper-nav-btn:hover {
    background: #1F2937;
    color: #ffffff;
    border-color: #1F2937;
}

/* ===== PROMO CARDS (Swiper) ===== */
.promo-slide {
    padding: 4px 0;
}

.promo-card {
    border-radius: var(--welcome-radius-sm);
    overflow: hidden;
    box-shadow: var(--welcome-shadow);
    background: var(--welcome-card);
    border: 1px solid rgba(0,0,0,0.03);
    transition: var(--welcome-transition);
}

.promo-card:hover {
    box-shadow: var(--welcome-shadow-hover);
}

.promo-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.promo-card-body {
    padding: 12px 14px;
}

.promo-card-body h6 {
    font-size: 0.85rem;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--welcome-dark);
}

.promo-card-body .promo-meta {
    font-size: 0.75rem;
    color: var(--welcome-text-secondary);
}

/* ===== RESTAURANT CARDS (Swiper recomended) ===== */
.restaurant-slide {
    padding: 6px 0 12px;
}

.restaurant-card {
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    background: #ffffff;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    text-decoration: none;
    color: inherit;
    display: block;
    border: 1px solid rgba(0,0,0,0.03);
    overflow: hidden; /* Cambiado de visible a hidden para evitar conflictos de z-index */
}

.restaurant-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}

.restaurant-card-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.restaurant-card-img-wrapper {
    position: relative;
    overflow: visible;
    z-index: 1;
    border-radius: 16px 16px 0 0;
}



.restaurant-card-logo {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 3px solid #FFD100;
    box-shadow: 0 3px 12px rgba(0,0,0,0.15), 0 0 0 4px rgba(255,255,255,0.8);
    object-fit: contain;
    background: #fff;
    padding: 3px;
    z-index: 10;
}

.restaurant-card-body {
    padding: 16px;
    position: relative;
    z-index: 1;
}

.restaurant-card-body h6 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 6px;
    color: #1F2937;
}

.restaurant-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.78rem;
    color: #6B7280;
    flex-wrap: wrap;
}

.restaurant-card-meta .star {
    color: #FFA600;
    font-weight: 700;
}

.restaurant-card-meta .badge {
    font-size: 0.62rem;
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: 700;
}

/* ===== SWIPER OVERRIDES ===== */
.home-section .swiper-wrapper {
    padding-bottom: 8px;
}

.home-section .swiper-slide {
    height: auto;
}

/* ===== RESPONSIVE ===== */
@media (min-width: 768px) {
    /* NOTA: .welcome-hero no se toca aquí - tiene height fijo definido arriba */

    .home-section {
        padding: 32px 40px;
    }
}

/* Ocultar imagen en móviles para que no tape el buscador */
@media (max-width: 767px) {
    .welcome-hero-image {
        display: none !important;
    }
    .welcome-hero-container {
        width: 100% !important; /* Forzar 100% en celular porque en PC hereda 55% */
        padding-right: max(20px, 5%) !important;
        padding-left: max(20px, 5%) !important;
    }
}


