/* ==========================================================================
   MGC Electric — hoja de estilos
   Paleta tomada del sitio original (tema Astra):
   rojo de marca #e30613 · #DD183B · #CC1939
   tinta #0F172A / #000 · gris #3A3A3A · fondo #FFFFFF
   tintes durazno #FFEDE6 / #FFD1BF · negro rojizo #140609
   ========================================================================== */

:root {
  --brand: #e30613;
  --brand-deep: #b8050f;
  --brand-ink: #ffffff;

  --bg: #ffffff;
  --bg-soft: #f7f5f3;
  --bg-blush: #ffede6;
  --peach: #ffd1bf;

  /* Fondo para el area de imagen: los productos son PNG blancos y sin esto
     se pierden sobre la tarjeta blanca. */
  --bg-media: #f2efec;

  --ink: #0b0b0c;
  --ink-soft: #0f172a;
  --ink-body: #423c39;
  --ink-dim: #6f6863;

  --border: #e0dbd6;
  --border-strong: #c8c0b8;
  --dark: #140609;

  --font-display: 'IBM Plex Serif', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --radius: 8px;
  --max-width: 1220px;
  --shadow-sm: 0 1px 2px rgba(11, 11, 12, .05);
  --shadow-md: 0 2px 6px rgba(11, 11, 12, .06), 0 14px 34px -22px rgba(11, 11, 12, .5);
  --shadow-lg: 0 4px 12px rgba(11, 11, 12, .08), 0 26px 60px -30px rgba(11, 11, 12, .55);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-body);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.18;
  letter-spacing: -.012em;
  text-wrap: balance;
  margin: 0;
}

a { color: var(--brand); }
a:hover, a:focus { color: var(--brand-deep); }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
::selection { background: var(--brand); color: #fff; }

img { max-width: 100%; height: auto; display: block; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--brand); color: #fff; padding: .8rem 1.2rem; font-weight: 700;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 1.75rem; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .8rem 1.6rem; border-radius: var(--radius); font-weight: 600; font-size: .97rem;
  text-decoration: none; border: 2px solid transparent; cursor: pointer; font-family: inherit;
  line-height: 1.2;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); box-shadow: var(--shadow-sm); }
.btn-primary:hover, .btn-primary:focus { background: var(--brand-deep); border-color: var(--brand-deep); color: #fff; }
.btn-outline { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-outline:hover, .btn-outline:focus { background: var(--brand); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink-soft); border-color: var(--border-strong); }
.btn-ghost:hover, .btn-ghost:focus { border-color: var(--brand); color: var(--brand); }
.btn-sm { padding: .55rem 1.05rem; font-size: .88rem; }

/* ---------- Barra superior ---------- */
.topbar { background: var(--dark); color: #ddd5d6; font-size: .84rem; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding-block: .55rem; }
.topbar a { color: #ddd5d6; text-decoration: none; }
.topbar a:hover { color: var(--peach); }
.topbar-contact { display: flex; gap: 1.5rem; flex-wrap: wrap; font-weight: 500; }

/* ---------- Cabecera ---------- */
.site-header {
  background: #fff; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  max-width: var(--max-width); margin: 0 auto; padding: .9rem 1.75rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; flex-shrink: 0; }
.brand img { width: auto; height: 58px; }

.primary-nav ul { list-style: none; display: flex; align-items: center; gap: 1.75rem; margin: 0; padding: 0; }
.primary-nav > ul > li { position: relative; }
.primary-nav a, .primary-nav summary {
  color: var(--ink-soft); text-decoration: none; font-size: .97rem; font-weight: 500;
  padding: .3rem 0; border-bottom: 2px solid transparent; display: inline-block;
}
.primary-nav a:hover, .primary-nav a[aria-current="page"] { color: var(--brand); border-bottom-color: var(--brand); }
.primary-nav summary { cursor: pointer; list-style: none; }
.primary-nav summary::-webkit-details-marker { display: none; }
.primary-nav summary::after { content: "▾"; margin-left: .3rem; font-size: .8em; color: var(--ink-dim); }
.primary-nav details[open] > summary { color: var(--brand); }
.primary-nav .submenu {
  position: absolute; top: calc(100% + .6rem); left: 50%; transform: translateX(-50%);
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: .45rem; min-width: 270px;
  flex-direction: column; align-items: stretch; gap: 0; z-index: 110;
}
.primary-nav .submenu a {
  display: block; padding: .62rem .85rem; border-radius: 5px; border-bottom: none; white-space: nowrap;
}
.primary-nav .submenu a:hover { background: var(--bg-blush); color: var(--brand); }

.header-cta { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }

.nav-toggle { display: none; background: none; border: 1px solid var(--border-strong); border-radius: 5px; padding: .5rem .68rem; cursor: pointer; color: var(--brand); font-size: 1.15rem; line-height: 1; }

/* ---------- Migas de pan ---------- */
.breadcrumbs { border-bottom: 1px solid var(--border); background: var(--bg-soft); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: .85rem 0; font-size: .87rem; }
.breadcrumbs li:not(:last-child)::after { content: "›"; margin-left: .4rem; color: var(--ink-dim); }
.breadcrumbs a { color: var(--ink-dim); text-decoration: none; }
.breadcrumbs a:hover { color: var(--brand); }
.breadcrumbs [aria-current="page"] { color: var(--ink-soft); font-weight: 600; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(900px 380px at 12% -12%, rgba(227, 6, 19, .09), transparent 70%),
    linear-gradient(180deg, var(--bg-blush) 0%, #fff 62%);
  padding: 4.5rem 0 3.5rem;
  border-bottom: 1px solid var(--border);
}
.hero-grid { display: grid; grid-template-columns: 1.02fr .98fr; gap: 3.5rem; align-items: center; }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .13em; color: var(--brand); margin: 0 0 1rem;
}
.eyebrow::before {
  content: ""; display: inline-block; width: 26px; height: 2px; background: var(--brand);
  vertical-align: middle; margin-right: .6rem;
}
.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); margin-bottom: 1.15rem; }
.hero .lead { font-size: 1.15rem; color: var(--ink-body); max-width: 50ch; margin: 0; }
.hero-actions { display: flex; gap: .9rem; margin-top: 2rem; flex-wrap: wrap; }

.hero-figure {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg);
  background: var(--bg-media); border: 1px solid var(--border);
}
.hero-figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; padding: 1.6rem; }

/* Barra de confianza bajo el hero */
.trust-bar { background: var(--dark); color: #e6dfe0; }
.trust-bar .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1.5rem; padding-block: 1.6rem; }
.trust-bar div { display: flex; flex-direction: column; gap: .1rem; }
.trust-bar strong { font-family: var(--font-display); font-size: 1.85rem; color: #fff; line-height: 1.05; }
.trust-bar span { font-size: .87rem; color: #b9aeb0; }

/* ---------- Secciones ---------- */
section { padding: 4.5rem 0; }
.section-head { margin-bottom: 2.6rem; max-width: 64ch; }
.section-head h1, .section-head h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); margin-bottom: .7rem; }
.section-head p { margin: 0; color: var(--ink-dim); font-size: 1.06rem; }
.section-soft { background: var(--bg-soft); border-block: 1px solid var(--border); }

/* ---------- Tarjetas de categoría ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.75rem; }
.cat-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit;
  box-shadow: var(--shadow-sm);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.cat-card:hover { border-color: var(--brand); box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.cat-card img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: contain;
  background: var(--bg-media); padding: 1.1rem; border-bottom: 1px solid var(--border);
}
.cat-card-body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.cat-card h3 { font-size: 1.25rem; }
.cat-card p { margin: 0; font-size: .95rem; color: var(--ink-dim); flex: 1; }
.pill {
  align-self: flex-start; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  color: var(--brand); background: var(--bg-blush); padding: .3rem .68rem; border-radius: 999px;
}
.cat-card .more { font-size: .93rem; font-weight: 600; color: var(--brand); }
.cat-card:hover .more { text-decoration: underline; }

/* ---------- Ficha de producto ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 1.75rem; }
.product-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.product-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.product-media { position: relative; background: var(--bg-media); border-bottom: 1px solid var(--border); }
.product-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; padding: 1.3rem; }
.product-code {
  position: absolute; top: .8rem; left: .8rem;
  font-family: var(--font-display); font-weight: 600; font-size: .84rem; letter-spacing: .07em;
  color: #fff; background: var(--brand); padding: .28rem .7rem; border-radius: 4px;
  box-shadow: var(--shadow-sm);
}
.product-card-body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: .7rem; flex: 1; }
.product-card h3 { font-size: 1.12rem; line-height: 1.3; }
.product-card p { margin: 0; font-size: .93rem; color: var(--ink-body); flex: 1; }

.spec-list { margin: 0; font-size: .88rem; border-top: 1px solid var(--border); padding-top: .8rem; display: grid; gap: .3rem; }
.spec-list div { display: flex; gap: .55rem; align-items: baseline; }
.spec-list dt { color: var(--ink-dim); flex-shrink: 0; font-weight: 500; }
.spec-list dd { margin: 0; color: var(--ink-soft); font-weight: 600; }
.product-card .btn { margin-top: .35rem; align-self: stretch; }

/* Aviso */
.notice {
  background: var(--bg-blush); border: 1px solid var(--peach); border-left: 4px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.15rem 1.4rem; margin-bottom: 2.4rem; font-size: .96rem; color: var(--ink-soft);
}
.notice strong { color: var(--ink); }

/* ---------- Galería (conectores) ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1.3rem; }
.gallery-grid figure {
  margin: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  background: var(--bg-media); box-shadow: var(--shadow-sm);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.gallery-grid figure:hover { border-color: var(--brand); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.gallery-grid img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; padding: 1.1rem; }

/* ---------- Franja CTA ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  color: #fff; text-align: center;
}
.cta-band h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.cta-band p { color: #fff; margin: .8rem auto 1.9rem; max-width: 56ch; opacity: .94; font-size: 1.05rem; }
.cta-band .btn-ghost { background: #fff; color: var(--brand); border-color: #fff; }
.cta-band .btn-ghost:hover { background: var(--dark); color: #fff; border-color: var(--dark); }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.12fr; gap: 3.5rem; align-items: start; }
.info-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.info-list li {
  border: 1px solid var(--border); border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 1.1rem 1.3rem; background: #fff;
  box-shadow: var(--shadow-sm);
}
.info-list strong {
  display: block; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em;
  color: var(--brand); margin-bottom: .35rem;
}
.info-list a { color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: 1.03rem; }
.info-list a:hover { color: var(--brand); }

.contact-form {
  display: grid; gap: 1.2rem; background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.9rem;
}
.field { display: grid; gap: .4rem; }
.field label { font-size: .88rem; font-weight: 600; color: var(--ink-soft); }
.field input, .field textarea, .field select {
  font: inherit; font-size: .97rem; padding: .78rem .95rem; border: 1px solid var(--border-strong);
  border-radius: 5px; background: #fff; color: var(--ink-soft); width: 100%;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--brand); }
.field textarea { min-height: 140px; resize: vertical; }
.form-note { font-size: .85rem; color: var(--ink-dim); margin: 0; }

/* ---------- Pie ---------- */
.site-footer { background: var(--dark); color: #bdb3b5; padding-top: 3.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.15fr; gap: 3rem; padding-bottom: 3rem; }
.site-footer h4 {
  font-family: var(--font-body); font-size: .8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: #fff; margin-bottom: 1.1rem;
}
.site-footer p { font-size: .94rem; margin: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .62rem; }
.site-footer a { color: #bdb3b5; text-decoration: none; font-size: .94rem; }
.site-footer a:hover { color: var(--peach); }
.footer-brand img { height: 52px; width: auto; margin-bottom: 1.1rem; filter: brightness(0) invert(1); }
.footer-bottom { background: var(--brand); color: #fff; font-size: .85rem; }
.footer-bottom .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: .9rem; }

/* ---------- WhatsApp flotante ---------- */
.whatsapp-float {
  position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 90;
  width: 60px; height: 60px; border-radius: 50%; background: #25d366;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .3);
  transition: background-color .15s ease, transform .15s ease;
}
.whatsapp-float svg { width: 32px; height: 32px; fill: #fff; }
.whatsapp-float:hover { background: #1da851; transform: scale(1.06); }

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.4rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 2.4rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2.2rem; }
}

@media (max-width: 860px) {
  body { font-size: 16px; }
  .nav-toggle { display: block; }
  .header-inner { flex-wrap: wrap; padding-inline: 1.25rem; }
  .wrap { padding-inline: 1.25rem; }
  .primary-nav { flex-basis: 100%; display: none; }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding-top: .5rem; }
  .primary-nav > ul > li { border-top: 1px solid var(--border); }
  .primary-nav a, .primary-nav summary { display: block; padding: .85rem 0; border-bottom: none; }
  .primary-nav .submenu {
    position: static; transform: none; box-shadow: none; border: none;
    padding: 0 0 .5rem 1rem; min-width: 0;
  }
  .header-cta .btn span.label { display: none; }
  .topbar .wrap { justify-content: center; text-align: center; }
  .hero { padding: 3rem 0 2.5rem; }
  section { padding: 3rem 0; }
}

@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
  .product-grid, .card-grid { grid-template-columns: 1fr; }
  .trust-bar .wrap { grid-template-columns: 1fr 1fr; gap: 1.1rem; }
}

/* ---------- Ficha de producto ---------- */
.product-detail { padding-bottom: 3rem; }
.product-detail-grid { display: grid; grid-template-columns: 1fr 1.08fr; gap: 3.5rem; align-items: start; }

.detail-media {
  margin: 0; background: var(--bg-media); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md);
}
.detail-media img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; padding: 2rem; }

.detail-info .eyebrow { margin-bottom: .8rem; }
.detail-info .eyebrow a { color: inherit; text-decoration: none; }
.detail-info .eyebrow a:hover { text-decoration: underline; }
.detail-code {
  display: inline-block; font-family: var(--font-display); font-weight: 600;
  font-size: 1rem; letter-spacing: .08em; color: #fff; background: var(--brand);
  padding: .3rem .8rem; border-radius: 4px; margin-bottom: .9rem;
}
.detail-info h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 1rem; }
.detail-lead { font-size: 1.08rem; color: var(--ink-body); margin: 0 0 1.8rem; }

.spec-table {
  margin: 0 0 1.8rem; border-top: 2px solid var(--ink); display: grid;
}
.spec-table div {
  display: grid; grid-template-columns: minmax(130px, 34%) 1fr; gap: 1rem;
  padding: .8rem 0; border-bottom: 1px solid var(--border);
}
.spec-table dt { color: var(--ink-dim); font-weight: 500; font-size: .92rem; }
.spec-table dd { margin: 0; color: var(--ink-soft); font-weight: 600; font-size: .96rem; }

.detail-actions { display: flex; gap: .9rem; flex-wrap: wrap; margin-bottom: 1rem; }
.detail-note { font-size: .88rem; color: var(--ink-dim); margin: 0; }

/* Bloque de texto corrido */
.prose { max-width: 68ch; }
.prose h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-bottom: .9rem; }
.prose p { margin: 0 0 1.1rem; font-size: 1.02rem; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--ink); }

/* Enlaces dentro de las tarjetas de producto */
.product-card h3 a { color: inherit; text-decoration: none; }
.product-card h3 a:hover { color: var(--brand); }
.product-media { display: block; }

@media (max-width: 1040px) {
  .product-detail-grid { grid-template-columns: 1fr; gap: 2.2rem; }
  .detail-media { max-width: 460px; }
}


/* ==========================================================================
   Version 2 - portada con video, hub de productos, formulario
   Se anade al final de la hoja original; no reemplaza ninguna regla previa.
   ========================================================================== */

/* --- Tipografias propias --------------------------------------------------
   En la v1 se pedian a fonts.googleapis.com en cada visita: bloqueaba el
   pintado y entregaba la IP del visitante a un tercero. Los archivos van en
   css/fonts/. Mientras no esten, el navegador cae en la pila del sistema, que
   ya estaba declarada en las variables --font-display y --font-body. */
@font-face {
  font-family: 'Inter';
  src: url('fonts/inter-var.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Serif';
  src: url('fonts/plex-serif-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}

/* --- Portada con video ---------------------------------------------------- */

.hero-cine {
  position: relative;
  isolation: isolate;
  min-height: min(78vh, 660px);
  display: flex;
  align-items: center;
  padding: 4.5rem 0;
  background: var(--dark);
  overflow: hidden;
}

.hero-cine .hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-cine .hero-poster,
.hero-cine .hero-vid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* El material esta grabado en vertical (478x850): al cubrir un hero
     panoramico se amplia mas de tres veces. El encuadre se corre un poco
     hacia arriba, que es donde queda el producto. */
  object-position: center 42%;
}

/* Un desenfoque leve hace que la falta de nitidez se lea como profundidad de
   campo y no como un escalado mal hecho. La escala evita que el borde del
   desenfoque deje ver el fondo. */
.hero-cine .hero-poster,
.hero-cine .hero-vid {
  filter: blur(2px) saturate(1.06);
  transform: scale(1.06);
}

/* El video aparece solo cuando ya esta reproduciendo, para que no se vea el
   salto del poster al primer fotograma. */
.hero-cine .hero-vid { opacity: 0; transition: opacity .6s ease; }
.hero-cine.video-on .hero-vid { opacity: 1; }

/* Capa de contraste: el texto es blanco y el fotograma puede ser claro. El
   degradado carga hacia la izquierda, que es donde vive el titular. */
.hero-cine .hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(20,6,9,.90) 0%, rgba(20,6,9,.74) 45%, rgba(20,6,9,.30) 100%),
    linear-gradient(0deg, rgba(20,6,9,.5), rgba(20,6,9,.12));
}

.hero-cine .hero-content { position: relative; max-width: 46rem; }
.hero-cine .eyebrow { color: #ff8a80; }
.hero-cine h1 { color: #fff; }
.hero-cine .lead { color: rgba(255,255,255,.86); }
.hero-cine .btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.6);
}
.hero-cine .btn-ghost:hover,
.hero-cine .btn-ghost:focus { border-color: #fff; color: #fff; background: rgba(255,255,255,.1); }

@media (max-width: 860px) {
  .hero-cine { min-height: 0; padding: 3rem 0; }
}

/* Sin animacion de fondo para quien la haya desactivado: el script tampoco
   carga el video en ese caso, esto es el cinturon de seguridad. */
@media (prefers-reduced-motion: reduce) {
  .hero-cine .hero-vid { display: none; }
}

/* --- Hub de productos ----------------------------------------------------- */

.prose-wide { max-width: 68ch; }
.prose-wide h2 { margin-bottom: .75rem; }
.prose-wide p { margin: 0 0 1.1rem; }

/* --- Formulario ----------------------------------------------------------- */

/* Campo trampa contra bots: fuera de la vista y fuera del recorrido de
   teclado, pero sin display:none, que algunos bots detectan. */
.site-footer h2 {
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #fff;
  margin: 0 0 1.1rem;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}


/* ==========================================================================
   Buscador y cotizador
   ========================================================================== */

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --- buscador de la cabecera --- */
.header-buscar { display: flex; align-items: center; position: relative; }
.header-buscar input {
  width: 190px; padding: .5rem .75rem; padding-right: 2.1rem;
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  font: inherit; font-size: .88rem; background: var(--bg);
}
.header-buscar input:focus { border-color: var(--brand); outline: none; }
.header-buscar button {
  position: absolute; right: .3rem; border: 0; background: none; cursor: pointer;
  color: var(--ink-dim); padding: .3rem; line-height: 0; border-radius: 4px;
}
.header-buscar button:hover { color: var(--brand); }
.header-buscar svg { fill: currentColor; }

.coti-boton { position: relative; }
.coti-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.3rem; height: 1.3rem; margin-left: .45rem; padding: 0 .35rem;
  background: var(--brand); color: #fff; border-radius: 999px;
  font-size: .72rem; font-weight: 700; font-variant-numeric: tabular-nums;
}

/* --- pagina de busqueda --- */
.buscador-form { display: flex; gap: .6rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.buscador-form input {
  flex: 1 1 20rem; padding: .85rem 1rem; font: inherit;
  border: 1px solid var(--border-strong); border-radius: var(--radius);
}
.buscador-form input:focus { border-color: var(--brand); outline: none; }

.filtros { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.filtros label { font-size: .85rem; font-weight: 600; color: var(--ink-dim); }
.filtros select {
  padding: .5rem .7rem; font: inherit; font-size: .9rem;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg);
}
.buscar-estado { font-size: .9rem; color: var(--ink-dim); margin: 0 0 1.2rem; }

/* --- agregar desde una tarjeta --- */
.add-line { display: flex; gap: .5rem; align-items: center; margin: .9rem 0 .6rem; }
.add-line input[type="number"] {
  width: 4.2rem; padding: .5rem; font: inherit; font-size: .9rem;
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  text-align: center; font-variant-numeric: tabular-nums;
}
.add-line input[type="number"]:focus { border-color: var(--brand); outline: none; }
.add-line-grande input[type="number"] { width: 5rem; padding: .8rem .5rem; font-size: 1rem; }
.mas-info { font-size: .9rem; font-weight: 600; text-decoration: none; }
.mas-info:hover { text-decoration: underline; }
.btn-ok { background: #1f6b4a !important; border-color: #1f6b4a !important; color: #fff !important; }
.detail-sub { font-size: .92rem; margin: .2rem 0 0; }
.card-cat { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-dim); margin: 0 0 .35rem; }
.card-specs { font-size: .85rem; color: var(--ink-dim); }

/* --- cotizador --- */
.coti-wrap { max-width: 780px; }
.coti-cabecera h1 { display: flex; align-items: center; gap: .6rem; }
.coti-cuenta {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2rem; height: 2rem; padding: 0 .5rem;
  background: var(--brand); color: #fff; border-radius: 999px;
  font-family: var(--font-body); font-size: 1rem; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.coti-cabecera p { margin: .8rem 0 2rem; }

.coti-vacia {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2.5rem 1.5rem; text-align: center; background: var(--bg-soft);
}
.coti-vacia p { margin: 0 0 .5rem; }
.coti-vacia .btn { margin-top: 1rem; }

.coti-lista { list-style: none; margin: 0 0 2rem; padding: 0; display: flex; flex-direction: column; gap: .75rem; }
.coti-item {
  display: flex; align-items: center; gap: 1rem;
  border: 1px solid var(--border); border-radius: 12px;
  padding: .8rem 1rem; background: var(--bg);
}
.coti-mini { width: 56px; height: 56px; object-fit: contain; background: var(--bg-media); border-radius: 8px; flex-shrink: 0; }
.coti-nombre { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.coti-nombre a { color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: .97rem; }
.coti-nombre a:hover { color: var(--brand); }
.coti-nombre small { color: var(--ink-dim); font-size: .8rem; }

.coti-ctrl { display: flex; align-items: center; gap: .3rem; flex-shrink: 0; }
.coti-paso {
  width: 2rem; height: 2rem; border: 1px solid var(--border-strong);
  background: var(--bg); border-radius: 8px; cursor: pointer;
  font-size: 1.05rem; line-height: 1; color: var(--ink-soft);
  display: flex; align-items: center; justify-content: center;
}
.coti-paso:hover { border-color: var(--brand); color: var(--brand); }
.coti-cant {
  width: 3rem; padding: .4rem .2rem; text-align: center; font: inherit;
  font-size: .95rem; font-variant-numeric: tabular-nums;
  border: 1px solid var(--border); border-radius: 8px;
  -moz-appearance: textfield;
}
.coti-cant::-webkit-outer-spin-button,
.coti-cant::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.coti-quitar {
  border: 0; background: none; cursor: pointer; color: var(--brand);
  font-size: 1.5rem; line-height: 1; padding: .2rem .4rem; border-radius: 6px;
  flex-shrink: 0;
}
.coti-quitar:hover { background: var(--bg-blush); }

/* --- complementos sugeridos --- */
.coti-sugeridos { margin: 0 0 2.5rem; padding: 1.5rem; background: var(--bg-soft); border-radius: 12px; }
.coti-sugeridos h2 { font-size: 1.1rem; }
.coti-sug-bajada { font-size: .92rem; color: var(--ink-dim); margin: .4rem 0 1.2rem; }
.coti-sug-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.coti-sug { display: flex; align-items: center; gap: .9rem; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: .6rem .9rem; }
.coti-sug-media { flex-shrink: 0; line-height: 0; }
.coti-sug-media img { width: 48px; height: 48px; object-fit: contain; background: var(--bg-media); border-radius: 6px; }
.coti-sug-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.coti-sug-txt a { color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: .92rem; }
.coti-sug-txt a:hover { color: var(--brand); }
.coti-sug-txt small { color: var(--ink-dim); font-size: .78rem; }

/* --- formulario del cotizador: etiqueta flotante, como el de referencia --- */
.coti-campos { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.campo { position: relative; }
.campo.ancho { grid-column: 1 / -1; }
.campo input, .campo select, .campo textarea {
  width: 100%; padding: 1.15rem .9rem .5rem; font: inherit; font-size: .97rem;
  border: 1px solid var(--border-strong); border-radius: 10px; background: var(--bg);
  color: var(--ink-soft);
}
.campo select { padding: .9rem; }
.campo textarea { min-height: 7rem; resize: vertical; padding-top: 1.35rem; }
.campo input:focus, .campo select:focus, .campo textarea:focus { border-color: var(--brand); }
.campo label {
  position: absolute; left: .95rem; top: .95rem;
  color: var(--ink-dim); font-size: .97rem; pointer-events: none;
  transition: transform .12s ease;
  transform-origin: left top;
}
.campo input:focus + label,
.campo input:not(:placeholder-shown) + label,
.campo textarea:focus + label,
.campo textarea:not(:placeholder-shown) + label {
  transform: translateY(-.55rem) scale(.78);
}

.coti-error {
  margin: 1.2rem 0 0; padding: .8rem 1rem; border-left: 3px solid var(--brand);
  background: var(--bg-blush); font-size: .95rem; border-radius: 0 8px 8px 0;
}
.coti-acciones { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; }
.coti-nota { font-size: .85rem; color: var(--ink-dim); margin-top: 1rem; }

@media (max-width: 860px) {
  .header-buscar { display: none; }
  .coti-campos { grid-template-columns: 1fr; }
  .coti-item { flex-wrap: wrap; }
  .coti-nombre { flex: 1 1 60%; }
}

.form-error {
  border-left: 3px solid var(--brand);
  background: var(--bg-blush);
  padding: .8rem 1rem;
  margin-bottom: 1.2rem;
  font-size: .95rem;
}

/* ---------- Correcciones del QA, 18-10-2026 (2-INFORMES/8-qa-ux-v2.md) ---------- */

/* QA-08: el borde de los campos tenia 1,80:1; WCAG 1.4.11 pide 3:1. Este da 3,53:1. */
:root { --border-input: #8f8781; }
.field input, .field textarea, .field select,
.campo input, .campo select, .campo textarea,
.add-line input[type="number"], .filtros select,
.header-buscar input, .buscador-form input { border-color: var(--border-input); }

/* QA-17: con 0 productos el contador se veia como un punto rojo
   (display:inline-flex le ganaba al atributo hidden). */
.coti-badge[hidden] { display: none; }
.coti-boton { display: inline-flex; align-items: center; gap: .4rem; }
.coti-icono { fill: currentColor; flex: none; }

/* QA-03: en movil la busqueda queda a un toque (antes no habia ninguna). */
.buscar-movil { display: none; }
@media (max-width: 860px) {
  .buscar-movil {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border: 1px solid var(--border-input);
    border-radius: var(--radius); color: var(--ink); background: var(--bg);
  }
  .buscar-movil svg { fill: currentColor; }
}

/* QA-06: errores junto a cada campo. */
.campo-error { display: block; margin-top: .35rem; font-size: .85rem; color: var(--brand-deep); }
.campo-error[hidden] { display: none; }
[aria-invalid="true"] { border-color: var(--brand) !important; box-shadow: 0 0 0 1px var(--brand); }

/* QA-04: modelo, calibre o gramaje antes de agregar. */
.detail-compra { margin-top: 1.25rem; }
.opcion { display: grid; gap: .35rem; margin-bottom: .9rem; max-width: 30rem; }
.opcion label { font-weight: 600; font-size: .92rem; color: var(--ink); }
.opcion select {
  font: inherit; font-size: .97rem; padding: .75rem .9rem; border: 1px solid var(--border-input);
  border-radius: var(--radius); background: var(--bg); color: var(--ink-soft); width: 100%;
}
.opcion select:focus { border-color: var(--brand); outline: 2px solid var(--brand); outline-offset: 1px; }
.compra-msg { margin: .6rem 0 0; color: var(--brand-deep); font-weight: 600; font-size: .92rem; }
.coti-var { display: block; font-size: .82rem; color: var(--ink-body); margin-top: .15rem; }
.coti-falta { color: var(--brand-deep); }

/* Moldes a pedido (pedido del usuario). */
.aviso-pedido {
  margin-top: 1rem; padding: .8rem 1rem; background: var(--bg-blush);
  border-radius: var(--radius); font-size: .95rem;
}
.aviso-pedido a { font-weight: 600; }

/* QA-09: el logo no tiene transparencia; el filtro lo volvia un cuadro blanco.
   Va con sus colores sobre una placa blanca hasta tener un logo transparente.
   QA-25: logo-mgc.webp es el logo completo; logo.webp era un recorte cuadrado
   que dejaba "MGC WELD" cortado en "MGC W". */
.footer-brand img { filter: none; background: #fff; padding: .45rem; border-radius: 10px; height: 84px; }

/* Busqueda: primero secciones, despues productos, con imagenes (pedido del usuario). */
.buscar-secciones { margin: 1rem 0 2rem; }
.buscar-secciones h2, .buscar-productos-titulo { font-size: 1.25rem; margin: 0 0 .8rem; }
.seccion-lista {
  list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}
.seccion-item {
  display: flex; align-items: center; gap: .9rem; padding: .7rem .9rem;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg);
  color: inherit; text-decoration: none; box-shadow: var(--shadow-sm);
}
.seccion-item:hover, .seccion-item:focus-visible { border-color: var(--brand); }
.seccion-item img, .sug-item img { flex: none; border-radius: 6px; background: var(--bg-media); object-fit: contain; }
.seccion-item strong, .sug-item strong { display: block; color: var(--ink); line-height: 1.3; }
.seccion-item small, .sug-item small { color: var(--ink-dim); font-size: .82rem; }

.sugerencias {
  position: absolute; top: calc(100% + 6px); right: 0; width: min(420px, 90vw);
  max-height: 70vh; overflow-y: auto; background: var(--bg);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: .4rem; z-index: 60; text-align: left;
}
.sugerencias[hidden] { display: none; }
.sug-titulo {
  margin: .5rem .6rem .3rem; font-size: .72rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink-dim);
}
.sug-item { display: flex; align-items: center; gap: .7rem; padding: .45rem .6rem; border-radius: 6px; color: inherit; text-decoration: none; }
.sugerencias .sug-item img { width: 48px; height: 48px; }
.sug-item:hover, .sug-item.activo { background: var(--bg-blush); }
.sug-seccion strong { color: var(--brand-deep); }
.sug-todos {
  display: block; margin-top: .3rem; padding: .6rem; border-top: 1px solid var(--border);
  font-weight: 600; font-size: .9rem; color: var(--brand); text-decoration: none;
}
.sug-todos:hover, .sug-todos.activo { background: var(--bg-blush); }

/* Portada rotativa (18-10-2026, en vez del video): una foto por linea, con
   fundido; el pie nombra la linea y lleva a su categoria. */
.rot-marco { position: relative; aspect-ratio: 4 / 3; }
.hero-figure .rot-img {
  position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto;
  object-fit: contain; padding: 1.6rem; opacity: 0; transition: opacity .9s ease;
}
.hero-figure .rot-img.activo { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .hero-figure .rot-img { transition: none; } }
.rot-pie {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem 1.1rem; border-top: 1px solid var(--border); background: #fff;
}
.rot-enlace { font-weight: 600; color: var(--ink); text-decoration: none; }
/* Espacio duro antes de la flecha: no se separa de la ultima palabra. */
.rot-enlace::after { content: "\00a0\2192"; color: var(--brand); }
.rot-enlace:hover, .rot-enlace:focus-visible { color: var(--brand); }
.rot-controles { display: flex; align-items: center; flex: none; }
.rot-punto {
  width: 24px; height: 24px; border: 0; padding: 0; background: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.rot-punto::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--border-input); transition: background .2s, transform .2s;
}
.rot-punto.activo::before { background: var(--brand); transform: scale(1.3); }

/* Antes eran style="..." en el HTML, que la politica de seguridad del
   .htaccess (style-src 'self') bloquea en el hosting. */
.pagina-centrada { text-align: center; padding: 3rem 0; }
.texto-centrado { max-width: 54ch; margin: 1rem auto 2rem; }
.texto-suave { color: var(--ink-dim); }
.acciones-centradas { justify-content: center; }
.ver-categoria { margin-top: 2rem; }

/* Como el WordPress (133x83): el logo completo tiene mucho detalle y a menos
   alto "electric" no se lee. */
.brand img { height: 74px; }

/* ---------- Celular (18-10-2026) ---------- */
.barra-compra { display: none; }
@media (max-width: 860px) {
  /* La franja superior repetia el lema de la portada en dos lineas; quedan
     telefono y correo, que si sirven a un toque. */
  .topbar .wrap > span:first-child { display: none; }
  .topbar .wrap { padding-block: .45rem; }

  /* Cabecera en una sola fila: logo · lupa · cotizacion · menu. El boton de
     WhatsApp de la cabecera se oculta porque el flotante esta siempre a la vista. */
  .header-inner { gap: .6rem; padding-block: .55rem; }
  .brand { order: 1; }
  .brand img { height: 52px; }
  .header-cta { order: 2; margin-left: auto; gap: .5rem; }
  .header-cta > a.btn-primary { display: none; }
  .nav-toggle { order: 3; width: 44px; height: 44px; padding: 0; }
  .primary-nav { order: 4; }
  .coti-boton { min-height: 44px; }

  /* QA-11: barra fija para cotizar cuando el bloque de compra no se ve. */
  .barra-compra:not([hidden]) {
    display: flex; align-items: center; gap: .75rem;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
    padding: .6rem 1rem; background: #fff;
    border-top: 1px solid var(--border-strong); box-shadow: 0 -6px 18px rgba(11, 11, 12, .12);
  }
  .barra-compra-txt {
    flex: 1; min-width: 0; font-weight: 600; font-size: .92rem; color: var(--ink);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .barra-compra .btn { flex: none; min-height: 44px; padding-inline: 1.3rem; }
  body.con-barra { padding-bottom: 4.6rem; }
  body.con-barra .whatsapp-float { bottom: 5.4rem; }
}

/* ---------- Mas compacto (20-10-2026) ----------
   Pedido del dueno: la letra se veia muy grande y, en celular, cada imagen
   ocupaba un cuadro enorme con mucho espacio sobrante. Se baja la escala de
   titulos y texto, y en celular van dos tarjetas por fila. */
body { font-size: 16px; }
.hero h1 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
.hero .lead { font-size: 1.05rem; }
.section-head h1, .section-head h2 { font-size: clamp(1.45rem, 2.6vw, 2.05rem); }
.section-head p { font-size: 1rem; }
.detail-info h1 { font-size: clamp(1.45rem, 2.8vw, 2.05rem); }
.detail-lead { font-size: 1rem; }
.prose h2 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); }
.prose p { font-size: 1rem; }
.cta-band h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.trust-bar strong { font-size: 1.6rem; }
.cat-card h3 { font-size: 1.12rem; }
/* En las categorias el titulo de la tarjeta es h2 y la v1 solo daba estilo al
   h3: salia grande, rojo y subrayado. */
.product-card h2, .product-card h3 { font-size: 1.05rem; line-height: 1.3; }
.product-card h2 a { color: inherit; text-decoration: none; }
.product-card h2 a:hover { color: var(--brand); }
/* Tres por fila en computador: de a cuatro se veia apretado (pedido del
   usuario, 22-10-2026). Dos en tablet; en celular, una (mas abajo). */
.product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; }
@media (max-width: 860px) { .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Linea con dos productos (barras quimicas, linea principal): dos tarjetas
   anchas con la foto grande arriba. Horizontales (22-10-2026) la foto quedaba
   chica al lado de una columna de texto angosta y larga (pedido del usuario,
   24-10-2026). */
@media (min-width: 861px) {
  .product-grid.par { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.8rem; }
  .product-grid.par .product-card img { aspect-ratio: 2 / 1; }
}
/* Ficha: la foto ocupaba media pantalla y el texto quedaba angosto (pedido del
   usuario, 22-10-2026). En computador la foto toma 2 de 5 partes y no pasa de
   440 px; bajo 1040 px sigue la columna unica de la v1. */
@media (min-width: 1041px) {
  .product-detail-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 3rem; }
  .detail-media { max-width: 440px; }
}

/* Todo a la vista sin bajar en la pantalla del dueno: 1920 x 1080 al 125 %,
   o sea 1536 x 674 px de pagina con la franja de depuracion de Chrome abierta
   (726 sin ella). Pedido del usuario, 24-10-2026: la portada llega hasta la
   barra negra, Nosotros hasta "Conversemos", cada tarjeta cabe entera bajo el
   encabezado fijo y la ficha queda a la altura de la foto. */
:root { --info: #1f5fa6; --info-deep: #174a82; --bg-info: #eef4fb; --info-line: #cddff2; }
/* Avisos en azul: en rojo se leian como un error. */
.notice, .aviso-pedido {
  background: var(--bg-info); border: 1px solid var(--info-line); border-left: 4px solid var(--info);
  border-radius: 0 var(--radius) var(--radius) 0; color: var(--ink-soft);
}
.notice { padding: .8rem 1.1rem; margin-bottom: 1.4rem; font-size: .93rem; }
.notice a, .aviso-pedido a { color: var(--info); }
.notice a:hover, .notice a:focus, .aviso-pedido a:hover, .aviso-pedido a:focus { color: var(--info-deep); }

/* Categorias y Nosotros: menos aire sobre el titulo y la bajada a lo ancho. */
section.compacta { padding-top: 1.5rem; }
.compacta .section-head { max-width: 92ch; margin-bottom: 1rem; }
.compacta .hero-grid p { line-height: 1.6; }
.product-detail { padding-top: 1.75rem; }
/* Pie de tarjeta: el boton y "Ver producto". Apilados como antes salvo en
   computador, donde van en una sola fila. */
.card-pie { display: flex; flex-direction: column; gap: inherit; }

@media (min-width: 861px) {
  .product-card img { aspect-ratio: 7 / 5; padding: 1rem; }
  .product-card-body { padding: 1rem 1.2rem 1.1rem; gap: .5rem; }
  /* La descripcion completa esta en la ficha. Sin flex: 1, que estira el
     parrafo y deja ver el texto cortado; lo que sigue baja al pie de la
     tarjeta para que los botones de una fila queden alineados. */
  .product-card-body > p {
    flex: none; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  }
  .product-card-body > p + * { margin-top: auto; }
  .product-card .spec-list { padding-top: .55rem; gap: .15rem; font-size: .86rem; line-height: 1.4; }
  .card-pie { flex-direction: row; align-items: center; justify-content: space-between; gap: .8rem; margin-top: .2rem; }
  .card-pie .add-line { flex: 1 1 auto; margin: 0; }
  .card-pie .btn { margin-top: 0; }
  .card-pie .mas-info { flex: none; white-space: nowrap; }
}

@media (min-width: 1041px) {
  /* La nota de moldes a pedido va al lado del titulo. */
  .cat-head { display: flex; align-items: center; gap: 2.5rem; margin-bottom: 1.4rem; }
  .cat-head .section-head { flex: 1 1 0; margin-bottom: 0; }
  .cat-head .notice { flex: 0 0 24rem; margin: 0; }

  .hero { padding: 1.5rem 0 1rem; }
  .hero h1 { font-size: 2.5rem; margin-bottom: .9rem; }
  .hero .lead { font-size: 1.05rem; max-width: 54ch; }
  .hero-actions { margin-top: 1.4rem; }
  /* La figura traia el margen de 1em arriba y abajo del navegador. */
  .hero-figure { margin-block: 0; max-width: 460px; width: 100%; justify-self: end; }
  .trust-bar .wrap { padding-block: .75rem; }

  /* Ficha: el panel se aprieta para quedar a la altura de la foto; si igual
     la pasa (muchos modelos), el cuadro de la foto se estira con el. */
  .product-detail-grid { align-items: stretch; }
  .detail-media { display: flex; align-items: center; }
  .detail-info .eyebrow { margin-bottom: .45rem; }
  .detail-code { margin-bottom: .5rem; padding: .2rem .7rem; }
  .detail-info h1 { font-size: 1.85rem; margin-bottom: .4rem; }
  .detail-lead { margin-bottom: .85rem; line-height: 1.55; }
  .spec-table { margin-bottom: .85rem; }
  .spec-table div { padding: .34rem 0; }
  /* Perno partido y copperweld (6 y 9 filas): la tabla en dos columnas. */
  .spec-table:has(> div:nth-child(5)) { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; }
  .spec-table:has(> div:nth-child(5)) div { grid-template-columns: minmax(0, 32%) 1fr; gap: .6rem; }
  /* "Mi cotizacion" ya esta siempre a la vista en el encabezado. */
  .detail-sub { display: none; }
  .aviso-pedido { margin: .8rem 0 0; padding: .55rem .9rem; font-size: .9rem; }
  .detail-compra { margin-top: 0; }
  .opcion { grid-template-columns: 6.5rem minmax(0, 1fr); align-items: center; gap: .8rem; margin-bottom: .5rem; max-width: 34rem; }
  .opcion select { padding: .6rem .8rem; }
  .detail-actions { margin-bottom: .5rem; }
  .add-line-grande input[type="number"] { padding: .65rem .5rem; }
  .detail-actions .btn { padding-top: .7rem; padding-bottom: .7rem; }
}

@media (max-width: 860px) {
  body { font-size: 15px; }
  .hero-figure { max-width: 380px; margin-inline: auto; }
}
@media (max-width: 600px) {
  .hero h1 { font-size: 1.6rem; }
  .section-head h1, .section-head h2 { font-size: 1.35rem; }
  .detail-info h1 { font-size: 1.35rem; }
  .cta-band h2 { font-size: 1.3rem; }

  /* Una tarjeta por fila, pero horizontal: la foto en un cuadro chico a la
     izquierda y el texto a la derecha. Dos por fila se probo y al dueno no le
     gusto (20-10-2026); lo que pidio fue bloques mas cortos. */
  .product-grid, .card-grid { grid-template-columns: minmax(0, 1fr); gap: .8rem; }
  .product-card, .cat-card { flex-direction: row; align-items: stretch; }
  .product-card:hover, .cat-card:hover { transform: none; }
  .product-media {
    flex: none; width: 36%; max-width: 140px; display: flex; align-items: center;
    border-bottom: 0; border-right: 1px solid var(--border);
  }
  .product-card img { padding: .4rem; }
  .cat-card img {
    flex: none; width: 36%; max-width: 140px; aspect-ratio: 1 / 1; align-self: center;
    padding: .4rem; border-bottom: 0;
  }
  .cat-card-body, .product-card-body { min-width: 0; padding: .7rem .85rem .8rem; gap: .35rem; }
  .cat-card h3, .product-card h2, .product-card h3 { font-size: .98rem; }
  /* Descripcion en dos lineas. Sin flex: 1 (de la v1), que estira el parrafo
     y deja ver el texto cortado bajo los puntos suspensivos. */
  .cat-card p, .product-card p {
    flex: none; font-size: .84rem; line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .spec-list { font-size: .8rem; padding-top: .45rem; gap: .15rem; }
  /* Si la etiqueta es larga ("Gramajes disponibles"), el valor baja a la
     linea siguiente en vez de apilarse en una columna angosta. */
  .spec-list div { flex-wrap: wrap; column-gap: .4rem; }
  .spec-list dd { flex: 1 1 9rem; }
  .pill { font-size: .62rem; padding: .22rem .5rem; }
  .product-code { font-size: .68rem; top: .3rem; left: .3rem; padding: .12rem .4rem; }
  .product-card .btn { font-size: .85rem; padding: .55rem .8rem; min-height: 40px; margin-top: .2rem; }
  .product-card .add-line { gap: .4rem; margin: .3rem 0 .1rem; }
  .product-card .add-line input[type="number"] { width: 3rem; padding: .45rem .2rem; }
  .product-card .add-line .btn { flex: 1; min-width: 0; margin-top: 0; }
  .cat-card .more, .mas-info { font-size: .84rem; }

  /* Ficha: la foto ya no ocupa toda la pantalla. */
  .detail-media { max-width: 300px; margin-inline: auto; }
  .detail-media img { padding: 1rem; }
}
