/* RIV Concorde Villa Alianza — estilos (mobile-first, sin dependencias externas).
   Tipografía: serif editorial del sistema para titulares + sans del sistema para texto. */
:root {
  /* Paleta: vinotinto de rivinotinto.com (css/estilo.css: --vinotinto #7B0026, --vinotinto-hover #5a001b,
     --acento #E8E3D8) + tonos del catálogo PDF anterior (#861B25 del logo, #5E1219, rosa #EBD3D5). */
  --vino: #7B0026; --vino-oscuro: #5A001B; --vino-logo: #861B25; --vino-suave: #EBD3D5;
  --crema: #F7F2EA; --arena: #E8E3D8; --papel: #FFFDF9;
  --verde: #4F5D45; --verde-suave: #DDE3D3;
  --tinta: #221A18; --gris: #5D5450; --linea: #DCD2C4;
  --wa: #1F7A4D;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r: 14px; --sombra: 0 1px 2px rgba(34,26,24,.06), 0 12px 32px -12px rgba(94,18,25,.22);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; font: 400 1.0625rem/1.6 var(--sans); color: var(--tinta); background: var(--crema);
  padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px)); overflow-x: clip; }
body.is-filter-open { overflow: hidden; }
body.is-filter-open .wa-float { visibility: hidden; pointer-events: none; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--vino); text-underline-offset: .18em; }
a:hover { color: var(--vino-oscuro); }
:focus-visible { outline: 3px solid var(--vino); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.wrap { width: min(1180px, 100% - 1.5rem); margin-inline: auto; }
@media (min-width: 640px) { .wrap { width: min(1180px, 100% - 2.5rem); } }
.narrow { width: min(820px, 100% - 1.5rem); }
@media (min-width: 640px) { .narrow { width: min(820px, 100% - 2.5rem); } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--vino); color: #fff; padding: .6rem 1rem; z-index: 100; border-radius: 8px; }
.skip:focus { top: 1rem; color: #fff; }
.small { font-size: .9rem; } .muted { color: var(--gris); }
.eyebrow { font: 600 .78rem/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--vino); margin-bottom: .8rem; }
.eyebrow-light { color: #F1D7D3; }
.plain { list-style: none; padding: 0; margin: 0; } .plain li { margin: .35rem 0; }

.hint { font-size: .8rem; color: var(--gris); }
.hero-logo { width: min(300px, 75vw); height: auto; object-fit: contain; margin-bottom: 1.6rem; }
@media (min-width: 700px) { .hero-logo { width: 340px; } }
.city-nav { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; margin: 0 0 1rem; font-weight: 600; }
.city-nav a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .55rem 1.1rem; border-radius: 999px; border: 1.5px solid var(--vino); text-decoration: none; background: var(--papel); }
.city-nav a:hover, .city-nav a.is-active { background: var(--vino); color: #fff; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .75rem 1.4rem;
  border: 1.5px solid var(--vino); border-radius: 999px; background: var(--vino); color: #fff; font: 600 1rem/1 var(--sans);
  text-decoration: none; cursor: pointer; transition: background .2s, color .2s, transform .2s; }
.btn:hover { background: var(--vino-oscuro); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--vino); }
.btn-ghost:hover { background: var(--vino-suave); color: var(--vino-oscuro); }
.btn-light { background: var(--crema); color: var(--vino-oscuro); border-color: var(--crema); }
.btn-light:hover { background: #fff; color: var(--vino-oscuro); }
.btn-outline-light { background: transparent; color: var(--crema); border-color: rgba(247,242,234,.7); }
.btn-outline-light:hover { background: rgba(247,242,234,.12); color: #fff; }
.btn-wa { background: var(--wa); border-color: var(--wa); width: 100%; }
.btn-wa:hover { background: #17603C; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,253,249,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--linea); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 70px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--tinta); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font: 700 1.25rem var(--serif); color: var(--vino-oscuro); }
.brand-sub { font-size: .72rem; letter-spacing: .06em; color: var(--gris); }
.nav-toggle { width: 48px; height: 48px; border: 1px solid var(--linea); border-radius: 12px; background: var(--papel); cursor: pointer; display: grid; place-items: center; }
.bars, .bars::before, .bars::after { display: block; width: 20px; height: 2px; background: var(--vino-oscuro); position: relative; content: ""; }
.bars::before { position: absolute; top: -6px; } .bars::after { position: absolute; top: 6px; }
.nav { display: none; position: absolute; inset: 70px 0 auto 0; background: var(--papel); border-bottom: 1px solid var(--linea); padding: .5rem 1.25rem 1.25rem; flex-direction: column; }
.nav.is-open { display: flex; }
.nav a { padding: .85rem 0; text-decoration: none; color: var(--tinta); font-weight: 500; border-bottom: 1px solid var(--arena); }
.nav a:hover { color: var(--vino); }
.nav .nav-cta { margin-top: .75rem; border: 0; background: var(--wa); color: #fff; border-radius: 999px; text-align: center; }
@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .nav { display: flex; position: static; flex-direction: row; align-items: center; gap: 1.6rem; padding: 0; border: 0; background: none; }
  .nav a { border: 0; padding: .4rem 0; }
  .nav .nav-cta { margin: 0; padding: .55rem 1.1rem; }
}

/* Hero */
.hero { position: relative; color: var(--crema); overflow: hidden;
  background: radial-gradient(1200px 500px at 85% -10%, rgba(221,227,211,.18), transparent 60%),
              linear-gradient(135deg, var(--vino-oscuro) 0%, var(--vino) 55%, #6E2A22 100%); }
.hero::after { content: ""; position: absolute; inset: auto -10% -40% 40%; height: 70%; border-radius: 50%; border: 1px solid rgba(247,242,234,.18); }
.hero-inner { position: relative; z-index: 1; padding: 4.5rem 0 3.5rem; max-width: 60rem; }
.hero h1 { color: #fff; max-width: 17ch; }
.hero-lead { font-size: clamp(1.1rem, 2.4vw, 1.35rem); max-width: 40ch; color: #F4E6E2; }
.hero-lead em { font-family: var(--serif); font-style: italic; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.8rem 0 2.6rem; }
.hero-stats { display: grid; grid-template-columns: 1fr; gap: 1rem; margin: 0; border-top: 1px solid rgba(247,242,234,.25); padding-top: 1.4rem; }
.hero-stats dt { font: 600 1.4rem var(--serif); color: #fff; } .hero-stats dd { margin: 0; color: #E9D3CF; font-size: .92rem; }
@media (min-width: 700px) { .hero-inner { padding: 7rem 0 5rem; } .hero-stats { grid-template-columns: repeat(3, 1fr); } }

/* Buscador */
.search-section { padding: 2.5rem 0 5.5rem; }
@media (min-width: 900px) { .search-section { padding: 3.5rem 0 4rem; } }
.section-head { max-width: 46rem; margin-bottom: 1.6rem; }
.demo-banner { background: #FFF5D6; border: 1px solid #E7CF86; color: #4A3A06; padding: .7rem 1rem; border-radius: 10px; font-size: .95rem; }
.search-panel { display: grid; grid-template-columns: 1fr; gap: 1rem; background: var(--papel); border: 1px solid var(--linea); border-radius: 22px; padding: 1.25rem; box-shadow: var(--sombra); margin-top: -1rem; }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field label, .field .label { font: 600 .8rem var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--gris); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
/* ≥16px evita zoom automático de iOS en campos; targets táctiles ≥48px */
input, select, textarea { font: 400 16px/1.4 var(--sans); color: var(--tinta); min-height: 48px; width: 100%; max-width: 100%; padding: .75rem .9rem; border: 1px solid var(--linea); border-radius: 12px; background: #fff; }
input:focus, select:focus, textarea:focus { border-color: var(--vino); outline: none; box-shadow: 0 0 0 3px rgba(123,0,38,.18); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gris) 50%), linear-gradient(135deg, var(--gris) 50%, transparent 50%); background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px); background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; padding-right: 2.2rem; }
.search-actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: stretch; }
.search-actions .btn { flex: 1 1 140px; min-height: 48px; }
.search-note { grid-column: 1 / -1; margin: 0; }
@media (min-width: 640px) { .search-panel { grid-template-columns: repeat(2, 1fr); } .field-wide { grid-column: 1 / -1; } }
@media (min-width: 1000px) { .search-panel { grid-template-columns: repeat(4, 1fr); padding: 1.6rem; } .field-wide { grid-column: span 2; } .search-actions { grid-column: span 2; justify-content: flex-end; } }
.count { margin: 1.6rem 0 1rem; font-weight: 600; color: var(--verde); }
.grid { display: grid; grid-template-columns: 1fr; gap: 1.4rem; outline: none; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) and (max-width: 999px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 1.2rem; } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.empty { background: var(--papel); border: 1px dashed var(--linea); border-radius: var(--r); padding: 1.5rem; margin-top: 1rem; }

/* Tarjetas */
.card { background: var(--papel); border: 1px solid var(--linea); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; position: relative; }
.card:hover, .card:focus-within { transform: translateY(-3px); box-shadow: var(--sombra); }
/* Foto principal + 3 miniaturas (como el catálogo PDF) */
.card-media { position: relative; display: grid; gap: 3px; background: var(--papel); padding: 3px 3px 0; }
.card-main { display: block; aspect-ratio: 3 / 2; background: var(--arena); border-radius: 14px 14px 4px 4px; overflow: hidden; }
.card-main img, .card-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.card-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.card-thumbs img { aspect-ratio: 3 / 2; border-radius: 4px; background: var(--arena); }
.card-num { position: absolute; left: .8rem; top: .8rem; background: var(--vino); color: #fff; font: 700 .85rem var(--serif); padding: .3rem .6rem; border-radius: 6px; }
.card-more { float: right; font-weight: 600; color: var(--vino); }
.chip-venta { background: var(--vino); } .chip-alquiler { background: var(--verde); }
.card-noimg { display: grid; place-items: center; height: 100%; color: var(--gris); }
.badge { display: inline-block; font: 700 .7rem/1 var(--sans); letter-spacing: .14em; padding: .38rem .55rem; border-radius: 6px; vertical-align: middle; }
.badge-demo { background: #FFE9A6; color: #4A3A06; }
.card-media .badge { position: absolute; top: 3rem; left: .8rem; }
.chip { position: absolute; top: .8rem; right: .8rem; font: 600 .78rem var(--sans); padding: .35rem .7rem; border-radius: 999px; background: rgba(34,26,24,.78); color: #fff; }
.card-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .2rem; flex: 1; }
.card-kicker { font-size: .82rem; letter-spacing: .05em; text-transform: uppercase; color: var(--verde); margin: 0; }
.card-title { font-size: 1.3rem; margin: .2rem 0 .3rem; }
.card-title a { color: var(--tinta); text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; }
.card-title a:hover { color: var(--vino); }
.card-price { font: 600 1.25rem var(--serif); color: var(--vino); margin: 0 0 .4rem; }
.card-specs { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 0 0 .6rem; }
.card-specs li { background: var(--verde-suave); color: #2F3A28; font-size: .85rem; padding: .2rem .6rem; border-radius: 999px; }
.card-code { margin: auto 0 0; font-size: .82rem; color: var(--gris); }

/* Secciones de marca */
.about { background: var(--papel); border-block: 1px solid var(--linea); padding: 4rem 0; }
.about-grid { display: grid; gap: 1.5rem; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 1fr 1.4fr; gap: 4rem; } }
.pull { font: italic 1.6rem/1.3 var(--serif); color: var(--vino-oscuro); border-left: 3px solid var(--vino); padding-left: 1rem; }
.link-arrow { font-weight: 600; margin-right: 1.4rem; text-decoration: none; }
.link-arrow::after { content: " →"; }
.cta-band { background: var(--verde); color: var(--crema); padding: 3.5rem 0; }
.cta-inner h2 { color: #fff; }

/* Páginas internas */
.page-hero { background: linear-gradient(135deg, var(--vino-oscuro), var(--vino)); color: #fff; padding: 4rem 0 3rem; }
.page-hero .eyebrow { color: #F1D7D3; } .page-hero h1 { color: #fff; }
.prose { padding: 3rem 0; } .lead { font-size: 1.25rem; }
.checks { padding-left: 1.2rem; } .checks li { margin: .4rem 0; }
.pending { background: var(--verde-suave); border-left: 4px solid var(--verde); padding: 1rem 1.2rem; border-radius: 8px; margin: 2rem 0; }
.timeline { list-style: none; padding: 0; border-left: 2px solid var(--vino); margin: 2rem 0; }
.timeline li { padding: 0 0 1.4rem 1.4rem; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: .35rem; width: 12px; height: 12px; border-radius: 50%; background: var(--vino); }
.tl-year { font: 600 1.1rem var(--serif); color: var(--vino); }
.contact-grid { display: grid; gap: 1.2rem; padding: 3rem 0 0; }
@media (min-width: 800px) { .contact-grid { grid-template-columns: repeat(3, 1fr); width: min(1180px, 100% - 2.5rem); } }
.contact-card { background: var(--papel); border: 1px solid var(--linea); border-radius: 18px; padding: 1.5rem; box-shadow: var(--sombra); }
.big { font: 600 1.35rem var(--serif); }

/* Ficha */
.crumbs { font-size: .9rem; padding: 1.2rem 0; color: var(--gris); }
.detail { padding-bottom: 3rem; }
.detail-head h1 { font-size: clamp(1.8rem, 4.5vw, 3rem); }
.detail-head h1 .badge { margin-left: .6rem; font-size: .75rem; }
.detail-price { font: 600 1.7rem var(--serif); color: var(--vino); }
.gallery { display: grid; gap: .6rem; margin: 1.2rem 0 2rem; touch-action: pan-y; }
.gallery button { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 14px; overflow: hidden; display: block; width: 100%; min-height: 44px; }
.gallery-main { position: relative; touch-action: pan-y; }
.gallery-main img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.gallery-hint { margin: .2rem 0 0; font-size: .85rem; color: var(--gris); text-align: center; }
@media (min-width: 900px) { .gallery-hint { display: none; } }
.gallery-thumbs { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.gallery-thumbs button { position: relative; }
.gallery-thumbs .more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(90,0,27,.6); color: #fff; font: 600 1.6rem var(--serif); }
.gallery-thumbs img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.detail-grid { display: grid; gap: 2rem; }
@media (min-width: 960px) { .detail-grid { grid-template-columns: 1fr 340px; } .detail-aside { position: sticky; top: 90px; align-self: start; } }
.detail-main section { margin-bottom: 2.2rem; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--linea); border: 1px solid var(--linea); border-radius: 12px; overflow: hidden; margin: 0; }
.facts div { background: var(--papel); padding: .8rem 1rem; }
.facts dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--gris); }
.facts dd { margin: .15rem 0 0; font-weight: 600; }
.facts-1 { grid-template-columns: 1fr; }
@media (min-width: 700px) { .facts { grid-template-columns: repeat(3, 1fr); } .facts-1 { grid-template-columns: 1fr; } }
.amenities { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.amenities li { border: 1px solid var(--verde); color: var(--verde); padding: .35rem .8rem; border-radius: 999px; font-size: .95rem; }
.plan { margin: 0; background: #fff; border: 1px solid var(--linea); border-radius: 12px; padding: .8rem; }
.plan figcaption { font-size: .85rem; color: var(--gris); margin-top: .5rem; }
.embed { border: 1px dashed var(--linea); border-radius: 12px; padding: 1.4rem; background: var(--papel); }
.embed.is-loaded { padding: 0; border: 0; aspect-ratio: 16 / 10; }
.embed iframe { width: 100%; height: 100%; border: 0; border-radius: 12px; }
.origin { font-size: .9rem; }
.notfound { padding: 3rem 0; }

/* Visor de fotos */
.viewer { width: min(1100px, 96vw); max-height: 94vh; padding: 0; border: 0; border-radius: 14px; background: #111; color: #fff; }
.viewer::backdrop { background: rgba(10,6,6,.86); }
.viewer figure { margin: 0; }
.viewer img { width: 100%; max-height: 82vh; object-fit: contain; }
.viewer figcaption { padding: .6rem 1rem; font-size: .9rem; }
.viewer-btn, .viewer-close { position: absolute; border: 0; background: rgba(255,255,255,.14); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 2rem; line-height: 1; cursor: pointer; }
.viewer-btn { top: 45%; } .viewer-prev { left: .6rem; } .viewer-next { right: .6rem; }
.viewer-close { top: .6rem; right: .6rem; }
.viewer-btn:hover, .viewer-close:hover { background: rgba(255,255,255,.3); }

/* Footer y WhatsApp flotante */
.site-footer { background: var(--tinta); color: #D9CFC8; padding: 3.5rem 0 6rem; }
.site-footer a { color: #F2D9D5; }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; } }
.footer-brand { font: 600 1.4rem var(--serif); color: #fff; margin: 0; }
.footer-slogan { font-family: var(--serif); font-style: italic; color: #F2D9D5; }
.footer-title { font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: .8rem; color: #fff; }
.footer-legal { border-top: 1px solid #3A302D; margin-top: 2rem; padding-top: 1.2rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; }
.wa-float { position: fixed; right: max(.85rem, env(safe-area-inset-right)); bottom: max(.85rem, env(safe-area-inset-bottom)); z-index: 60; width: 56px; height: 56px; border-radius: 50%; background: var(--wa); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.wa-float:hover { color: #fff; background: #17603C; }
/* En móvil el flotante no tapa el buscador: deja aire bajo resultados y se desplaza si hay barra de filtros */
@media (max-width: 899px) {
  .search-section { padding-bottom: 7.5rem; }
  .search-section .empty, .search-section .count { padding-right: 4.5rem; }
  .wa-float { bottom: max(5.25rem, calc(4.5rem + env(safe-area-inset-bottom))); }
  body.has-filter-bar .wa-float { bottom: max(6.5rem, calc(5.75rem + env(safe-area-inset-bottom))); }
}
.notfound-page { padding: 4rem 0; }

/* Logo oficial (PNG con transparencia; proporción 417×165 respetada) */
.brand { flex-direction: column; align-items: flex-start; gap: .1rem; }
.brand-logo { height: 46px; width: auto; max-width: 60vw; object-fit: contain; }
.brand-sub { font-size: .66rem; }
@media (min-width: 900px) { .brand-logo { height: 52px; } }
.footer-logo { height: 64px; width: auto; object-fit: contain; margin-bottom: .6rem; }
.about-logo { width: min(260px, 70%); height: auto; object-fit: contain; margin-bottom: 1.5rem; }
.notfound-page .brand-logo { margin-bottom: 2rem; }

/* Mini botones del header: llave (acceso privado) y CRM */
.header-icons { display: flex; gap: .35rem; margin-left: auto; order: 2; }
.nav-toggle { order: 3; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--linea); color: var(--vino); background: var(--papel); text-decoration: none; }
.icon-btn:hover { background: var(--vino); color: #fff; border-color: var(--vino); }
.icon-btn.is-pending { opacity: .45; cursor: not-allowed; }
.icon-btn.is-pending:hover { background: var(--papel); color: var(--vino); border-color: var(--linea); }
@media (min-width: 900px) { .header-icons { order: 3; margin-left: .4rem; } .icon-btn { width: 40px; height: 40px; } }
@media (max-width: 380px) { .brand-sub { display: none; } .brand-logo { max-width: 46vw; } }

/* Compartir ficha */
.share-card { margin-top: 1rem; background: var(--papel); border: 1px solid var(--linea); border-radius: 18px; padding: 1.2rem; }
.share-actions { display: grid; grid-template-columns: 1fr; gap: .65rem; }
@media (min-width: 420px) { .share-actions { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .share-actions { grid-template-columns: 1fr; } }
.share-actions .btn { width: 100%; min-height: 48px; padding: .85rem 1rem; font-size: 1rem; }
.share-actions .btn[disabled] { opacity: .6; cursor: progress; }

/* Impresión: solo logo, código, fotos e información */
@media print {
  @page { margin: 12mm; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .site-header { position: static; border: 0; background: #fff; }
  .nav, .nav-toggle, .header-icons, .skip, .crumbs, .share-card, .contact-card .btn, .embed, .wa-float, .site-footer, .search-panel, #visor, .gallery-thumbs .more { display: none !important; }
  .brand-logo { height: 48px; }
  .detail-grid { display: block; }
  .detail-aside { position: static; }
  .gallery button { cursor: default; }
  .gallery-main img { max-height: 95mm; object-fit: cover; }
  .gallery-thumbs { grid-template-columns: repeat(3, 1fr); }
  .facts { grid-template-columns: repeat(3, 1fr) !important; }
  .detail-main section, .facts div { break-inside: avoid; }
  .demo-banner { border: 2px solid #000; }
  a { color: #000; text-decoration: none; }
}


/* ——— Responsivo móvil / tablet (filtros tipo hoja inferior) ——— */
.filter-bar {
  display: flex; gap: .6rem; align-items: center; margin: 0 0 1rem;
}
.filter-bar .btn { flex: 1; min-height: 48px; }
.filter-badge {
  display: inline-grid; place-items: center; min-width: 1.4rem; height: 1.4rem; padding: 0 .35rem;
  margin-left: .35rem; border-radius: 999px; background: #fff; color: var(--vino); font: 700 .75rem/1 var(--sans);
}
.filter-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(20,10,12,.45); z-index: 70;
}
.filter-sheet-head {
  display: none; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .2rem 0 .8rem; border-bottom: 1px solid var(--linea); margin-bottom: .8rem;
}
.filter-sheet-head h3 { margin: 0; font-size: 1.15rem; }
.filter-close {
  width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--linea);
  background: var(--papel); font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--tinta);
}
.search-actions-mobile { display: none; }

@media (max-width: 899px) {
  body.has-filter-bar .filter-bar { display: flex; }
  .filter-bar { position: sticky; top: 70px; z-index: 40; background: rgba(247,242,234,.94); backdrop-filter: blur(8px);
    padding: .55rem 0; margin: 0 0 .8rem; border-bottom: 1px solid transparent; }
  .search-panel {
    display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
    max-height: min(92vh, 920px); overflow: auto; margin: 0;
    border-radius: 22px 22px 0 0; padding: 1rem 1rem calc(6.5rem + env(safe-area-inset-bottom));
    box-shadow: 0 -12px 40px rgba(0,0,0,.22); -webkit-overflow-scrolling: touch;
  }
  .search-panel.is-open { display: grid; grid-template-columns: 1fr; }
  .filter-backdrop.is-open { display: block; }
  .filter-sheet-head { display: flex; }
  .search-actions { display: none; } /* desktop actions hidden in sheet; sticky mobile bar used */
  .search-actions-mobile {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 85;
    gap: .55rem; padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom));
    background: rgba(255,253,249,.96); border-top: 1px solid var(--linea); box-shadow: 0 -6px 20px rgba(0,0,0,.08);
  }
  .search-actions-mobile .btn { flex: 1; min-height: 48px; }
  .search-note { margin-bottom: .5rem; }
  .pair { grid-template-columns: 1fr; }
  .hero-actions .btn { min-width: min(100%, 220px); }
  .nav a { min-height: 48px; display: flex; align-items: center; }
  .card-title { font-size: 1.2rem; }
}

@media (min-width: 900px) {
  .filter-bar, .filter-backdrop, .filter-sheet-head, .search-actions-mobile { display: none !important; }
  .search-panel { display: grid !important; position: static !important; max-height: none !important; overflow: visible !important; }
  .search-actions { display: flex !important; }
}

/* Tablet: buscador 2 columnas cómodas, ficha aún apilada hasta 960 */
@media (min-width: 768px) and (max-width: 899px) {
  .search-panel.is-open { grid-template-columns: repeat(2, 1fr); padding: 1.2rem 1.4rem calc(6.5rem + env(safe-area-inset-bottom)); }
  .search-panel.is-open .field-wide, .search-panel.is-open .filter-sheet-head, .search-panel.is-open .search-note { grid-column: 1 / -1; }
  .pair { grid-template-columns: 1fr 1fr; }
  .detail-aside .btn-wa { min-height: 52px; font-size: 1.05rem; }
}

/* Evitar scroll horizontal en 320px */
@media (max-width: 360px) {
  .hero h1 { max-width: none; }
  .card-specs li { font-size: .8rem; }
  .brand-logo { max-width: 42vw; }
}

@media print {
  .filter-bar, .filter-backdrop, .search-actions-mobile, .gallery-hint { display: none !important; }
  body { padding-bottom: 0; }
}
