

.local-hero {
    position: relative;
    /* La franja llena la pantalla (menos los 78px de la barra fija): la línea queda en el borde inferior */
    min-height: max(360px, calc(100vh - 78px));
    min-height: max(360px, calc(100svh - 78px));
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.local-hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 90px;
    background: linear-gradient(180deg, transparent, var(--paper));
    pointer-events: none;
}

.local-hero-photo {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.06);
    filter: blur(3px);
}

.local-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(20, 14, 8, 0.85) 0%, rgba(20, 14, 8, 0.35) 55%, rgba(20, 14, 8, 0.1) 100%);
}

.local-hero-content {
    position: relative;
    z-index: 1;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 6.25rem 1.5rem 2.25rem;
    width: 100%;
}

/* La foto queda centrada en el espacio entre el botón "Volver" (arriba) y la categoría (abajo) */
.local-hero-content:has(> .galeria) {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    padding-top: 4.75rem;
}
.local-hero-content > .galeria { width: 100%; margin: auto; }
.local-hero-content > .galeria + .local-hero-tags { margin-top: 2.6rem; }

.local-hero-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0 0 0.75rem; }
.local-hero-tags .local-hero-tag { margin-bottom: 0; }
.local-hero-cat { text-decoration: none; transition: background 0.15s ease; }
.local-hero-cat:hover { background: var(--copper-dark); color: var(--paper); }
.local-intro-cat { color: inherit; }

.local-hero-tag {
    display: inline-block;
    background: var(--copper);
    color: var(--paper);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    padding: 0.3em 0.9em;
    border-radius: 999px;
    margin-bottom: 0.75rem;
}

.local-hero-content h1 {
    color: var(--paper);
    margin: 0;
}

.galeria {
    position: relative;
    max-width: 860px;
    margin: 0 auto 2.6rem;
}

.galeria-pista {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
}
.galeria-pista::-webkit-scrollbar { display: none; }
.galeria-pista:focus-visible { outline: 3px solid var(--maize); outline-offset: -3px; }

.galeria-foto {
    flex: 0 0 100%;
    margin: 0;
    height: clamp(280px, 50vh, 480px);
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.galeria-foto img {
    display: block;
    box-sizing: border-box;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    border: 6px solid var(--paper-raised);
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(20, 14, 8, 0.5);
}

.galeria:not(.galeria--varias) .galeria-pista { overflow: visible; }

.galeria--varias {
    border-radius: 16px;
    overflow: hidden;
    background: rgba(20, 14, 8, 0.4);
    box-shadow: 0 12px 32px rgba(20, 14, 8, 0.5);
}
.galeria--varias .galeria-foto { padding: 0.9rem 0.9rem 2.6rem; box-sizing: border-box; }

.galeria-flecha {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(248, 246, 241, 0.92);
    color: var(--ink);
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(20, 14, 8, 0.3);
    transition: background 0.15s ease, color 0.15s ease;
}
.galeria-flecha svg { width: 20px; height: 20px; }
.galeria-flecha--anterior { left: 10px; }
.galeria-flecha--siguiente { right: 10px; }
.galeria-flecha:hover { background: var(--copper); color: var(--paper); }
.galeria-flecha:focus-visible { outline: 3px solid var(--maize); outline-offset: 2px; }

.galeria-puntos {
    position: absolute;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    display: flex;
    gap: 7px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(20, 14, 8, 0.5);
}

.galeria-puntos button {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(248, 246, 241, 0.55);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}
.galeria-puntos button[aria-current="true"] { width: 20px; background: var(--maize); }
.galeria-puntos button:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }

@media (max-width: 600px) {
    .galeria-foto { height: clamp(250px, 40vh, 360px); }
    .galeria-foto img { border-width: 4px; border-radius: 12px; }
    .galeria--varias .galeria-foto { padding: 0.6rem 0.6rem 2.4rem; }
    .galeria-flecha--anterior { left: 6px; }
    .galeria-flecha--siguiente { right: 6px; }
}

@media (prefers-reduced-motion: reduce) {
    .galeria-puntos button { transition: none; }
}

.local-hero-top {
    position: absolute;
    top: 2rem;
    left: 0;
    right: 0;
    z-index: 2;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.local-hero-top--plain {
    position: relative;
    z-index: 2;
    top: auto;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem 1.5rem 0;
}

.local-volver {
    display: inline-block;
    background: rgba(20, 14, 8, 0.55);
    color: var(--paper);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    padding: 0.45em 1em;
    border-radius: 999px;
    backdrop-filter: blur(2px);
}

.local-volver:hover {
    background: rgba(20, 14, 8, 0.75);
    color: var(--paper);
}

.local-volver--plain {
    position: static;
    margin-bottom: 1.4rem;
    background: rgba(255, 255, 255, 0.8);
    color: var(--ink);
    border: 1px solid var(--line);
    backdrop-filter: none;
}
.local-volver--plain:hover {
    background: #fff;
    color: var(--copper-dark);
}
.local-volver--plain::before {
    background-color: var(--copper);
}
.local-volver--plain:hover::before {
    background-color: var(--copper-dark);
}
.page-intro--sin-foto { padding-top: 2rem; padding-bottom: 2.5rem; }
.page-intro--sin-foto::before { display: none; }

.local-detalle {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 40px;
    align-items: start;
}

@media (max-width: 860px) {
    .local-detalle {
        grid-template-columns: 1fr;
    }
}

.local-descripcion {
    font-size: 1.05rem;
    color: var(--ink-soft);
    max-width: 68ch;
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
}

.precios-head {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.precios-head h2 {
    margin-bottom: 0.2em;
}

.precios-head p {
    color: var(--ink-soft);
    font-size: 0.9rem;
    margin: 0;
}

.galeria-productos {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 16px;
}

@media (max-width: 600px) {
    .galeria-productos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .producto-cuerpo { padding: 10px 12px 12px; }
    .producto-nombre { font-size: 0.95rem; }
    .producto-resumen { font-size: 0.82rem; }
}

.producto-tarjeta {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: 0;
    text-align: left;
    font: inherit;
    color: inherit;
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.producto-tarjeta:hover,
.producto-tarjeta:focus-visible {
    box-shadow: 0 6px 18px rgba(40, 30, 20, 0.12);
    transform: translateY(-2px);
}

.producto-foto {
    display: block;
    aspect-ratio: 4 / 3;
    background: var(--paper);
    overflow: hidden;
}

.tabla-productos {
    width: 100%;
    border-collapse: collapse;
    border-radius: 16px;
    overflow: hidden;
}

.tabla-productos--aparte { margin-top: 1.5rem; }

.tabla-productos th,
.tabla-productos td {
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
}

.tabla-productos th {
    background: var(--copper);
    color: #fff;
    font-family: var(--font-body);
    font-weight: 600;
}

.tabla-productos tbody tr:nth-child(even) { background: var(--paper-raised); }

.tabla-productos-nota {
    display: block;
    margin-top: 2px;
    color: var(--ink-soft);
    font-size: 0.85rem;
    font-weight: 400;
}

.producto-foto--vacia {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--copper);
    background: linear-gradient(135deg, var(--paper), var(--line));
}

.producto-foto--vacia svg { width: 44px; height: 44px; opacity: 0.55; }

.producto-foto img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.producto-cuerpo {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px 14px;
    flex: 1;
}

.producto-nombre { font-size: 1rem; line-height: 1.25; }

.producto-resumen {
    color: var(--ink-soft);
    font-size: 0.88rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.producto-precio {
    margin-top: auto;
    padding-top: 6px;
    font-weight: 700;
    color: var(--copper);
}

.producto-precio small { font-weight: 400; color: var(--ink-soft); }

.producto-dialogo {
    width: min(480px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    padding: 0;
    border: 0;
    border-radius: 18px;
    overflow: auto;
    background: var(--paper);
    color: var(--ink);
}

.producto-abierto { overflow: hidden; }
.producto-dialogo { overscroll-behavior: contain; }

.producto-dialogo::backdrop { background: rgba(26, 20, 14, 0.6); }

.producto-dialogo-cerrar {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
    color: var(--ink);
    font-size: 1rem;
    cursor: pointer;
}

.producto-dialogo-foto {
    display: block;
    width: 100%;
    max-height: 320px;
    object-fit: cover;
}

.producto-dialogo-foto[hidden] { display: none; }

.producto-dialogo-cuerpo { padding: 20px 22px 24px; }
.producto-dialogo-cuerpo h3 { margin: 0 0 4px; }
.producto-dialogo-precio { margin: 0 0 12px; font-weight: 700; color: var(--copper); }
.producto-dialogo-texto { margin: 0; line-height: 1.55; white-space: pre-line; }

.local-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.local-sidebar-card {
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 20px;
}

.local-sidebar-card h3 {
    margin-top: 0;
    margin-bottom: 0.75em;
    font-size: 1.1rem;
    font-weight: 700;
}

.local-sidebar-card .ficha-meta,
.local-sidebar-card .ficha-horario {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    margin: 0 0 0.7rem;
    font-size: 0.92rem;
    text-align: left;
    font-weight: 400;
}

.local-sidebar-card .ficha-ubicacion { font-weight: 600; }

.local-sidebar-card .pin-icon,
.local-sidebar-card .horario-icon {
    width: 21px;
    height: 21px;
    margin: 0.05em 0 0;
    flex-shrink: 0;
    color: var(--copper);
}

.local-contacto {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.local-contacto .btn {
    width: 100%;
    text-align: center;
}

.local-contact-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    padding: 0.65em 1em;
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
}

.local-contact-pill svg {
    width: 16px;
    height: 16px;
    color: var(--copper);
}

.local-contact-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45em;
    color: var(--copper-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.3em 0;
}

.local-contact-line svg {
    width: 15px;
    height: 15px;
}

.local-social {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem 0.9rem;
    margin-top: 0.25rem;
}

.local-social a {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--copper-dark);
    text-decoration: none;
}

.local-social a:hover {
    text-decoration: underline;
}
.ficha-etiqueta {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.local-volver {
    display: inline-flex;
    align-items: center;
    gap: 0.55em;
    padding-left: 0.4em;
}
.local-volver::before {
    content: "";
    width: 1.75em;
    height: 1.75em;
    border-radius: 50%;
    background: rgba(248, 246, 241, 0.2) var(--flecha-blanca) center / 58% no-repeat;
    transform: scaleX(-1);
    transition: transform 0.2s ease, background-color 0.2s ease;
}
.local-volver:hover::before {
    background-color: var(--copper);
    transform: scaleX(-1) translateX(3px);
}

.local-ver-mapa { display: flex; align-items: center; justify-content: center; gap: 0.55em; min-height: 52px; margin-top: 1rem; font-size: 1.05rem; font-weight: 700; border: 3px solid #fff; box-shadow: 0 6px 16px rgba(145, 56, 40, 0.26); }
.local-ver-mapa svg { width: 22px; height: 22px; flex: none; }

.local-dato {
    display: flex;
    align-items: flex-start;
    gap: 0.55em;
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}
.local-dato svg { flex: none; width: 16px; height: 16px; margin-top: 0.2em; color: var(--copper); }

.local-ver-mapa,
.local-compartir { width: 100%; text-align: center; }
.local-compartir { display: flex; align-items: center; justify-content: center; gap: 0.5em; margin-top: 0.6rem; }
.local-compartir svg { width: 17px; height: 17px; }

.megusta {
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-width: 38px;
    height: 38px;
    padding: 0 0.75rem;
    color: var(--copper-dark);
    background: rgba(255, 252, 247, 0.94);
    border: 0;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(20, 14, 8, 0.25);
    cursor: pointer;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    transition: background 0.2s ease, color 0.2s ease;
}
.megusta:hover { background: #fff; }
.megusta svg { width: 20px; height: 20px; flex: none; transition: transform 0.2s ease; }
.megusta.is-activo { color: #d93a55; }
.megusta.is-activo svg { fill: currentColor; }
.megusta.is-latido svg { animation: megusta-latido 0.45s ease; }
.local-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.page-intro--sin-foto .megusta { position: absolute; top: 1.6rem; right: 1.5rem; }
.megusta--linea { color: var(--copper-dark); background: rgba(0, 0, 0, 0.06); }
.megusta--linea:hover { background: rgba(0, 0, 0, 0.1); }
.megusta--linea.is-activo { color: #d93a55; }
@keyframes megusta-latido { 0% { transform: scale(1); } 40% { transform: scale(1.45); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .megusta.is-latido svg { animation: none; } }

.local-volver--plain::before { background-color: var(--copper); }
.local-volver--plain:hover::before { background-color: var(--copper-dark); }

/* Foto de portada ampliable */
.galeria { position: relative; }
.galeria-foto img { cursor: zoom-in; }
.galeria-ampliar {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    color: #fffffe;
    background: rgba(20, 14, 8, 0.55);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}
.galeria-ampliar svg { width: 20px; height: 20px; }
.galeria-ampliar:hover { background: rgba(20, 14, 8, 0.8); }

.visor-zoom {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: rgba(20, 14, 8, 0.94);
    touch-action: none;
    overscroll-behavior: none;
    user-select: none;
    -webkit-user-select: none;
}
.visor-zoom[hidden] { display: none; }
.visor-zoom img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transform-origin: center center;
    will-change: transform;
    cursor: zoom-in;
    -webkit-user-drag: none;
}
.visor-zoom--ampliada img { cursor: grab; }
.visor-zoom-abierto, .visor-zoom-abierto body { overflow: hidden; }
.visor-zoom-btn {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    color: var(--ink);
    background: #fffffe;
    border: 0;
    border-radius: 50%;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
.visor-zoom-btn svg { width: 22px; height: 22px; }
.visor-zoom-cerrar { position: absolute; top: max(0.8rem, env(safe-area-inset-top)); right: 0.8rem; }
.visor-zoom-nav { position: absolute; top: 50%; transform: translateY(-50%); }
.visor-zoom-ant { left: 0.8rem; }
.visor-zoom-sig { right: 0.8rem; }
.visor-zoom-nav[hidden] { display: none; }
.visor-zoom-barra {
    position: absolute;
    bottom: max(1rem, env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.6rem;
}
.visor-zoom-contador {
    position: absolute;
    top: max(1.1rem, env(safe-area-inset-top));
    left: 1rem;
    color: #fffffe;
    font-size: 0.9rem;
    font-weight: 600;
}

.local-oculto { letter-spacing: 0.12em; color: var(--ink-soft); }

/* Teléfono y WhatsApp: fondo de la tarjeta, con borde para que se note que son tocables */
.local-red {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0.6rem 0.55rem 0.8rem;
    border: 1.5px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(60, 40, 20, 0.06);
}
.local-red-icono { flex: none; display: grid; place-items: center; color: var(--copper); }
.local-red-icono svg { width: 20px; height: 20px; }
.local-red-texto { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.local-red-texto strong { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-soft); }
.local-red-texto small { font-size: 1rem; font-weight: 600; color: inherit; user-select: text; }
.local-red-texto small.local-oculto { font-weight: 400; color: var(--ink-soft); }
.local-red-acciones { flex: none; display: flex; align-items: center; }

.local-ojo,
.local-copiar {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 0.85rem;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--copper-dark);
    background: transparent;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.local-ojo { width: 44px; min-height: 44px; padding: 0; }
.local-ojo svg { width: 22px; height: 22px; }
.local-ojo:hover,
.local-copiar:hover { border-color: var(--copper); background: rgba(145, 56, 40, 0.06); }
.local-ojo:disabled { opacity: 0.6; cursor: progress; }

/* Redes: misma tarjeta que el teléfono; la zona del enlace abre la red */
.local-red-enlace {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: inherit;
    text-decoration: none;
}
.local-red-enlace strong:only-child {
    font-size: 1rem;
    letter-spacing: 0;
    text-transform: none;
    color: inherit;
}

.local-contacto-aviso { margin: 0; font-size: 0.88rem; color: var(--copper); }
.local-contacto-aviso[hidden] { display: none; }

/* Escritorio: el corazón baja a la altura del nombre, alineado con el borde derecho del contenido (panel de información) */
@media (min-width: 900px) {
    .local-hero-top:not(.local-hero-top--plain) {
        top: 0;
        bottom: 0;
        max-width: none;
        margin: 0;
        padding: 2rem 1.5rem 0 max(1.5rem, calc((100% - var(--max-width)) / 2 + 1.5rem));
        align-items: flex-start;
        pointer-events: none;
    }
    .local-hero-top:not(.local-hero-top--plain) .local-volver { pointer-events: auto; }
    .local-hero-top:not(.local-hero-top--plain) .megusta {
        position: absolute;
        right: max(1.5rem, calc((100% - var(--max-width)) / 2 + 1.5rem));
        bottom: 2.6rem;
        pointer-events: auto;
    }
}
