/* HENNIO-GALLERIA-1 — una foto con una persona non si taglia mai.
   Un solo punto per tutta la regola: la classe .hnz-worn (e il selettore
   sulle immagini indossate /hennio-foto/…/worn-…) mostrano sempre la foto
   intera, con la testa in alto e il fondo crema ai lati. */

/* ── La regola comune: foto indossate, in ogni scheda di hennio ─────────── */
body.hennio-body .hnz-worn,
body.hennio-body .hnz-worn img,
body.hennio-body img[src*="/hennio-foto/"][src*="/worn-"],
body.hennio-body .ff-hf-wrap img,
body.hennio-body .hh-hero-img {
  object-fit: contain !important;
  object-position: center top !important;
  background-color: #F3E6E0;
}

/* ── Galleria della pagina del capo ─────────────────────────────────────── */
body.hennio-body .ad-gallery-wrap {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
body.hennio-body .ad-photo {
  background: #F3E6E0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
body.hennio-body .ad-photo .ff-hf-wrap {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
}
body.hennio-body .ad-photo img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 80vh;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  object-position: center top;
  margin: 0 auto;
  background: #F3E6E0;
}
/* Copertine scontornate: restano su fondo bianco, senza tagli. */
body.hennio-body .ad-photo.is-clean { background: #FFFFFF; }
body.hennio-body .ad-photo.is-clean img,
body.hennio-body .ad-photo.is-clean .ff-hf-wrap img { background: #FFFFFF; }

/* Sul telefono la foto grande prende tutta la larghezza. */
@media (max-width: 719px) {
  body.hennio-body .ad-gallery-wrap { max-width: none; }
  body.hennio-body .ad-photo img {
    width: 100%;
    height: auto;
    max-height: none;
    aspect-ratio: 3 / 4;
  }
}
/* Il foglio del confronto prezzo impone un'altezza fissa sul telefono:
   la nostra regola vince, perché la testa non deve mai uscire. */
body.hennio-body.ad-page .ad-photo img {
  height: auto !important;
  aspect-ratio: 3 / 4 !important;
}
body.hennio-body.ad-page .ad-photo.is-clean img {
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
}

/* Miniature: mai un taglio della persona; bordo cacao solo su quella scelta. */
body.hennio-body .ad-thumb {
  background: #F3E6E0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
}
body.hennio-body .ad-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
  background: #F3E6E0;
}
body.hennio-body .ad-thumb.is-clean { background: #FFFFFF; }
body.hennio-body .ad-thumb.is-clean img { background: #FFFFFF; }
body.hennio-body .ad-thumb.is-active {
  border: 2px solid #3B2A26;
  border-radius: 10px;
  outline: 0;
}
body.hennio-body .ad-thumb:focus { outline: 0; }
body.hennio-body .ad-thumb:focus-visible {
  outline: 2px solid #B9867E;
  outline-offset: 2px;
}

/* ── Zoom a schermo intero: la foto intera, mai ritagliata ──────────────── */
.hnz-zoom {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FBF6F1;
  padding: 20px;
}
.hnz-zoom[hidden] { display: none; }
.hnz-zoom img {
  display: block;
  max-width: calc(100vw - 120px);
  max-height: calc(100vh - 80px);
  width: auto;
  height: auto;
  object-fit: contain !important;
  background: #F3E6E0;
  border-radius: 2px;
}
.hnz-zoom-close,
.hnz-zoom-prev,
.hnz-zoom-next {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid #E9C9C1;
  border-radius: 50%;
  background: #FFFFFF;
  color: #3B2A26;
  font: 600 20px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
  cursor: pointer;
  box-shadow: 0 1px 6px rgba(59, 42, 38, 0.14);
}
.hnz-zoom-close { top: 14px; right: 14px; }
.hnz-zoom-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.hnz-zoom-next { right: 14px; top: 50%; transform: translateY(-50%); }
.hnz-zoom-count {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  font: 600 12px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #6D5A52;
}
@media (max-width: 520px) {
  .hnz-zoom { padding: 8px; }
  .hnz-zoom img { max-width: 100vw; max-height: calc(100vh - 110px); }
  .hnz-zoom-prev { left: 6px; }
  .hnz-zoom-next { right: 6px; }
}
