/* Revive · Catálogo — identidad: amarillo, caramelo, óxido y café oscuro */
@font-face { font-family: "Open Sans"; src: url("/assets/fonts/open-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("/assets/fonts/open-sans-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("/assets/fonts/open-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("/assets/fonts/open-sans-latin-600-italic.woff2") format("woff2"); font-weight: 600; font-style: italic; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("/assets/fonts/open-sans-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("/assets/fonts/open-sans-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --amarillo: #faf2a0;
  --amarillo-brand: #ffff80;
  --zigzag: #eee597;
  --caramelo: #c38846;
  --oxido: #8a4925;
  --cafe: #2d1d10;
  --texto: #4a3018;
  --blanco: #fffdf2;
  --radio: 14px;
  --sombra: 0 6px 18px rgb(45 29 16 / .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0;
  font-family: "Open Sans", system-ui, sans-serif;
  color: var(--texto);
  background-color: var(--amarillo);
  /* zigzag suave, como el fondo del catálogo impreso */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='22' viewBox='0 0 40 22'%3E%3Cpath d='M0 15 10 7l10 8 10-8 10 8' fill='none' stroke='%23eee597' stroke-width='2.2'/%3E%3C/svg%3E");
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

.motto {
  background: var(--cafe); color: var(--amarillo-brand);
  text-align: center; font-size: .72rem; letter-spacing: .32em; text-transform: uppercase;
  padding: .55rem 1rem;
}
.motto span { opacity: .5; margin: 0 .3em; }

.brandbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem 1.1rem; max-width: 1100px; margin: 0 auto;
}
.brandbar__logo img { height: 52px; width: auto; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  background: var(--caramelo); color: var(--blanco);
  border: 2px solid var(--oxido); border-radius: 999px;
  padding: .8rem 1.4rem; font-weight: 700; font-size: .95rem; text-decoration: none;
  letter-spacing: .02em; transition: background .2s, transform .15s;
}
.btn:hover { background: var(--oxido); }
.btn:active { transform: scale(.97); }
.btn--small { padding: .45rem 1rem; font-size: .82rem; }
.btn--light { background: var(--amarillo-brand); color: var(--cafe); border-color: var(--amarillo-brand); }
.btn--light:hover { background: var(--blanco); }

/* Portada */
.hero { position: relative; overflow: hidden; padding: 0 1.1rem 2.2rem; max-width: 1100px; margin: 0 auto; }
.hero__type {
  position: absolute; inset: 0 0 auto 0; display: flex; flex-direction: column;
  font-weight: 800; text-transform: uppercase; line-height: .86; font-size: clamp(3.4rem, 17vw, 9rem);
  color: transparent; -webkit-text-stroke: 1.5px rgb(195 136 70 / .35); white-space: nowrap; pointer-events: none; user-select: none;
}
.hero__img { position: relative; width: min(100%, 520px); margin: .5rem auto 0; height: auto; filter: drop-shadow(0 18px 24px rgb(45 29 16 / .18)); }
.hero__text { position: relative; text-align: center; margin-top: .9rem; }
.eyebrow { margin: 0; font-size: .75rem; letter-spacing: .22em; text-transform: uppercase; font-weight: 700; color: var(--oxido); }
.hero h1 {
  margin: .2rem 0 .6rem; font-weight: 800; text-transform: uppercase; line-height: .92;
  font-size: clamp(2.8rem, 13vw, 5rem); color: var(--cafe); letter-spacing: -.01em;
}
.hero__intro { max-width: 34ch; margin: 0 auto 1.3rem; font-style: italic; font-size: .98rem; }

/* Navegación por secciones */
.chips {
  position: sticky; top: 0; z-index: 10; background: rgb(250 242 160 / .94);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border-block: 1px solid rgb(195 136 70 / .35);
}
.chips__track { position: relative; display: flex; gap: .5rem; overflow-x: auto; padding: .65rem 1.1rem; max-width: 1100px; margin: 0 auto; scrollbar-width: none; }
.chips__track::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: .42rem .95rem; border-radius: 999px; border: 1.5px solid var(--caramelo);
  font-size: .8rem; font-weight: 600; text-decoration: none; color: var(--oxido); background: var(--blanco); white-space: nowrap;
}
.chip.is-active { background: var(--caramelo); color: var(--blanco); }

/* Catálogo */
.catalog { max-width: 1100px; margin: 0 auto; padding: .5rem 1.1rem 1rem; }
.loading { text-align: center; padding: 3rem 0; font-style: italic; }
.section { padding: 2rem 0 .5rem; }
.section-title {
  margin: 0 0 1.2rem; text-align: center; text-transform: uppercase; color: var(--caramelo);
  font-weight: 800; font-size: 1.45rem; letter-spacing: .04em; line-height: 1.15;
}
.section-title small { display: block; font-weight: 400; font-size: .95rem; letter-spacing: .08em; }
.section-title small::before { content: "("; } .section-title small::after { content: ")"; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card {
  display: flex; flex-direction: column; background: var(--blanco);
  border: 3px solid var(--caramelo); border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra);
}
.card__media { position: relative; display: block; width: 100%; aspect-ratio: 1; overflow: hidden; background: var(--zigzag); border: 0; padding: 0; cursor: zoom-in; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__media--empty { display: grid; place-items: center; }
.card__media--empty img { width: 45%; height: auto; opacity: .35; }
.badge {
  position: absolute; top: .5rem; left: .5rem; background: var(--cafe); color: var(--amarillo-brand);
  font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: .25rem .55rem; border-radius: 6px;
}
.card.is-out .card__media img { filter: grayscale(.8); opacity: .65; }
.card__body { display: flex; flex-direction: column; gap: .25rem; padding: .7rem .75rem .8rem; flex: 1; }
.card__name { margin: 0; font-size: .92rem; font-weight: 700; color: var(--cafe); line-height: 1.25; }
.card__price { margin: 0; font-weight: 800; color: var(--oxido); font-size: .95rem; }
.card__desc {
  margin: 0; font-size: .76rem; font-style: italic; color: var(--texto);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card__wa {
  margin-top: auto; padding-top: .55rem; font-size: .78rem; font-weight: 700; color: var(--oxido);
  text-decoration: none; display: inline-flex; align-items: center; gap: .35em;
}
.card__wa::before { content: ""; width: .55em; height: .55em; border-radius: 50%; background: #25d366; }
.card.is-out .card__wa { color: #8a7a66; }

/* Resultados */
.results { max-width: 1100px; margin: 0 auto; padding: 2rem 0 2.5rem; }
.results__track { display: flex; gap: .8rem; overflow-x: auto; padding: 0 1.1rem .5rem; scroll-snap-type: x mandatory; }
.shot { flex: none; width: 44vw; max-width: 220px; scroll-snap-align: start; margin: 0; }
.shot img { aspect-ratio: 3/4; object-fit: cover; width: 100%; border: 3px solid var(--caramelo); border-radius: var(--radio) var(--radio) 0 0; }
.shot figcaption {
  background: var(--caramelo); color: var(--blanco); text-align: center; text-transform: uppercase;
  font-size: .78rem; font-weight: 700; letter-spacing: .1em; padding: .3rem; border-radius: 0 0 var(--radio) var(--radio);
}

/* Pie */
.footer {
  background: var(--cafe); color: var(--amarillo); text-align: center;
  padding: 2.6rem 1.4rem calc(5.5rem + env(safe-area-inset-bottom));
}
.footer__logo { width: 120px; height: auto; margin: 0 auto 1.4rem; }
.footer__list { list-style: none; margin: 0 0 1.6rem; padding: 0; display: grid; gap: .55rem; font-size: .92rem; font-style: italic; }
.footer__list a { text-decoration: none; border-bottom: 1px solid rgb(250 242 160 / .35); }
.footer__updated { margin: 1.6rem 0 0; font-size: .75rem; opacity: .7; }

.wa-float {
  position: fixed; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 20;
  width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff;
  display: grid; place-items: center; box-shadow: 0 8px 20px rgb(0 0 0 / .25);
}
.wa-float svg { width: 30px; height: 30px; }

/* Vista ampliada */
.viewer { border: 3px solid var(--caramelo); border-radius: 18px; padding: 0; width: min(92vw, 460px); background: var(--blanco); color: var(--texto); }
.viewer::backdrop { background: rgb(45 29 16 / .7); }
.viewer img { width: 100%; max-height: 60vh; object-fit: contain; background: var(--zigzag); }
.viewer__body { padding: 1rem 1.2rem 1.3rem; }
.viewer h3 { margin: 0; color: var(--cafe); }
.viewer__price { font-weight: 800; color: var(--oxido); margin: .2rem 0 .6rem; }
.viewer__body p:not(.viewer__price) { font-style: italic; font-size: .9rem; margin: 0 0 1rem; }
.viewer__close {
  position: absolute; right: .6rem; top: .6rem; width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: var(--cafe); color: var(--amarillo-brand); font-size: 1.5rem; line-height: 1; cursor: pointer;
}

@media (min-width: 900px) {
  .hero { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; padding-bottom: 3rem; }
  .hero__img { order: 2; margin-top: 2rem; }
  .hero__text { text-align: left; margin-top: 0; }
  .hero__intro { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
