/* === 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;
}

main { 
    flex: 1;
}

/* 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;
    font-weight: 700;
    margin-bottom: 24px;
}

main {
    min-height: calc(100vh - 200px);
    padding: 16px;
    background-color: transparent;
}

/* === 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;
}

/* === 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 */
.card-local {
    background: rgba(255, 255, 255, 0.92);
    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);
}

/* IMAGEN PROTAGONISTA */
.card-local img {
    width: 100%;
    height: auto;
    max-height: 260px;
    min-height: 180px;
    object-fit: contain;
    object-position: center;
    display: block;
    background: transparent;
}

.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;
}

/* TÍTULO CENTRADO */
.card-local h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #222;
    margin: 0;
    text-align: center;
}

/* DESCRIPCIÓN JUSTIFICADA */
.card-local p {
    font-size: 0.95rem;
    color: #555;
    flex-grow: 1;
    line-height: 1.5;
    text-align: justify;
}

/* BOTÓN CENTRADO */
.card-local .btn-ver-local {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #ff0000;
    font-weight: 600;
    font-size: 0.95rem;
    margin-top: auto;
    transition: opacity 0.2s;
    justify-content: center;
    width: 100%;
}

.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;
    }

    .contenedor-locales {
        grid-template-columns: 1fr;
        padding: 0 8px;
    }

    .card-local img {
        min-height: 160px;
        max-height: 240px;
    }

    .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;
    }
    
    .card-local img {
        min-height: 150px;
        max-height: 220px;
    }
}

/* === FONDO DE PÁGINA === */
.background-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.background-canvas img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

@media (max-width: 768px) {
    .background-canvas img {
        object-position: top center;
    }
}


@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;
    }
}