/* 3pito Shop — tienda. Tokens de §7 (copiados igual en apps/admin/src/app/styles.css). */
:root {
  --bg: #f4f5fa;
  --surface: #ffffff;
  --surface-2: #ebeef6;
  --ink: #0e1530;
  --muted: #5a6283;
  --line: #dce0ec;
  --brand: #ff6a1a;
  --brand-ink: #ffffff;
  --brand-soft: #ffe6d6;
  --brand-strong: #e85a0c;
  --warn-text: #8a5600;
  --wa-strong: #1a8f4c;
  --navy: #16205c;
  --on-navy: #ffffff;
  --sun: #ffd21f;
  --sun-ink: #2a2100;
  --ok: #17855a;
  --ok-soft: #ddf3e9;
  --warn: #a86a00;
  --warn-soft: #fff1cf;
  --bad: #c7372f;
  --bad-soft: #fbe1de;
  --info: #2c5fd6;
  --info-soft: #e1eafd;
  --wa: #1faf5a;
  --shadow: 0 18px 40px -22px rgba(22, 32, 92, 0.35);
  --r-md: 16px;
  --r-lg: 26px;
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-text: "Onest", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --gutter: max(16px, env(safe-area-inset-left));
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #090d1c;
    --surface: #111731;
    --surface-2: #1a2144;
    --ink: #eef0fa;
    --muted: #9ba3c4;
    --line: #252d55;
    --brand: #ff7a2e;
    --brand-ink: #1a0a00;
    --brand-soft: #3a2214;
    --brand-strong: #ff7a2e;
    --warn-text: #f2b53a;
    --navy: #1c2770;
    --sun: #ffd84a;
    --ok: #3fcb8e;
    --ok-soft: #10372a;
    --warn: #f2b53a;
    --warn-soft: #3a2c0e;
    --bad: #ff7a70;
    --bad-soft: #3d1715;
    --info: #7fa4ff;
    --info-soft: #17264d;
    --shadow: 0 20px 44px -24px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #090d1c;
  --surface: #111731;
  --surface-2: #1a2144;
  --ink: #eef0fa;
  --muted: #9ba3c4;
  --line: #252d55;
  --brand: #ff7a2e;
  --brand-ink: #1a0a00;
  --brand-soft: #3a2214;
  --brand-strong: #ff7a2e;
  --warn-text: #f2b53a;
  --navy: #1c2770;
  --sun: #ffd84a;
  --ok: #3fcb8e;
  --ok-soft: #10372a;
  --warn: #f2b53a;
  --warn-soft: #3a2c0e;
  --bad: #ff7a70;
  --bad-soft: #3d1715;
  --info: #7fa4ff;
  --info-soft: #17264d;
  --shadow: 0 20px 44px -24px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px / 1.55 var(--font-text);
  overflow-x: hidden;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: inherit;
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  overflow-wrap: anywhere;
}
h1 {
  font-size: clamp(2.6rem, 6.4vw, 5.2rem);
  line-height: 1.05;
  font-weight: 800;
}
h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  line-height: 1.05;
  font-weight: 800;
}
h3 {
  font-size: 1.3rem;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.01em;
}
main > section,
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px var(--gutter);
}
.eyebrow {
  font: 700 0.78rem / 1.4 var(--font-text);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.sr-only,
.search label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 8px;
  z-index: 10;
}

/* Tarjeta de producto (§7, regla obligatoria) */
.pcard {
  display: flex;
  flex-direction: column;
}
.pcard .title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  line-height: 1.25;
  min-height: calc(2 * 1.25em);
}
.pcard .price-row {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.5rem;
}
.pcard .price,
.pcard .was,
.money {
  white-space: nowrap;
}

.pcard {
  background: var(--surface);
  border-radius: var(--r-md);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.pcard-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
  padding: 0 0 14px;
  text-decoration: none;
}
.pcard-link > :not(.pcard-media) {
  margin-left: 14px;
  margin-right: 14px;
}
.pcard .title {
  font-size: 1.05rem;
  margin-bottom: 0;
}
.pcard-media {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: linear-gradient(
    140deg,
    color-mix(in srgb, var(--cat) 30%, var(--surface)),
    var(--surface-2)
  );
}
.pcard-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pcard-icon {
  font-size: 3rem;
}
.pcard-media .badge {
  position: absolute;
  top: 10px;
  left: 10px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 18px;
}

@media (pointer: coarse) {
  a,
  button,
  input,
  select,
  summary {
    min-height: 40px;
    min-width: 40px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    /* biome-ignore lint/complexity/noImportantStyles: §7 exige !important con prefers-reduced-motion */
    animation: none !important;
    /* biome-ignore lint/complexity/noImportantStyles: §7 exige !important con prefers-reduced-motion */
    transition: none !important;
  }
}
