html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* === Titoli in stile "Tre modi per lavorare insieme" – tutto il sito e plugin === */
h1, h2, h3,
.wp-block-post-title,
.wp-block-query-title,
.product_title,
.woocommerce-products-header__title,
.wc-block-components-title,
.elementor-heading-title {
  font-family: "Cormorant Garamond", serif !important;
  font-weight: 500 !important;
  text-transform: uppercase !important;
  letter-spacing: normal !important;
  color: #1f2020;
}

/* Dimensione dei titoli principali (esclusi titoli prodotto nelle griglie e carrello) */
h1,
h2:not(.woocommerce-loop-product__title):not(.wc-block-grid__product-title):not(.wc-block-mini-cart__title):not(.wc-block-product-template *):not(.wc-block-mini-cart__drawer *),
h1.wp-block-post-title,
h1.product_title,
.elementor-widget-heading h1.elementor-heading-title,
.elementor-widget-heading h2.elementor-heading-title {
  font-size: 30px !important;
  line-height: 38px !important;
}

/* Lineetta oro sotto il titolo (la home ha già la sua) */
h1:not(.sa *)::after,
h2:not(.sa *):not(.woocommerce-loop-product__title):not(.wc-block-grid__product-title):not(.wc-block-mini-cart__title):not(.wc-block-product-template *):not(.wc-block-mini-cart__drawer *)::after {
  content: "";
  display: block;
  width: 60px;
  height: 1px;
  background: #c9a86a;
  margin: 12px auto 0;
}
h1.has-text-align-left::after, h2.has-text-align-left::after,
.elementor-align-left .elementor-heading-title::after { margin-left: 0; }
h1.has-text-align-right::after, h2.has-text-align-right::after,
.elementor-align-right .elementor-heading-title::after { margin-right: 0; }

@media (max-width: 600px) {
  h1, h1.wp-block-post-title, h1.product_title,
  h2:not(.woocommerce-loop-product__title):not(.wc-block-mini-cart__title):not(.wc-block-product-template *):not(.wc-block-mini-cart__drawer *) {
    font-size: 26px !important;
    line-height: 32px !important;
  }
}

/* === Pagina FAQ === */
/* Titoli di sezione nello stile del sito (anche su desktop) */
body.page-id-209 .faqx .faqx-k { text-align: center !important; }
body.page-id-209 .faqx h2.faqx-h {
  text-align: center !important;
  text-transform: uppercase !important;
  font-weight: 500 !important;
}
/* Titolo F.A.Q. sulla copertina */
body.page-id-209 .wp-block-cover p.has-x-large-font-size {
  font-family: "Cormorant Garamond", serif !important;
  font-weight: 500;
  letter-spacing: .08em;
}

@media (max-width: 781px) {
  body.page-id-209 .wp-block-cover { min-height: 220px !important; }
  body.page-id-209 .faqx { padding: 0 20px; box-sizing: border-box; }
  body.page-id-209 .faqx .faqx-intro { margin: 36px auto 0; }
  body.page-id-209 .faqx .faqx-intro p { font-size: 15px; line-height: 1.65; }

  /* Categorie: griglia 2x2 ordinata */
  body.page-id-209 .faqx .faqx-nav {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 20px;
  }
  body.page-id-209 .faqx .faqx-nav a {
    display: flex; align-items: center; justify-content: center; text-align: center;
    min-height: 48px; padding: 8px 6px; font-size: 11px; letter-spacing: .08em; line-height: 1.3;
  }

  body.page-id-209 .faqx .faqx-sec { margin: 48px auto 18px; scroll-margin-top: 90px; }
  body.page-id-209 .faqx h2.faqx-h { font-size: 26px !important; line-height: 32px !important; }

  /* Domande */
  body.page-id-209 .faqx .faqx-item summary {
    padding: 16px 34px 16px 0; font-size: 15px; line-height: 1.45;
  }
  body.page-id-209 .faqx .faqx-item summary:after { top: 12px; right: 2px; }
  body.page-id-209 .faqx .faqx-item p { font-size: 15px; line-height: 1.7; margin-bottom: 18px; }

  /* Box finale */
  body.page-id-209 .faqx .faqx-cta { margin: 50px auto 70px; padding: 28px 22px; }
  body.page-id-209 .faqx .faqx-cta h3 { font-size: 26px !important; }
  body.page-id-209 .faqx .faqx-cta a { display: block; text-align: center; margin: 0 0 10px; }
}

/* === Ottimizzazione cellulare – tutte le pagine === */
@media (max-width: 600px) {
  /* Riquadri e griglie non devono mai uscire dallo schermo */
  body .sa section > div,
  body .sa [style*="max-width"] { min-width: 0; max-width: 100% !important; }
  body .sa [style*="minmax(2"],
  body .sa [style*="minmax(3"],
  body .sa [style*="minmax(4"] { grid-template-columns: 1fr !important; gap: 20px !important; }

  /* Padding interni più leggeri */
  body .sa [style*="padding:40px"], body .sa [style*="padding: 40px"],
  body .sa [style*="padding:44px"], body .sa [style*="padding: 44px"],
  body .sa [style*="padding:48px"], body .sa [style*="padding: 48px"],
  body .sa [style*="padding:56px"], body .sa [style*="padding: 56px"],
  body .sa [style*="padding:60px"], body .sa [style*="padding: 60px"] {
    padding: 28px 22px !important;
  }

  /* Titoli: niente parole tagliate */
  body .sa h1, body .sa h1.serif { font-size: 28px !important; line-height: 1.2 !important; }
  body h1, body h2, body h3 { overflow-wrap: break-word; hyphens: manual; }

  /* Testi e pulsanti */
  body .sa p { overflow-wrap: break-word; }
  body .sa a[style*="padding"], body .wp-block-button__link { line-height: 1.3; }
  body .wp-block-buttons { gap: 10px; }
  body .wp-block-buttons > .wp-block-button { width: 100%; }
  body .wp-block-buttons .wp-block-button__link { display: block; width: 100%; text-align: center; }
}
@media (max-width: 380px) {
  body .sa h1, body .sa h1.serif { font-size: 25px !important; }
  body h2:not(.woocommerce-loop-product__title):not(.wc-block-mini-cart__title):not(.wc-block-product-template *) {
    font-size: 24px !important; line-height: 30px !important;
  }
}

/* Evita la doppia lineetta oro quando la pagina ha già la sua */
h1:has(+ .line)::after, h2:has(+ .line)::after,
h1:has(+ .wp-block-separator)::after, h2:has(+ .wp-block-separator)::after { display: none !important; }