:root {
  --amarillo: #FDB71E;
  --amarillo-2: #FFD166;
  --negro: #151110;
  --crema: #FDF5EC;
  --crema-2: #F6EADB;
  --papel: #FFFBF6;
  --madera: #6B3A1E;
  --oro: #8B6510;
  --texto: #2A211C;
  --muted: #6E625A;
  --linea: #E8DACA;
  --wa: #1FA855;
  --wa-2: #178A45;
  --radio: 14px;
  --sombra: 0 1px 2px rgba(40, 25, 10, .06), 0 8px 24px rgba(40, 25, 10, .08);
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--texto);
  background: var(--papel);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.12; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--amarillo); outline-offset: 2px; border-radius: 6px; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: var(--negro); color: #fff; padding: 10px 14px; border-radius: 8px; }
.muted { color: var(--muted); font-weight: 500; }

.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.ico { width: 18px; height: 18px; flex: none; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px;
  border-radius: 999px; border: 2px solid transparent;
  font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn--block { width: 100%; }
.btn--dark { background: var(--negro); color: #fff; }
.btn--wa { background: var(--wa); color: #fff; }
.btn--ghost { background: transparent; border-color: var(--negro); color: var(--negro); }
@media (hover: hover) {
  .btn--dark:hover { background: #2E2622; }
  .btn--wa:hover { background: var(--wa-2); }
  .btn--ghost:hover { background: var(--negro); color: #fff; }
}

/* ---------- Encabezado ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--amarillo);
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}
.topbar__in { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand img { width: 120px; height: auto; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  text-decoration: none; font-weight: 600; font-size: 15px;
  padding: 8px 12px; border-radius: 999px;
}
@media (hover: hover) { .nav a:hover { background: rgba(0, 0, 0, .08); } }
.menu-btn { display: none; }

@media (max-width: 920px) {
  .topbar__wa span { display: none; }
  .topbar__wa { padding: 0; width: 44px; min-height: 44px; margin-left: auto; }
  .topbar__wa .ico { width: 22px; height: 22px; }
  .menu-btn {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; padding: 0 11px; border: 0; border-radius: 10px;
    background: var(--negro); cursor: pointer;
  }
  .menu-btn span { display: block; height: 2px; background: #fff; border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
  .menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; margin: 0; padding: 8px 16px 16px;
    background: var(--amarillo); border-bottom: 1px solid rgba(0, 0, 0, .1);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .12);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 8px; border-radius: 8px; font-size: 17px; border-bottom: 1px solid rgba(0, 0, 0, .08); }
  .nav a:last-child { border-bottom: 0; }
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(253, 183, 30, .35), transparent 60%),
    var(--crema);
  padding: 56px 0 64px;
  overflow: hidden;
}
.hero__in { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.kicker {
  display: inline-block; margin: 0 0 14px;
  font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--madera);
}
.hero h1 {
  font-family: var(--serif); font-weight: 900;
  font-size: clamp(38px, 5.4vw, 64px); letter-spacing: -.01em;
  text-wrap: balance;
}
.lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--muted); margin: 18px 0 28px; max-width: 34em; text-wrap: pretty; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.facts { list-style: none; padding: 0; margin: 36px 0 0; display: flex; gap: 32px; }
.facts li { display: flex; flex-direction: column; }
.facts strong { font-family: var(--serif); font-size: 32px; line-height: 1; font-variant-numeric: tabular-nums; }
.facts span { font-size: 14px; color: var(--muted); margin-top: 4px; }

.hero__media {
  display: grid; gap: 14px;
  grid-template-columns: 1.2fr 1fr;
  grid-template-rows: 1fr 1fr;
  aspect-ratio: 1 / 0.92;
}
.hero__img { margin: 0; border-radius: 18px; overflow: hidden; background: var(--crema-2); box-shadow: var(--sombra); }
.hero__img img { width: 100%; height: 100%; object-fit: cover; }
.hero__img--a { grid-row: 1 / 3; }

@media (max-width: 860px) {
  .hero { padding: 36px 0 44px; }
  .hero__in { grid-template-columns: 1fr; gap: 32px; }
  .hero__media { aspect-ratio: 1 / 0.8; }
  .facts { gap: 24px; }
}

/* ---------- Secciones ---------- */
.section { padding: 72px 0; }
.section--cream { background: var(--crema); }
.section--dark { background: var(--negro); color: #F3EBE2; }
.section__head { margin-bottom: 28px; }
.section__head h2 { font-family: var(--serif); font-weight: 800; font-size: clamp(30px, 3.6vw, 44px); }
.section__head p { margin: 8px 0 0; color: var(--muted); }
.section--dark .section__head p { color: #BDB0A4; }
@media (max-width: 640px) { .section { padding: 52px 0; } }

/* ---------- Categorías ---------- */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.cat {
  position: relative; display: block; border: 0; padding: 0; cursor: pointer; text-align: left;
  border-radius: var(--radio); overflow: hidden; background: var(--crema-2);
  aspect-ratio: 4 / 3; box-shadow: var(--sombra);
  -webkit-tap-highlight-color: transparent;
}
.cat img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s cubic-bezier(.2, .7, .2, 1); }
.cat::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(15, 10, 6, .82)); }
.cat__label { position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 1; color: #fff; }
.cat__label strong { display: block; font-family: var(--serif); font-size: 21px; line-height: 1.15; }
.cat__label span { font-size: 13px; opacity: .85; }
@media (hover: hover) { .cat:hover img { transform: scale(1.04); } }
@media (max-width: 520px) {
  .cats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cat__label strong { font-size: 17px; }
}

/* ---------- Filtros ---------- */
.section--catalog { background: var(--papel); }
.filters {
  position: sticky; top: 68px; z-index: 20;
  display: grid; grid-template-columns: 1fr auto; gap: 12px;
  padding: 14px 0 12px; margin-bottom: 8px;
  background: var(--papel);
  border-bottom: 1px solid var(--linea);
}
.search {
  display: flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 16px; border-radius: 999px;
  background: #fff; border: 1.5px solid var(--linea);
}
.search:focus-within { border-color: var(--negro); }
.search .ico { color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 16px; }
.filters__row { display: flex; gap: 10px; }
.select select {
  appearance: none; min-height: 48px; padding: 0 40px 0 16px; border-radius: 999px;
  border: 1.5px solid var(--linea); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%232A211C' stroke-width='2'%3E%3Cpath d='m1 1 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 16px center;
  font-size: 15px; cursor: pointer;
}
.chips {
  grid-column: 1 / -1;
  display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain;
  scrollbar-width: none; margin: 0 -16px; padding: 2px 16px;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; min-height: 38px; padding: 0 16px; border-radius: 999px;
  border: 1.5px solid var(--linea); background: #fff; cursor: pointer;
  font-size: 14px; font-weight: 600; white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.chip[aria-selected="true"] { background: var(--negro); border-color: var(--negro); color: #fff; }
@media (hover: hover) { .chip:not([aria-selected="true"]):hover { border-color: var(--negro); } }
@media (max-width: 720px) {
  .filters { grid-template-columns: 1fr; top: 68px; }
  .filters__row .select { flex: 1; }
  .filters__row select { width: 100%; }
}

.count { color: var(--muted); font-size: 14px; margin: 12px 0 16px; }

/* ---------- Tarjetas ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; }
.card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); overflow: hidden;
  transition: box-shadow .2s ease, transform .2s ease;
}
@media (hover: hover) { .card:hover { box-shadow: var(--sombra); transform: translateY(-2px); } }
.card__media {
  position: relative; display: block; width: 100%; border: 0; padding: 0; cursor: zoom-in;
  aspect-ratio: 1500 / 790; background: var(--crema);
}
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.badge {
  position: absolute; top: 10px; left: 10px;
  font-size: 12px; font-weight: 700; letter-spacing: .02em;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(21, 17, 16, .85); color: #fff;
}
.badge--parota { background: var(--amarillo); color: var(--negro); }
.card__body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; flex: 1; }
.card__code { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .04em; }
.card__title { font-family: var(--serif); font-size: 19px; font-weight: 700; text-wrap: balance; }
.card__med { font-size: 14px; color: var(--muted); }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; }
.price { font-weight: 700; font-size: 20px; font-variant-numeric: tabular-nums; margin: 0; }
.price--quote { color: var(--oro); }
.card__actions { display: flex; gap: 8px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 999px;
  border: 0; background: var(--wa); color: #fff; cursor: pointer; text-decoration: none;
}
.icon-btn .ico { width: 21px; height: 21px; }
@media (hover: hover) { .icon-btn:hover { background: var(--wa-2); } }
.link-btn {
  border: 1.5px solid var(--negro); background: transparent; border-radius: 999px;
  min-height: 42px; padding: 0 14px; font-weight: 600; font-size: 14px; cursor: pointer;
}
@media (hover: hover) { .link-btn:hover { background: var(--negro); color: #fff; } }
@media (max-width: 520px) { .grid { grid-template-columns: 1fr; gap: 16px; } }

.more { display: flex; justify-content: center; margin-top: 28px; }
.empty { text-align: center; padding: 40px 0; color: var(--muted); }

/* ---------- Acabados ---------- */
.swatches { list-style: none; margin: 0 0 40px; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.swatches li { display: flex; flex-direction: column; gap: 10px; }
.swatches img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; outline: 1px solid rgba(255, 255, 255, .12); outline-offset: -1px; }
.swatches span { font-weight: 600; display: flex; flex-direction: column; }
.swatches small { font-weight: 400; color: #BDB0A4; font-size: 13px; }
.materials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.materials article { background: #221B18; border: 1px solid #3A302A; border-radius: var(--radio); padding: 22px; }
.materials h3 { font-family: var(--serif); font-size: 24px; color: var(--amarillo); margin-bottom: 12px; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checks li { position: relative; padding-left: 26px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .3em; width: 16px; height: 16px; border-radius: 50%;
  background: var(--amarillo) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23151110' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4.5 8.2 2.2 2.2 4.8-4.8'/%3E%3C/svg%3E") center / 14px no-repeat;
}
@media (max-width: 760px) {
  .swatches { grid-template-columns: repeat(3, 1fr); }
  .materials { grid-template-columns: 1fr; }
}

/* ---------- Cómo comprar ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.steps li { background: var(--crema); border-radius: var(--radio); padding: 24px; }
.steps__n {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--amarillo); font-weight: 800; font-size: 18px; margin-bottom: 14px;
}
.steps h3 { font-family: var(--serif); font-size: 22px; margin-bottom: 6px; }
.steps p { margin: 0; color: var(--muted); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Sucursales ---------- */
.stores { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.store { background: #fff; border-radius: var(--radio); overflow: hidden; border: 1px solid var(--linea); display: flex; flex-direction: column; }
.store__map { aspect-ratio: 16 / 9; background: var(--crema-2); }
.store__map iframe { width: 100%; height: 100%; border: 0; display: block; }
.store__body { padding: 20px 22px 22px; }
.store h3 { font-family: var(--serif); font-size: 24px; }
.store__addr { color: var(--muted); margin: 8px 0 16px; }
.store__actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 760px) { .stores { grid-template-columns: 1fr; } }

/* ---------- Pie ---------- */
.footer { background: var(--negro); color: #E9DFD5; padding: 48px 0 24px; }
.footer__in { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer__logo { width: 180px; height: auto; }
.footer__note { color: #A99C90; font-size: 14px; max-width: 30em; margin: 16px 0 0; }
.footer__links { display: grid; gap: 10px; align-content: start; }
.footer__links a { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 500; min-height: 32px; }
@media (hover: hover) { .footer__links a:hover { color: var(--amarillo); } }
.footer__bottom { border-top: 1px solid #2E2622; margin-top: 32px; padding-top: 18px; font-size: 13px; color: #8E8176; }

/* ---------- Botón flotante ---------- */
.fab {
  position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 30;
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: var(--wa); color: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  transition: transform .15s ease;
}
.fab svg { width: 30px; height: 30px; }
.fab:active { transform: scale(.94); }

/* ---------- Modal ---------- */
.modal {
  width: min(1040px, 100% - 32px); max-height: calc(100dvh - 32px);
  padding: 0; border: 0; border-radius: 18px; background: #fff; color: var(--texto);
  overflow: auto; overscroll-behavior: contain;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .35);
}
.modal::backdrop { background: rgba(15, 10, 6, .6); }
.modal[open] { animation: modalIn .22s cubic-bezier(.2, .8, .2, 1); }
@keyframes modalIn { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.modal__close {
  position: sticky; top: 10px; float: right; margin: 10px 10px -54px 0; z-index: 2;
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(21, 17, 16, .85); color: #fff; font-size: 26px; line-height: 1;
}
.modal__grid { display: grid; grid-template-columns: 1.25fr 1fr; }
.modal__media { background: var(--crema); padding: 16px; display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.modal__media img { width: 100%; border-radius: 12px; background: var(--crema-2); }
.toggle { display: inline-flex; align-self: center; background: #fff; border-radius: 999px; padding: 4px; border: 1px solid var(--linea); }
.toggle button { border: 0; background: transparent; padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; cursor: pointer; min-height: 36px; }
.toggle button[aria-pressed="true"] { background: var(--negro); color: #fff; }
.modal__info { padding: 28px 28px 28px; display: flex; flex-direction: column; gap: 6px; }
.modal__cat { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--madera); }
.modal__info h2 { font-family: var(--serif); font-size: clamp(24px, 3vw, 32px); padding-right: 36px; text-wrap: balance; }
.modal__code { margin: 0; color: var(--muted); font-size: 14px; }
.price--lg { font-size: 28px; margin: 8px 0 4px; }
.specs { margin: 8px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 15px; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 600; }
.modal__sub { font-size: 15px; font-weight: 700; margin: 16px 0 8px; font-family: var(--sans); }
.checks--dark li::before { background-color: var(--amarillo); }
.colors { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.color {
  width: 48px; height: 48px; border-radius: 50%; padding: 0; cursor: pointer;
  border: 3px solid #fff; box-shadow: 0 0 0 1.5px var(--linea);
  background-size: cover; background-position: center;
}
.color[aria-checked="true"] { box-shadow: 0 0 0 3px var(--negro); }
#mWa { margin-top: auto; }
@media (max-width: 820px) {
  .modal { width: 100%; max-width: 100%; max-height: 100dvh; height: 100dvh; border-radius: 0; margin: 0; }
  .modal__grid { grid-template-columns: 1fr; }
  .modal__info { padding: 20px 16px 24px; }
  #mWa { position: sticky; bottom: 12px; margin-top: 12px; box-shadow: 0 8px 20px rgba(0, 0, 0, .2); }
}

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