:root {
  --bg: #f4f4f2; --surface: #ffffff; --text: #1d1d1b; --muted: #6b6a65;
  --accent: #ce8f03; --accent-text: #8a5d00; --on-accent: #1d1d1b; --line: #e4e3de;
  --radius: 14px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: "Manrope", system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.55; }
a { color: var(--accent-text); }
.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
.container--narrow { width: min(720px, 100% - 32px); }

.header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; }
.brand__mark { width: 44px; height: auto; display: block; }
.brand__name small { display: block; font-size: .7rem; font-weight: 600; color: var(--muted); margin-top: -4px; }
.nav { display: none; gap: 24px; }
.nav a { color: var(--text); text-decoration: none; font-weight: 600; }
@media (min-width: 800px) { .nav { display: flex; } }

.btn { display: inline-block; padding: 14px 22px; border-radius: 999px; font-weight: 700; text-decoration: none; border: 1.5px solid transparent; }
.btn--sm { padding: 9px 16px; font-size: .9rem; }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--ghost { border-color: var(--line); color: var(--text); background: var(--surface); }

.hero { padding: 72px 0 56px; }
.hero__inner { max-width: 760px; }
.eyebrow { color: var(--accent-text); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; margin: 0 0 12px; }
h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); line-height: 1.08; margin: 0 0 16px; font-weight: 800; }
h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0 0 12px; font-weight: 800; }
h3 { margin: 0 0 6px; font-size: 1.1rem; }
.lead { font-size: 1.15rem; color: var(--muted); margin: 0 0 28px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }

.section { padding: 56px 0; }
.section--alt { background: var(--surface); border-block: 1px solid var(--line); }
.section__sub, .muted, .note { color: var(--muted); }
.note { margin-top: 20px; }

.grid { display: grid; gap: 16px; margin-top: 24px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.section--alt .card { background: var(--bg); }
.card p { margin: 0 0 12px; }
.card .btn { margin: 4px 6px 0 0; }
.price { font-size: 1.8rem; font-weight: 800; margin: 8px 0; }
.price small { font-size: .85rem; font-weight: 600; color: var(--muted); }
.size { font-weight: 800; color: var(--accent-text); }

.steps { list-style: none; counter-reset: s; padding: 0; margin: 24px 0 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 800; margin-bottom: 10px; }
.steps strong, .steps span { display: block; }
.steps span { color: var(--muted); }

details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin-top: 12px; }
.section--alt details { background: var(--bg); }
summary { cursor: pointer; font-weight: 700; }
details p { margin: 10px 0 0; color: var(--muted); }
details ul { margin: 8px 0 0; padding-left: 20px; color: var(--muted); display: grid; gap: 6px; }

.footer { border-top: 1px solid var(--line); padding: 32px 0 96px; color: var(--muted); }
.footer__inner { display: grid; gap: 6px; }

.fab { position: fixed; right: 16px; bottom: 16px; z-index: 20; padding: 14px 20px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 800; text-decoration: none; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
@media (min-width: 800px) { .fab { display: none; } .footer { padding-bottom: 32px; } }

/* Guía de tamaños (lista compacta) */
.sizes { margin-top: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.size-row { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); }
.size-row:last-child { border-bottom: 0; }
.size-row:hover, .size-row:focus-visible { background: var(--bg); }
.size-row__body { display: grid; }
.size-row__ref { color: var(--accent-text); font-weight: 600; font-size: .95rem; }
.size-row__go { color: var(--accent-text); font-weight: 800; }

.small { font-size: .88rem; }

/* Calculadora */
.calc { display: grid; gap: 16px; margin-top: 24px; }
@media (min-width: 800px) { .calc { grid-template-columns: 1.4fr 1fr; align-items: start; } .calc__result { position: sticky; top: 80px; } }
.calc__items { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 20px; }
.calc__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.calc__row:last-child { border-bottom: 0; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--bg); color: var(--text); font-size: 1.2rem; font-weight: 700; cursor: pointer; }
.stepper button:hover { border-color: var(--accent); }
.stepper output { min-width: 22px; text-align: center; font-weight: 700; }

/* Formulario */
.form { display: grid; gap: 14px; margin-top: 24px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
.form input, .form select, .form textarea { font: inherit; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); color: var(--text); }
.form input:focus, .form select:focus, .form textarea:focus, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.form button { cursor: pointer; font: inherit; font-weight: 700; border: 0; }
.form button[disabled] { opacity: .6; }
.form__msg { margin: 0; font-weight: 600; color: var(--accent-text); min-height: 1.4em; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Requisitos */
.checks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.checks li { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px 14px 48px; position: relative; font-weight: 600; }
.checks li::before { content: "✓"; position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: .8rem; font-weight: 800; }

/* Sucursales: listado + mapas */
.info { margin: 0 0 14px; display: grid; gap: 10px; }
.info div { display: grid; grid-template-columns: 120px 1fr; gap: 10px; }
.info dt { color: var(--muted); font-weight: 600; font-size: .9rem; }
.info dd { margin: 0; font-weight: 600; }
.map { margin: 16px 0 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.map iframe { display: block; width: 100%; height: 420px; border: 0; }

/* Foto de portada (aparece solo si existe assets/img/hero.jpg) */
.hero__media { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.hero__media img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }

/* Foto en la guía de tamaños (aparece solo si existe tamano-<categoria>.jpg) */
.size-row.has-img { grid-template-columns: 64px 1fr 120px auto; }
.size-row__img { display: block; width: 120px; height: 80px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.size-row__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.size-row__img--empty { display: grid; place-items: center; text-align: center; padding: 6px; border: 2px dashed var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent-text); font-size: .8rem; font-weight: 700; }
@media (max-width: 600px) {
  .size-row.has-img { grid-template-columns: 56px 1fr auto; }
  .size-row.has-img .size-row__img { grid-column: 1 / -1; order: 1; width: 100%; height: 150px; }
}

/* Espacios de foto genéricos (portada, seguridad, sucursales, pasos) */
.foto-slot { overflow: hidden; border-radius: 10px; }
.foto-slot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.foto-slot--card { aspect-ratio: 3 / 2; margin-bottom: 14px; }
.foto-slot.is-empty { display: grid; place-items: center; text-align: center; padding: 8px; border: 2px dashed var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent-text); font-size: .85rem; font-weight: 700; }
.foto-slot.is-empty span { color: var(--accent-text); font-weight: 700; }
.foto-slot[hidden] { display: none; }

/* Portada: foto de fondo a todo el ancho con degradado para que el texto se lea */
.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero.has-media { padding: 96px 0 88px; min-height: 460px; display: flex; align-items: center; }
.hero.has-media .hero__inner { width: min(1120px, 100% - 32px); }
.hero.has-media .hero__text { max-width: 620px; }
.hero__media.foto-slot { position: absolute; inset: 0; z-index: -2; margin: 0; border: 0; border-radius: 0; aspect-ratio: auto; }
.hero__media.foto-slot img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; }
.hero.has-media::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(0deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 0%, transparent) 28%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 78%, transparent) 0%, color-mix(in srgb, var(--bg) 92%, transparent) 100%);
}
@media (min-width: 900px) {
  .hero.has-media::after {
    background:
      linear-gradient(0deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 0%, transparent) 22%),
      linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 92%, transparent) 45%, color-mix(in srgb, var(--bg) 70%, transparent) 70%, color-mix(in srgb, var(--bg) 15%, transparent) 100%);
  }
}
/* Recuadro indicador (mientras falta la foto): marco punteado dentro de la portada */
.hero__media.foto-slot.is-empty { outline: 2px dashed var(--accent); outline-offset: -16px; place-items: end center; padding-bottom: 36px; }
@media (min-width: 900px) { .hero__media.foto-slot.is-empty { place-items: center end; padding: 0 12% 0 0; } }
