/*
 * Hubnoise — sezioni interne.
 *
 * Schede, archivi, pagine e WooCommerce nel linguaggio della home Bildora:
 * titoli grandi e leggeri, fondi carta, foto con angoli a 8px, accenti
 * arancioni, blocchi neri per i rimandi. Si appoggia ai token di bildora.css
 * e viene caricato dopo, quindi a parità di specificità vince.
 */

:root {
  --hn-soft: #eeeee9;
  --hn-warm: #eeeae5;
  --hn-night: #0c0c0c;
  --hn-radius-lg: 12px;
  --hn-title: clamp(42px, 6vw, 72px);
  --hn-h2: clamp(30px, 3.6vw, 48px);
}

/* ------------------------------------------------------------ elementi base */

.hn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border: 1px solid #242b3350;
  border-radius: 99px;
  font-size: 14px;
  line-height: 1.5;
  text-decoration: none;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}

.hn-back:hover {
  background: var(--hn-ink);
  border-color: var(--hn-ink);
  color: #fff;
}

.hn-back span {
  transition: transform 0.3s var(--hn-ease);
}

.hn-back:hover span {
  transform: translateX(-3px);
}

.hn-button {
  cursor: pointer;
}

.hn-button--dark,
.hn-form .hn-button,
.hn-filters .hn-button {
  background: var(--hn-ink);
  color: #fff;
}

.hn-button--dark:hover,
.hn-form .hn-button:hover,
.hn-filters .hn-button:hover {
  background: #000;
}

/* Le etichette dei termini diventano pillole. */
.hn-terms {
  justify-content: center;
  gap: 10px 22px;
  font-size: 14px;
}

.hn-terms__group {
  align-items: center;
  gap: 8px;
}

.hn-terms__label {
  font-size: 13px;
}

.hn-terms__list {
  gap: 6px;
}

.hn-terms__item:not(:last-child)::after {
  content: none;
}

.hn-terms__item a,
.hn-terms__item {
  text-decoration: none;
}

.hn-terms__item a {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 99px;
  background: #e8e4df;
  transition: background 0.25s, color 0.25s;
}

.hn-terms__item a:hover {
  background: var(--hn-orange);
  color: #231b18;
}

/* Testo lungo: misura di lettura e ritmo più ampio. */
.hn-prose {
  font-size: 18px;
  line-height: 1.65;
}

.hn-prose img,
.hn-prose .wp-block-image img,
.hn-prose iframe {
  border-radius: var(--hn-radius);
}

.hn-prose figure {
  margin: 2em 0;
}

.hn-prose blockquote,
.hn-prose .wp-block-quote {
  margin: 2em 0;
  padding: 0 0 0 28px;
  border-left: 2px solid var(--hn-orange);
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.hn-prose blockquote cite {
  display: block;
  margin-top: 12px;
  font-size: 14px;
  font-style: normal;
  letter-spacing: 0;
  color: var(--hn-muted);
}

.hn-prose h3 {
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin: 1.6em 0 0.5em;
}

.hn-prose ul,
.hn-prose ol {
  padding-left: 1.2em;
}

.hn-prose li::marker {
  color: var(--hn-accent-text);
}

.hn-prose hr {
  border: 0;
  border-top: 1px solid var(--hn-border);
  margin: 3em 0;
}

/* ------------------------------------------------------------------ schede */

/* I pulsanti dentro un testo lungo non prendono il colore dei link. */
.hn-prose a.hn-button {
  color: #231b18;
}

.hn-prose :is(a.button, button.button, .wp-block-button__link, .wc-block-components-button:not(.is-link)) {
  color: #fff;
}

.hn-prose .wc-block-grid__product-title,
.hn-prose .wc-block-components-product-name {
  color: var(--hn-ink);
  text-decoration: none;
}

.hn-scheda {
  padding-top: 40px;
}

.hn-scheda__header,
.hn-page__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  max-width: 920px;
  margin: 0 auto 64px;
  text-align: center;
}

.hn-scheda__title,
.hn-page__title {
  margin: 0;
  font-size: var(--hn-title);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.hn-scheda__subtitle,
.hn-scheda__meta {
  margin: 0;
  font-size: 20px;
  line-height: 1.4;
  color: var(--hn-muted);
}

.hn-scheda__meta a {
  color: var(--hn-ink);
}

.hn-scheda__kicker {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hn-scheda__logo img {
  width: 104px;
  height: 104px;
  max-height: none;
  padding: 14px;
  object-fit: contain;
  background: #fff;
  border-radius: 50%;
}

.hn-scheda__link {
  margin: 6px 0 0;
}

.hn-scheda__link .hn-button {
  background: var(--hn-ink);
  color: #fff;
}

.hn-scheda__link .hn-button span {
  font-size: 18px;
}

.hn-scheda__cover {
  margin: 0 0 88px;
  overflow: hidden;
  border-radius: var(--hn-radius);
  background: var(--hn-soft);
}

.hn-scheda__cover img {
  width: 100%;
  height: auto;
  max-height: 640px;
  aspect-ratio: 16 / 8;
  object-fit: cover;
}

.hn-scheda__columns {
  gap: 48px 88px;
}

/* Una colonna sola: il testo si centra alla misura di lettura. */
.hn-scheda .hn-scheda__columns--single {
  grid-template-columns: minmax(0, 1fr);
}

.hn-scheda__columns--single > .hn-scheda__text {
  width: 100%;
  max-width: 760px;
  margin-inline: auto;
}

.hn-scheda__abstract {
  margin: 0 0 32px;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.32;
  letter-spacing: -0.02em;
}

/* Contatti dell'ente: una scheda tecnica compatta. */
.hn-contacts {
  margin: 40px 0 0;
  padding: 6px 24px;
  border-radius: var(--hn-radius-lg);
  background: var(--hn-soft);
}

.hn-contacts__row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--hn-border);
}

.hn-contacts__row:last-child {
  border-bottom: 0;
}

.hn-contacts dt {
  font-size: 14px;
  color: var(--hn-muted);
}

.hn-contacts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.hn-contacts a {
  text-decoration: none;
}

.hn-contacts a:hover {
  color: var(--hn-accent-text);
}

/* ---------------------------------------------------------------- sezioni */

.hn-section,
.hn-section + .hn-section {
  margin-top: 104px;
}

.hn-section__title {
  margin: 0 0 40px;
  font-size: var(--hn-h2);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.035em;
  text-transform: none;
  color: var(--hn-ink);
}

/* Nella colonna media i titoli si fanno piccoli: accompagnano, non aprono. */
.hn-scheda__media > .hn-section,
.hn-scheda__media > .hn-section + .hn-section {
  margin-top: 48px;
}

.hn-scheda__media > .hn-section:first-child {
  margin-top: 0;
}

.hn-scheda__media .hn-section__title {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hn-muted);
}

/* Galleria: la prima foto apre larga, le altre in coppia. */
.hn-gallery__list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.hn-gallery__item:first-child {
  grid-column: 1 / -1;
}

.hn-gallery__item img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--hn-radius);
}

.hn-gallery__item:first-child img {
  aspect-ratio: 16 / 10;
}

figcaption {
  font-size: 13px;
}

.hn-media__list {
  gap: 20px;
}

.hn-media__item img {
  width: 100%;
  height: auto;
  border-radius: var(--hn-radius);
}

.hn-media__embed {
  overflow: hidden;
  border-radius: var(--hn-radius);
  background: var(--hn-night);
}

.hn-media__embed iframe {
  display: block;
  border: 0;
}

/* Video senza anteprima oEmbed: un riquadro che resta un link chiaro. */
.hn-media__item > figure > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-radius: var(--hn-radius);
  background: var(--hn-night);
  color: #fff;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.hn-media__item > figure > a::after {
  content: "▶";
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--hn-orange);
  color: #231b18;
  font-size: 14px;
}

/* Elenchi collegati: stessa griglia degli archivi. */
.hn-list__items {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 48px 28px;
}

/* -------------------------------------------------------------------- card */

.hn-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: none;
  overflow: visible;
}

.hn-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--hn-radius);
  background: #e9e6e1;
}

.hn-card__media img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  transition: transform 0.6s var(--hn-ease);
}

.hn-card:hover .hn-card__media img {
  transform: scale(1.04);
}

.hn-card__media--logo {
  display: grid;
  place-items: center;
  padding: 16%;
  background: #fff;
}

.hn-card__media--logo img {
  object-fit: contain;
}

.hn-card__media--initial {
  display: grid;
  place-items: center;
  background: var(--hn-warm);
  color: var(--hn-orange);
}

.hn-card__media--initial span {
  font-size: clamp(72px, 9vw, 120px);
  line-height: 1;
  letter-spacing: -0.06em;
  transition: transform 0.6s var(--hn-ease);
}

.hn-card:hover .hn-card__media--initial span {
  transform: scale(1.08);
}

/* Tre toni che si alternano, così una griglia senza foto non è piatta. */
.hn-list__item:nth-child(3n + 2) .hn-card__media--initial {
  background: var(--hn-ink);
}

.hn-list__item:nth-child(3n + 3) .hn-card__media--initial {
  background: var(--hn-orange);
  color: #231b18;
}

.hn-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 18px 0 0;
}

.hn-card__meta {
  order: -1;
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hn-accent-text);
}

.hn-card__title {
  margin: 0;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.hn-card__title a {
  text-decoration: none;
}

.hn-card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hn-card__title a:focus-visible {
  outline: 0;
}

.hn-card:has(.hn-card__title a:focus-visible) {
  outline: 3px solid var(--hn-orange);
  outline-offset: 6px;
  border-radius: 10px;
}

.hn-card__summary {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.5;
  color: var(--hn-muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.hn-card__price {
  margin: 0;
  font-size: 17px;
  color: var(--hn-accent-text);
}

.hn-card__price ins {
  text-decoration: none;
}

.hn-card__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
  font-size: 14px;
}

.hn-card__more span {
  transition: transform 0.3s var(--hn-ease);
}

.hn-card:hover .hn-card__more span {
  transform: translate(3px, -3px);
  color: var(--hn-accent-text);
}

/* Libri: la copertina resta intera, appoggiata su un fondo carta. */
.hn-card--product .hn-card__media {
  aspect-ratio: 4 / 5;
  padding: 12%;
  background: #ebe9e2;
}

.hn-card--product .hn-card__media img {
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 16px #0000002a);
}

.hn-card--product .hn-card__media--initial {
  padding: 0;
}

/* ---------------------------------------------------------------- il filo */

.hn-filo {
  display: grid;
  gap: 32px 80px;
  align-items: start;
  margin-top: 104px;
  padding: clamp(36px, 6vw, 80px);
  border: 0;
  border-radius: var(--hn-radius-lg);
  background: var(--hn-night);
  color: #fff;
}

@media (min-width: 810px) {
  .hn-filo {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  }
}

.hn-filo__label {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--hn-orange);
}

.hn-filo__intro {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.hn-filo__list {
  gap: 0;
  border-top: 1px solid #ffffff26;
}

.hn-filo__item {
  border-bottom: 1px solid #ffffff26;
}

.hn-filo__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: #fff;
}

.hn-filo__title {
  text-decoration: none;
  transition: color 0.25s;
}

.hn-filo__link:hover .hn-filo__title {
  color: var(--hn-orange);
}

.hn-filo__arrow {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--hn-orange);
  color: #231b18;
  font-size: 18px;
  transition: transform 0.35s var(--hn-ease);
}

.hn-filo__link:hover .hn-filo__arrow,
.hn-filo__link:focus-visible .hn-filo__arrow {
  transform: rotate(45deg);
}

.hn-filo__link:focus-visible {
  outline-offset: 2px;
}

/* ------------------------------------------------------------ filo rosso */

.hn-scheda--filo-rosso .hn-scheda__text > p:first-child {
  font-size: clamp(20px, 2vw, 23px);
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.hn-thread__intro {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--hn-accent-text);
}

.hn-thread__title {
  margin: 0;
  font-size: var(--hn-h2);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

/* Layout 1: i collegamenti sotto il testo, a tutta larghezza. */
.hn-scheda__columns--single > .hn-thread {
  margin-top: 56px;
  padding-top: 88px;
  border-top: 1px solid var(--hn-border);
}

.hn-scheda__columns--single > .hn-thread .hn-thread__head {
  margin-bottom: 8px;
  text-align: center;
}

/* I gruppi (enti, progetti, libri…) stanno affiancati, uno per colonna. */
.hn-scheda__columns--single > .hn-thread {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0 28px;
  align-items: start;
}

.hn-scheda__columns--single > .hn-thread > .hn-thread__head {
  grid-column: 1 / -1;
}

.hn-scheda .hn-scheda__columns--single .hn-thread .hn-list__items {
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
}

.hn-scheda__columns--single > .hn-thread .hn-section:only-of-type {
  grid-column: 1 / -1;
}

.hn-scheda__columns--single > .hn-thread .hn-section:only-of-type .hn-list__items {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.hn-thread .hn-section,
.hn-thread .hn-section + .hn-section {
  margin-top: 56px;
}

.hn-thread .hn-section__title {
  margin-bottom: 24px;
  font-size: 24px;
  letter-spacing: -0.025em;
}

/* Layout 2: una spalla compatta di fianco al testo. */
.hn-scheda__columns:not(.hn-scheda__columns--single) > .hn-thread {
  padding: 28px;
  border-radius: var(--hn-radius-lg);
  background: var(--hn-soft);
}

@media (min-width: 60rem) {
  .hn-scheda__columns:not(.hn-scheda__columns--single) > .hn-thread {
    position: sticky;
    top: 24px;
  }
}

.hn-scheda__columns:not(.hn-scheda__columns--single) > .hn-thread .hn-thread__title {
  font-size: 26px;
}

.hn-scheda__columns:not(.hn-scheda__columns--single) > .hn-thread .hn-section,
.hn-scheda__columns:not(.hn-scheda__columns--single) > .hn-thread .hn-section + .hn-section {
  margin-top: 28px;
}

.hn-scheda__columns:not(.hn-scheda__columns--single) > .hn-thread .hn-section__title {
  margin-bottom: 12px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hn-muted);
}

.hn-scheda__columns:not(.hn-scheda__columns--single) > .hn-thread .hn-list__items {
  grid-template-columns: 1fr;
  gap: 14px;
}

.hn-scheda__columns:not(.hn-scheda__columns--single) > .hn-thread .hn-card {
  flex-direction: row;
  align-items: center;
  gap: 14px;
}

.hn-scheda__columns:not(.hn-scheda__columns--single) > .hn-thread .hn-card__media {
  flex: none;
  width: 64px;
  aspect-ratio: 1;
  padding: 0;
}

.hn-scheda__columns:not(.hn-scheda__columns--single) > .hn-thread .hn-card__media--initial span {
  font-size: 28px;
}

.hn-scheda__columns:not(.hn-scheda__columns--single) > .hn-thread .hn-card__body {
  gap: 2px;
  padding: 0;
}

.hn-scheda__columns:not(.hn-scheda__columns--single) > .hn-thread .hn-card__title {
  font-size: 17px;
  letter-spacing: -0.015em;
}

.hn-scheda__columns:not(.hn-scheda__columns--single) > .hn-thread :is(.hn-card__summary, .hn-card__more) {
  display: none;
}

.hn-scheda__columns:not(.hn-scheda__columns--single) > .hn-thread :is(.hn-card__meta, .hn-card__price) {
  font-size: 12px;
}

/* --------------------------------------------------------------- prodotto */

.hn-prodotto__acquisto {
  display: grid;
  gap: 36px;
  align-content: start;
}

.hn-prodotto__copertina {
  display: grid;
  place-items: center;
  padding: clamp(28px, 5vw, 64px);
  border-radius: var(--hn-radius-lg);
  background: #ebe9e2;
}

.hn-prodotto__copertina img {
  width: auto;
  max-width: 100%;
  max-height: 520px;
  height: auto;
  filter: drop-shadow(0 18px 26px #00000030);
}

.hn-prodotto__frontespizio {
  display: flex;
  align-items: flex-end;
  width: min(100%, 300px);
  aspect-ratio: 2 / 3;
  padding: 28px 24px;
  border-radius: 2px 6px 6px 2px;
  background: var(--hn-orange);
  box-shadow: inset 10px 0 0 #0000001a, 0 18px 30px #00000026;
  color: #231b18;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

/* Senza media utente: copertina e acquisto affiancati. */
.hn-scheda .hn-scheda__columns--product-only {
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 810px) {
  .hn-scheda__columns--product-only .hn-prodotto__acquisto {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 72px;
    align-items: center;
  }
}

.hn-prodotto__info {
  display: grid;
  gap: 24px;
}

.hn-prodotto__prezzo {
  margin: 0;
  font-size: 36px;
  line-height: 1;
  letter-spacing: -0.035em;
}

.hn-prodotto__prezzo ins {
  text-decoration: none;
}

.hn-prodotto__prezzo del {
  font-size: 0.6em;
  color: var(--hn-muted);
}

.hn-prodotto__descrizione {
  font-size: 17px;
}

.hn-prodotto__carrello form.cart {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
}

.hn-prodotto__carrello .quantity input.qty {
  width: 96px;
  height: 52px;
  padding: 0 12px;
  border: 1px solid var(--hn-border);
  border-radius: 99px;
  background: #fff;
  text-align: center;
}

.hn-prodotto__carrello .button,
.woocommerce .hn-prodotto__carrello button.button.alt {
  min-height: 52px;
  padding: 0 32px;
  border: 0;
  border-radius: 99px;
  background: var(--hn-ink);
  color: #fff;
  font-size: 16px;
  font-weight: 400;
  cursor: pointer;
  transition: background 0.25s;
}

.hn-prodotto__carrello .button:hover,
.woocommerce .hn-prodotto__carrello button.button.alt:hover {
  background: var(--hn-accent-text);
  color: #fff;
}

.hn-prodotto__stock .stock,
.hn-prodotto__carrello .stock {
  display: inline-block;
  margin: 0;
  padding: 6px 14px;
  border-radius: 99px;
  background: var(--hn-soft);
  font-size: 14px;
}

.hn-prodotto__carrello .stock {
  margin-bottom: 12px;
}

.hn-scheda--prodotto .hn-media__list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.hn-scheda--prodotto .hn-media__item--video {
  grid-column: 1 / -1;
}

.hn-scheda--prodotto .hn-media__item--image img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.hn-prodotto__recensione {
  padding: clamp(36px, 6vw, 88px);
  border-radius: var(--hn-radius-lg);
  background: var(--hn-warm);
}

.hn-prodotto__recensione .hn-section__title {
  margin-bottom: 24px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hn-accent-text);
}

.hn-prodotto__recensione .hn-prose {
  max-width: 860px;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.45;
  letter-spacing: -0.015em;
}

/* ---------------------------------------------------------------- commenti */

.hn-prodotto__commenti,
.hn-comments {
  max-width: 760px;
  margin-inline: auto;
}

.hn-comments__title,
.woocommerce-Reviews-title {
  margin: 0 0 32px;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.hn-comments__list,
.hn-comments__list .children {
  margin: 0 0 56px;
  padding: 0;
  list-style: none;
}

.hn-comments__list .children {
  margin: 0 0 0 32px;
}

.hn-comments .comment-body {
  padding: 24px 0;
  border-bottom: 1px solid var(--hn-border);
}

.hn-comments .comment-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hn-comments .comment-author img {
  border-radius: 50%;
}

.hn-comments .comment-author .says {
  display: none;
}

.hn-comments .comment-metadata {
  margin: 4px 0 12px 44px;
  font-size: 13px;
}

.hn-comments .comment-metadata a,
.hn-comments .reply a {
  color: var(--hn-muted);
}

.comment-form {
  display: grid;
  gap: 18px;
}

.comment-form p {
  margin: 0;
}

.comment-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

.comment-form :is(input[type="text"], input[type="email"], input[type="url"], textarea),
.search-form .search-field,
.woocommerce input.input-text,
.woocommerce select,
.woocommerce textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--hn-border);
  border-radius: var(--hn-radius);
  background: #fff;
  color: var(--hn-ink);
}

.comment-form :is(input, textarea):focus,
.search-form .search-field:focus {
  outline: 0;
  border-color: var(--hn-ink);
  box-shadow: 0 0 0 3px #ff6d4d40;
}

.comment-form-cookies-consent {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 14px;
}

.comment-form-cookies-consent label {
  display: inline;
}

.comment-form .submit,
.woocommerce #review_form #respond .form-submit input,
.search-form .search-submit {
  min-height: 48px;
  padding: 0 28px;
  border: 0;
  border-radius: 99px;
  background: var(--hn-ink);
  color: #fff;
  cursor: pointer;
  transition: background 0.25s;
}

.comment-form .submit:hover,
.woocommerce #review_form #respond .form-submit input:hover,
.search-form .search-submit:hover {
  background: #000;
}

.comment-reply-title {
  display: block;
  margin: 40px 0 8px;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.woocommerce-noreviews,
.comment-notes {
  color: var(--hn-muted);
}

/* ---------------------------------------------------------------- archivi */

.hn-archive__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 40px 0 72px;
  text-align: center;
}

.hn-archive__title {
  margin: 0;
  font-size: clamp(44px, 7vw, 88px);
  line-height: 1;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.hn-archive__description {
  max-width: 620px;
  font-size: 18px;
  color: var(--hn-muted);
}

.hn-archive__header .hn-archive__description p {
  margin: 0;
}

.hn-archive__header .search-form {
  margin-top: 8px;
}

@media (min-width: 56rem) {
  .hn-archive {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 56px;
  }

  .hn-archive__sidebar {
    top: 24px;
    max-height: calc(100vh - 48px);
  }
}

.hn-archive__panel {
  border: 0;
  border-radius: var(--hn-radius-lg);
  background: var(--hn-soft);
}

.hn-archive__panel-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 20px;
  font-weight: 400;
}

.hn-archive__panel-toggle::after,
.hn-archive__panel[open] .hn-archive__panel-toggle::after {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--hn-ink);
  color: #fff;
  font-size: 16px;
  content: "+";
}

.hn-archive__panel[open] .hn-archive__panel-toggle::after {
  content: "–";
}

@media (min-width: 56rem) {
  .hn-archive__panel-toggle {
    display: none;
  }
}

.hn-filters {
  gap: 0;
  border-top: 0;
  background: transparent;
}

.hn-filters__group,
.hn-filters__actions {
  padding: 18px 20px;
  border-bottom: 1px solid var(--hn-border);
  background: transparent;
}

.hn-filters__actions,
.hn-filters > :has(+ .hn-filters__actions[hidden]) {
  border-bottom: 0;
}

.hn-filters__legend {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
}

details.hn-filters__group > .hn-filters__legend::after {
  font-size: 16px;
}

.hn-filters input[type="search"],
.hn-filters input[type="number"],
.hn-filters select {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: var(--hn-radius);
  background-color: #fff;
}

.hn-filters input:focus,
.hn-filters select:focus {
  outline: 0;
  border-color: var(--hn-ink);
  box-shadow: 0 0 0 3px #ff6d4d40;
}

.hn-filters__check {
  padding: 5px 0;
  font-size: 15px;
}

.hn-filters__count {
  padding: 1px 8px;
  border-radius: 99px;
  background: #fff;
  font-size: 12px;
}

.hn-results__bar {
  align-items: center;
  margin-bottom: 36px;
  padding-bottom: 16px;
}

.hn-results__count {
  font-size: 14px;
}

.hn-chip {
  padding: 6px 14px;
  border: 0;
  background: var(--hn-ink);
  color: #fff;
  font-size: 14px;
  transition: background 0.25s;
}

.hn-chip:hover,
.hn-chip:focus-visible {
  background: var(--hn-accent-text);
}

.hn-chip__x {
  color: var(--hn-orange);
}

.hn-chip:hover .hn-chip__x {
  color: #fff;
}

.hn-chips__reset {
  font-size: 14px;
}

.hn-results .hn-list__items {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.hn-results--wide .hn-list__items {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.hn-archive--hn_filo_rosso .hn-list__items {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 64px 32px;
}

.hn-archive--hn_filo_rosso .hn-card__media {
  aspect-ratio: 16 / 10;
}

.hn-archive--hn_filo_rosso .hn-card__title {
  font-size: 30px;
}

.hn-archive--product .hn-list__items {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.hn-results__empty {
  padding: 80px 24px;
  border-radius: var(--hn-radius-lg);
  background: var(--hn-soft);
  font-size: 18px;
  text-align: center;
}

.hn-pagination {
  justify-content: center;
  gap: 8px;
  margin-top: 72px;
}

.hn-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.hn-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--hn-border);
  border-radius: 99px;
  font-weight: 400;
  text-decoration: none;
  transition: background 0.25s, border-color 0.25s, color 0.25s;
}

.hn-pagination a.page-numbers:hover {
  border-color: var(--hn-ink);
}

.hn-pagination .page-numbers.current {
  border-color: var(--hn-ink);
  background: var(--hn-ink);
  color: #fff;
  font-weight: 400;
}

.hn-pagination .page-numbers.dots {
  border-color: transparent;
}

/* ------------------------------------------------------------------ pagine */

.hn-page {
  padding-top: 40px;
}

.hn-page__content {
  max-width: 760px;
  margin-inline: auto;
}

.hn-page__code {
  margin: 0;
  font-size: clamp(120px, 22vw, 260px);
  line-height: 0.85;
  letter-spacing: -0.07em;
  color: var(--hn-orange);
}

.hn-page--404 .hn-page__content {
  text-align: center;
}

.search-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 24px 0;
}

.search-form label {
  flex: 1 1 260px;
  max-width: 420px;
}

.search-form .search-field {
  border-radius: 99px;
  padding-inline: 20px;
}

/* Contatti: testo e modulo affiancati. */
.hn-contatti-layout {
  display: grid;
  gap: 48px 88px;
  align-items: start;
}

@media (min-width: 60rem) {
  .hn-contatti-layout {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  }
}

.hn-contatti-layout > .hn-page__content {
  margin: 0;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.4;
  letter-spacing: -0.015em;
}

.hn-contatti {
  padding: clamp(24px, 4vw, 48px);
  border-radius: var(--hn-radius-lg);
  background: #fff;
}

.hn-contatti .hn-form {
  max-width: none;
}

@media (min-width: 480px) {
  .hn-contatti .hn-form {
    grid-template-columns: 1fr 1fr;
  }

  .hn-contatti .hn-form > * {
    grid-column: 1 / -1;
  }

  .hn-contatti .hn-form > .hn-form__field:has(#hn-nome),
  .hn-contatti .hn-form > .hn-form__field:has(#hn-email) {
    grid-column: auto;
  }
}

.hn-form__field input,
.hn-form__field textarea {
  border-color: var(--hn-border);
}

.hn-form__privacy {
  margin: 0;
  font-size: 13px;
  color: var(--hn-muted);
}

.hn-form__actions {
  margin: 0;
}

.hn-notice {
  margin: 0 0 24px;
  border-left: 2px solid var(--hn-orange);
  border-radius: var(--hn-radius);
  background: var(--hn-warm);
}

.hn-notice--error {
  border-left-color: #b3261e;
}

/* ------------------------------------------------------------- woocommerce */

/* Carrello, cassa e account: la pagina usa tutta la larghezza. */
:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) .hn-page__content {
  max-width: none;
  font-size: 16px;
}

.woocommerce-notices-wrapper:empty {
  display: none;
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.wc-block-components-notice-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 32px;
  padding: 16px 20px;
  border: 0;
  border-left: 2px solid var(--hn-orange);
  border-radius: var(--hn-radius);
  background: var(--hn-warm);
  list-style: none;
}

.woocommerce-error {
  border-left-color: #b3261e;
}

.woocommerce-message .button,
.woocommerce-info .button {
  order: 2;
}

.woocommerce a.button,
.woocommerce button.button,
.wc-block-components-button:not(.is-link),
.wp-element-button.wc-block-components-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border: 0;
  border-radius: 99px;
  background: var(--hn-ink);
  color: #fff;
  font-weight: 400;
  text-decoration: none;
  transition: background 0.25s;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.wc-block-components-button:not(.is-link):hover {
  background: var(--hn-accent-text);
  color: #fff;
}

.wc-block-cart,
.wc-block-checkout {
  font-size: 16px;
}

.wc-block-components-sidebar .wc-block-components-panel,
.wc-block-components-totals-wrapper,
.wp-block-woocommerce-checkout-order-summary-block {
  border-color: var(--hn-border);
}

.wc-block-components-sidebar-layout .wc-block-components-sidebar {
  padding: 24px;
  border-radius: var(--hn-radius-lg);
  background: var(--hn-soft);
}

.wc-block-components-text-input input,
.wc-block-components-combobox .wc-block-components-combobox-control input,
.wc-blocks-components-select .wc-blocks-components-select__select {
  border-radius: var(--hn-radius) !important;
}

.wc-block-components-product-name {
  color: var(--hn-ink);
  font-size: 18px;
  text-decoration: none;
}

.wc-block-cart-item__image img,
.wc-block-components-order-summary-item__image img {
  border-radius: 4px;
}

.woocommerce-MyAccount-navigation ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 40px;
  padding: 0;
  list-style: none;
}

.woocommerce-MyAccount-navigation a {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid var(--hn-border);
  border-radius: 99px;
  text-decoration: none;
}

.woocommerce-MyAccount-navigation .is-active a {
  border-color: var(--hn-ink);
  background: var(--hn-ink);
  color: #fff;
}

.woocommerce table.shop_table {
  width: 100%;
  border-collapse: collapse;
}

.woocommerce table.shop_table :is(th, td) {
  padding: 14px 8px;
  border-bottom: 1px solid var(--hn-border);
  text-align: left;
}

.woocommerce form .form-row {
  margin: 0 0 16px;
}

.woocommerce form .form-row label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

/* ------------------------------------------------------------- responsive */

@media (max-width: 809px) {
  .hn-scheda,
  .hn-page {
    padding-top: 28px;
  }

  .hn-scheda__header,
  .hn-page__header {
    margin-bottom: 44px;
  }

  .hn-scheda__subtitle,
  .hn-scheda__meta {
    font-size: 18px;
  }

  .hn-scheda__cover {
    margin-bottom: 52px;
  }

  .hn-scheda__cover img {
    aspect-ratio: 4 / 3;
  }

  .hn-section,
  .hn-section + .hn-section,
  .hn-filo {
    margin-top: 72px;
  }

  .hn-archive__header {
    padding: 28px 0 44px;
  }

  .hn-filo__link {
    font-size: 18px;
  }

  .hn-contacts {
    padding-inline: 18px;
  }

  .hn-contacts__row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .hn-archive--hn_filo_rosso .hn-list__items {
    grid-template-columns: 1fr;
  }

  .hn-archive--hn_filo_rosso .hn-card__title {
    font-size: 26px;
  }
}

@media (max-width: 479px) {
  .hn-list__items,
  .hn-results .hn-list__items {
    grid-template-columns: 1fr;
  }

  .hn-archive--product .hn-list__items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 14px;
  }

  .hn-archive--product .hn-card__title {
    font-size: 18px;
  }

  .hn-archive--product .hn-card__more {
    display: none;
  }

  .hn-prodotto__carrello form.cart > * {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hn-card__media img,
  .hn-card__media--initial span,
  .hn-card__more span,
  .hn-filo__arrow,
  .hn-back span {
    transition: none;
  }

  .hn-card:hover .hn-card__media img,
  .hn-card:hover .hn-card__media--initial span {
    transform: none;
  }
}

/* Blocchi dell'editor dentro le pagine. */
.hn-prose .is-style-lead {
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.hn-prose .wp-block-buttons {
  margin: 2.5em 0 0;
}

.hn-prose .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 28px;
  border-radius: 99px;
  background: var(--hn-ink);
  text-decoration: none;
  transition: background 0.25s;
}

.hn-prose .wp-block-button__link:hover {
  background: var(--hn-accent-text);
}

.hn-prose .wp-element-caption {
  margin-top: 10px;
}

/* Menu principale a sette voci: resta su una riga fino al passaggio al mobile. */
@media (min-width: 810px) {
  .nav-primary {
    flex-wrap: nowrap;
    gap: 20px;
    white-space: nowrap;
  }
}

@media (min-width: 810px) and (max-width: 999px) {
  .nav-primary {
    gap: 14px;
  }

  .nav-primary a {
    font-size: 14px;
  }

  .site-header .hn-brand-name,
  .site-header .hn-header-cta {
    display: none;
  }
}
