/*
 * Tema "pizboe" — Hotel PizBoè (Mazzin di Fassa).
 * Identità: nero #0a0a0a, rosso #e50404, Montserrat. Tono "alpine hotel".
 * Classi con prefisso pz- (tema cliente), caricato dopo il CSS del prodotto.
 * Contrasti verificati (WCAG 2.2 AA): bianco su rosso 4.83:1, nero su bianco 19.8:1,
 * rosso chiaro #ff4d4d su nero 6.05:1 (il rosso pieno su nero non basta: 4.1:1).
 */

@font-face {
    font-family: 'Montserrat';
    src: url("fonts/Montserrat-Variable-TuwR0qG.woff2") format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --pz-black: #0a0a0a;
    --pz-white: #ffffff;
    --pz-red: #e50404;
    --pz-red-dark: #c40303;
    --pz-red-on-dark: #ff4d4d;
    --pz-stone: #f4f2ef;
    --pz-grey: #595959;
    --pz-line: #e3e0db;
    --pz-font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --pz-radius: 4px;
    --pz-space: 1rem;
    --pz-container: 1200px;
    --pz-header-h: 76px;
    --pz-focus: 3px solid var(--pz-red);
}

/* === Base === */
.pz-body {
    margin: 0;
    font-family: var(--pz-font);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--pz-black);
    background: var(--pz-white);
    -webkit-font-smoothing: antialiased;
}

.pz-body h1,
.pz-body h2,
.pz-body h3 {
    font-family: var(--pz-font);
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.pz-body a {
    color: inherit;
}

.pz-body :focus-visible {
    outline: var(--pz-focus);
    outline-offset: 3px;
}

.pz-body img {
    max-width: 100%;
    height: auto;
}

.pz-container {
    width: 100%;
    max-width: var(--pz-container);
    margin-inline: auto;
    padding-inline: 1.25rem;
    box-sizing: border-box;
}

.pz-visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.pz-skip-link {
    position: absolute;
    left: 1rem;
    top: -100px;
    z-index: 1000;
    padding: 0.75rem 1rem;
    background: var(--pz-black);
    color: var(--pz-white);
    text-decoration: none;
}

.pz-skip-link:focus {
    top: 1rem;
}

/* === Tipografia === */
.pz-h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.pz-h2 {
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    font-weight: 700;
    margin: 0 0 1rem;
}

.pz-h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 2rem 0 1rem;
}

.pz-lead {
    font-size: 1.125rem;
    color: var(--pz-grey);
    max-width: 60ch;
}

.pz-eyebrow {
    margin: 0 0 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.pz-link {
    font-weight: 600;
    color: var(--pz-red);
    text-underline-offset: 4px;
}

/* === Pulsanti (min 44px, WCAG 2.5.8) === */
.pz-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.7rem 1.5rem;
    border: 2px solid transparent;
    border-radius: var(--pz-radius);
    font: 600 0.95rem/1 var(--pz-font);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.pz-body .pz-btn--primary {
    background: var(--pz-red);
    color: var(--pz-white);
}

.pz-body .pz-btn--primary:hover {
    background: var(--pz-red-dark);
}

.pz-body .pz-btn--dark {
    background: var(--pz-black);
    color: var(--pz-white);
}

.pz-body .pz-btn--dark:hover {
    background: #2a2a2a;
}

.pz-btn--block {
    width: 100%;
}

/* === Header === */
.pz-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--pz-white);
    box-shadow: 0 1px 0 var(--pz-line);
}

.pz-topbar {
    background: var(--pz-black);
    color: var(--pz-white);
    font-size: 0.85rem;
}

.pz-topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 40px;
}

.pz-topbar__contacts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pz-topbar a {
    display: inline-block;
    padding-block: 0.5rem;
    color: var(--pz-white);
    text-decoration: none;
}

.pz-topbar a:hover {
    text-decoration: underline;
}

.pz-navbar__inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-height: var(--pz-header-h);
}

.pz-brand {
    flex-shrink: 0;
    display: inline-flex;
}

.pz-brand .pz-brand__logo {
    display: block;
    width: auto;
    height: 52px;
}

.pz-nav {
    margin-left: auto;
}

.pz-nav__list {
    display: flex;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pz-nav__list a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pz-nav__list a:hover,
.pz-nav__list a[aria-current='page'] {
    color: var(--pz-red);
}

.pz-nav__list a[aria-current='page'] {
    box-shadow: inset 0 -2px 0 var(--pz-red);
}

.pz-navbar__toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    margin-left: auto;
    padding: 10px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.pz-navbar__toggle span {
    display: block;
    height: 2px;
    background: var(--pz-black);
}

/* Drawer mobile (controller gr-mobile-menu: classe is-open) */
.pz-mobile-menu {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 200;
    width: min(320px, 85vw);
    padding: 1.5rem;
    background: var(--pz-black);
    color: var(--pz-white);
    transform: translateX(100%);
    transition: transform 0.2s ease;
    visibility: hidden;
    overflow-y: auto;
}

.pz-mobile-menu.is-open {
    transform: none;
    visibility: visible;
}

.pz-mobile-menu__list {
    margin: 2rem 0;
    padding: 0;
    list-style: none;
}

.pz-mobile-menu__list a,
.pz-mobile-menu__phone {
    display: flex;
    align-items: center;
    min-height: 48px;
    color: var(--pz-white);
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    border-bottom: 1px solid #2a2a2a;
}

.pz-mobile-menu__list a[aria-current='page'] {
    color: var(--pz-red-on-dark);
}

.pz-mobile-backdrop {
    position: fixed;
    inset: 0;
    z-index: 150;
    background: rgba(10, 10, 10, 0.6);
}

.pz-mobile-backdrop.is-open {
    display: block;
}

/* === Hero === */
.pz-hero {
    position: relative;
    display: grid;
    min-height: min(78vh, 720px);
    color: var(--pz-white);
    background: var(--pz-black);
    isolation: isolate;
}

.pz-hero__image {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Velo per garantire il contrasto del testo sulla foto */
.pz-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.2) 0%, rgba(10, 10, 10, 0.75) 100%);
}

.pz-hero__content {
    align-self: end;
    padding-block: 4rem 7rem;
}

.pz-hero__title {
    max-width: 18ch;
    margin: 0 0 1rem;
    font-size: clamp(2.4rem, 6vw, 4.5rem);
    font-weight: 800;
    color: var(--pz-white);
}

.pz-hero__lead {
    max-width: 50ch;
    margin: 0;
    font-size: 1.2rem;
}

/* === Barra di prenotazione ===
   Contenitore .pz-booking del tema; il form è il componente BookingBar di gr-hospitality
   (classi gr-booking-bar*, stilate qui). */
.pz-booking {
    background: var(--pz-stone);
    padding-block: 1.25rem;
    scroll-margin-top: calc(var(--pz-header-h) + 50px);
}

.pz-booking .gr-booking-bar {
    display: block;
}

.pz-booking .gr-booking-bar__title {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.pz-booking .gr-booking-bar__fields {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.75rem 1rem;
}

.pz-booking .gr-booking-bar__field {
    display: flex;
    flex: 1 1 180px;
    flex-direction: column;
    gap: 0.3rem;
}

.pz-booking .gr-booking-bar__field:has(select) {
    flex: 0 1 110px;
}

.pz-booking .gr-booking-bar__label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.pz-booking .gr-booking-bar__input,
.pz-booking .gr-booking-bar__select {
    min-height: 44px;
    padding: 0.5rem 0.75rem;
    border: 1px solid #8a8a8a;
    border-radius: var(--pz-radius);
    background: var(--pz-white);
    font: 500 1rem var(--pz-font);
    color: var(--pz-black);
    box-sizing: border-box;
}

.pz-booking .gr-booking-bar__help {
    font-size: 0.8rem;
    color: var(--pz-grey);
}

.pz-booking .gr-booking-bar__error {
    margin: 0 0 0.75rem;
    padding: 0.5rem 0.75rem;
    border-left: 4px solid var(--pz-red);
    background: var(--pz-white);
    font-weight: 600;
}

.pz-booking .gr-booking-bar__actions {
    display: flex;
    flex: 1 1 220px;
    flex-direction: column;
    gap: 0.3rem;
    align-self: flex-end;
}

.pz-booking .gr-booking-bar__submit {
    min-height: 44px;
    padding: 0.7rem 1.5rem;
    border: 2px solid var(--pz-red);
    border-radius: var(--pz-radius);
    background: var(--pz-red);
    color: var(--pz-white);
    font: 600 0.95rem/1 var(--pz-font);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
}

.pz-booking .gr-booking-bar__submit:hover {
    background: var(--pz-red-dark);
    border-color: var(--pz-red-dark);
}

.pz-booking .gr-booking-bar__note {
    font-size: 0.85rem;
    color: var(--pz-grey);
}

/* Variante sopra l'hero: pannello che si sovrappone alla foto */
.pz-booking--hero {
    position: relative;
    z-index: 2;
    margin-top: -3.5rem;
    background: transparent;
    padding-block: 0;
}

.pz-booking--hero .gr-booking-bar {
    padding: 1.5rem;
    background: var(--pz-white);
    border-radius: var(--pz-radius);
    box-shadow: 0 12px 40px rgba(10, 10, 10, 0.18);
}

/* Variante laterale nella scheda camera */
.pz-booking--aside {
    position: sticky;
    top: calc(var(--pz-header-h) + 56px);
    padding: 1.5rem;
    border-radius: var(--pz-radius);
}

.pz-booking--aside .pz-container {
    padding: 0;
}

.pz-booking--aside .gr-booking-bar__field,
.pz-booking--aside .gr-booking-bar__field:has(select),
.pz-booking--aside .gr-booking-bar__actions {
    flex: 1 1 100%;
}

/* === Sezioni === */
.pz-section {
    padding-block: clamp(3rem, 7vw, 6rem);
}

.pz-section--dark {
    background: var(--pz-black);
    color: var(--pz-white);
}

.pz-section--dark .pz-link {
    color: var(--pz-red-on-dark);
}

.pz-page-header {
    padding-block: 3rem 1.5rem;
    border-bottom: 1px solid var(--pz-line);
}

.pz-breadcrumb {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
}

.pz-breadcrumb a {
    color: var(--pz-grey);
}

.pz-split__inner {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

.pz-split__image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--pz-radius);
}

.pz-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.pz-card {
    display: flex;
    flex-direction: column;
    background: #161616;
    border-radius: var(--pz-radius);
    overflow: hidden;
}

.pz-card__image {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

.pz-card__body {
    padding: 1.5rem;
}

.pz-card__title {
    margin: 0 0 0.5rem;
    font-size: 1.35rem;
    color: var(--pz-white);
}

/* === Camere === */
.pz-room-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.pz-room-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--pz-line);
    border-radius: var(--pz-radius);
    overflow: hidden;
    transition: box-shadow 0.15s ease;
}

.pz-room-card:hover {
    box-shadow: 0 10px 30px rgba(10, 10, 10, 0.12);
}

.pz-room-card__image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.pz-room-card__body {
    padding: 1.25rem 1.5rem 1.5rem;
}

.pz-room-card__title {
    margin: 0 0 0.25rem;
    font-size: 1.25rem;
}

.pz-room-card__title a {
    text-decoration: none;
}

/* Tutta la card e' cliccabile tramite il link del titolo */
.pz-room-card__title a::after {
    content: '';
    position: absolute;
    inset: 0;
}

.pz-room-card__meta {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--pz-red);
}

.pz-room-card__more {
    font-weight: 600;
    color: var(--pz-red);
}

.pz-gallery__list {
    display: flex;
    gap: 0.5rem;
    margin: 0;
    padding: 0.5rem;
    list-style: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
}

.pz-gallery__item {
    flex: 0 0 min(80vw, 720px);
    scroll-snap-align: start;
}

.pz-gallery__item img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.pz-room {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 3rem;
    align-items: start;
}

.pz-prose {
    max-width: 70ch;
}

.pz-specs {
    margin: 0;
    border-top: 1px solid var(--pz-line);
}

.pz-specs__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--pz-line);
}

.pz-specs dt {
    font-weight: 600;
}

.pz-specs dd {
    margin: 0;
}

/* === Messaggi === */
.pz-flash {
    margin: 1rem 0 0;
    padding: 0.75rem 1rem;
    border-left: 4px solid var(--pz-black);
    background: var(--pz-stone);
}

.pz-flash--error {
    border-color: var(--pz-red);
}

/* === Footer === */
.pz-footer {
    padding-top: 4rem;
    background: var(--pz-black);
    color: #d9d9d9;
    font-size: 0.95rem;
}

.pz-footer a {
    color: var(--pz-white);
}

.pz-footer__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

.pz-footer .pz-footer__logo {
    display: block;
    width: 154px;
    margin-bottom: 1.25rem;
}

.pz-footer__address {
    font-style: normal;
}

.pz-footer__title {
    margin: 0 0 1rem;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--pz-white);
}

.pz-footer__links,
.pz-footer__social {
    margin: 0;
    padding: 0;
    list-style: none;
}

.pz-footer__links a,
.pz-footer__social a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    text-decoration: none;
}

.pz-footer__links a:hover,
.pz-footer__social a:hover {
    text-decoration: underline;
}

.pz-footer__social {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.pz-footer__legal,
.pz-footer__sister {
    margin-top: 1rem;
    font-size: 0.85rem;
}

.pz-footer__bottom {
    margin: 3rem 0 0;
    padding: 1.25rem;
    border-top: 1px solid #2a2a2a;
    text-align: center;
    font-size: 0.85rem;
}

/* === Barra fissa mobile === */
.pz-sticky-book {
    display: none;
}

/* === Responsive === */
@media (max-width: 960px) {
    .pz-nav,
    .pz-navbar__cta,
    .pz-topbar__email {
        display: none;
    }

    .pz-navbar__toggle {
        display: flex;
    }

    .pz-brand .pz-brand__logo {
        height: 40px;
    }

    .pz-hero {
        min-height: 70vh;
    }

    .pz-split__inner,
    .pz-room {
        grid-template-columns: 1fr;
    }

    .pz-booking--aside {
        position: static;
    }

    .pz-footer__grid {
        grid-template-columns: 1fr;
    }

    .pz-sticky-book {
        position: fixed;
        inset: auto 0 0 0;
        z-index: 90;
        display: block;
        padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom));
        background: var(--pz-white);
        box-shadow: 0 -4px 16px rgba(10, 10, 10, 0.12);
    }

    /* Spazio per non coprire il footer con la barra fissa */
    .pz-body {
        padding-bottom: 72px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pz-body *,
    .pz-body *::before,
    .pz-body *::after {
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
