/* ===== Tokens ===== */
:root {
  --paper: #fff8f1;
  --paper-2: #fdeee2;
  --ink: #1d1a16;
  --ink-soft: #5d554b;
  --line: rgba(29, 26, 22, 0.09);
  --card: #ffffff;

  /* Colores de marca (logo) */
  --pink: #fe3162;
  --pink-dark: #d81b4b;
  --orange: #ff992d;

  --wa: #1fae5b;
  --wa-dark: #158a47;

  --radius: 18px;
  --display: 'Unbounded', 'Arial Black', sans-serif;
  --body: 'Instrument Sans', 'Helvetica Neue', sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #17120f;
    --paper-2: #211a16;
    --ink: #f4efe6;
    --ink-soft: #b3a998;
    --line: rgba(244, 239, 230, 0.12);
    --card: #221e18;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--paper);
  /* líneas de capa, como una pieza impresa */
  background-image: repeating-linear-gradient(
    0deg,
    transparent 0 5px,
    var(--line) 5px 6px
  );
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; border-radius: 6px; }

/* ===== Topbar ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand-mark { height: 30px; width: auto; }
.topbar-links a { font-weight: 600; font-size: 14px; text-decoration: none; opacity: 0.75; }
.topbar-links a:hover { opacity: 1; }

/* ===== Hero ===== */
.hero {
  display: grid;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 80px) clamp(16px, 4vw, 48px) clamp(48px, 8vw, 96px);
}
@media (min-width: 760px) {
  .hero { grid-template-columns: auto 1fr; }
}
.hero-logo {
  margin: 0;
  justify-self: center;
  animation: logo-in 0.9s cubic-bezier(0.2, 0.8, 0.25, 1.15) both;
}
.hero-logo img { height: clamp(260px, 56vh, 520px); width: auto; }
.hero-copy { display: grid; gap: 22px; justify-items: start; }
@media (max-width: 759px) {
  .hero-logo img { height: min(300px, 40vh); }
  .hero-copy { justify-items: center; text-align: center; }
}
.hero-kicker {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  animation: rise 0.6s 0.3s both;
}
.hero-kicker::before {
  content: '';
  width: 28px;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--pink) 50%, var(--orange) 50%);
}
.hero-tagline {
  margin: 0;
  max-width: 15ch;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(30px, 4.6vw, 58px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-wrap: balance;
  animation: rise 0.6s 0.45s both;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: inherit;
  gap: 12px;
  animation: rise 0.6s 0.6s both;
}
@media (max-width: 759px) {
  .hero-actions { justify-content: center; }
}

/* ===== Botones ===== */
.btn-wa,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-wa {
  color: #fff;
  background: var(--wa);
  box-shadow: 0 3px 0 var(--wa-dark);
}
.btn-wa:hover { transform: translateY(-1px); box-shadow: 0 4px 0 var(--wa-dark); }
.btn-wa:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--wa-dark); }
.btn-wa.is-disabled { background: var(--ink-soft); box-shadow: none; opacity: 0.5; cursor: not-allowed; }
.btn-wa--small { min-height: 46px; }
.btn-wa--big { min-height: 56px; padding: 0 28px; font-size: 17px; width: 100%; }
.btn-ghost {
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* ===== Catálogo ===== */
.catalog {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px) 80px;
}
.catalog-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 28px;
  border-top: 3px solid var(--ink);
}
.catalog-head h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(24px, 4vw, 36px);
  letter-spacing: -0.03em;
}
.count { font-weight: 600; color: var(--ink-soft); font-size: 14px; }

.chips {
  display: flex;
  gap: 8px;
  margin: 20px 0 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--card);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}
.chip small { font-weight: 500; color: var(--ink-soft); }
.chip:hover { border-color: var(--ink); }
.chip.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip.is-active small { color: inherit; opacity: 0.7; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: clamp(16px, 2.4vw, 28px);
  margin-top: 24px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: rise 0.55s calc(var(--i, 0) * 60ms) both;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 0 var(--orange), 0 18px 30px -18px rgba(0, 0, 0, 0.35);
}
.card-media {
  position: relative;
  display: block;
  aspect-ratio: 1;
  background: var(--paper-2);
  overflow: hidden;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.card:hover .card-media img { transform: scale(1.04); }
.price-tag {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--orange);
  color: #1d1a16;
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
  transform: rotate(-3deg);
  box-shadow: 2px 2px 0 #1d1a16;
}
.card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  padding: 16px 16px 18px;
}
.card-cat {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pink);
  text-decoration: none;
}
.card-body h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.card-body h3 a { text-decoration: none; }
.card-body h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.card-desc {
  margin: 0 0 8px;
  color: var(--ink-soft);
  font-size: 14.5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-body .btn-wa { margin-top: auto; width: 100%; }

.no-photo {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 200px;
  color: var(--ink-soft);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: repeating-linear-gradient(-45deg, transparent 0 10px, var(--line) 10px 11px);
}

/* ===== Vacío ===== */
.empty {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 80px 16px;
  text-align: center;
  color: var(--ink-soft);
}
.empty p { margin: 0; font-size: 17px; }
.empty-layers { display: grid; gap: 4px; justify-items: center; }
.empty-layers i {
  display: block;
  height: 10px;
  border-radius: 5px;
  animation: layer 2.4s ease-in-out infinite;
}
.empty-layers i:nth-child(1) { width: 40px; background: var(--orange); animation-delay: 0.9s; }
.empty-layers i:nth-child(2) { width: 60px; background: var(--pink); animation-delay: 0.6s; }
.empty-layers i:nth-child(3) { width: 80px; background: var(--orange); animation-delay: 0.3s; }
.empty-layers i:nth-child(4) { width: 100px; background: var(--pink); }

/* ===== Producto ===== */
.product {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px clamp(16px, 4vw, 48px) 80px;
}
.back {
  display: inline-block;
  margin-bottom: 20px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  color: var(--ink-soft);
}
.back:hover { color: var(--ink); }
.product-layout {
  display: grid;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}
@media (min-width: 860px) {
  .product-layout { grid-template-columns: 1.15fr 1fr; }
  .product-info { position: sticky; top: 90px; }
}
.product-media {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--line);
  box-shadow: 10px 10px 0 var(--orange);
  animation: rise 0.6s both;
}
.product-media img { width: 100%; height: auto; }
.product-info { display: flex; flex-direction: column; gap: 14px; animation: rise 0.6s 0.15s both; }
.product-info h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(28px, 4.4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.product-price {
  align-self: flex-start;
  margin: 4px 0;
  padding: 8px 16px;
  border-radius: 10px;
  background: var(--orange);
  color: #1d1a16;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -0.03em;
  transform: rotate(-2deg);
  box-shadow: 3px 3px 0 #1d1a16;
}
.product-desc { white-space: pre-line; color: var(--ink-soft); font-size: 17px; }
.product-note { margin: 0; font-size: 14px; color: var(--ink-soft); text-align: center; }

.related { margin-top: 80px; padding-top: 28px; border-top: 3px solid var(--ink); }
.related h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(20px, 3vw, 28px);
  letter-spacing: -0.03em;
}

/* ===== Footer ===== */
.footer {
  padding: 36px clamp(16px, 4vw, 48px) 48px;
  text-align: center;
  border-top: 1px solid var(--line);
  background: var(--paper-2);
}
.footer p { margin: 0; }
.footer-small { margin-top: 6px !important; font-size: 13.5px; color: var(--ink-soft); }

/* ===== Animaciones ===== */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes logo-in {
  from { opacity: 0; transform: translateY(24px) scale(0.94) rotate(-2deg); }
  to { opacity: 1; transform: none; }
}
@keyframes layer {
  0%, 100% { transform: scaleX(1); opacity: 1; }
  50% { transform: scaleX(0.6); opacity: 0.5; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
