/* ==========================================================================
   generadores.pe — Estilos del sitio
   Los colores principales se definen desde el panel (variables en <head>).
   ========================================================================== */

:root {
    --primary: #d9480f;
    --primary-dark: #b23a0c;
    --primary-soft: #fdf0ea;
    --on-primary: #fff;
    --secondary: #1f2933;
    --on-secondary: #fff;
    --bg: #ffffff;
    --text: #1f2933;
    --muted: #667085;
    --line: #e6e8ec;
    --surface: #f6f7f9;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
    --shadow-lg: 0 12px 32px rgba(16, 24, 40, .14);
    --gutter: clamp(16px, 3vw, 48px);
    --font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --font-head: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 400 16px/1.55 var(--font);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; color: var(--secondary); }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

.wrap { width: 100%; padding-inline: var(--gutter); margin-inline: auto; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 1000; background: var(--secondary); color: #fff; padding: 8px 14px; border-radius: 6px; }
.skip:focus { left: 8px; color: #fff; }
.ico { flex-shrink: 0; }

/* --------------------------------------------------------------------------
   Cabecera
   -------------------------------------------------------------------------- */
.site-header { background: var(--bg); position: relative; z-index: 50; }

.hdr-top {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 24px;
    padding-block: 18px;
}
.menu-btn, .hdr-spacer { display: none; }

.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--secondary); min-width: 0; }
.logo:hover { color: var(--secondary); }
.logo-img { max-height: 60px; width: auto; }
.logo-mark {
    display: grid; place-items: center;
    width: 42px; height: 42px; border-radius: 10px;
    background: var(--primary); color: var(--on-primary);
}
.logo-mark .ico { fill: currentColor; stroke: none; }
.logo-text { font: 700 1.9rem/1 var(--font-head); letter-spacing: -.01em; white-space: nowrap; }
.logo-tld { color: var(--primary); }

/* Buscador */
.search { position: relative; display: flex; justify-self: end; width: min(100%, var(--search-w, 640px)); }
.search input {
    flex: 1; min-width: 0;
    height: var(--search-h, 48px); padding: 0 16px 0 18px;
    border: var(--search-bw, 2px) solid var(--search-bc, var(--line)); border-right: 0;
    border-radius: var(--search-r, 999px) 0 0 var(--search-r, 999px);
    background: var(--search-bg, var(--surface));
    font-size: 16px;
    transition: border-color .2s, background .2s;
    -webkit-appearance: none; appearance: none;
}
.search input::-webkit-search-cancel-button { cursor: pointer; }
.search input:focus { outline: none; border-color: var(--primary); background: #fff; }
.search input:focus + .search-btn { box-shadow: 0 0 0 var(--search-bw, 2px) var(--primary); }
.search-btn {
    display: inline-flex; align-items: center; gap: 8px;
    height: var(--search-h, 48px); padding: 0 22px;
    border: 0; border-radius: 0 var(--search-r, 999px) var(--search-r, 999px) 0;
    background: var(--primary); color: var(--on-primary);
    font-weight: 600; cursor: pointer;
    transition: background .2s;
}
.search-btn:hover { background: var(--primary-dark); }

.search-results {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); overflow: hidden; z-index: 60;
    max-height: min(70vh, 520px); overflow-y: auto;
}
.search-results a {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; color: var(--text); border-bottom: 1px solid var(--line);
}
.search-results a:last-child { border-bottom: 0; }
.search-results a:hover, .search-results a.is-active { background: var(--primary-soft); color: var(--text); }
.search-results img { width: 48px; height: 48px; object-fit: contain; border-radius: 6px; background: var(--surface); flex-shrink: 0; }
.search-results .sr-name { font-weight: 500; line-height: 1.3; }
.search-results mark { background: none; color: var(--primary); font-weight: 700; }
.search-results .sr-all { justify-content: center; font-weight: 600; color: var(--primary); background: var(--surface); }
.search-results .sr-empty { padding: 14px; color: var(--muted); margin: 0; }

/* Menú principal (escritorio: barra bajo el logo y el buscador) */
.main-nav { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg); }
.drawer-head { display: none; }
.nav-list { list-style: none; margin: 0 auto; display: flex; gap: 6px; }
.nav-list > li { position: relative; }
.nav-list > li > a {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 14px 18px;
    font: 700 .95rem/1 var(--font-head); letter-spacing: .08em;
    color: var(--secondary);
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
}
.nav-list > li:first-child > a { padding-left: 0; }
.nav-list > li > a:hover, .nav-list > li > a[aria-current="page"] { color: var(--primary); border-bottom-color: var(--primary); }
.nav-list .ico-down { transition: transform .2s; }
.sub {
    list-style: none; margin: 0; padding: 8px;
    position: absolute; top: 100%; left: 0; min-width: 260px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    opacity: 0; visibility: hidden; transform: translateY(6px);
    transition: opacity .18s, transform .18s, visibility .18s;
}
.has-sub:hover .sub, .has-sub:focus-within .sub { opacity: 1; visibility: visible; transform: none; }
.has-sub:hover .ico-down { transform: rotate(180deg); }
.sub a { display: block; padding: 9px 12px; border-radius: 6px; color: var(--text); font-weight: 500; }
.sub a:hover { background: var(--primary-soft); color: var(--primary-dark); }
.nav-overlay { display: none; }

/* --------------------------------------------------------------------------
   Contenido
   -------------------------------------------------------------------------- */
.site-main { flex: 1; }
.section { padding-block: 28px 56px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.page-title { font-size: clamp(1.6rem, 2.6vw, 2.3rem); margin: 0; }
.section-title { font-size: 1.5rem; margin: 0 0 18px; }
.count { color: var(--muted); margin: 0; font-weight: 500; }
.lead { color: var(--muted); font-size: 1.08rem; max-width: 70ch; margin: 0 0 20px; }
.empty { padding: 40px; text-align: center; color: var(--muted); background: var(--surface); border-radius: var(--radius); }

/* Ruta de navegación */
.crumbs ol { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: .9rem; color: var(--muted); }
.crumbs li:not(:last-child)::after { content: "/"; margin-left: 6px; color: #c0c5cc; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--primary); }

/* Filtros por categoría */
.chips { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px; border-radius: 999px;
    border: 1px solid var(--line); background: #fff;
    color: var(--text); font-weight: 500; font-size: .95rem;
    transition: border-color .2s, background .2s, color .2s;
}
.chip span { font-size: .78rem; color: var(--muted); background: var(--surface); border-radius: 999px; padding: 1px 7px; }
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.is-active { background: var(--secondary); border-color: var(--secondary); color: var(--on-secondary); }
.chip.is-active span { background: rgba(255,255,255,.18); color: inherit; }

/* Rejilla de productos */
.grid {
    list-style: none; margin: 0; padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 20px;
}
.grid-sm { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.card { min-width: 0; }
.card-link {
    display: flex; flex-direction: column; height: 100%;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; color: var(--text);
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.card-link:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); transform: translateY(-3px); color: var(--text); }
.card-img { display: block; aspect-ratio: 1 / 1; background: #fff; padding: 12px; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: contain; transition: transform .35s ease; }
.card-link:hover .card-img img { transform: scale(1.04); }
.card-name {
    display: block; padding: 14px 16px 16px;
    border-top: 1px solid var(--line);
    font: 600 1.06rem/1.3 var(--font-head);
    color: var(--secondary);
}
.card-link:hover .card-name { color: var(--primary); }

/* Paginación */
.pagination ul { list-style: none; margin: 32px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pagination a { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); font-weight: 600; }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination a[aria-current="page"] { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }

/* Botones */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 12px 22px; border-radius: 10px; border: 2px solid transparent;
    font-weight: 600; font-size: 1rem; line-height: 1.2; cursor: pointer;
    transition: background .2s, border-color .2s, color .2s, transform .1s;
    text-align: center;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-dark); color: var(--on-primary); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-lg { padding: 15px 26px; font-size: 1.06rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* Botón de WhatsApp (estilo del plugin "Botón para solicitar precio") */
.wpb-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 12px 20px; border: 0; border-radius: 25px;
    background: var(--wpb-bg, #28a745); color: #fff !important;
    font-weight: 700; font-size: 16px; line-height: 1.2;
    cursor: pointer; transition: background-color .3s ease;
    -webkit-tap-highlight-color: transparent;
}
.wpb-btn:hover, .wpb-btn:focus-visible { background: var(--wpb-bg-h, #218838); color: #fff !important; }
.wpb-btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.wpb-btn.btn-lg { padding: 15px 26px; font-size: 1.06rem; border-radius: 10px; }
.wpb-block { display: flex; width: 100%; }

/* --------------------------------------------------------------------------
   Ficha de producto
   -------------------------------------------------------------------------- */
.product-top {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: clamp(24px, 4vw, 64px);
    align-items: start;
}
.gallery { position: sticky; top: 16px; }
.gallery-main {
    margin: 0; aspect-ratio: 1 / 1;
    border: 1px solid var(--line); border-radius: var(--radius);
    background: #fff; padding: 16px; overflow: hidden;
}
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs { list-style: none; margin: 12px 0 0; padding: 0; display: flex; gap: 10px; flex-wrap: wrap; }
.thumb { width: 78px; height: 78px; padding: 4px; border: 2px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb.is-active, .thumb:hover { border-color: var(--primary); }

.product-info { padding-top: 4px; }
.tag {
    display: inline-block; margin-bottom: 12px;
    padding: 4px 12px; border-radius: 999px;
    background: var(--primary-soft); color: var(--primary-dark);
    font-size: .85rem; font-weight: 600;
}
.product-title { font-size: clamp(1.7rem, 3vw, 2.6rem); margin-bottom: 14px; }
.product-short { color: #475467; font-size: 1.1rem; margin: 0 0 20px; }
.meta-list { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 0 0 24px; padding: 14px 0; border-block: 1px solid var(--line); }
.meta-list div { display: flex; gap: 8px; }
.meta-list dt { color: var(--muted); }
.meta-list dd { margin: 0; font-weight: 600; }
.cta { display: flex; flex-direction: column; align-items: stretch; gap: 12px; max-width: 440px; }

.notice { padding: 14px 16px; border-radius: 10px; margin-bottom: 16px; font-weight: 500; }
.notice-ok { background: #ecfdf3; color: #05603a; border: 1px solid #abefc6; }

.product-details { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); margin-top: 48px; }
.detail-block h2 { font-size: 1.4rem; padding-bottom: 10px; border-bottom: 2px solid var(--line); position: relative; }
.detail-block h2::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 56px; height: 2px; background: var(--primary); }
.prose { color: #344054; }
.prose h3 { font-size: 1.2rem; margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose table { border-collapse: collapse; width: 100%; }
.prose td, .prose th { border: 1px solid var(--line); padding: 8px; }
.specs { width: 100%; border-collapse: collapse; font-size: .98rem; }
.specs th, .specs td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.specs th { width: 45%; color: var(--muted); font-weight: 500; }
.specs td { font-weight: 600; }
.specs tr:nth-child(odd) { background: var(--surface); }
.related { margin-top: 56px; }

/* --------------------------------------------------------------------------
   Formularios
   -------------------------------------------------------------------------- */
.gp-form .field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.gp-form .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.gp-form label { font-weight: 600; font-size: .93rem; color: var(--secondary); }
.gp-form .req { color: var(--primary); font-weight: 500; margin-left: 4px; font-size: .85rem; }
.gp-form .opt { color: var(--muted); font-weight: 400; margin-left: 4px; font-size: .85rem; }
.gp-form input, .gp-form textarea {
    width: 100%; padding: 12px 14px;
    border: 1.5px solid #d0d5dd; border-radius: 10px; background: #fff;
    font-size: 16px; transition: border-color .2s, box-shadow .2s;
}
.gp-form textarea { resize: vertical; min-height: 110px; }
.gp-form input:focus, .gp-form textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.gp-form .is-invalid { border-color: #d92d20 !important; }
.gp-form .field-error { color: #d92d20; font-size: .85rem; font-weight: 500; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.turnstile { margin: 6px 0 12px; min-height: 65px; }
.form-status:empty { display: none; }
.form-status { padding: 12px 14px; border-radius: 10px; margin-bottom: 14px; font-weight: 500; }
.form-status.is-ok { background: #ecfdf3; color: #05603a; border: 1px solid #abefc6; }
.form-status.is-err { background: #fef3f2; color: #b42318; border: 1px solid #fecdca; }

/* Página de contacto */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 48px); align-items: start; }
.card-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 3vw, 32px); box-shadow: var(--shadow); position: relative; }
.contact-info { background: var(--surface); border-radius: var(--radius); padding: clamp(18px, 3vw, 32px); }
.contact-info h2 { font-size: 1.35rem; }
.contact-info ul { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 14px; }
.contact-info li { display: flex; gap: 12px; align-items: flex-start; }
.contact-info li .ico { color: var(--primary); margin-top: 2px; }
.contact-info a { color: var(--text); font-weight: 500; word-break: break-word; }
.map { width: 100%; height: 260px; border: 0; border-radius: var(--radius); margin-top: 20px; }

/* --------------------------------------------------------------------------
   Ventana emergente de cotización
   -------------------------------------------------------------------------- */
.modal { position: fixed; inset: 0; z-index: 2147483100; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .55); backdrop-filter: blur(2px); opacity: 0; transition: opacity .25s; }
.modal-box {
    position: relative; width: min(100%, 600px);
    max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto;
    background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg);
    padding: 0 26px 24px;
    opacity: 0; transform: translateY(16px) scale(.98);
    transition: opacity .25s, transform .25s;
    overscroll-behavior: contain;
}
.modal.is-open .modal-backdrop { opacity: 1; }
.modal.is-open .modal-box { opacity: 1; transform: none; }
.modal-head {
    position: sticky; top: 0; z-index: 2;
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    margin: 0 -26px 18px; padding: 18px 26px 14px;
    background: #fff; border-bottom: 1px solid var(--line);
}
.modal-head h2 { margin: 0; font-size: 1.4rem; }
.modal-sub { margin: 2px 0 0; color: var(--muted); font-size: .93rem; line-height: 1.3; }
.modal-x {
    flex-shrink: 0; display: grid; place-items: center;
    width: 40px; height: 40px; border-radius: 50%;
    border: 1px solid var(--line); background: var(--surface); color: var(--secondary);
    cursor: pointer; transition: background .2s, color .2s;
}
.modal-x:hover { background: var(--secondary); color: #fff; }
body.modal-open { overflow: hidden; }

/* 404 */
.notfound { text-align: center; }
.notfound .big { font: 700 7rem/1 var(--font-head); color: var(--primary); margin: 20px 0 0; }

/* --------------------------------------------------------------------------
   Pie de página
   -------------------------------------------------------------------------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); }
.footer-inner { padding-block: 22px; padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); text-align: left; }
.footer-copy { margin: 0; color: var(--muted); font-weight: 500; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.footer-claims { display: inline-flex; align-items: center; gap: 8px; color: var(--secondary); font-weight: 600; font-size: .95rem; padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.footer-claims:hover { border-color: var(--primary); color: var(--primary); }
.footer-claims .ico { color: var(--primary); }

/* Páginas creadas en el panel */
.page-body { max-width: 900px; }
.page-with-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.page-image { margin: 0 0 20px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.page-image img { width: 100%; height: auto; }
.page-prose { font-size: 1.05rem; line-height: 1.7; }
.page-prose h2 { font-size: 1.5rem; margin-top: 1.4em; }
.page-prose img { border-radius: 8px; }
.nav-list > li > a.is-parent-active { color: var(--primary); }

/* Libro de reclamaciones */
.claims-head { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 18px; }
.claims-book { flex-shrink: 0; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 14px; background: var(--primary-soft); color: var(--primary); }
.claims-head .lead { margin: 6px 0 0; }
.claims-company { display: flex; flex-wrap: wrap; gap: 10px 32px; padding: 16px 20px; margin-bottom: 20px; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); }
.claims-company div { display: flex; flex-direction: column; }
.claims-company span { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.claims-form { max-width: 980px; }
.claims-form fieldset { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
.claims-form legend { display: flex; align-items: center; gap: 10px; width: 100%; padding-bottom: 10px; margin-bottom: 16px; border-bottom: 1px solid var(--line); font: 700 1.2rem/1.2 var(--font-head); color: var(--secondary); }
.claims-form legend span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-size: .95rem; }
.field-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
.gp-form select { width: 100%; padding: 12px 14px; border: 1.5px solid #d0d5dd; border-radius: 10px; background: #fff; font-size: 16px; cursor: pointer; }
.gp-form select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.claims-type select { max-width: 320px; }
.hint { color: var(--muted); font-size: .85rem; line-height: 1.45; }
.claims-note { margin: 16px 0 0; color: var(--muted); font-size: .85rem; line-height: 1.5; }
@media (max-width: 900px) { .field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .field-grid { grid-template-columns: 1fr; } .claims-book { width: 52px; height: 52px; } .claims-head { flex-direction: column; gap: 12px; } .footer-inner { flex-direction: column; align-items: flex-start; } }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
    .product-details { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .product-top { grid-template-columns: 1fr; }
    .gallery { position: static; }
    .cta { max-width: none; }
    .contact-grid { grid-template-columns: 1fr; }
}

/* Móvil: logo al centro, botón de menú a su lado y buscador debajo */
@media (max-width: 820px) {
    .hdr-top {
        grid-template-columns: 48px 1fr 48px;
        gap: 12px;
        padding-block: 12px 14px;
    }
    .menu-btn {
        display: grid; place-items: center;
        width: 46px; height: 46px; border-radius: 10px;
        border: 1px solid var(--line); background: #fff; color: var(--secondary);
        cursor: pointer;
    }
    .menu-btn:hover { border-color: var(--primary); color: var(--primary); }
    .hdr-spacer { display: block; }
    .logo { justify-self: center; }
    .logo-text { font-size: 1.6rem; }
    .logo-mark { width: 36px; height: 36px; }
    .logo-img { max-height: 48px; }
    .search { grid-column: 1 / -1; width: 100%; justify-self: stretch; }
    .search input { height: 46px; }
    .search-btn { height: 46px; padding: 0 16px; }
    .search-btn span { display: none; }

    /* El menú se convierte en un panel que aparece por la izquierda */
    .main-nav {
        position: fixed; top: 0; left: 0; bottom: 0; z-index: 2147483200;
        width: min(86vw, 330px);
        border: 0; background: #fff;
        box-shadow: var(--shadow-lg);
        transform: translateX(-105%);
        transition: transform .3s ease;
        overflow-y: auto; overscroll-behavior: contain;
        visibility: hidden;
    }
    .main-nav.is-open { transform: none; visibility: visible; }
    .drawer-head {
        display: flex; align-items: center; justify-content: space-between;
        padding: 16px 18px; border-bottom: 1px solid var(--line);
        position: sticky; top: 0; background: #fff;
    }
    .drawer-title { font: 700 1.25rem/1 var(--font-head); color: var(--secondary); }
    .drawer-close { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--surface); cursor: pointer; }
    .nav-list { flex-direction: column; gap: 0; padding: 8px 0; }
    .nav-list > li > a, .nav-list > li:first-child > a {
        display: flex; justify-content: space-between; padding: 16px 20px;
        border-bottom: 1px solid var(--line); margin: 0;
        border-left: 4px solid transparent;
    }
    .nav-list > li > a:hover, .nav-list > li > a[aria-current="page"] { border-bottom-color: var(--line); border-left-color: var(--primary); background: var(--primary-soft); }
    .nav-list .ico-down { display: none; }
    .sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; border-radius: 0; padding: 4px 0 8px 20px; min-width: 0; border-bottom: 1px solid var(--line); }
    .sub a { padding: 10px 16px; font-size: .95rem; }
    .nav-overlay {
        display: block; position: fixed; inset: 0; z-index: 2147483150;
        background: rgba(15, 23, 42, .5);
        opacity: 0; transition: opacity .3s;
    }
    .nav-overlay[hidden] { display: none; }
    .nav-overlay.is-open { opacity: 1; }
    body.nav-open { overflow: hidden; }
    body.nav-open #jwc-root { visibility: hidden; }

    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .card-img { padding: 8px; }
    .card-name { padding: 10px 12px 12px; font-size: .98rem; }
    .section { padding-block: 18px 40px; }
}

@media (max-width: 560px) {
    .gp-form .field-row { grid-template-columns: 1fr; }
    .modal { padding: 0; align-items: end; }
    .modal-box { width: 100%; border-radius: 18px 18px 0 0; padding: 0 18px 20px; max-height: 94vh; max-height: 94dvh; }
    .modal-head { margin: 0 -18px 16px; padding: 14px 18px 12px; }
    .modal-box { transform: translateY(40px); }
    .chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: none; }
    .chips::-webkit-scrollbar { display: none; }
    .chip { white-space: nowrap; }
}

@media (min-width: 1600px) {
    .grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}

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

@media print {
    .site-header, .site-footer, .cta, #jwc-root, .modal { display: none !important; }
}

[hidden] { display: none !important; }
