/* MYASNOVICH: copertina compatta, foto a tutta area e taglio a sinistra */
.tg-hero-image {
  object-fit: cover;
  object-position: right center;
}

/* Computer e tablet larghi */
@media (min-width: 801px) {
  .tg-hero {
    min-height: max(350px, 40vw);
    height: auto;
    display: flex;
    align-items: center;
    background: var(--tg-red);
  }

  .tg-hero-images {
    position: absolute;
    inset: 0 0 0 29%;
    width: 71%;
    height: 100%;
  }

  .tg-hero-panel {
    display: block;
    inset: 0;
    clip-path: polygon(0 6%, 45% 0, 29% 100%, 0 100%);
  }

  .tg-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: var(--tg-red);
    clip-path: polygon(0 0, calc(45% + 2px) 0, 0 calc(6% + 2px));
  }

  .tg-hero-content {
    width: calc(100% - 56px);
    margin: 0 auto;
    padding: 36px 0 24px;
  }

  .tg-hero .tg-eyebrow {
    font-size: 8px;
    max-width: 32vw;
    margin: 0 0 10px;
  }

  .tg-hero h1 {
    font-size: clamp(34px, 4.5vw, 64px);
    line-height: 1.04;
    max-width: 32vw;
    margin: 10px 0 18px;
  }

  .tg-hero-subtitle {
    font-size: 17px;
    max-width: 32vw;
    margin: 0 0 20px;
  }

  .tg-hero-content .tg-button {
    min-height: 44px;
    padding: 11px 18px;
    font-size: 12px;
    gap: 16px;
  }

  .tg-hero-controls {
    margin-top: 16px;
    gap: 4px;
  }

  .tg-hero-controls button {
    min-height: 36px;
    min-width: 34px;
    font-size: 10px;
  }

  .tg-hero-controls .tg-rotation {
    min-width: 64px;
    margin-right: 8px;
  }

  .tg-hero-position {
    min-width: 44px;
    font-size: 10px;
  }
}

@media (min-width: 1101px) {
  .tg-hero-content {
    width: calc(100% - 96px);
  }
}

/* Schermi stretti: fotografia sopra al testo */
@media (max-width: 800px) {
  .tg-hero {
    min-height: 0;
    height: auto;
    display: flex;
    flex-direction: column;
    background: var(--tg-paper);
  }

  .tg-hero-images {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 1672 / 941;
    order: 0;
    background: var(--tg-red);
  }

  .tg-hero-panel {
    display: none;
  }

  .tg-hero::before {
    content: none;
  }

  .tg-hero-content {
    order: 1;
    width: calc(100% - 40px);
    margin: 0 auto;
    padding: 24px 0;
  }

  .tg-hero .tg-eyebrow {
    max-width: 100%;
    margin-bottom: 10px;
  }

  .tg-hero h1 {
    font-size: clamp(32px, 7.5vw, 48px);
    line-height: 1.04;
    max-width: 100%;
    margin: 8px 0 14px;
  }

  .tg-hero-subtitle {
    font-size: 17px;
    max-width: 100%;
    margin-bottom: 18px;
  }

  .tg-hero-controls {
    margin-top: 16px;
  }

  .tg-hero-caption {
    top: 12px;
    bottom: auto;
    right: 12px;
  }
}

/* Logo grande: proporzioni originali */
body.tg-site .tg-header,
body.tg-site .tg-header-inner {
  overflow: visible !important;
}

body.tg-site .tg-header {
  position: relative;
  z-index: 20;
}

body.tg-site .tg-header .tg-brand {
  position: relative !important;
  width: 320px !important;
  max-width: 100% !important;
  flex: 0 0 320px !important;
  overflow: visible !important;
  z-index: 2;
}

body.tg-site .tg-header .tg-brand img {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain;
}

/* Computer e tablet: logo sporgente sulla parte avorio */
@media (min-width: 801px) {
  body.tg-site .tg-header .tg-brand {
    height: 80px !important;
  }

  body.tg-site .tg-header .tg-brand img {
    position: absolute !important;
    inset: auto auto -48px 0 !important;
  }
}

@media (min-width: 801px) and (max-width: 1100px) {
  body.tg-site .tg-header .tg-brand {
    width: 280px !important;
    flex-basis: 280px !important;
    height: 72px !important;
  }
}

/* Schermi stretti: logo grande dentro la testata */
@media (max-width: 800px) {
  body.tg-site .tg-header .tg-brand {
    width: min(220px, calc(100vw - 100px)) !important;
    flex-basis: min(220px, calc(100vw - 100px)) !important;
    height: auto !important;
  }

  body.tg-site .tg-header .tg-brand img {
    position: static !important;
    inset: auto !important;
  }
}

/* Selettore della lingua compatto nella barra superiore */
body.tg-site .tg-header .tg-header-language {
  flex: 0 0 auto;
  align-self: center;
}

body.tg-site .tg-header .tg-header-language .tg-language-plugin {
  zoom: 0.75;
  padding: 0 !important;
}

/* Menu e lingua nello stesso riquadro a destra */
body.tg-site .tg-header .tg-header-inner {
  --my-menu-width: min(300px, calc(100vw - 36px));
  position: relative;
  flex-wrap: nowrap;
  gap: 16px;
}

body.tg-site .tg-header .tg-menu-toggle {
  display: inline-flex !important;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  margin-left: auto;
  order: 2;
}

/* Parte inferiore del riquadro: voci del menu */
body.tg-site .tg-header .tg-navigation {
  display: none !important;
  position: absolute;
  top: calc(100% + 80px);
  right: 0;
  left: auto;
  width: var(--my-menu-width);
  margin: 0;
  padding: 0;
  background: var(--tg-paper, #fbf6ec);
  border: 1px solid var(--tg-line, #dfd0bc);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 14px 28px #26101826;
  max-height: min(420px, calc(100vh - 210px));
  max-height: min(420px, calc(100dvh - 210px));
  overflow-y: auto;
  z-index: 30;
}

body.tg-site .tg-header .tg-navigation.is-open {
  display: block !important;
}

body.tg-site .tg-header .tg-nav-list {
  display: block;
  margin: 0;
  padding: 0;
  list-style: none;
}

body.tg-site .tg-header .tg-nav-list > li {
  margin: 0;
  border: 0;
}

body.tg-site .tg-header .tg-nav-list > li + li {
  border-top: 1px solid var(--tg-line, #dfd0bc);
}

body.tg-site .tg-header .tg-nav-list a {
  display: block;
  min-height: 48px;
  padding: 14px 18px;
  border: 0;
  color: var(--tg-red, #741c2a);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  white-space: normal;
}

body.tg-site .tg-header .tg-nav-list a:hover,
body.tg-site .tg-header .tg-nav-list a:focus-visible,
body.tg-site .tg-header .tg-nav-list a[aria-current="page"],
body.tg-site .tg-header .tg-nav-list .current-menu-item > a {
  color: var(--tg-red-dark, #521620);
  background: #f0e5d5;
}

body.tg-site .tg-header .tg-nav-list a:focus-visible {
  outline-offset: -3px;
}

/* Parte superiore del riquadro: scelta della lingua */
body.tg-site .tg-header .tg-header-language {
  display: none !important;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: auto;
  width: var(--my-menu-width);
  height: 72px;
  margin: 0;
  padding: 12px 18px;
  align-items: center;
  justify-content: flex-start;
  background: var(--tg-paper, #fbf6ec);
  color: var(--tg-red, #741c2a);
  border: 1px solid var(--tg-line, #dfd0bc);
  border-radius: 10px 10px 0 0;
  z-index: 31;
}

body.tg-site .tg-header .tg-navigation.is-open ~ .tg-header-language {
  display: flex !important;
}

body.tg-site .tg-header .tg-header-language .tg-language,
body.tg-site .tg-header .tg-header-language select {
  color: var(--tg-red, #741c2a);
}

body.tg-site .tg-header .tg-header-language .tg-language {
  border-color: var(--tg-line, #dfd0bc);
}

/* Testata 1.2: navigazione visibile, ricerca, lingua, carrello e altre opzioni. */
body.tg-site .tg-header .tg-header-inner.tg-header-expanded {
  display: grid;
  grid-template-columns: auto auto minmax(220px, 1fr) auto auto auto;
  grid-template-areas: "logo primary search language cart more";
  align-items: center;
  gap: 14px;
}
body.tg-site .tg-header .tg-header-expanded > .tg-brand {
  grid-area: logo;
  min-width: 0;
}
body.tg-site .tg-header .tg-header-expanded > .tg-quick-links {
  grid-area: primary;
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
body.tg-site .tg-header .tg-quick-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 4px;
  color: #fff8ea;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
body.tg-site .tg-header .tg-quick-links a:hover,
body.tg-site .tg-header .tg-quick-links a[aria-current="page"] {
  background: #ffffff18;
}
body.tg-site .tg-header .tg-header-expanded > .tg-header-search {
  grid-area: search;
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  max-width: 440px;
  min-width: 0;
  min-height: 46px;
  justify-self: end;
  margin: 0;
  padding: 0;
  border: 1px solid var(--tg-line, #dfd0bc);
  border-radius: 6px;
  background: var(--tg-paper, #fbf6ec);
  color: var(--tg-red, #741c2a);
}
body.tg-site .tg-header .tg-header-search:focus-within {
  outline: 2px solid var(--tg-gold, #d6b47a);
  outline-offset: 3px;
}
body.tg-site .tg-header .tg-header-search input[type="search"] {
  flex: 1 1 0%;
  width: 100%;
  min-width: 0;
  height: 44px;
  margin: 0;
  padding: 10px 0 10px 12px;
  border: 0;
  border-radius: 6px;
  box-shadow: none;
  background: transparent;
  color: #352b27;
  font: 400 16px/1.3 var(--tg-sans, sans-serif);
  outline: none;
}
body.tg-site .tg-header .tg-header-search input::placeholder {
  color: #73645b;
  opacity: 1;
}
body.tg-site .tg-header .tg-header-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--tg-red, #741c2a);
}
body.tg-site .tg-header .tg-header-search button:hover {
  background: #efe4d4;
}
body.tg-site .tg-header .tg-header-search button:focus-visible {
  outline-offset: -4px;
}
/* Specificità superiore al vecchio CSS che inseriva la lingua nella tendina. */
body.tg-site .tg-header .tg-header-inner.tg-header-expanded > .tg-header-language {
  grid-area: language;
  display: flex !important;
  position: static;
  inset: auto;
  width: auto;
  height: auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  justify-self: end;
  align-self: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  order: 0;
  z-index: 2;
}
body.tg-site .tg-header .tg-language-top .tg-language {
  border-radius: 5px;
  background: var(--tg-paper, #fbf6ec);
  color: var(--tg-red, #741c2a);
}
body.tg-site .tg-header .tg-language-top .tg-language select {
  color: var(--tg-red, #741c2a);
  max-width: 105px;
}
body.tg-site .tg-header .tg-language-top .tg-language-plugin {
  zoom: 0.75;
  background: transparent;
}
body.tg-site .tg-header .tg-header-expanded > .tg-header-cart {
  grid-area: cart;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  width: 44px;
  height: 44px;
  border: 1px solid #ffffff88;
  border-radius: 5px;
  color: #fff8ea;
  background: transparent;
}
body.tg-site .tg-header .tg-header-cart:hover,
body.tg-site .tg-header .tg-menu-dots:hover {
  background: #ffffff18;
  color: #fff8ea;
}
body.tg-site .tg-header .tg-cart-count {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 20px;
  height: 20px;
  padding-inline: 4px;
  border-radius: 12px;
  background: var(--tg-paper, #fbf6ec);
  color: var(--tg-red, #741c2a);
  font: 600 11px/20px var(--tg-sans, sans-serif);
  text-align: center;
}
body.tg-site .tg-header .tg-header-inner.tg-header-expanded > .tg-menu-toggle {
  grid-area: more;
  justify-self: end;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border-radius: 5px;
  font-size: 28px;
  line-height: 1;
  order: 0;
}
body.tg-site .tg-header .tg-header-inner.tg-header-expanded > .tg-menu-toggle::after {
  content: none !important;
}
body.tg-site .tg-header .tg-header-inner.tg-header-expanded > .tg-navigation {
  top: calc(100% + 8px);
  right: 0;
  border: 1px solid var(--tg-line, #dfd0bc);
  border-radius: 10px;
  max-height: min(420px, calc(100vh - 200px));
  max-height: min(420px, calc(100dvh - 200px));
}
body.tg-site .tg-header .tg-pdf-pending {
  display: block;
  padding: 14px 18px;
  color: #776c61;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}
body.tg-site .tg-header .tg-pdf-pending small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 400;
}
@media (max-width: 1200px) and (min-width: 801px) {
  body.tg-site .tg-header .tg-header-inner.tg-header-expanded {
    grid-template-columns: auto minmax(0, 1fr) auto auto auto;
    grid-template-areas: "logo primary language cart more" "logo search search search search";
    gap: 10px 14px;
    padding-block: 12px;
  }
  body.tg-site .tg-header .tg-header-expanded > .tg-header-search {
    max-width: none;
  }
}
@media (max-width: 800px) {
  body.tg-site .tg-header .tg-header-inner.tg-header-expanded {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "logo cart more" "primary language language" "search search search";
    gap: 12px;
    padding-block: 12px 16px;
  }
  body.tg-site .tg-header .tg-header-expanded > .tg-brand {
    max-width: 100% !important;
  }
  body.tg-site .tg-header .tg-header-expanded > .tg-header-search {
    max-width: none;
  }
  body.tg-site .tg-header .tg-header-inner.tg-header-expanded > .tg-navigation {
    max-height: min(420px, calc(100vh - 280px));
    max-height: min(420px, calc(100dvh - 280px));
  }
}
@media (max-width: 380px) {
  body.tg-site .tg-header .tg-header-search input::placeholder {
    font-size: 13px;
  }
  body.tg-site .tg-header .tg-quick-links a {
    padding-inline: 7px;
    font-size: 13px;
  }
}
@media print {
  body.tg-site .tg-header .tg-header-expanded > .tg-header-search,
  body.tg-site .tg-header .tg-header-expanded > .tg-header-cart,
  body.tg-site .tg-header .tg-header-expanded > .tg-menu-toggle,
  body.tg-site .tg-header .tg-header-expanded > .tg-header-language,
  body.tg-site .tg-header .tg-header-expanded > .tg-navigation {
    display: none !important;
  }
}
