/* ==========================================================================
   Páginas de producto (/productos/…). Se carga después de styles.css y estilo-app.css.
   Reutiliza los tokens del sitio; aquí solo va el acomodo propio de estas páginas.
   ========================================================================== */

.pp-nav { display: flex; align-items: center; }
.pp-nav .nav-link { height: var(--header-h); }

/* ---------- Encabezado de la página ---------- */
.pp-hero { background: linear-gradient(160deg, var(--navy-950), var(--navy)); color: #fff; padding-block: clamp(36px, 6vw, 72px); }
.pp-hero :focus-visible { outline-color: #fff; }
.pp-hero-inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.pp-hero h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 800; letter-spacing: -.02em; }
.pp-hero-short h1 { margin-top: 6px; }
.pp-lead { margin-top: 18px; font-size: 1.15rem; color: rgba(255, 255, 255, .82); max-width: 58ch; }
.pp-crumbs { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: .9rem; color: rgba(255, 255, 255, .7); margin-bottom: 18px; }
.pp-crumbs a { padding-block: 10px; }
.pp-crumbs a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.pp-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.pp-cta .btn svg { width: 18px; height: 18px; }

.pp-hero-img { background: #fff; border-radius: var(--r-block); box-shadow: var(--e3); padding: clamp(20px, 3vw, 36px); display: grid; gap: 16px; justify-items: center; }
.pp-hero-img > img { width: 100%; max-height: 380px; object-fit: contain; }
.pp-hero-img figcaption { justify-self: end; }
.pp-hero-img figcaption img { height: 26px; width: auto; }

/* ---------- Secciones ---------- */
.pp-section { padding-block: clamp(48px, 7vw, 88px); }
.pp-alt { background: var(--row); }
.pp-section .section-head { margin-bottom: 28px; }
.pp-section h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; }
.pp-group { margin: 40px 0 18px; font-size: 1.4rem; font-weight: 800; color: var(--navy); }
.pp-group:first-child { margin-top: 0; }

/* Modelo */
.pp-models { display: grid; gap: 20px; }
.pp-model { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: start;
  background: #fff; border-radius: var(--r-card); box-shadow: var(--e2); padding: clamp(20px, 3vw, 32px); }
.pp-model-img { background: var(--row); border-radius: 16px; padding: 16px; display: grid; place-items: center; aspect-ratio: 1; }
.pp-model-img { overflow: hidden; }
.pp-model-img img { max-height: 228px; max-width: 100%; width: auto; height: auto; object-fit: contain; }
.pp-model-body .kicker { margin-bottom: 8px; }
.pp-model-body h3 { font-size: 1.45rem; font-weight: 800; color: var(--navy); margin-bottom: 10px; }
.pp-model-body > p { color: var(--ink); max-width: 70ch; }
.pp-model-link:hover { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }

.pp-figs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.pp-figs div { background: var(--row-2); border-radius: 14px; padding: 10px 16px; min-width: 120px; }
.pp-figs dt { font-size: .82rem; color: var(--muted); }
.pp-figs dd { margin: 0; font-size: 1.2rem; font-weight: 800; color: var(--navy); }

.pp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pp-chips li { background: var(--row-2); color: var(--navy); border-radius: 999px; padding: 6px 14px; font-size: .9rem; font-weight: 600; }

.pp-table-wrap { margin-top: 18px; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 14px; background: #fff; box-shadow: var(--e1); }
.pp-table { width: 100%; border-collapse: collapse; font-size: .97rem; }
.pp-table caption { text-align: left; font-weight: 700; color: var(--navy); padding: 14px 16px 4px; }
.pp-table th, .pp-table td { padding: 11px 16px; text-align: left; vertical-align: top; }
.pp-table thead th { background: var(--navy); color: #fff; font-size: .85rem; letter-spacing: .04em; }
.pp-table tbody tr:nth-child(even) { background: var(--row); }
.pp-table tbody th { font-weight: 600; color: var(--navy); }
.pp-code { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.pp-note { margin-top: 14px; color: var(--muted); max-width: 80ch; }

/* Usos y preguntas */
.pp-two { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 80px); }
.pp-two h2 { margin-bottom: 20px; }
.pp-uses { display: grid; gap: 10px; }
.pp-uses li { position: relative; padding-left: 28px; }
.pp-uses li::before { content: ""; position: absolute; left: 4px; top: .6em; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.pp-faq { display: grid; gap: 10px; }
.pp-faq-item { background: #fff; border-radius: 14px; box-shadow: var(--e1); }
.pp-faq-item summary { cursor: pointer; list-style: none; padding: 16px 48px 16px 18px; font-weight: 700; color: var(--navy); position: relative; }
.pp-faq-item summary::-webkit-details-marker { display: none; }
.pp-faq-item summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--red); transition: transform .2s var(--ease); }
.pp-faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.pp-faq-item p { padding: 0 18px 18px; color: var(--ink); }

/* Contacto */
.pp-contact-inner { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.pp-contact h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; }
.pp-phones { display: grid; gap: 6px; }
.pp-phones a { display: inline-flex; align-items: center; gap: 12px; font-size: 1.2rem; font-weight: 700; padding-block: 10px; }
.pp-phones svg { color: var(--pink); width: 20px; height: 20px; }
.pp-phones a:hover { color: var(--pink); }

/* Tarjetas de producto */
.pp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 18px; }
.pp-card { display: grid; grid-template-rows: auto 1fr; background: #fff; border-radius: var(--r-card); box-shadow: var(--e2); overflow: hidden;
  transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.pp-card:hover { box-shadow: var(--e3); transform: translateY(-2px); }
.pp-card-img { background: var(--row); display: grid; place-items: center; height: 180px; padding: 18px; overflow: hidden; }
.pp-card-img img { max-height: 144px; max-width: 100%; width: auto; height: auto; object-fit: contain; }
.pp-card-body { padding: 16px 18px 20px; display: grid; gap: 6px; align-content: start; }
.pp-card-brand { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
.pp-card-title { font-weight: 700; color: var(--navy); font-size: 1.08rem; line-height: 1.3; }

/* Página por producto */
.pp-hero-solo { grid-template-columns: minmax(0, 1fr); }
.pp-text { font-size: 1.12rem; max-width: 60ch; }
.pp-narrow .pp-faq { max-width: 860px; }
.pp-narrow h2 { margin-bottom: 20px; }
.pp-more { margin-top: 18px; }
.pp-model-noimg { grid-template-columns: minmax(0, 1fr); }
.pp-prods { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.pp-prod { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; align-items: start;
  background: #fff; border-radius: var(--r-card); box-shadow: var(--e1); padding: 18px; }
.pp-prod:not(:has(.pp-prod-img)) { grid-template-columns: minmax(0, 1fr); }
.pp-prod-img { background: var(--row); border-radius: 12px; height: 96px; display: grid; place-items: center; padding: 8px; overflow: hidden; }
.pp-prod-img img { max-height: 80px; max-width: 100%; width: auto; height: auto; object-fit: contain; }
.pp-prod .kicker { margin-bottom: 4px; font-size: .72rem; }
.pp-prod h3 { font-size: 1.08rem; font-weight: 800; color: var(--navy); margin-bottom: 6px; line-height: 1.25; }
.pp-prod p { font-size: .97rem; }
.pp-prod-n { margin-top: 8px; color: var(--muted); font-size: .88rem !important; }
.pp-codes-title { margin-top: 44px; }
.pp-table-long { max-height: 640px; overflow: auto; }
.pp-table-long thead th { position: sticky; top: 0; z-index: 1; }

/* Índice de productos */
.pp-subgroup { margin: 34px 0 6px; font-size: 1.15rem; font-weight: 800; color: var(--red); letter-spacing: .02em; }
.pp-cat { margin: 18px 0 12px; font-size: 1.05rem; font-weight: 700; color: var(--navy); }
.pp-cards-sm { grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.pp-cards-sm .pp-card-img { height: 140px; }
.pp-cards-sm .pp-card-img img { max-height: 108px; }
.pp-lines { columns: 3 280px; column-gap: 32px; }
.pp-line { break-inside: avoid; margin-bottom: 26px; }
.pp-line h3 { font-size: 1.05rem; font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.pp-line li a { display: block; padding: 6px 0; color: var(--ink); border-bottom: 1px solid var(--line); }
.pp-line li a:hover { color: var(--red); }

/* ---------- WhatsApp (gratis: enlace wa.me) ---------- */
:root { --wa: #1fa855; --wa-dark: #178a45; }
.wa-float {
  position: fixed; right: 24px; bottom: 24px; z-index: 95;
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--wa); color: #fff; font-weight: 700; border-radius: 999px;
  padding: 12px 20px 12px 14px; box-shadow: 0 8px 24px rgba(6, 33, 58, .25);
  transition: background-color .2s var(--ease), transform .2s var(--ease);
}
.wa-float:hover { background: var(--wa-dark); transform: translateY(-2px); }
.wa-float:active { transform: scale(.97); }
.wa-float svg { width: 28px; height: 28px; }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: var(--wa-dark); }
.btn-wa svg { width: 20px; height: 20px; }
.contact-list .contact-wa svg { color: #6fe39a; }
.actionbar-wa { background: var(--wa); color: #fff; }
.actionbar-wa svg { width: 18px; height: 18px; }
@media (max-width: 900px) {
  .wa-float { display: none; }           /* en celular va en la barra fija de abajo */
  .actionbar { gap: 6px; }
  .actionbar a { font-size: .95rem; gap: 6px; }
}
@media (max-width: 380px) { .actionbar a svg { display: none; } }
@media (prefers-reduced-motion: reduce) { .wa-float, .wa-float:hover { transition: none; transform: none; } }

/* Sección "Productos más buscados" en el inicio */
.featured .pp-cards { margin-top: 8px; }
.featured-more { margin-top: 28px; }

@media (max-width: 1100px) {
  .pp-nav { display: none; }
}
@media (max-width: 900px) {
  .pp-hero-inner, .pp-two, .pp-contact-inner { grid-template-columns: minmax(0, 1fr); }
  .pp-hero-img { order: -1; }
  .pp-hero-img > img { max-height: 240px; }
}
@media (max-width: 640px) {
  .pp-model { grid-template-columns: minmax(0, 1fr); }
  .pp-model-img { aspect-ratio: auto; height: 200px; }
  .pp-model-img img { max-height: 168px; }
  .pp-cta .btn { flex: 1 1 100%; }
  .pp-table th, .pp-table td { padding: 10px 12px; }
}
