/* Pusateri Maker — modello Ristorazione B2B — 2.8.7.
   Total 6.8: struttura verificata sul catalogo, attivazione per singola scheda.
   Attivo solo con il nuovo frammento HTML; nessuna regola globale.
   Non incollare tag <style> nel campo CSS di WordPress. */

/* Riordino visivo di titolo, galleria originale e presentazione.
   I due contenitori sono div senza ruolo: display:contents lascia i loro
   figli nella griglia dell'articolo senza cambiare i blocchi del tema. */
body.pm-b2b-scheda:has(.pm-b2b) #main > .page-header { display: none; }

body.pm-b2b-scheda #single-blocks:has(.pm-b2b) {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: start;
  gap: 28px 36px;
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  margin-block-start: 32px;
}
body.pm-b2b-scheda #single-blocks:has(.pm-b2b) > .single-blog-content,
body.pm-b2b-scheda .pm-b2b { display: contents; }

body.pm-b2b-scheda #single-blocks:has(.pm-b2b)::after,
body.pm-b2b-scheda #single-blocks:has(.pm-b2b) > .single-blog-content::after,
body.pm-b2b-scheda #single-blocks:has(.pm-b2b) > .single-blog-content::before { display: none; }

body.pm-b2b-scheda #single-blocks:has(.pm-b2b) > .single-blog-header {
  grid-column: 1 / -1;
  order: 1;
  margin: 0;
}
body.pm-b2b-scheda #single-blocks:has(.pm-b2b) > .single-blog-header h1 {
  max-width: 1000px;
  font-size: clamp(1.75rem, 2.8vw, 2.5rem);
  line-height: 1.18;
  overflow-wrap: break-word;
}
body.pm-b2b-scheda #single-blocks:has(.pm-b2b) > #post-media {
  grid-column: 2;
  order: 3;
  min-width: 0;
  width: 100%;
  margin: 0;
}
body.pm-b2b-scheda #single-blocks:has(.pm-b2b) > .single-blog-content > * {
  grid-column: 1 / -1;
  order: 5;
  min-width: 0;
}
body.pm-b2b-scheda #single-blocks:has(.pm-b2b) > .related-posts {
  grid-column: 1 / -1;
  order: 8;
  min-width: 0;
  width: 100%;
}

body.pm-b2b-scheda .pm-b2b .pm-b2b__hero {
  grid-column: 1;
  order: 2;
  min-width: 0;
  color: #252923;
  line-height: 1.65;
}
body.pm-b2b-scheda .pm-b2b .pm-b2b__body {
  grid-column: 1 / -1;
  order: 4;
  min-width: 0;
  color: #252923;
  line-height: 1.7;
}
body.pm-b2b-scheda .pm-b2b :where(.pm-b2b__hero, .pm-b2b__section) p { margin: 0 0 1em; }
body.pm-b2b-scheda .pm-b2b .pm-b2b__eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  color: #456038;
  margin-bottom: 0.8rem;
}
body.pm-b2b-scheda .pm-b2b .pm-b2b__lead {
  font-size: clamp(1.25rem, 1.8vw, 1.6rem);
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 1rem;
}
body.pm-b2b-scheda .pm-b2b :where(.pm-b2b__hero, .pm-b2b__section) h2 {
  margin: 0 0 0.75em;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  line-height: 1.3;
  color: inherit;
}
body.pm-b2b-scheda .pm-b2b :where(.pm-b2b__hero, .pm-b2b__section) h3 {
  margin: 0 0 0.65em;
  font-size: 1.12rem;
  line-height: 1.4;
  color: inherit;
}
body.pm-b2b-scheda .pm-b2b :where(.pm-b2b__hero, .pm-b2b__section) a:not(.pm-b2b__button) {
  color: #32691c;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  overflow-wrap: anywhere;
}
body.pm-b2b-scheda .pm-b2b :where(.pm-b2b__hero, .pm-b2b__section) a:not(.pm-b2b__button):hover { color: #204812; }
body.pm-b2b-scheda .pm-b2b :where(.pm-b2b__hero, .pm-b2b__section) a:focus-visible {
  outline: 3px solid #252923;
  outline-offset: 4px;
}
body.pm-b2b-scheda .pm-b2b .pm-b2b__highlights {
  margin: 0 0 1.25rem;
  padding-left: 1.2em;
  list-style: disc;
}
body.pm-b2b-scheda .pm-b2b :where(.pm-b2b__hero, .pm-b2b__section) li { margin-bottom: 0.45em; }
body.pm-b2b-scheda .pm-b2b .pm-b2b__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin: 1.25rem 0 1rem;
}
body.pm-b2b-scheda .pm-b2b a.pm-b2b__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 48px;
  max-width: 100%;
  padding: 13px 20px;
  border: 2px solid #32691c;
  border-radius: 4px;
  background: #32691c;
  color: #ffffff !important; /* Il CSS mobile esistente forza il colore dei link. */
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: break-word;
  box-shadow: none;
}
body.pm-b2b-scheda .pm-b2b a.pm-b2b__button:hover {
  border-color: #204812;
  background: #204812;
  color: #ffffff !important;
}
body.pm-b2b-scheda .pm-b2b a.pm-b2b__button--secondary {
  background: #ffffff;
  color: #32691c !important;
}
body.pm-b2b-scheda .pm-b2b a.pm-b2b__button--secondary:hover {
  background: #edf3e8;
  color: #204812 !important;
}
body.pm-b2b-scheda .pm-b2b .pm-b2b__note { font-size: 0.9rem; color: #4d5548; }
body.pm-b2b-scheda .pm-b2b .pm-b2b__section {
  margin-top: 2.5rem;
  scroll-margin-top: 140px;
}
body.pm-b2b-scheda .pm-b2b .pm-b2b__section:first-child { margin-top: 0.5rem; }
body.pm-b2b-scheda .pm-b2b .pm-b2b__section > p { max-width: 80ch; }
body.pm-b2b-scheda .pm-b2b .pm-b2b__projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 1rem;
}
body.pm-b2b-scheda .pm-b2b .pm-b2b__project {
  padding: 22px;
  background: #f6f7f3;
  border-left: 3px solid #32691c;
}
body.pm-b2b-scheda .pm-b2b .pm-b2b__project p:last-child { margin-bottom: 0; }
body.pm-b2b-scheda .pm-b2b .pm-b2b__specs { margin: 0 0 1.25rem; }
body.pm-b2b-scheda .pm-b2b .pm-b2b__specs > div {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 2fr);
  gap: 12px 24px;
  padding: 14px 0;
  border-bottom: 1px solid #dfe3d9;
}
body.pm-b2b-scheda .pm-b2b .pm-b2b__specs dt { font-weight: 700; }
body.pm-b2b-scheda .pm-b2b .pm-b2b__specs dd { margin: 0; }
body.pm-b2b-scheda .pm-b2b .pm-b2b__quote {
  padding: clamp(20px, 3vw, 36px);
  border: 1px solid #d5dfcd;
  border-radius: 6px;
  background: #f4f7ef;
}
body.pm-b2b-scheda .pm-b2b .pm-b2b__direct { margin-bottom: 0; }
/* Riquadro opzionale: regole circoscritte al solo nuovo blocco. */
body.pm-b2b-scheda .pm-b2b .pm-b2b__qr-dinamici {
  box-sizing: border-box;
  max-width: 60rem;
  margin-inline: auto;
  padding: clamp(20px, 3vw, 36px);
  border: 1px solid #d5dfcd;
  border-radius: 6px;
  background: #f4f7ef;
  text-align: center;
}
body.pm-b2b-scheda .pm-b2b .pm-b2b__qr-dinamici > p { margin-inline: auto; }
body.pm-b2b-scheda .pm-b2b .pm-b2b__qr-dinamici .pm-b2b__actions {
  justify-content: center;
  margin-bottom: 0;
}
body.pm-b2b-scheda .pm-b2b .pm-b2b__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
body.pm-b2b-scheda #single-blocks:has(.pm-b2b) #post-media { scroll-margin-top: 140px; }

@media (max-width: 900px) {
  body.pm-b2b-scheda #single-blocks:has(.pm-b2b) {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  body.pm-b2b-scheda #single-blocks:has(.pm-b2b) > #post-media,
  body.pm-b2b-scheda .pm-b2b .pm-b2b__hero { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  body.pm-b2b-scheda .pm-b2b .pm-b2b__projects,
  body.pm-b2b-scheda .pm-b2b .pm-b2b__specs > div { grid-template-columns: minmax(0, 1fr); }
  body.pm-b2b-scheda .pm-b2b .pm-b2b__specs > div { gap: 4px; }
  body.pm-b2b-scheda .pm-b2b .pm-b2b__actions { align-items: stretch; flex-direction: column; }
  body.pm-b2b-scheda .pm-b2b a.pm-b2b__button { width: 100%; }
  body.pm-b2b-scheda .pm-b2b .pm-b2b__text-link { text-align: center; }
  body.pm-b2b-scheda .pm-b2b .pm-b2b__section { margin-top: 2rem; }
}

/* I blocchi comuni riusati mantengono le loro classi e i rispettivi CSS. */
body.pm-b2b-scheda .pm-b2b .pm-b2b__technical .pm-specs { margin-block: 0 1.25rem; }
body.pm-b2b-scheda .pm-b2b .pm-b2b__technical .pm-specs__title { font-size: 1.12rem; }
body.pm-b2b-scheda .pm-b2b .pm-b2b__common { margin-top: 2.5rem; }
body.pm-b2b-scheda .pm-b2b [id] { scroll-margin-top: 180px; }
body.pm-b2b-scheda #single-blocks:has(.pm-b2b):not(:has(> #post-media)) { grid-template-columns: minmax(0, 1fr); }

/* Leggibilità circoscritta al modello, inclusi gli accordion senza CSS in 2.8.2. */
body.pm-b2b-scheda .pm-b2b .pm-b2b__body { font-size: 1rem; overflow-wrap: anywhere; }
body.pm-b2b-scheda .pm-b2b .pm-specs__row { gap: .5rem 1.25rem; padding-block: .8rem; }
body.pm-b2b-scheda .pm-b2b .pm-specs__row--notes dd,
body.pm-b2b-scheda .pm-b2b .pm-specs__hint { font-size: 1rem; line-height: 1.65; }
body.pm-b2b-scheda .pm-b2b .pm-specs__hint { margin: .65rem 0 .5rem; }
body.pm-b2b-scheda .pm-b2b .pm-specs__techniques { gap: .45rem; }
body.pm-b2b-scheda .pm-b2b .pm-specs__techniques > li { margin: 0; }
body.pm-b2b-scheda .pm-b2b .pm-b2b__quote { padding: clamp(18px, 2vw, 24px); }
body.pm-b2b-scheda .pm-b2b .pm-b2b__quote h2 { font-size: clamp(1.25rem, 1.8vw, 1.5rem); margin-bottom: .6rem; }
body.pm-b2b-scheda .pm-b2b .pm-b2b__quote .pm-b2b__actions { margin: .9rem 0 .7rem; gap: 10px 14px; }
body.pm-b2b-scheda .pm-b2b .pm-b2b__quote .pm-b2b__direct { margin: 0; font-size: .95rem; }
body.pm-b2b-scheda .pm-b2b :where(.pusa-product-info__item, .pm-b2b__quote-notes) {
  margin: 0; padding-block: .8rem; border-bottom: 1px solid #dfe6da;
}
body.pm-b2b-scheda .pm-b2b :where(.pusa-product-info__item, .pm-b2b__quote-notes) > summary {
  display: list-item; padding: .5rem .25rem; min-height: 44px; box-sizing: border-box;
  cursor: pointer; font-size: 1rem; font-weight: 600; line-height: 1.5; color: #293223;
}
body.pm-b2b-scheda .pm-b2b .pusa-product-info__content { padding: .6rem .25rem 0; line-height: 1.7; }
body.pm-b2b-scheda .pm-b2b .pusa-product-info__content > :last-child { margin-bottom: 0; }
body.pm-b2b-scheda .pm-b2b summary:focus-visible,
body.pm-b2b-scheda #post-media .sp-thumbnail-container:focus-visible { outline: 3px solid #32691c; outline-offset: -3px; }
@media (max-width: 600px) {
  body.pm-b2b-scheda .pm-b2b .pm-specs__row { gap: .3rem; }
  body.pm-b2b-scheda .pm-b2b .pm-b2b__quote .pm-b2b__actions { gap: 10px; }
  body.pm-b2b-scheda .pm-b2b .pm-b2b__quote a.pm-b2b__button { padding: 11px 14px; }
}
