/* ============================================================
   HOSTIFY PALERMO — Dettaglio camera
   Galleria + lightbox, contenuto editoriale, widget prenotazione.
   Eredita i token; riusa alcune classi di home.css (dove-map, ecc.).
   ============================================================ */

/* ---------- Testata ----------------------------------------- */
.detail-head { padding-top: clamp(6.5rem, 14vw, 9rem); }
.breadcrumb { display: flex; align-items: center; gap: 0.5em; font-size: var(--t-small); color: color-mix(in srgb, var(--ombra) 58%, transparent); margin-bottom: var(--sp-5); flex-wrap: wrap; }
.breadcrumb a { color: var(--maiolica); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb svg { width: 12px; height: 12px; opacity: 0.6; }

.room-head { display: grid; gap: var(--sp-3); margin-bottom: var(--sp-6); }
.room-head h1 { font-size: clamp(2.4rem, 1.6rem + 3.5vw, 3.6rem); line-height: var(--lh-tight); letter-spacing: var(--track-display); }

/* Base di .room-expo e .room-meta (camera.html non carica camere.css) */
.room-expo {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-size: var(--t-eyebrow); font-weight: 600; letter-spacing: var(--track-eyebrow);
  text-transform: uppercase; color: var(--maiolica);
}
.room-expo svg { width: 14px; height: 14px; color: var(--zagara); flex: none; }
.room-meta { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); font-size: var(--t-small); color: color-mix(in srgb, var(--ombra) 66%, transparent); }
.room-meta span { display: inline-flex; align-items: center; gap: 0.45em; }
.room-meta svg { width: 15px; height: 15px; color: var(--alloro); flex: none; }
.room-meta .num { color: var(--ombra); }
.room-head .room-meta { gap: var(--sp-2) var(--sp-5); font-size: var(--t-body); }
.room-head .room-meta svg { width: 17px; height: 17px; }

/* ---------- Galleria mosaico -------------------------------- */
.gallery {
  position: relative;
  display: grid; gap: var(--sp-2);
  grid-template-columns: 1fr;
  border-radius: var(--r-lg); overflow: hidden;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.gallery-item { display: block; position: relative; overflow: hidden; background: var(--calce); cursor: zoom-in; }
/* scale(1.04) a riposo: evita la sottile riga scura ai bordi (arrotondamento di object-fit) */
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 1.1s var(--ease), opacity var(--dur); }
.gallery-item:hover img { transform: scale(1.09); }
.gallery-item:focus-visible { outline: 3px solid var(--zagara); outline-offset: -3px; }
/* mobile: mostra solo la prima, le altre nel lightbox */
.gallery-item { aspect-ratio: 4 / 3; }
.gallery-item:not(:first-child) { display: none; }

.gallery-all {
  position: absolute; right: var(--sp-4); bottom: var(--sp-4); z-index: 2;
  display: inline-flex; align-items: center; gap: 0.5em;
  background: color-mix(in srgb, var(--gesso) 92%, transparent);
  backdrop-filter: blur(8px);
  border: 1px solid var(--linea); border-radius: var(--r-pill);
  padding: 0.6em 1.1em; font-size: var(--t-small); font-weight: 600; color: var(--ombra);
  box-shadow: var(--shadow-1);
}
.gallery-all svg { width: 16px; height: 16px; }

@media (min-width: 760px) {
  .gallery {
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    height: clamp(360px, 46vw, 560px);
  }
  .gallery-item { aspect-ratio: auto; height: 100%; }
  .gallery-item:not(:first-child) { display: block; }
  .gallery-item:first-child { grid-row: 1 / span 2; }
  /* mosaico = 1 grande + 4 piccole; la 6ª resta solo nel lightbox */
  .gallery-item:nth-child(n+6) { display: none; }
}

/* ---------- Layout contenuto + aside ------------------------ */
.detail-grid { display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
@media (min-width: 980px) { .detail-grid { grid-template-columns: 1.6fr 1fr; } }

.detail-section { padding-block: clamp(1.75rem, 4vw, 2.5rem); border-top: 1px solid var(--linea); }
.detail-section:first-child { border-top: 0; padding-top: 0; }
.detail-section h2 { font-size: var(--t-camera); margin-bottom: var(--sp-4); }
.detail-section p { color: color-mix(in srgb, var(--ombra) 80%, transparent); }
.detail-section p + p { margin-top: var(--sp-3); }

/* Servizi raggruppati */
.amenity-groups { display: grid; gap: var(--sp-5); }
@media (min-width: 560px) { .amenity-groups { grid-template-columns: 1fr 1fr; } }
.amenity-group h3 { font-family: var(--font-body); font-size: var(--t-eyebrow); text-transform: uppercase; letter-spacing: var(--track-eyebrow); color: var(--maiolica); margin-bottom: var(--sp-3); }
.amenity-group ul { display: grid; gap: var(--sp-2); }
.amenity-group li { display: flex; align-items: center; gap: 0.65em; font-size: 0.95rem; color: color-mix(in srgb, var(--ombra) 82%, transparent); }
.amenity-group li svg { width: 17px; height: 17px; color: var(--alloro); flex: none; }

/* Buono a sapersi */
.know-list { display: grid; gap: var(--sp-4); }
@media (min-width: 560px) { .know-list { grid-template-columns: 1fr 1fr; } }
.know-item { display: flex; gap: var(--sp-3); }
.know-item svg { width: 20px; height: 20px; color: var(--maiolica); flex: none; margin-top: 2px; }
.know-item .k-label { font-size: var(--t-eyebrow); text-transform: uppercase; letter-spacing: var(--track-eyebrow); color: var(--maiolica); }
.know-item .k-value { font-weight: 500; }

/* Nota dell'host */
.host-note { background: var(--gesso-2); border-radius: var(--r-lg); padding: clamp(1.5rem, 4vw, 2.25rem); }
.host-note .glifo { width: 26px; height: 26px; color: var(--zagara); margin-bottom: var(--sp-3); }
.host-note blockquote { font-family: var(--font-display); font-size: 1.3rem; line-height: 1.4; color: var(--ombra); }
.host-note .host-sign { margin-top: var(--sp-3); font-size: var(--t-small); color: color-mix(in srgb, var(--ombra) 62%, transparent); }

/* ---------- Widget prenotazione ----------------------------- */
.booking {
  background: var(--gesso); border: 1px solid var(--linea);
  border-radius: var(--r-lg); box-shadow: var(--shadow-2);
  padding: clamp(1.25rem, 3vw, 1.75rem);
}
@media (min-width: 980px) { .booking { position: sticky; top: 5.5rem; } }

.booking-price { display: flex; align-items: baseline; gap: 0.4em; margin-bottom: var(--sp-4); padding-bottom: var(--sp-4); border-bottom: 1px solid var(--linea); }
.booking-price .num { font-size: 2rem; }
.booking-price .notte { font-size: var(--t-small); color: color-mix(in srgb, var(--ombra) 60%, transparent); }
.booking-price .badge-ok { margin-left: auto; display: inline-flex; align-items: center; gap: 0.4em; font-size: var(--t-eyebrow); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ombra); }
.booking-price .badge-ok .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--alloro); }

.booking-dates { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--linea-forte); border-radius: var(--r-md); overflow: hidden; margin-bottom: var(--sp-3); }
.booking-dates .qs-field { padding: var(--sp-3); }
.booking-dates .qs-field + .qs-field { border-left: 1px solid var(--linea); }
.booking .qs-field { display: flex; flex-direction: column; gap: 0.25em; }
.booking .qs-field label { font-size: var(--t-eyebrow); text-transform: uppercase; letter-spacing: var(--track-eyebrow); font-weight: 600; color: var(--maiolica); }
.booking .qs-field input, .booking .qs-field select { border: none; background: none; font-size: 1rem; font-weight: 500; color: var(--ombra); width: 100%; }
.booking-guests { border: 1px solid var(--linea-forte); border-radius: var(--r-md); padding: var(--sp-3); margin-bottom: var(--sp-4); }

/* Riepilogo prezzo (compare con le date) */
.booking-break { display: grid; gap: var(--sp-2); margin-bottom: var(--sp-4); font-size: 0.95rem; }
.booking-break .row { display: flex; justify-content: space-between; gap: var(--sp-3); color: color-mix(in srgb, var(--ombra) 78%, transparent); }
.booking-break .row .num { color: var(--ombra); }
.booking-break .row.muted { color: color-mix(in srgb, var(--ombra) 55%, transparent); font-size: var(--t-small); }
.booking-break .row.total { padding-top: var(--sp-3); border-top: 1px solid var(--linea); font-family: var(--font-display); font-size: 1.15rem; color: var(--ombra); }
.booking-break .row.total .num { font-size: 1.35rem; }
.booking-hint { font-size: var(--t-small); color: color-mix(in srgb, var(--ombra) 60%, transparent); margin-bottom: var(--sp-4); text-align: center; }
.booking .btn--cta { width: 100%; }
.booking-secure { margin-top: var(--sp-3); text-align: center; font-size: var(--t-small); color: color-mix(in srgb, var(--ombra) 60%, transparent); display: flex; align-items: center; justify-content: center; gap: 0.5em; }
.booking-secure svg { width: 14px; height: 14px; color: var(--alloro); }

/* errore date */
.booking-error { display: none; color: var(--corallo); font-size: var(--t-small); margin-bottom: var(--sp-3); }
.booking.has-error .booking-error { display: block; }

/* ---------- Mappa posizione (riusa .dove-map da home.css) --- */
.detail-map { margin-top: var(--sp-4); }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: color-mix(in srgb, var(--ombra) 94%, black);
  display: none; place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
}
.lightbox.open { display: grid; }
.lightbox-img { max-width: 100%; max-height: 82vh; border-radius: var(--r-md); box-shadow: var(--shadow-3); object-fit: contain; }
.lightbox-close, .lightbox-nav button {
  position: absolute; background: rgba(244,242,234,0.12); color: var(--gesso);
  border-radius: 50%; width: 48px; height: 48px; display: grid; place-items: center;
  backdrop-filter: blur(6px); transition: background var(--dur-fast);
}
.lightbox-close:hover, .lightbox-nav button:hover { background: rgba(244,242,234,0.24); }
.lightbox-close { top: clamp(1rem, 3vw, 2rem); right: clamp(1rem, 3vw, 2rem); }
.lightbox-nav button { top: 50%; transform: translateY(-50%); }
.lightbox-nav .prev { left: clamp(0.5rem, 2vw, 1.5rem); }
.lightbox-nav .next { right: clamp(0.5rem, 2vw, 1.5rem); }
.lightbox-counter {
  position: absolute; bottom: clamp(1rem, 3vw, 2rem); left: 50%; transform: translateX(-50%);
  color: var(--su-scuro); font-family: var(--font-display); font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em; font-size: 1rem;
}
.lightbox svg { width: 20px; height: 20px; }

@media (prefers-reduced-motion: reduce) {
  .gallery-item img { transition: none; }
}

/* Tassa di soggiorno: importo separato, da saldare in struttura (non fa parte del totale) */
.tax-note { margin-top: var(--sp-2); padding: var(--sp-3); border-radius: var(--r-md, 8px); background: color-mix(in srgb, var(--maiolica) 16%, transparent); border: 1px solid color-mix(in srgb, var(--maiolica) 45%, transparent); font-size: var(--t-small); line-height: 1.5; color: var(--ombra); }
.tax-note .tn-line { display: flex; justify-content: space-between; gap: var(--sp-3); font-weight: 600; }
.tax-note p { margin: var(--sp-1, 4px) 0 0; }
