/* ==========================================================================
   Barraca Nuñez — Calculadora de materiales
   ========================================================================== */

:root {
  --navy: #000031;
  --navy-2: #0a0a4a;
  --navy-3: #16166a;
  --red: #d90a0a;
  --red-dark: #b10707;
  --white: #ffffff;
  --ink: #0d1033;
  --muted: #5b6080;
  --line: #e2e4ef;
  --bg: #ffffff;
  --bg-alt: #f4f5fa;
  --wa: #1fa855;
  --wa-dark: #178a45;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(0, 0, 49, .06), 0 8px 24px rgba(0, 0, 49, .07);
  --shadow-lg: 0 2px 4px rgba(0, 0, 49, .06), 0 20px 48px rgba(0, 0, 49, .14);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font-display: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  overflow-x: clip;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.container { width: min(1180px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: .78rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--red);
}
.eyebrow::before { content: ""; width: 18px; height: 3px; background: currentColor; border-radius: 2px; }
.eyebrow-light { color: #ff6b6b; }

/* ------------------------------------------------------------------ botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px;
  border: 2px solid transparent; border-radius: 999px;
  font-family: var(--font-display); font-weight: 700; font-size: .95rem;
  text-decoration: none; cursor: pointer;
  transition: transform .18s var(--ease), background-color .18s, box-shadow .18s, color .18s, border-color .18s;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: .88rem; }
.btn-lg { min-height: 54px; padding: 14px 28px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 6px 18px rgba(217, 10, 10, .28); }
.btn-whatsapp { background: var(--wa); color: #fff; box-shadow: 0 6px 18px rgba(31, 168, 85, .25); }
.btn-ghost { background: #fff; color: var(--navy); border-color: var(--line); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
@media (hover: hover) {
  .btn-primary:not(:disabled):hover { background: var(--red-dark); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(217, 10, 10, .34); }
  .btn-whatsapp:hover { background: var(--wa-dark); transform: translateY(-2px); }
  .btn-ghost:hover { border-color: var(--navy); transform: translateY(-2px); }
  .btn-outline-light:hover { border-color: #fff; background: rgba(255, 255, 255, .08); transform: translateY(-2px); }
}
.btn-link {
  background: none; border: 0; padding: 6px 0; cursor: pointer;
  color: var(--muted); font-weight: 600; font-size: .9rem; text-decoration: underline; text-underline-offset: 3px;
}
.btn-link:hover { color: var(--red); }
.btn-link-light { color: #fff; text-decoration: none; display: inline-block; margin-top: 14px; font-family: var(--font-display); font-weight: 700; }
.btn-link-light:hover { color: #ff8a8a; }

/* ------------------------------------------------------------------ topbar */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid transparent;
  transition: box-shadow .2s, border-color .2s;
}
@supports (backdrop-filter: blur(10px)) {
  .topbar { background: rgba(255, 255, 255, .85); backdrop-filter: blur(12px) saturate(160%); -webkit-backdrop-filter: blur(12px) saturate(160%); }
}
.topbar.is-scrolled { border-color: var(--line); box-shadow: 0 4px 20px rgba(0, 0, 49, .06); }
.topbar-inner { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand img { width: 168px; }
.nav { display: flex; gap: 6px; margin-left: auto; }
.nav a {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px;
  color: var(--navy); text-decoration: none; font-family: var(--font-display); font-weight: 600; font-size: .92rem;
  transition: background-color .18s;
}
.nav a:hover { background: var(--bg-alt); }
.badge {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  background: var(--red); color: #fff; border-radius: 999px; font-size: .72rem; font-weight: 700;
}

/* -------------------------------------------------------------------- hero */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(40, 40, 160, .55), transparent 60%),
    radial-gradient(700px 420px at -10% 110%, rgba(217, 10, 10, .18), transparent 60%),
    var(--navy);
  color: #fff;
  padding: clamp(56px, 8vw, 104px) 0 clamp(64px, 8vw, 110px);
}
.hero-roof {
  position: absolute; z-index: -1; right: -6%; bottom: -38%;
  width: min(760px, 90vw); aspect-ratio: 1.6;
  background: linear-gradient(135deg, transparent 49.2%, rgba(217, 10, 10, .9) 49.4%, rgba(217, 10, 10, .9) 55%, transparent 55.2%) left / 50% 100% no-repeat,
              linear-gradient(225deg, transparent 49.2%, rgba(217, 10, 10, .9) 49.4%, rgba(217, 10, 10, .9) 55%, transparent 55.2%) right / 50% 100% no-repeat;
  opacity: .22;
  animation: roofIn 1.2s var(--ease) both .2s;
}
@keyframes roofIn { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: .22; } }
.hero-inner { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero h1 {
  margin: 18px 0 18px;
  font-size: clamp(2.1rem, 4.6vw, 3.6rem); font-weight: 800; letter-spacing: -.02em;
  text-wrap: balance; max-width: 18ch;
}
.hero h1 em { font-style: normal; color: #ff6060; }
.lead { font-size: clamp(1.02rem, 1.4vw, 1.15rem); color: rgba(255, 255, 255, .82); max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-copy > * { animation: fadeUp .7s var(--ease) both; }
.hero-copy > *:nth-child(2) { animation-delay: .06s; }
.hero-copy > *:nth-child(3) { animation-delay: .12s; }
.hero-copy > *:nth-child(4) { animation-delay: .18s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 18px 20px; border-radius: var(--radius);
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1);
  animation: fadeUp .7s var(--ease) both;
}
.steps li:nth-child(1) { animation-delay: .2s; }
.steps li:nth-child(2) { animation-delay: .3s; }
.steps li:nth-child(3) { animation-delay: .4s; }
.steps strong { font-family: var(--font-display); font-size: 1.02rem; }
.steps p { color: rgba(255, 255, 255, .7); font-size: .92rem; margin-top: 2px; }
.step-n {
  flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px;
  background: var(--red); font-family: var(--font-display); font-weight: 800;
}

/* ---------------------------------------------------------------- secciones */
.section { padding: clamp(56px, 8vw, 96px) 0; scroll-margin-top: 72px; }
.section-alt { background: var(--bg-alt); }
.section-navy { background: var(--navy); color: #fff; }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 800; margin: 12px 0 10px; }
.section-head p { color: var(--muted); font-size: 1.04rem; }

[data-reveal] { opacity: 1; }
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js [data-reveal].is-revealed { opacity: 1; transform: none; }

/* ------------------------------------------------------------------ rubros */
.rubros { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 36px; }
.rubro-grupo { display: flex; flex-direction: column; gap: 12px; }
.rubro-grupo-head h3 { font-size: .95rem; font-weight: 800; color: var(--navy); }
.rubro-grupo-head p { font-size: .82rem; color: var(--muted); }
.rubro-grid { display: grid; gap: 10px; }
.rubro-card {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 14px; text-align: left; cursor: pointer;
  background: #fff; border: 1.5px solid var(--line); border-radius: 14px;
  transition: border-color .18s, box-shadow .18s, transform .18s var(--ease), background-color .18s;
}
@media (hover: hover) {
  .rubro-card:hover { border-color: var(--navy); transform: translateY(-2px); box-shadow: var(--shadow); }
}
.rubro-card.is-active { background: var(--navy); border-color: var(--navy); color: #fff; box-shadow: var(--shadow-lg); }
.rubro-card.is-active::after {
  content: ""; position: absolute; top: -1px; left: 18px; width: 26px; height: 4px; border-radius: 0 0 4px 4px; background: var(--red);
}
.rubro-icon {
  flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px;
  background: var(--bg-alt); color: var(--navy);
  transition: background-color .18s, color .18s;
}
.rubro-icon svg { width: 24px; height: 24px; }
.rubro-card.is-active .rubro-icon { background: var(--red); color: #fff; }
.rubro-text { display: flex; flex-direction: column; min-width: 0; }
.rubro-text strong { font-family: var(--font-display); font-weight: 700; font-size: .93rem; }
.rubro-text small { font-size: .78rem; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.rubro-card.is-active .rubro-text small { color: rgba(255, 255, 255, .72); }

/* -------------------------------------------------------------- calculadora */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 24px; align-items: start; scroll-margin-top: 80px; }
.calc-form-card, .calc-result {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: clamp(20px, 3vw, 30px);
}
.calc-result { position: sticky; top: 92px; border-top: 4px solid var(--red); }
.calc-form-head { display: flex; gap: 14px; align-items: center; margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.rubro-icon-lg { width: 52px; height: 52px; border-radius: 14px; background: var(--navy); color: #fff; }
.rubro-icon-lg svg { width: 28px; height: 28px; }
.calc-form-head h3 { font-size: 1.3rem; font-weight: 800; }
.calc-form-head p { color: var(--muted); font-size: .92rem; }
.calc-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 16px; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-weight: 600; font-size: .88rem; color: var(--ink); }
.field-help { font-size: .78rem; color: var(--muted); line-height: 1.35; }
.calc-form .field:has(select), .calc-form .field-check, .calc-form .field-waste, .calc-form .field:has(.field-help) { grid-column: 1 / -1; }
.input-wrap, .select-wrap {
  position: relative; display: flex; align-items: center;
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .18s, box-shadow .18s;
}
.input-wrap:focus-within, .select-wrap:focus-within { border-color: var(--navy); box-shadow: 0 0 0 4px rgba(0, 0, 49, .08); }
.input-wrap input, .select-wrap select {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 0; background: transparent; outline: none;
  font-size: 1rem; font-weight: 600;
}
.input-wrap input[type=number] { -moz-appearance: textfield; }
.input-wrap input::-webkit-outer-spin-button, .input-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.unit { padding: 0 14px 0 4px; color: var(--muted); font-weight: 600; font-size: .9rem; white-space: nowrap; }
.select-wrap select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer; font-weight: 500; }
.select-wrap::after {
  content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; margin-top: -6px; pointer-events: none;
  border-right: 2px solid var(--navy); border-bottom: 2px solid var(--navy); transform: rotate(45deg);
}
.field-check { flex-direction: row; align-items: center; gap: 12px; cursor: pointer; padding: 4px 0; }
.field-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch {
  flex: none; position: relative; width: 44px; height: 26px; border-radius: 999px; background: #cfd2e2;
  transition: background-color .2s;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s var(--ease);
}
.field-check input:checked + .switch { background: var(--red); }
.field-check input:checked + .switch::after { transform: translateX(18px); }
.field-check input:focus-visible + .switch { outline: 3px solid var(--navy); outline-offset: 2px; }
.field-waste { padding-top: 16px; border-top: 1px dashed var(--line); }
.field-waste .input-wrap { max-width: 160px; }

/* --------------------------------------------------------------- resultado */
.result-head h3 { font-size: 1.15rem; font-weight: 800; margin-top: 8px; text-wrap: balance; }
.datos { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 18px; }
.datos div { background: var(--bg-alt); border-radius: 10px; padding: 8px 12px; }
.datos dt { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.datos dd { margin: 0; font-weight: 700; font-size: .92rem; }
.empty { color: var(--muted); padding: 18px 0; }

.mat-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.mat-row {
  display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.mat-qty { font-size: .85rem; color: var(--muted); line-height: 1.2; }
.mat-qty strong { display: block; font-family: var(--font-display); font-size: 1.3rem; color: var(--navy); font-weight: 800; }
.mat-name { display: flex; flex-direction: column; min-width: 0; }
.mat-name strong { font-weight: 600; font-size: .95rem; }
.mat-name small, .mat-price small { font-size: .78rem; color: var(--muted); }
.mat-price { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.mat-price strong { font-weight: 700; white-space: nowrap; }

.totales { margin: 18px 0; padding: 16px 18px; border-radius: 14px; background: var(--navy); color: #fff; }
.total-main { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.total-main span { font-family: var(--font-display); font-weight: 700; }
.total-main strong { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.5rem, 3vw, 1.9rem); }
.total-sub { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; font-size: .8rem; color: rgba(255, 255, 255, .7); }
.aviso {
  margin: 0 0 14px; padding: 10px 14px; border-radius: 10px;
  background: #fff4e5; color: #6b4200; font-size: .84rem; border-left: 3px solid #f0a020;
}
.result-note { margin-top: 12px; font-size: .78rem; color: var(--muted); text-align: center; }

/* ------------------------------------------------------------------- lista */
.lista-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 24px; align-items: start; }
.lista-col { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 28px); box-shadow: var(--shadow); }
.lista-sub { font-size: 1rem; font-weight: 800; margin-bottom: 14px; }
.lista-sub small { font-family: var(--font-body); font-weight: 500; color: var(--muted); font-size: .8rem; }
.trabajos { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.trabajo { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--bg-alt); }
.trabajo-icon { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--navy); color: #fff; }
.trabajo-icon svg { width: 20px; height: 20px; }
.trabajo-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.trabajo-text strong { font-size: .92rem; }
.trabajo-text small { font-size: .8rem; color: var(--muted); }
.icon-btn {
  flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { background: #fff; color: var(--red); }
.cliente { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); display: grid; gap: 14px; }
.cliente .lista-sub { margin-bottom: 0; }
.lista-actions { display: grid; gap: 10px; justify-items: center; }
.lista-empty {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
  background: #fff; border: 1.5px dashed #c9cce0; border-radius: var(--radius); padding: 48px 24px;
}
.lista-empty svg { width: 48px; height: 48px; color: var(--navy); opacity: .5; }
.lista-empty h3 { font-size: 1.2rem; }
.lista-empty p { color: var(--muted); max-width: 44ch; margin-bottom: 8px; }

/* ---------------------------------------------------------------- contacto */
.contacto { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.contacto-logo { width: 220px; margin-bottom: 28px; }
.contacto h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 800; margin-bottom: 12px; }
.contacto-copy > p { color: rgba(255, 255, 255, .78); font-size: 1.05rem; max-width: 44ch; }
.contacto-actions { margin-top: 26px; }
.contacto-cards { display: grid; gap: 16px; }
.info-card { padding: 22px 24px; border-radius: var(--radius); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); }
.info-card h3 { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; margin-bottom: 12px; }
.info-card h3 svg { width: 22px; height: 22px; color: #ff6b6b; }
.info-card p { color: rgba(255, 255, 255, .85); }
.estado { margin-left: auto; padding: 4px 10px; border-radius: 999px; font-size: .74rem; font-family: var(--font-body); font-weight: 600; background: rgba(255, 255, 255, .12); color: #fff; }
.estado.is-open { background: rgba(31, 168, 85, .22); color: #6ee79c; }
.horarios { width: 100%; border-collapse: collapse; font-size: .93rem; }
.horarios th, .horarios td { padding: 8px 10px; border-top: 1px solid rgba(255, 255, 255, .1); vertical-align: top; }
.horarios th { text-align: left; font-weight: 500; color: rgba(255, 255, 255, .78); }
.horarios td { text-align: right; font-weight: 600; }
.horarios tr.is-today { background: rgba(217, 10, 10, .18); }
.horarios tr.is-today th { color: #fff; font-weight: 700; }

/* ------------------------------------------------------------------ footer */
.footer { background: #00001f; color: rgba(255, 255, 255, .6); padding: 28px 0 32px; font-size: .85rem; }
.footer-inner { display: grid; gap: 6px; }
.footer-legal { font-size: .78rem; color: rgba(255, 255, 255, .45); }

/* ---------------------------------------------------------- flotantes */
.lista-bar {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40;
  display: none; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border-radius: 14px; background: var(--navy); color: #fff; text-decoration: none;
  box-shadow: 0 10px 30px rgba(0, 0, 49, .35); font-size: .92rem;
}
.lista-bar-cta { font-family: var(--font-display); font-weight: 700; color: #ff7070; }
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 18px; border-radius: 12px; background: #11123d; color: #fff; font-size: .92rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .25);
  opacity: 0; pointer-events: none; transform: translate(-50%, 16px);
  transition: opacity .25s, transform .25s var(--ease);
}
.toast.is-on { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.toast a { color: #ff7a7a; font-weight: 700; text-decoration: none; white-space: nowrap; }
.print-sheet { display: none; }

/* -------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .rubros { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .hero-inner, .calc, .lista-grid, .contacto { grid-template-columns: 1fr; }
  .calc-result { position: static; }
  .nav { display: none; }
  .topbar-wa { margin-left: auto; }
  .lista-bar:not([hidden]) { display: flex; }
  .toast { bottom: 84px; }
  .footer { padding-bottom: 96px; }
}
@media (max-width: 600px) {
  .container { width: min(1180px, 100% - 28px); }
  .brand img { width: 136px; }
  .topbar-inner { min-height: 64px; }
  .topbar-wa span { display: none; }
  .topbar-wa { width: 44px; padding: 0; }
  .rubros { grid-template-columns: 1fr; gap: 22px; }
  .rubro-grid { grid-template-columns: 1fr 1fr; }
  .rubro-card { flex-direction: column; align-items: flex-start; }
  .rubro-text small { display: none; }
  .calc-form { grid-template-columns: 1fr; }
  .mat-row { grid-template-columns: minmax(0, 1fr) auto; }
  .mat-qty { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 6px; }
  .mat-qty strong { display: inline; font-size: 1.15rem; }
  .steps li { padding: 14px 16px; }
  .hero-actions .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-roof { animation: none; }
}

/* ------------------------------------------------------------ PDF (print) */
@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; }
  body > *:not(.print-sheet) { display: none !important; }
  .print-sheet { display: block !important; color: #000; font-family: var(--font-body); font-size: 11pt; }
  .p-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 12px; border-bottom: 3px solid var(--red); margin-bottom: 14px; }
  .p-head img { width: 170px; }
  .p-head h1 { font-size: 16pt; color: var(--navy); text-align: right; }
  .p-head p { text-align: right; color: #555; }
  .p-cliente { margin-bottom: 8px; }
  .print-sheet h2 { font-size: 12pt; color: var(--navy); margin: 14px 0 6px; }
  .p-trabajos { margin: 0; padding-left: 18px; }
  .print-sheet table { width: 100%; border-collapse: collapse; }
  .print-sheet th { background: var(--navy) !important; color: #fff !important; text-align: left; padding: 6px 8px; font-size: 9.5pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-sheet td { padding: 6px 8px; border-bottom: 1px solid #ddd; vertical-align: top; }
  .print-sheet td:nth-child(3), .print-sheet td:nth-child(4), .print-sheet th:nth-child(3), .print-sheet th:nth-child(4) { text-align: right; white-space: nowrap; }
  .print-sheet small { color: #666; }
  .print-sheet tfoot td { text-align: right; border: 0; }
  .print-sheet tfoot td:first-child { font-weight: 600; }
  .p-total td { font-size: 13pt; font-weight: 800; color: var(--navy); border-top: 2px solid var(--navy) !important; }
  .p-foot { margin-top: 18px; padding-top: 10px; border-top: 1px solid #ccc; font-size: 9pt; color: #444; }
  .p-foot p + p { margin-top: 4px; }
  .print-sheet tr { page-break-inside: avoid; }
}

/* ------------------------------------------------ quitar materiales / buscador */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.mat-list-del .mat-row { grid-template-columns: 112px minmax(0, 1fr) auto 32px; }
.mat-del { width: 30px; height: 30px; border-radius: 8px; }
.mat-del svg { width: 15px; height: 15px; }
.mat-del:hover { background: #ffe9e9; color: var(--red); }
.quitadas { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; font-size: .82rem; color: var(--muted); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px;
  border: 1px dashed #c2c6da; border-radius: 999px; background: #fff;
  font-size: .82rem; color: var(--navy); cursor: pointer;
}
.chip:hover { border-color: var(--red); color: var(--red); border-style: solid; }
.chip span { font-weight: 700; }

.buscador {
  margin-top: 26px; padding: clamp(18px, 3vw, 26px);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.buscador .field-label { font-family: var(--font-display); font-weight: 700; font-size: 1rem; }
.buscador .input-wrap { max-width: 560px; }
.input-icon { width: 20px; height: 20px; margin-left: 14px; color: var(--muted); flex: none; }
.buscador-res { display: grid; gap: 8px; margin-top: 16px; }
.buscador-item {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; border-radius: 12px; background: var(--bg-alt);
}
.buscador-nombre { display: flex; flex-direction: column; min-width: 0; flex: 1 1 260px; }
.buscador-nombre strong { font-size: .93rem; }
.buscador-nombre small { font-size: .8rem; color: var(--muted); }
.buscador-add { display: flex; align-items: center; gap: 8px; }
.buscador-add .input-wrap { width: 84px; background: #fff; }
.buscador-add .input-wrap input { min-height: 40px; padding: 6px 10px; text-align: center; }
.buscador-vacio { color: var(--muted); font-size: .9rem; }
