/* ===== Carviplast – estilos ===== */
:root {
  --primary: #393B93;
  --primary-600: #2E3080;
  --primary-dark: #1E2060;
  --primary-ink: #151635;
  --primary-light: #A2B6DD;
  --primary-50: #EEF1FA;
  --bg: #FFFFFF;
  --bg-alt: #F4F6FB;
  --text: #1B1D2E;
  --muted: #5B6072;
  --border: #E1E5F0;
  --wa: #25D366;
  --wa-dark: #128C7E;
  --error: #C62828;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(21, 22, 53, .06), 0 8px 24px rgba(21, 22, 53, .06);
  --shadow-lg: 0 20px 50px rgba(21, 22, 53, .14);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Plus Jakarta Sans", var(--font);
  --wrap: 1200px;
}

/* `hidden` tiene que ganarle siempre a display: flex/grid. Ya nos mordió dos veces. */
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; font-size: 16px; }
img { max-width: 100%; display: block; }
a { color: var(--primary); text-underline-offset: 3px; }
h1, h2, h3, .h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; color: var(--primary-ink); letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; }
h3, .h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.small { font-size: .875rem; }
.muted { color: var(--muted); }
.center { text-align: center; margin-top: 2.5rem; }
.center-text { text-align: center; }
.center-text .lead { margin-inline: auto; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 28px; } }
.narrow { max-width: 780px; }
.ic { flex-shrink: 0; vertical-align: middle; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 14px; z-index: 100; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--primary-light); outline-offset: 2px; border-radius: 4px; }

/* ===== Botones ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .75rem 1.25rem; border-radius: 999px; font-weight: 600; font-size: .98rem; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .15s, background .15s, box-shadow .15s, color .15s; font-family: inherit; line-height: 1.2; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }
.btn-lg { padding: .95rem 1.6rem; font-size: 1.02rem; }
.btn-block { width: 100%; margin-top: .6rem; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 18px rgba(57, 59, 147, .3); }
.btn-primary:hover { background: var(--primary-600); }
.btn-outline { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-ghost { background: var(--primary-50); color: var(--primary); }
.btn-ghost:hover { background: #E2E7F6; }
.btn-light { background: #fff; color: var(--primary-dark); }
.btn-wa { background: var(--wa); color: #073b1f; }
.btn-wa:hover { background: #1fbd5a; }

/* ===== Topbar y header ===== */
.topbar { background: var(--primary-ink); color: #cfd4ea; font-size: .82rem; }
.topbar-inner { display: flex; justify-content: space-between; gap: 1rem; padding-block: .45rem; }
.topbar span, .topbar a { display: inline-flex; align-items: center; gap: .35rem; }
.topbar a { color: #cfd4ea; text-decoration: none; }
.topbar a:hover { color: #fff; }
.topbar-right { display: flex; gap: 1.25rem; }
@media (max-width: 760px) { .topbar-inner > span:first-child { display: none; } .topbar-right { width: 100%; justify-content: space-between; } }
@media (max-width: 420px) { .topbar-right a:last-child { display: none; } }

.header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.logo { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.logo img { width: 44px; height: 44px; border-radius: 10px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text strong { font-family: var(--font-head); font-size: 1.35rem; color: var(--primary); letter-spacing: -.02em; }
.logo-text small { font-size: .72rem; color: var(--muted); }
.nav-toggle { display: none; background: none; border: 0; color: var(--primary-ink); padding: 8px; cursor: pointer; }

.nav { display: flex; align-items: center; gap: 1rem; }
.nav > ul { list-style: none; display: flex; gap: .15rem; margin: 0; padding: 0; }
.nav > ul > li { position: relative; }
.nav > ul > li > a { display: flex; align-items: center; gap: .25rem; padding: .6rem .7rem; color: var(--text); text-decoration: none; font-weight: 500; font-size: .94rem; border-radius: 8px; }
.nav > ul > li > a:hover { color: var(--primary); background: var(--primary-50); }
.sub { list-style: none; margin: 0; padding: .5rem; position: absolute; top: 100%; left: 0; min-width: 250px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s; }
.has-sub:hover .sub, .has-sub:focus-within .sub { opacity: 1; visibility: visible; transform: none; }
.sub a { display: block; padding: .55rem .75rem; color: var(--text); text-decoration: none; border-radius: 8px; font-size: .93rem; }
.sub a:hover { background: var(--primary-50); color: var(--primary); }

@media (max-width: 979px) {
  .header { backdrop-filter: none; background: #fff; }
  .nav-toggle { display: block; }
  .nav { position: fixed; inset: var(--nav-top, 72px) 0 0 0; background: #fff; flex-direction: column; align-items: stretch; padding: 1rem 16px 2rem; overflow-y: auto; transform: translateX(100%); visibility: hidden; transition: transform .25s, visibility .25s; }
  .nav.is-open { transform: none; visibility: visible; }
  .nav > ul { flex-direction: column; }
  .nav > ul > li > a { padding: .9rem .5rem; font-size: 1.05rem; justify-content: space-between; border-bottom: 1px solid var(--border); border-radius: 0; }
  .sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; display: none; padding: .25rem 0 .5rem 1rem; }
  .has-sub.is-open .sub { display: block; }
  .nav-cta { margin-top: 1rem; }
  body.nav-open { overflow: hidden; }
}

/* ===== Hero ===== */
.hero { position: relative; overflow: hidden; background: radial-gradient(1100px 500px at 85% -10%, #DDE5F7 0%, transparent 60%), linear-gradient(180deg, #F7F8FD, #fff); padding: 3rem 0 4rem; }
.hero-grid { display: grid; gap: 3rem; align-items: center; }
.hero-grid > * { min-width: 0; }
h1, h2 { overflow-wrap: break-word; }
@media (min-width: 980px) { .hero-grid { grid-template-columns: 1.1fr .9fr; } .hero { padding: 4.5rem 0 5rem; } }
.eyebrow { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); background: var(--primary-50); padding: .35rem .75rem; border-radius: 999px; margin-bottom: 1rem; }
.accent { color: var(--primary); background: linear-gradient(transparent 62%, #D4DDF3 62%); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.75rem 0 1.5rem; }
.hero-actions.center { justify-content: center; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; color: var(--muted); font-size: .95rem; }
.hero-points li { display: flex; align-items: center; gap: .35rem; }
.hero-points .ic { color: var(--primary); }
.hero-media { position: relative; min-height: 420px; }
.hero-photo { position: absolute; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); background: var(--primary-50); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo-main { inset: 0 18% 0 0; }
.hero-photo-small { width: 42%; height: 52%; right: 0; bottom: -6%; border: 6px solid #fff; }
.hero-badge { position: absolute; left: -12px; bottom: 28px; background: var(--primary-dark); color: #fff; padding: 1rem 1.2rem; border-radius: var(--radius); box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: .75rem; max-width: 230px; }
.hero-badge strong { font-family: var(--font-head); font-size: 2.2rem; line-height: 1; }
.hero-badge span { font-size: .85rem; line-height: 1.3; color: #cfd4ea; }
@media (max-width: 600px) { .hero-media { min-height: 340px; } .hero-badge { left: 8px; } }

/* ===== Stats ===== */
.stats { background: var(--primary-dark); color: #fff; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1px; background: rgba(255, 255, 255, .08); }
.stat { display: flex; gap: .9rem; align-items: center; padding: 1.5rem 1.25rem; background: var(--primary-dark); }
.stat .ic { color: var(--primary-light); }
.stat strong { display: block; font-family: var(--font-head); font-size: 1.1rem; }
.stat span { font-size: .85rem; color: #b9c0dd; }

/* ===== Secciones ===== */
.section { padding: 4.5rem 0; }
.section-tight { padding: 2.5rem 0 4rem; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 700px; margin: 0 auto 2.5rem; }
.section-head p { color: var(--muted); }
.section-head.left { text-align: left; margin-left: 0; }
.section-head h2 a { color: inherit; text-decoration: none; }
.section-head h2 a:hover { color: var(--primary); }

/* Tarjetas */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.25rem; }
.card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; text-decoration: none; color: inherit; transition: transform .2s, box-shadow .2s, border-color .2s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card-img { aspect-ratio: 4 / 3; background: #fff; overflow: hidden; border-bottom: 1px solid var(--border); }
.card-img img { width: 100%; height: 100%; object-fit: contain; padding: .75rem; transition: transform .3s; }
.card:hover .card-img img { transform: scale(1.04); }
.card-body { padding: 1.1rem 1.25rem 1.3rem; display: flex; flex-direction: column; flex: 1; }
.card-body p { color: var(--muted); font-size: .93rem; flex: 1; }
.card-tag { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--primary); margin-bottom: .35rem; }
.card-link { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; color: var(--primary); font-size: .92rem; }
.img-pendiente { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; width: 100%; height: 100%; min-height: 160px; background: linear-gradient(135deg, var(--primary-50), #fff); color: var(--muted); font-size: .8rem; }
.img-pendiente img { width: 72px !important; height: 72px !important; padding: 0 !important; opacity: .6; border-radius: 14px; }

/* Sectores */
.grid-sectores { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; }
@media (min-width: 900px) { .grid-sectores { grid-template-columns: repeat(3, 1fr); } }
.sector { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: .2s; }
.sector:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-3px); }
.sector-icon { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; background: var(--primary); color: #fff; margin-bottom: 1rem; }
.sector p { color: var(--muted); font-size: .93rem; flex: 1; }

/* Split */
.split { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.split-media img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; object-fit: cover; }
.gallery-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.gallery-2 img { aspect-ratio: 3 / 4; }
.gallery-2 img:last-child { margin-top: 2.5rem; }
.checklist { list-style: none; padding: 0; margin: 1.25rem 0 1.75rem; display: grid; gap: .85rem; }
.checklist li { display: flex; gap: .7rem; align-items: flex-start; }
.checklist .ic { color: #fff; background: var(--primary); border-radius: 50%; padding: 3px; margin-top: 2px; }

/* Pasos */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); counter-reset: s; }
.steps li { background: #fff; border-radius: var(--radius-lg); padding: 1.75rem; border: 1px solid var(--border); }
.steps li > span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--primary-50); color: var(--primary); font-weight: 800; font-family: var(--font-head); font-size: 1.2rem; margin-bottom: 1rem; }
.steps p { color: var(--muted); margin: 0; }

/* FAQ */
.faq-wrap { display: grid; gap: 2rem; }
@media (min-width: 900px) { .faq-wrap { grid-template-columns: .8fr 1.2fr; gap: 4rem; } }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { list-style: none; cursor: pointer; padding: 1.15rem 0; font-weight: 600; display: flex; justify-content: space-between; gap: 1rem; font-size: 1.05rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { transition: transform .2s; color: var(--primary); }
.faq details[open] summary .ic { transform: rotate(180deg); }
.faq details p { color: var(--muted); padding-bottom: 1rem; margin: 0; }

/* Banda CTA */
.cta-band { background: linear-gradient(120deg, var(--primary-dark), var(--primary)); color: #fff; }
.cta-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.5rem; padding-block: 3rem; }
.cta-band h2 { color: #fff; margin-bottom: .25rem; }
.cta-band p { color: #d7dcf0; margin: 0; }
.cta-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* Encabezado de página */
.page-head { background: linear-gradient(180deg, #F2F4FB, #fff); padding: 2rem 0 2.5rem; border-bottom: 1px solid var(--border); }
.page-head-compact { padding: 1.25rem 0; }
.page-head-compact h1 { margin-top: .25rem; }
.migas ol { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; padding: 0; margin: 0 0 1rem; font-size: .85rem; color: var(--muted); }
.migas li + li::before { content: "›"; margin-right: .35rem; }
.migas a { color: var(--muted); text-decoration: none; }
.migas a:hover { color: var(--primary); }
.sector-head { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 900px) { .sector-head { grid-template-columns: 1.2fr .8fr; } }
.sector-benefits { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.75rem; box-shadow: var(--shadow); }
.sector-benefits .checklist { margin-bottom: 0; }

/* Producto */
.product { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 900px) { .product { grid-template-columns: 1fr 1fr; gap: 3.5rem; } .product-media { position: sticky; top: 100px; } }
.product-main { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); background: #fff; aspect-ratio: 1; }
.product-main img { width: 100%; height: 100%; object-fit: contain; padding: 1rem; }
.img-nota { font-size: .82rem; color: var(--muted); margin: .5rem 0 0; }
.product-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin-top: .75rem; }
.product-thumbs > div { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); aspect-ratio: 1; background: #fff; }
.product-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.product-info h1 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); }
.product-info > p { color: var(--muted); font-size: 1.05rem; }
.product-info .h3 { margin-top: 2rem; }
.product-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.75rem 0 .5rem; }
.specs { margin: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.specs > div { display: grid; grid-template-columns: 38% 1fr; gap: 1rem; padding: .7rem 1rem; }
.specs > div:nth-child(odd) { background: var(--bg-alt); }
.specs dt { font-weight: 600; color: var(--primary-ink); }
.specs dd { margin: 0; color: var(--muted); }
.specs-sm > div { padding: .45rem .7rem; font-size: .88rem; grid-template-columns: 42% 1fr; }
.tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.tags li { background: var(--primary-50); color: var(--primary); padding: .35rem .8rem; border-radius: 999px; font-size: .88rem; font-weight: 500; }
.link-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .75rem; }
.link-list a { display: inline-flex; align-items: center; gap: .4rem; padding: .7rem 1.1rem; background: #fff; border: 1px solid var(--border); border-radius: 999px; text-decoration: none; font-weight: 600; }

/* Nosotros */
.two-cols { display: grid; gap: 1.25rem; }
@media (min-width: 800px) { .two-cols { grid-template-columns: 1fr 1fr; } }
.box { background: #fff; border-radius: var(--radius-lg); padding: 2rem; border: 1px solid var(--border); }
.box p { color: var(--muted); margin: 0; }
.grid-proceso { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.25rem; }
.proceso img { border-radius: var(--radius); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; margin-bottom: 1rem; }
.proceso p { color: var(--muted); font-size: .95rem; }

/* ===== Cotizador ===== */
.quote { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 980px) { .quote { grid-template-columns: 1fr 340px; } .quote-summary { position: sticky; top: 96px; } }
.quote-form { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; box-shadow: var(--shadow); scroll-margin-top: 90px; }
@media (min-width: 700px) { .quote-form { padding: 2rem 2.25rem; } }
.quote-progress { list-style: none; display: flex; gap: .5rem; padding: 0; margin: 0 0 1.75rem; }
.quote-progress li { flex: 1; display: flex; align-items: center; gap: .5rem; font-size: .85rem; font-weight: 600; color: var(--muted); padding-bottom: .7rem; border-bottom: 3px solid var(--border); }
.quote-progress li span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--border); font-size: .8rem; flex-shrink: 0; }
.quote-progress li.is-active, .quote-progress li.is-done { color: var(--primary); border-color: var(--primary); }
.quote-progress li.is-active span, .quote-progress li.is-done span { background: var(--primary); color: #fff; }
@media (max-width: 480px) { .quote-progress li { font-size: 0; gap: 0; justify-content: center; } }
.step { display: none; border: 0; padding: 0; margin: 0; min-width: 0; }
.step.is-active { display: block; animation: aparecer .25s ease; }
@keyframes aparecer { from { opacity: 0; transform: translateY(6px); } }
.step legend { font-family: var(--font-head); font-size: 1.35rem; font-weight: 700; color: var(--primary-ink); margin-bottom: 1rem; padding: 0; }
.hint { color: var(--muted); font-size: .92rem; margin-top: -.5rem; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); gap: .75rem; }
.choice { position: relative; cursor: pointer; border: 2px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: .15s; background: #fff; }
.choice:hover { border-color: var(--primary-light); }
.choice input { position: absolute; opacity: 0; }
.choice:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(57, 59, 147, .15); }
.choice:has(input:focus-visible) { outline: 3px solid var(--primary-light); }
.choice-img { aspect-ratio: 4 / 3; display: block; overflow: hidden; }
.choice-img img { width: 100%; height: 100%; object-fit: contain; padding: .35rem; }
.choice-img.img-pendiente { min-height: 0; display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 800; color: var(--primary-light); }
.choice .img-pendiente > span:not(:only-child) { display: none; }
.choice .img-pendiente img { width: 48px !important; height: 48px !important; }
.choice-name { padding: .5rem .6rem .65rem; font-size: .84rem; font-weight: 600; line-height: 1.25; text-align: center; }
.choice:has(input:checked) .choice-name { color: var(--primary); }

.fields { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.fields label { display: flex; flex-direction: column; gap: .35rem; font-weight: 600; font-size: .9rem; }
.fields label[hidden] { display: none; }
.fields .full { grid-column: 1 / -1; }
.fields small { font-weight: 400; color: var(--muted); }
input, select, textarea { font: inherit; font-weight: 400; color: var(--text); padding: .7rem .85rem; border: 1.5px solid var(--border); border-radius: 10px; background: #fff; width: 100%; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(57, 59, 147, .15); }
.invalid { border-color: var(--error) !important; }
.input-group { display: flex; }
.input-group input { border-radius: 10px 0 0 10px; }
.unit { display: flex; align-items: center; padding: 0 .85rem; background: var(--bg-alt); border: 1.5px solid var(--border); border-left: 0; border-radius: 0 10px 10px 0; color: var(--muted); font-weight: 500; white-space: nowrap; }
.check { flex-direction: row !important; align-items: flex-start; font-weight: 400 !important; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; accent-color: var(--primary); }
.hp { position: absolute !important; left: -9999px; }
.field-error { color: var(--error); font-size: .9rem; font-weight: 500; margin: 1rem 0 0; }
.step-actions { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }

.quote-summary { background: var(--bg-alt); border-radius: var(--radius-lg); padding: 1.5rem; border: 1px solid var(--border); }
.summary-product { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; color: var(--primary); margin-bottom: .75rem; }
.quote-summary .specs { background: #fff; }
.estimate { margin-top: 1rem; background: #fff; border-left: 4px solid var(--primary); border-radius: 10px; padding: .9rem 1rem; }
.estimate p { margin: 0 0 .35rem; font-size: .92rem; }
.condiciones { list-style: none; padding: 0; margin: 1rem 0 0; color: var(--muted); display: grid; gap: .3rem; }
.quote-summary hr { border: 0; border-top: 1px solid var(--border); margin: 1.25rem 0 1rem; }

/* Gracias, legal */
.success-icon { width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 1.5rem; background: #E3F7EA; color: #1c8a47; }
.prose h2 { font-size: 1.3rem; margin-top: 2rem; }
.prose p, .prose li { color: #3a3e52; }
.notice { background: #FFF6E0; border: 1px solid #F3D48A; padding: .8rem 1rem; border-radius: 10px; }

/* ===== Footer ===== */
.footer { background: var(--primary-ink); color: #b9c0dd; padding-top: 4rem; font-size: .93rem; }
.footer-grid { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); padding-bottom: 3rem; }
.footer h3 { color: #fff; font-size: 1rem; margin: 0 0 .9rem; }
.footer h3 + ul + h3, .footer ul + h3 { margin-top: 1.5rem; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.footer a { color: #b9c0dd; text-decoration: none; }
.footer a:hover { color: #fff; }
.logo-footer .logo-text strong { color: #fff; }
.logo-footer .logo-text small { color: #8d94b8; }
.logo-footer { margin-bottom: 1rem; }
.contact-list li { display: flex; gap: .55rem; align-items: flex-start; }
.contact-list .ic { margin-top: 3px; color: var(--primary-light); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-block: 1.5rem 5.5rem; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .84rem; }
@media (min-width: 700px) { .footer-bottom { padding-bottom: 1.5rem; } }

/* WhatsApp flotante */
.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 60; width: 60px; height: 60px; border-radius: 50%; background: var(--wa); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 28px rgba(18, 140, 126, .45); transition: transform .2s; }
.wa-float:hover { transform: scale(1.08); }
.wa-float::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--wa); animation: pulso 2.4s infinite; }
@keyframes pulso { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.6); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ===== Asesor virtual ===== */
.chat-burbuja { position: fixed; right: 18px; bottom: 88px; z-index: 60; width: 60px; height: 60px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--primary); color: #fff; cursor: pointer; box-shadow: 0 10px 28px rgba(57, 59, 147, .4); transition: transform .2s; }
.chat-burbuja:hover { transform: scale(1.08); }
.chat-burbuja span { position: absolute; right: 72px; white-space: nowrap; background: var(--primary-ink); color: #fff; font-size: .82rem; font-weight: 600; padding: .35rem .7rem; border-radius: 8px; opacity: 0; pointer-events: none; transition: opacity .15s; }
.chat-burbuja:hover span, .chat-burbuja:focus-visible span { opacity: 1; }
/* Con el chat abierto el panel queda encima del botón: se esconde y se cierra con la X */
.chat-burbuja[aria-expanded="true"] { display: none; }
.chat-panel { position: fixed; right: 18px; bottom: 88px; z-index: 61; width: min(380px, calc(100vw - 36px)); height: min(560px, calc(100dvh - 120px)); background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; }
.chat-panel[hidden] { display: none; }  /* sin esto, display:flex le gana al atributo hidden */
.chat-panel header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1rem; background: var(--primary-dark); color: #fff; }
.chat-panel header strong { display: block; font-family: var(--font-head); }
.chat-panel header small { color: #b9c0dd; font-size: .8rem; }
.chat-panel header button { background: rgba(255,255,255,.14); border: 0; color: #fff; border-radius: 8px; padding: .3rem; cursor: pointer; display: grid; place-items: center; }
.chat-mensajes { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .6rem; background: var(--bg-alt); }
/* Lo que manda el cliente se ve tal cual: la foto y el reproductor de la nota de voz */
.chat-medio { padding: .3rem; }
.chat-medio img { display: block; max-width: 100%; max-height: 220px; border-radius: 11px; }
.chat-medio audio { display: block; width: 240px; max-width: 100%; height: 40px; }
.chat-medio.chat-enviando { opacity: .55; }
.chat-medio-ido { padding: .6rem .85rem; font-size: .85rem; font-style: italic; opacity: .8; }

/* Formulario de datos dentro de la conversación */
.chat-form { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: .85rem; display: grid; grid-template-columns: 1fr 1fr; gap: .45rem .5rem; box-shadow: var(--shadow); }
.chat-form > strong, .chat-form > button, .chat-form-aviso, .chat-form label:first-of-type { grid-column: 1 / -1; }
.chat-form strong { font-family: var(--font-head); font-size: .95rem; }
.chat-form label { display: flex; flex-direction: column; gap: .15rem; font-size: .75rem; font-weight: 600; color: var(--muted); }
.chat-form label i { font-weight: 400; font-style: normal; opacity: .75; }
.chat-form input { border: 1px solid var(--border); border-radius: 8px; padding: .45rem .55rem; font: inherit; font-size: .88rem; color: var(--ink); min-width: 0; }
.chat-form input:focus { outline: 2px solid var(--primary); outline-offset: -1px; }
.chat-form label:has(input[name="email"]), .chat-form .chat-rut { grid-column: 1 / -1; }
.fields input[type="file"] { border: 1px solid var(--border); border-radius: var(--radius); padding: .5rem; font: inherit; font-size: .88rem; background: var(--bg-alt); cursor: pointer; }
.fields input[type="file"]::file-selector-button, .chat-form input[type="file"]::file-selector-button { border: 0; border-radius: 6px; background: var(--primary-50); color: var(--primary-ink); font: inherit; font-size: .82rem; font-weight: 600; padding: .35rem .7rem; margin-right: .6rem; cursor: pointer; }
.chat-form input[type="file"] { padding: .35rem; font-size: .8rem; background: var(--bg-alt); cursor: pointer; }
.chat-form input[type="file"]::file-selector-button { border: 0; border-radius: 6px; background: var(--primary-50); color: var(--primary-ink); font: inherit; font-size: .78rem; font-weight: 600; padding: .3rem .6rem; margin-right: .5rem; cursor: pointer; }
.chat-form input[name="sitio_web"] { position: absolute; left: -9999px; }
.chat-form button { margin-top: .2rem; justify-content: center; }
.chat-form-aviso { margin: 0; font-size: .72rem; color: var(--muted); text-align: center; }
.chat-form-ok { background: #E8F6EC; border: 1px solid #BFE3C9; border-radius: 14px; padding: .8rem .9rem; font-size: .9rem; color: #1B5E33; font-weight: 600; }
.chat-msg { max-width: 85%; padding: .6rem .85rem; border-radius: 14px; font-size: .93rem; line-height: 1.45; white-space: pre-wrap; }
.chat-asesor { background: #fff; border: 1px solid var(--border); border-bottom-left-radius: 4px; align-self: flex-start; }
.chat-cliente { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.chat-esperando { color: var(--muted); font-style: italic; }
.chat-panel > form { display: flex; gap: .5rem; padding: .75rem; border-top: 1px solid var(--border); align-items: flex-end; }
.chat-panel textarea { flex: 1; resize: none; max-height: 120px; font: inherit; padding: .6rem .8rem; border: 1.5px solid var(--border); border-radius: 12px; }
.chat-panel textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(57,59,147,.15); }
.chat-panel > form .btn { padding: .6rem .9rem; }
.chat-accion { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--muted); cursor: pointer; transition: .15s; }
.chat-accion:hover { color: var(--primary); border-color: var(--primary); }
.chat-accion.grabando { background: #C62828; border-color: #C62828; color: #fff; width: auto; padding: 0 .6rem; gap: .35rem; grid-auto-flow: column; animation: latido 1.2s ease-in-out infinite; }
.chat-accion.grabando::after { content: attr(data-tiempo); font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums; }
@keyframes latido { 50% { opacity: .65; } }
@media (prefers-reduced-motion: reduce) { .chat-accion.grabando { animation: none; } }
.chat-aviso { margin: 0; padding: 0 .9rem .75rem; font-size: .72rem; color: var(--muted); }
@media (max-width: 480px) {
  .chat-burbuja span { display: none; }
  .chat-panel { right: 10px; left: 10px; width: auto; bottom: 10px; height: min(70dvh, 520px); }
}
