/* Ficha de producto Paramireforma (tema Warehouse). Verde de la tienda #a2bf5e; texto verde #6d8a2f para contraste. */
.page-product {
  --apf-green: #a2bf5e;
  --apf-green-d: #6d8a2f;
  --apf-green-bg: #f3f7ea;
  --apf-line: #e6e8e1;
  --apf-text: #2b2f27;
  --apf-muted: #6b7065;
  --apf-red: #b2433a;
  --apf-red-bg: #fbf0ee;
}

.apf-hidden { display: none !important; }

/* ---------- Cabecera: marca, referencia y nombre ---------- */
.page-product .apf-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--apf-muted);
  letter-spacing: .02em;
}
.page-product .apf-meta[hidden] { display: none; }
.page-product .apf-meta__brand {
  color: var(--apf-text);
  font-weight: 700;
  text-transform: uppercase;
}
.page-product #col-product-info h1.page-title {
  text-transform: none;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 600;
  margin-bottom: 10px;
}
.page-product .product-prices .current-price-value { font-weight: 700; }
/* El texto genérico de entrega del tema se sustituye por el bloque de compra del módulo. */
.page-product .product-prices .delivery-information { display: none; }
.page-product .product-actions > div:not([class]):has(> a[href*="informacion-de-envios"]) { display: none; }

/* ---------- Descripción corta ---------- */
.apf-short { font-size: 14px; color: var(--apf-text); }
.apf-short h1, .apf-short h2, .apf-short h3 { font-size: 15px; text-transform: none; margin: 0 0 8px; }
.apf-short .apf-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 2px 0 12px;
}
.apf-short .apf-chips li {
  padding: 3px 10px;
  border: 1px solid #dbe5c4;
  border-radius: 999px;
  background: var(--apf-green-bg);
  font-size: 12.5px;
  line-height: 1.5;
  white-space: nowrap;
}
.apf-short ul:not(.apf-chips) {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
  display: grid;
  gap: 5px;
}
.apf-short ul:not(.apf-chips) li {
  position: relative;
  padding-left: 22px;
  line-height: 1.45;
}
.apf-short ul:not(.apf-chips) li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .38em;
  width: 11px;
  height: 6px;
  border-left: 2px solid var(--apf-green-d);
  border-bottom: 2px solid var(--apf-green-d);
  transform: rotate(-45deg);
}
.apf-short p { margin: 0 0 8px; }
.apf-links { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; margin: 0 0 10px !important; }
.apf-links a { color: var(--apf-green-d); text-decoration: underline; text-underline-offset: 2px; }
.apf-links a:hover { color: var(--apf-text); }
.apf-promo {
  margin: 4px 0 6px;
  padding: 9px 12px;
  border-left: 3px solid var(--apf-green);
  background: var(--apf-green-bg);
  font-size: 13.5px;
}

/* ---------- Bloque de compra ---------- */
.page-product .product-additional-info .social-sharing { display: none; }
.apf-trust {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  border: 1px solid var(--apf-line);
}
.apf-trust__item {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border-bottom: 1px solid var(--apf-line);
}
.apf-trust__item:last-child { border-bottom: 0; }
.apf-trust__icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--apf-green-d);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.apf-trust__text { display: grid; gap: 1px; font-size: 13px; line-height: 1.4; color: var(--apf-muted); }
.apf-trust__text strong { color: var(--apf-text); font-weight: 600; }
.apf-trust__text a { color: var(--apf-muted); text-decoration: underline; text-underline-offset: 2px; font-size: 12px; }
.apf-help {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--apf-muted);
}
.apf-help__a { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.apf-help__a a { color: var(--apf-green-d); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Descripción larga ---------- */
.page-product #description .product-description h2,
.page-product .product-description h2 {
  font-size: 19px;
  text-transform: none;
  margin: 26px 0 10px;
}
.page-product #description .product-description > h2:first-child { margin-top: 4px; }
.page-product #description .product-description p { line-height: 1.6; }
.page-product #description .product-description ul { padding-left: 18px; }
.page-product #description .product-description li { margin-bottom: 4px; line-height: 1.55; }

.apf-fit {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 6px 0 16px;
}
@media (max-width: 767px) { .apf-fit { grid-template-columns: 1fr; } }
.apf-fit__col { padding: 14px 16px; }
.apf-fit__col--yes { background: var(--apf-green-bg); }
.apf-fit__col--no { background: var(--apf-red-bg); }
.apf-fit__title { font-weight: 700; margin: 0 0 8px !important; color: var(--apf-text); }
.apf-fit ul { list-style: none; padding: 0 !important; margin: 0; display: grid; gap: 6px; }
.apf-fit li { position: relative; padding-left: 22px; }
.apf-fit__col--yes li::before { content: "✓"; position: absolute; left: 0; color: var(--apf-green-d); font-weight: 700; }
.apf-fit__col--no li::before { content: "✕"; position: absolute; left: 1px; color: var(--apf-red); font-weight: 700; }

/* ---------- Calculadoras ---------- */
.apf-calc {
  margin: 10px 0 20px;
  padding: 16px;
  border: 1px solid #dbe5c4;
  background: #fafcf5;
}
.apf-calc__title { font-weight: 700; font-size: 16px; margin: 0 0 12px !important; color: var(--apf-text); }
.apf-calc__fields { display: flex; flex-wrap: wrap; gap: 12px 16px; }
.apf-calc label { display: grid; gap: 4px; font-size: 12.5px; color: var(--apf-muted); margin: 0; }
.apf-calc label > span { display: flex; align-items: center; gap: 6px; color: var(--apf-text); font-size: 13px; }
.apf-calc input, .apf-calc select {
  height: 36px;
  padding: 4px 8px;
  border: 1px solid #cfd4c7;
  background: #fff;
  font-size: 14px;
  color: var(--apf-text);
}
.apf-calc input { width: 84px; }
.apf-calc input:focus, .apf-calc select:focus { outline: 2px solid var(--apf-green); outline-offset: 1px; }
.apf-calc__result { margin: 14px 0 4px !important; font-size: 15px; color: var(--apf-text); min-height: 1.5em; }
.apf-calc__result .apf-ok { display: block; margin-top: 4px; color: var(--apf-green-d); font-weight: 600; }
.apf-calc__result .apf-ko { display: block; margin-top: 4px; color: var(--apf-red); font-weight: 600; }
.apf-calc__note { margin: 0 !important; font-size: 12px; color: var(--apf-muted); }

/* ---------- Ficha técnica ---------- */
.apf-specs__title { font-size: 19px; text-transform: none; margin: 4px 0 14px; }
.apf-specs__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 28px;
}
@media (max-width: 767px) { .apf-specs__grid { grid-template-columns: 1fr; } }
.apf-specs__name {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--apf-green-d);
  margin: 0 0 6px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--apf-green);
}
.apf-specs table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.apf-specs td { padding: 7px 0; border-bottom: 1px solid var(--apf-line); vertical-align: top; }
.apf-specs td:first-child { color: var(--apf-muted); padding-right: 12px; width: 52%; }
.apf-specs td:last-child { color: var(--apf-text); font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Barra fija en móvil ---------- */
.apf-sticky { display: none; }
@media (max-width: 767px) {
  .apf-sticky {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px max(12px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
    background: #fff;
    border-top: 1px solid var(--apf-line);
    box-shadow: 0 -4px 14px rgba(0, 0, 0, .08);
    transform: translateY(110%);
    transition: transform .2s ease;
  }
  .apf-sticky--on { transform: translateY(0); }
  .apf-sticky__info { display: grid; min-width: 0; flex: 1; }
  .apf-sticky__name { font-size: 12px; color: var(--apf-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .apf-sticky__price { font-size: 17px; font-weight: 700; color: var(--apf-green-d); }
  .apf-sticky__btn {
    flex: 0 0 auto;
    border: 0;
    background: var(--apf-green);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    padding: 12px 16px;
  }
  body.apf-sticky-pad { padding-bottom: 68px; }
  .page-product #col-product-info h1.page-title { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) { .apf-sticky { transition: none; } }

/* Si el contenido ya pone un H2 justo encima de la calculadora, no se repite el título. */
h2 + .apf-calc .apf-calc__title { display: none; }
.apf-fit a { color: var(--apf-green-d); text-decoration: underline; text-underline-offset: 2px; }

/* Teléfono destacado: debajo de la calculadora y en el bloque de compra (enlace tel: para llamar). */
.apf-call {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #dbe5c4;
}
.apf-call__text { font-size: 14px; font-weight: 600; color: var(--apf-text); }
.page-product a.apf-call__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  background: var(--apf-green);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .02em;
  text-decoration: none;
  white-space: nowrap;
}
.page-product a.apf-call__btn:hover, .page-product a.apf-call__btn:focus-visible { background: var(--apf-green-d); color: #fff; }
.apf-call__icon { width: 18px; height: 18px; fill: currentColor; flex: 0 0 auto; }
@media (max-width: 767px) { .page-product a.apf-call__btn { width: 100%; justify-content: center; } }

.apf-help { align-items: center; }
.page-product .apf-help__a a.apf-help__phone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 2px solid var(--apf-green);
  color: var(--apf-green-d);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.page-product .apf-help__a a.apf-help__phone:hover { background: var(--apf-green); color: #fff; }
.apf-help__a { align-items: center; }

/* 1.2.0: calculadoras de consumo y pellet */
.apf-calc__hint { flex: 1 0 100%; margin: 0 !important; font-size: 12px; color: var(--apf-muted); }
.apf-calc__result .apf-extra { display: block; margin-top: 4px; }
