/* === Layout base para sticky footer === */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

.page-wrapper {
    min-height: calc(100vh - var(--header-height, 80px) - var(--footer-height, 200px));
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    background-color: transparent; /* 👈 Fondo transparente para no tapar el fondo */
}

main {
    flex: 1;
    /* Asegura que el contenido crezca y empuje el footer abajo */
}

/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Título principal */
main h1 {
    font-family: var(--font-titulo, 'Poppins', sans-serif);
    font-size: var(--size-titulo, 28px);
    color: #ff0000; /* 🔴 Nombre de la marca en rojo brillante */
    font-weight: 700;
    margin-bottom: 24px;
}

main {
    min-height: calc(100vh - 200px); /* Ajuste aproximado: header + footer */
    padding: 16px;
    background-color: transparent; /* 👈 Fondo transparente para no tapar el fondo */
}

/* === Búsqueda === */
.buscador-locales {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
}

.search-container {
    position: relative;
    width: 100%;
    max-width: 600px;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #777;
}

#searchInput {
    width: 100%;
    padding: 14px 16px 14px 48px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 12px;
    outline: none;
    transition: border-color 0.3s;
    font-family: inherit;
}

#searchInput:focus {
    border-color: #ff0000; /* 🔴 Foco en rojo */
}

/* === Contenedor de tarjetas de locales === */
.contenedor-locales {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Tarjeta de local */
/* Tarjeta de local */
.card-local {
    /* 👇 CAMBIO: Fondo blanco con transparencia (alpha = 0.95) */
    background: rgba(255, 255, 255, 0.70);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-local:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.card-local img {
    width: 100%;
    height: 160px;
    object-fit: contain; /* ✅ Ajusta la imagen sin recortar */
    background-color: #f9f9f9;
    object-position: center; /* Centra la imagen dentro del contenedor */
}

.card-local .contenido {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
}

.card-local .numero-local {
    display: inline-block;
    background-color: #f0f0f0;
    color: #555;
    font-size: 13px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.card-local h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #222;
    margin: 0;
}

.card-local p {
    font-size: 0.95rem;
    color: #555;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Botón "Ver Local" */
.card-local .btn-ver-local {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #ff0000; /* 🔴 Enlace en rojo brillante */
    font-weight: 600;
    font-size: 0.95rem;
    margin-top: auto;
    transition: opacity 0.2s;
}

.card-local .btn-ver-local:hover {
    opacity: 0.85;
}

/* Mensaje de "sin locales" */
.contenedor-locales p {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    grid-column: 1 / -1;
}

/* === Responsivo === */

@media (max-width: 768px) {
    main h1 {
        font-size: 24px;
    }

    .search-container {
        max-width: none;
    }

    #searchInput {
        padding: 12px 16px 12px 44px;
        font-size: 16px; /* Evita zoom en iOS */
    }

    .contenedor-locales {
        grid-template-columns: 1fr;
        padding: 0 8px;
    }

    .card-local img {
        height: 140px;
    }

    .card-local .contenido {
        padding: 14px;
    }
}

@media (max-width: 480px) {
    main {
        padding: 12px;
    }

    main h1 {
        font-size: 22px;
        margin: 16px 0;
    }

    .card-local h3 {
        font-size: 1.15rem;
    }

    .card-local .btn-ver-local {
        font-size: 0.9rem;
    }
}

/* === FONDO DE PÁGINA === */
.background-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1; /* Asegura que esté detrás de todo */
    overflow: hidden;
}

.background-canvas img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Para dispositivos móviles, centrar la imagen en la parte más importante */
@media (max-width: 768px) {
    .background-canvas img {
        object-position: top center; /* Centra la parte superior (el león y el cielo) */
    }
}
/* === BANNER PROMOCIONAL FLOTANTE === */
.floating-promo-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ff6b6b, #ff0000);
    color: white;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(255, 0, 0, 0.4);
    z-index: 10000;
    max-width: 95%;
    width: 400px;
    padding: 16px;
    font-family: var(--font-cuerpo, 'Poppins', sans-serif);
    display: flex;
    flex-direction: column;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from { bottom: -150px; opacity: 0; }
    to { bottom: 20px; opacity: 1; }
}

.floating-promo-banner h3 {
    margin: 0 0 8px;
    font-size: 1.25rem;
    font-weight: 700;
    font-family: var(--font-titulo, 'Poppins', sans-serif);
    color: #ffd700; /* 🟡 Amarillo dorado */
}

.promo-content {
    flex: 1;
}

.promo-products {
    list-style: none;
    padding: 0;
    margin: 10px 0;
    font-size: 0.9rem;
}

.promo-products li {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.promo-products li:last-child {
    border-bottom: none;
}

.product-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-price {
    font-weight: bold;
    margin-left: 8px;
    min-width: 50px;
    text-align: right;
}

.promo-cta {
    margin-top: 8px;
    font-size: 0.9rem;
    opacity: 0.9;
}

.close-promo {
    position: absolute;
    top: 8px;
    right: 10px;
    background: rgba(0,0,0,0.2);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.promo-timer {
    position: absolute;
    top: 8px;
    left: 10px;
    background: rgba(0,0,0,0.2);
    width: 32px;
    height: 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 480px) {
    .floating-promo-banner {
        width: calc(100% - 32px);
        padding: 14px;
    }

    .promo-products li {
        flex-direction: column;
        align-items: flex-start;
    }

    .product-price {
        margin-left: 0;
        margin-top: 4px;
        text-align: left;
    }

    .close-promo, .promo-timer {
        top: 6px;
        width: 22px;
        height: 22px;
    }
}