/* ---------- Buttons ---------- */
.btn {
  --bg: var(--ink); --fg: var(--cream);
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 58px; padding: 0 30px; border-radius: var(--radius-pill);
  background: var(--bg); color: var(--fg);
  font-family: var(--font-display); font-weight: 800; font-size: 1.02rem;
  text-transform: uppercase; letter-spacing: 0.01em; white-space: nowrap;
  position: relative; overflow: hidden; isolation: isolate;
  transition: transform 0.5s var(--ease-out), color 0.4s;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--fg);
  transform: translateY(101%); border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  transition: transform 0.55s var(--ease-out), border-radius 0.55s var(--ease-out);
}
.btn:hover { color: var(--bg); }
.btn:hover::before { transform: none; border-radius: 0; }
.btn--cream { --bg: var(--cream); --fg: var(--ink); }
.btn--red { --bg: var(--red); --fg: var(--cream); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px currentColor; --fg: var(--ink); }
.btn--ghost:hover { color: var(--cream); }
.btn--ghost::before { background: var(--ink); }
.sec--red .btn--ghost { color: var(--cream); }
.sec--red .btn--ghost::before { background: var(--cream); }
.sec--red .btn--ghost:hover { color: var(--red); }
.btn[disabled], .btn.is-disabled { opacity: 0.45; pointer-events: none; }
.btn__arrow { width: 18px; height: 18px; transition: transform 0.4s var(--ease-out); }
.btn:hover .btn__arrow { transform: translateX(4px); }

.link-u {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 2px no-repeat;
  padding-bottom: 3px; transition: background-size 0.45s var(--ease-out);
}
.link-u:hover { background-size: 0 2px; background-position: 100% 100%; }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; white-space: nowrap; user-select: none; }
.marquee__track { flex: none; display: inline-flex; animation: marquee var(--dur, 38s) linear infinite; will-change: transform; }
.marquee--rev .marquee__track { animation-direction: reverse; }
.marquee__item { flex: none; display: inline-flex; align-items: center; gap: 0.5em; padding-right: 1.1em; }
.marquee__item img { width: 0.9em; height: auto; display: inline-block; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Playing card (concept: "la baraja") ---------- */
.card {
  --tilt: 0deg;
  position: relative; background: var(--cream-hi); color: var(--ink);
  border-radius: var(--radius-card); aspect-ratio: 5 / 7;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 28px 50px -18px rgba(14, 11, 10, 0.55), 0 0 0 1px rgba(14, 11, 10, 0.12);
  transform: rotate(var(--tilt));
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.7s var(--ease-out), box-shadow 0.7s var(--ease-out);
}
.card__idx {
  position: absolute; left: 14px; top: 12px; z-index: 2; display: grid; justify-items: center; gap: 3px;
  font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; line-height: 1; color: var(--red);
}
.card__idx img { width: 16px; }
.card__idx--br { left: auto; right: 14px; top: auto; bottom: 12px; transform: rotate(180deg); }
.card__art { flex: 1; margin: 12px; border-radius: 12px; overflow: hidden; background: var(--red); display: grid; place-items: center; position: relative; }
.card__art img { width: 100%; height: 100%; object-fit: cover; }
.card__art--contain img { object-fit: contain; padding: 8%; }
.card__label { padding: 0 16px 16px; text-align: center; }
.card__title { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; letter-spacing: -0.03em; text-transform: uppercase; line-height: 1; }
.card__sub { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.7; margin-top: 6px; }
.card__stamp {
  position: absolute; z-index: 3; left: 50%; top: 48%; transform: translate(-50%, -50%) rotate(-14deg);
  padding: 6px 18px; border: 3px solid var(--cream); color: var(--cream); background: rgba(196, 10, 24, 0.9);
  font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; text-transform: uppercase; letter-spacing: 0.02em;
}

/* ---------- Polaroid ---------- */
.polaroid {
  background: var(--cream-hi); padding: 10px 10px 36px; border-radius: 4px;
  box-shadow: 0 24px 40px -16px rgba(14, 11, 10, 0.5), 0 0 0 1px rgba(14, 11, 10, 0.1);
  transform: rotate(var(--r, 0deg)); transition: transform 0.6s var(--ease-out);
}
.polaroid:hover { transform: rotate(0deg) scale(1.03); z-index: 3; }
.polaroid img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.polaroid figcaption { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; padding-top: 10px; text-align: center; }

/* ---------- Spec list ---------- */
.specs { display: grid; }
.specs > div { display: grid; grid-template-columns: 9.5em 1fr; gap: 12px; padding-block: 12px; border-top: 1px solid var(--line-on-red); }
.sec--cream .specs > div, .specs--ink > div { border-top-color: var(--line-on-cream); }
.specs dt { font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.8; padding-top: 3px; }
.specs dd { font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); letter-spacing: -0.01em; line-height: 1.2; }

/* ---------- Chips / option picker ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; min-height: 46px; padding: 0 20px; border-radius: var(--radius-pill);
  box-shadow: inset 0 0 0 2px currentColor; font-family: var(--font-display); font-weight: 700; font-size: 0.95rem;
  transition: background 0.3s, color 0.3s;
}
.chip input:checked + span { background: var(--ink); color: var(--cream); box-shadow: none; }
.sec--red .chip input:checked + span { background: var(--cream); color: var(--red); }
.chip input:focus-visible + span { outline: 3px solid currentColor; outline-offset: 3px; }

.qty { display: inline-flex; align-items: center; border-radius: var(--radius-pill); box-shadow: inset 0 0 0 2px currentColor; }
.qty button { width: 46px; height: 46px; font-size: 1.3rem; font-family: var(--font-display); font-weight: 700; }
.qty output { min-width: 28px; text-align: center; font-family: var(--font-mono); }

/* ---------- Product card (shop grid) ---------- */
.pcard { display: grid; gap: 18px; }
.pcard__media {
  position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius-card); overflow: hidden;
  background: var(--red); display: grid; place-items: center;
}
.pcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease-out); }
.pcard__media--contain img { object-fit: contain; padding: 10%; }
.pcard:hover .pcard__media img { transform: scale(1.06); }
.pcard__tag {
  position: absolute; left: 14px; top: 14px; z-index: 2; padding: 7px 14px; border-radius: var(--radius-pill);
  background: var(--cream); color: var(--ink); font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
}
.pcard__tag--sold { background: var(--ink); color: var(--cream); }
.pcard__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.pcard__name { font-family: var(--font-display); font-weight: 800; font-size: var(--step-2); letter-spacing: -0.035em; line-height: 0.95; text-transform: uppercase; }
.pcard__price { font-family: var(--font-display); font-weight: 800; font-size: var(--step-1); white-space: nowrap; }
.pcard__meta { font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.7; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 8px; }
.field label, .field .label { font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: 0.08em; text-transform: uppercase; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--cream-hi); color: var(--ink); border: 2px solid var(--ink); border-radius: 14px;
  padding: 16px 18px; font: inherit; transition: box-shadow 0.3s, border-color 0.3s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; box-shadow: 0 0 0 4px var(--red); border-color: var(--ink); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 0.95rem; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--red); flex: none; }
.check a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Cart line ---------- */
.line { display: grid; grid-template-columns: 84px 1fr auto; gap: 16px; align-items: center; padding-block: 18px; border-bottom: 1px solid var(--line-on-cream); }
.line__img { width: 84px; aspect-ratio: 1; border-radius: 14px; background: var(--red); overflow: hidden; display: grid; place-items: center; }
.line__img img { width: 100%; height: 100%; object-fit: cover; }
.line__name { font-family: var(--font-display); font-weight: 800; font-size: var(--step-1); text-transform: uppercase; letter-spacing: -0.02em; line-height: 1; }
.line__opt { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.7; margin-top: 6px; }
.line__price { font-family: var(--font-display); font-weight: 800; font-size: var(--step-1); text-align: right; }
.line__rm { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; text-decoration: underline; text-underline-offset: 3px; margin-top: 8px; opacity: 0.75; }
.empty { padding-block: 56px; text-align: center; display: grid; gap: 20px; justify-items: center; }
.empty img { width: 90px; }
.empty p { font-family: var(--font-display); font-weight: 800; font-size: var(--step-2); text-transform: uppercase; line-height: 1; }

@media (max-width: 640px) {
  .specs > div { grid-template-columns: 1fr; gap: 2px; }
}
