/* ==========================================================================
   product-landing-page.css
   Landing page Fix&Go MICROAIR — enqueue condizionale (vedi functions.php),
   mai caricato globalmente. Punta alle classi ufficiali dei blocchi
   WooCommerce (wc-block-components-*) invece di indovinare markup interno.
   NB: verifica i selettori .wc-block-components-* via ispettore sul
   rendering effettivo — cambiano leggermente tra versioni di WooCommerce
   Blocks; quelli qui sotto sono quelli correnti al momento della scrittura.
   ========================================================================== */

:root {
  --pdp-paper: var(--wp--preset--color--secondary, #F8F8F6);
  --pdp-paper-alt: var(--wp--preset--color--secondary-alt, #F1F1EE);
  --pdp-ink: var(--wp--preset--color--black, #131310);
  --pdp-muted: var(--wp--preset--color--muted, #6D6D66);
  --pdp-accent: var(--wp--preset--color--accent, #D2521E);
  --pdp-hairline: var(--wp--preset--color--hairline, #DCDCD6);
  --pdp-alert: var(--wp--preset--color--alert, #B4202F);
  --pdp-motion: 0.28s ease;
}

.mk-landing * { box-sizing: border-box; }

.mk-landing {
  background: var(--pdp-paper);
  color: var(--pdp-ink);
}

.mk-landing :focus-visible {
  outline: 2px solid var(--pdp-accent);
  outline-offset: 2px;
}

.mk-landing .eyebrow {
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pdp-muted);
}

.mk-landing hr.mk-hairline {
  border: none;
  border-top: 1px solid var(--pdp-hairline);
}

/* ---------- ghost buttons: applicati a link/bottoni statici E al
   blocco dinamico "Prodotto: pulsante" (add_to_cart_button) ---------- */

.mk-landing .btn-ghost,
.mk-landing .wp-block-woocommerce-product-button .wp-block-button__link,
.mk-landing .wp-block-woocommerce-product-button a.add_to_cart_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--pdp-ink);
  background: transparent !important;
  color: var(--pdp-ink) !important;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 26px;
  border-radius: 0 !important;
  box-shadow: none !important;
  cursor: pointer;
  transition: background var(--pdp-motion), color var(--pdp-motion), border-color var(--pdp-motion);
}

.mk-landing .btn-ghost:hover,
.mk-landing .wp-block-woocommerce-product-button .wp-block-button__link:hover,
.mk-landing .wp-block-woocommerce-product-button a.add_to_cart_button:hover {
  background: var(--pdp-ink) !important;
  color: var(--pdp-paper) !important;
}

.mk-landing .btn-ghost--accent,
.mk-landing .mk-hero__actions .wp-block-woocommerce-product-button .wp-block-button__link,
.mk-landing .mk-final .wp-block-woocommerce-product-button .wp-block-button__link {
  border-color: var(--pdp-accent) !important;
}

.mk-landing .btn-ghost--accent:hover,
.mk-landing .mk-hero__actions .wp-block-woocommerce-product-button .wp-block-button__link:hover,
.mk-landing .mk-final .wp-block-woocommerce-product-button .wp-block-button__link:hover {
  background: var(--pdp-accent) !important;
  border-color: var(--pdp-accent) !important;
  color: #fff !important;
}

.mk-landing .btn-ghost--small,
.mk-sticky .wp-block-woocommerce-product-button .wp-block-button__link {
  padding: 10px 18px !important;
  font-size: 0.72rem !important;
}

/* ---------- badge sconto: reskin del blocco "Prodotto: badge sconto" ---------- */

.mk-landing .wc-block-components-product-sale-badge,
.mk-landing .wp-block-woocommerce-product-sale-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  background: transparent !important;
  border: 1px solid var(--pdp-alert) !important;
  color: var(--pdp-alert) !important;
  font-weight: 600;
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 9px !important;
  border-radius: 0 !important;
  font-variant-numeric: tabular-nums;
}

/* ---------- prezzo: blocco dinamico "Prodotto: prezzo" ---------- */

.mk-price {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 8px !important;
}

.mk-price .wc-block-components-product-price,
.mk-price .price {
  font-variant-numeric: tabular-nums;
}

.mk-price .wc-block-components-product-price__value.is-discounted,
.mk-price ins {
  font-weight: 700;
  font-size: 2.3rem;
  line-height: 1;
  text-decoration: none;
  color: var(--pdp-ink);
}

.mk-price del,
.mk-price .wc-block-components-product-price__regular {
  font-weight: 600;
  font-size: 1rem;
  color: var(--pdp-muted);
  text-decoration: line-through;
}

.mk-price__sku {
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--pdp-muted);
  font-variant-numeric: tabular-nums;
  margin: 0 0 28px !important;
}

/* ---------- immagine prodotto: blocco dinamico "Immagine in evidenza" ---------- */

.mk-hero__visual,
.mk-hero__visual .wc-block-components-product-image {
  border: 1px solid var(--pdp-hairline);
  background: var(--pdp-paper-alt);
  padding: 0;
}

.mk-hero__visual img {
  display: block;
  width: 100%;
  height: auto;
}

.mk-hero__visual figcaption {
  margin: 0;
  padding: 14px 24px;
  border-top: 1px solid var(--pdp-hairline);
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--pdp-muted);
  font-variant-numeric: tabular-nums;
}

/* ---------- hero layout ---------- */

.mk-hero { padding: 64px 0 56px; }

.mk-hero .wp-block-columns { align-items: center; gap: 40px; }

.mk-hero__copy h1,
.mk-hero__copy .wp-block-post-title {
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 14px 0 18px;
}

.mk-hero__lede {
  font-size: 1.05rem;
  max-width: 46ch;
  margin: 0 0 30px !important;
}

.mk-hero__actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.mk-hero__note {
  font-size: 0.8rem;
  color: var(--pdp-muted);
  margin: 0 !important;
}

@media (max-width: 1023px) {
  .mk-hero .wp-block-columns { flex-wrap: wrap; }
}

/* ---------- problema ---------- */

.mk-problem {
  padding: 52px 0;
  border-top: 1px solid var(--pdp-hairline);
}

.mk-problem .wp-block-columns { gap: 48px; }

.mk-problem p { font-size: 1.15rem; max-width: 62ch; margin: 0; }

@media (max-width: 699px) {
  .mk-problem .wp-block-columns { flex-wrap: wrap; }
}

/* ---------- indice contenuti kit (grid esplicita, breakpoint 1024/700) ---------- */

.mk-kit { padding: 56px 0; border-top: 1px solid var(--pdp-hairline); }

.mk-kit__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.mk-kit__head h2 { font-weight: 700; font-size: 1.6rem; margin: 10px 0 0; }

.mk-kit__count {
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--pdp-muted);
  font-variant-numeric: tabular-nums;
}

.mk-kit__grid {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--pdp-hairline);
  gap: 0;
}

@media (min-width: 700px) {
  .mk-kit__grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1024px) {
  .mk-kit__grid { grid-template-columns: repeat(3, 1fr); }
}

.mk-kit__item {
  border-bottom: 1px solid var(--pdp-hairline);
  border-right: 1px solid var(--pdp-hairline);
  padding: 26px 22px;
  display: flex;
  gap: 16px;
}

@media (min-width: 1024px) {
  .mk-kit__item:nth-child(3n) { border-right: none; }
}

@media (min-width: 700px) and (max-width: 1023px) {
  .mk-kit__item:nth-child(2n) { border-right: none; }
}

@media (max-width: 699px) {
  .mk-kit__item { border-right: none; }
}

.mk-kit__num {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--pdp-accent);
  font-variant-numeric: tabular-nums;
  flex: none;
  padding-top: 2px;
}

.mk-kit__item h3 { font-weight: 600; font-size: 0.95rem; margin: 0 0 6px; }
.mk-kit__item p { font-size: 0.88rem; color: var(--pdp-muted); margin: 0; }

/* ---------- readout bar / psi / kPa ---------- */

.mk-readout { padding: 52px 0; border-top: 1px solid var(--pdp-hairline); }

.mk-readout__head h2 { font-weight: 700; font-size: 1.6rem; margin: 10px 0 30px; }

.mk-readout__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--pdp-hairline);
}

@media (min-width: 700px) {
  .mk-readout__grid { grid-template-columns: repeat(4, 1fr); }
}

.mk-readout__cell {
  padding: 24px 20px;
  border-right: 1px solid var(--pdp-hairline);
  border-bottom: 1px solid var(--pdp-hairline);
}

@media (min-width: 700px) {
  .mk-readout__cell:last-child { border-right: none; }
  .mk-readout__cell { border-bottom: none; }
}

@media (max-width: 699px) {
  .mk-readout__cell:nth-child(2n) { border-right: none; }
  .mk-readout__cell:nth-last-child(-n+2) { border-bottom: none; }
}

.mk-readout__label {
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pdp-muted);
  margin-bottom: 10px;
}

.mk-readout__value {
  font-weight: 700;
  font-size: 1.3rem;
  font-variant-numeric: tabular-nums;
}

.mk-readout__value small {
  font-weight: 600;
  font-size: 0.7rem;
  color: var(--pdp-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-left: 4px;
}

/* ---------- passaggi d'uso (sequenza reale) ---------- */

.mk-steps { padding: 56px 0; border-top: 1px solid var(--pdp-hairline); }

.mk-steps__head h2 { font-weight: 700; font-size: 1.6rem; margin: 10px 0 34px; }

.mk-steps .wp-block-columns { gap: 20px; }

.mk-step__num {
  display: block;
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--pdp-muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.mk-step p { font-size: 0.9rem; margin: 0 !important; }

.mk-step--final .mk-step__num { color: var(--pdp-accent); }

@media (max-width: 699px) {
  .mk-steps .wp-block-columns { flex-wrap: wrap; }
  .mk-step { padding-top: 20px; border-top: 1px solid var(--pdp-hairline); }
}

/* ---------- avvertenze ---------- */

.mk-warn { padding: 40px 0 64px; border-top: 1px solid var(--pdp-hairline); }

.mk-warn__box { border: 1px solid var(--pdp-hairline); padding: 26px 26px 22px; }

.mk-warn__box .eyebrow { color: var(--pdp-alert); margin-bottom: 12px; }

.mk-warn__box ul { margin: 0; padding: 0 0 0 18px; }
.mk-warn__box li { font-size: 0.92rem; margin-bottom: 8px; }
.mk-warn__box li:last-child { margin-bottom: 0; }

/* ---------- cta finale ---------- */

.mk-final {
  border-top: 1px solid var(--pdp-hairline);
  padding: 56px 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: flex-start;
}

@media (min-width: 700px) {
  .mk-final { flex-direction: row; justify-content: space-between; align-items: center; }
}

.mk-final h2 { font-weight: 700; font-size: 1.4rem; margin: 10px 0 0; max-width: 34ch; }

/* ---------- barra sticky: transform-based, fixed, off-flow quando nascosta ---------- */

.mk-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: var(--pdp-paper);
  border-top: 1px solid var(--pdp-ink);
  transform: translateY(100%);
  transition: transform var(--pdp-motion);
}

.mk-sticky.is-visible { transform: translateY(0); }

.mk-sticky__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  max-width: 1160px;
  margin: 0 auto;
}

.mk-sticky .wc-block-components-product-price {
  font-weight: 700;
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  .mk-sticky,
  .mk-landing .btn-ghost,
  .mk-landing .wp-block-woocommerce-product-button .wp-block-button__link {
    transition: none;
  }
}
