/* Tentados public site. Mobile-first; every color is a theme token. */

/* ---------- Tokens ---------- */
:root {
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Outfit", "Segoe UI", system-ui, sans-serif;

  --container: 1280px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 110px;

  --radius-xl: 32px;
  --radius-lg: 26px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --radius-pill: 999px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.45, 0, 0.2, 1);

  --brand-navy: #012746;
  --brand-cream: #e9dfd3;
  --brand-yellow: #f4b63f;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #011a2e;
  --bg-deep: #00131f;
  --surface: #062640;
  --surface-2: #0b3150;
  --surface-3: #113c60;
  --line: rgba(233, 223, 211, 0.11);
  --line-strong: rgba(233, 223, 211, 0.22);
  --ink: #efe6db;
  --ink-soft: #c4bcb2;
  --ink-mute: #93a3b2;
  --accent: #f4b63f;
  --accent-hover: #f7c662;
  --accent-ink: #012746;
  --accent-text: #f4b63f;
  --accent-soft: rgba(244, 182, 63, 0.14);
  --focus: #f4b63f;
  --header-bg: rgba(1, 26, 46, 0.74);
  --toolbar-bg: rgba(6, 38, 64, 0.8);
  --skeleton: #0a2e4c;
  --skeleton-shine: rgba(233, 223, 211, 0.07);
  --glow-a: rgba(244, 182, 63, 0.13);
  --glow-b: rgba(54, 118, 178, 0.28);
  --seal-bg: #e9dfd3;
  --seal-ink: #012746;
  --scrim: rgba(0, 12, 22, 0.64);
  --shadow-1: 0 1px 2px rgba(0, 8, 16, 0.35), 0 10px 26px -16px rgba(0, 8, 16, 0.8);
  --shadow-2: 0 2px 6px rgba(0, 8, 16, 0.3), 0 28px 56px -24px rgba(0, 8, 16, 0.9);
  --shadow-accent: 0 12px 28px -14px rgba(244, 182, 63, 0.7);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f1e9;
  --bg-deep: #efe6da;
  --surface: #fffbf6;
  --surface-2: #f1e8dc;
  --surface-3: #e9dfd3;
  --line: rgba(1, 39, 70, 0.11);
  --line-strong: rgba(1, 39, 70, 0.22);
  --ink: #012746;
  --ink-soft: #2c4862;
  --ink-mute: #566879;
  --accent: #f4b63f;
  --accent-hover: #f6c158;
  --accent-ink: #012746;
  --accent-text: #8a5800;
  --accent-soft: rgba(244, 182, 63, 0.24);
  --focus: #a86c00;
  --header-bg: rgba(247, 241, 233, 0.8);
  --toolbar-bg: rgba(255, 251, 246, 0.86);
  --skeleton: #ebe1d4;
  --skeleton-shine: rgba(255, 255, 255, 0.6);
  --glow-a: rgba(244, 182, 63, 0.26);
  --glow-b: rgba(1, 39, 70, 0.08);
  --seal-bg: #012746;
  --seal-ink: #e9dfd3;
  --scrim: rgba(1, 25, 45, 0.5);
  --shadow-1: 0 1px 2px rgba(1, 39, 70, 0.06), 0 10px 26px -16px rgba(1, 39, 70, 0.3);
  --shadow-2: 0 2px 6px rgba(1, 39, 70, 0.06), 0 28px 56px -26px rgba(1, 39, 70, 0.4);
  --shadow-accent: 0 12px 26px -14px rgba(196, 132, 20, 0.6);
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
  background: var(--bg);
}

body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html:has(dialog[open]) {
  overflow: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 560;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

main:focus {
  outline: none;
}

/* ---------- Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

:root[data-theme="dark"] .only-light,
:root[data-theme="light"] .only-dark {
  display: none !important;
}

.icon {
  display: inline-block;
  flex: none;
  width: 1.25em;
  height: 1.25em;
  vertical-align: middle;
}

.skeleton {
  background-color: var(--skeleton);
  background-image: linear-gradient(100deg, transparent 30%, var(--skeleton-shine) 50%, transparent 70%);
  background-size: 220% 100%;
  animation: shimmer 1.5s var(--ease-soft) infinite;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 100;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 0.2s var(--ease-out);
}

.skip-link:focus {
  transform: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--accent-text);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

/* ---------- Buttons & links ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.25s var(--ease-out), background-color 0.25s, box-shadow 0.3s, border-color 0.25s;
}

.btn .icon {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--shadow-accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-secondary:hover {
  background: var(--surface-2);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn-sm {
  min-height: 44px;
  padding: 0 16px;
  font-size: 0.95rem;
}

.btn-lg {
  min-height: 56px;
  padding: 0 28px;
  font-size: 1.05rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: gap 0.25s var(--ease-out);
}

.text-link:hover {
  gap: 12px;
}

.text-link .icon {
  width: 18px;
  height: 18px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  backdrop-filter: saturate(1.4) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 12px 32px -24px rgba(0, 8, 16, 0.55);
}

.header-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "brand actions"
    "nav nav";
  align-items: center;
  column-gap: 12px;
  min-height: 60px;
}

.brand {
  grid-area: brand;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  justify-self: start;
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.brand-mark {
  width: 26px;
  height: auto;
}

.brand-word {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1;
}

.site-nav {
  grid-area: nav;
  border-top: 1px solid var(--line);
  padding-bottom: 4px;
}

.site-nav ul {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  color: var(--ink-soft);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s, background-color 0.2s;
}

.site-nav a:hover {
  color: var(--ink);
  background: var(--surface-2);
}

.header-actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  transition: background-color 0.25s, border-color 0.25s, transform 0.25s var(--ease-out);
}

.theme-toggle:hover {
  background: var(--surface-2);
  transform: rotate(-8deg);
}

.theme-toggle .icon {
  grid-area: 1 / 1;
  width: 20px;
  height: 20px;
  transition: transform 0.5s var(--ease-out), opacity 0.3s;
}

:root[data-theme="dark"] .theme-toggle .icon-moon,
:root[data-theme="light"] .theme-toggle .icon-sun {
  opacity: 0;
  transform: rotate(-90deg) scale(0.4);
}

.header-cta .icon {
  width: 18px;
  height: 18px;
}

.header-cta .cta-long {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  padding-block: clamp(28px, 5vw, 72px) clamp(56px, 8vw, 104px);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(42rem 28rem at 88% 18%, var(--glow-a), transparent 70%),
    radial-gradient(46rem 34rem at 4% 0%, var(--glow-b), transparent 70%);
}

.hero-grid {
  display: grid;
  gap: 48px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.hero-title {
  margin-top: 18px;
  font-size: clamp(2.6rem, 1.4rem + 4.6vw, 5.3rem);
  font-weight: 540;
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: wrap;
}

.hero-title em {
  font-style: italic;
  font-weight: 460;
  color: var(--accent-text);
  white-space: nowrap;
}

.inline-photo {
  position: relative;
  display: inline-block;
  overflow: hidden;
  border-radius: var(--radius-pill);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-1);
}

.inline-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s var(--ease-out);
}

.inline-photo img.is-loaded {
  opacity: 1;
}

.inline-photo.is-fallback {
  background: linear-gradient(135deg, var(--accent-soft), var(--surface-2));
}

.hero-title .inline-photo {
  display: none;
}

.hero-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.hero-thumbs .inline-photo {
  width: 104px;
  height: 52px;
}

.hero-lead {
  max-width: 38ch;
  margin-top: 22px;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.25rem);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-note {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.hero-note .icon,
.step-note .icon {
  width: 22px;
  height: 22px;
  color: var(--accent-text);
}

.hero-visual {
  position: relative;
  min-width: 0;
}

.bento {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 1.2vw, 16px);
  aspect-ratio: 1 / 0.92;
  padding: 0;
  list-style: none;
}

.bento-tile {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
}

.bento-tile--a {
  grid-row: 1 / span 2;
}

.bento-tile.is-fallback {
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 20%, #0b3c66, var(--brand-navy) 72%);
}

.bento-tile.is-fallback img {
  width: 28%;
}

.tile {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  text-align: left;
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.7s var(--ease-out), transform 0.9s var(--ease-out);
}

.tile img.is-loaded {
  opacity: 1;
  transform: scale(1);
}

.tile:hover img.is-loaded {
  transform: scale(1.05);
}

.tile:focus-visible {
  outline-offset: -4px;
}

.tile-caption {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 8px 8px 14px;
  border-radius: var(--radius-pill);
  background: rgba(1, 26, 46, 0.62);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #f5ede3;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.2;
}

.tile-caption span {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

@media (max-width: 559px) {
  .tile-caption {
    left: 8px;
    right: 8px;
    bottom: 8px;
    padding: 7px 7px 7px 12px;
    border-radius: 18px;
    font-size: 0.82rem;
  }

  .tile-caption .icon {
    width: 26px;
    height: 26px;
    padding: 6px;
  }
}

.tile-caption .icon {
  width: 30px;
  height: 30px;
  padding: 7px;
  border-radius: 50%;
  background: var(--brand-yellow);
  color: var(--brand-navy);
  transition: transform 0.3s var(--ease-out);
}

.tile:hover .tile-caption .icon {
  transform: rotate(-45deg);
}

.seal {
  position: absolute;
  top: -30px;
  right: 6px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 92px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--seal-bg);
  color: var(--seal-ink);
  box-shadow: var(--shadow-2);
}

.seal-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: spin 28s linear infinite;
}

.seal-text {
  fill: currentColor;
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 1.5px;
}

.seal-mark {
  width: 30%;
}

/* ---------- Value strip ---------- */
.values {
  border-block: 1px solid var(--line);
  background: var(--bg-deep);
}

.values-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  padding: 20px 0;
  list-style: none;
}

.value {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.3;
}

.value .icon {
  width: 22px;
  height: 22px;
  color: var(--accent-text);
}

/* ---------- Section heads ---------- */
.catalog,
.how {
  padding-block: clamp(64px, 9vw, 120px);
}

.section-head {
  max-width: 680px;
  margin-bottom: 28px;
}

.section-title {
  margin-top: 14px;
  font-size: clamp(2.1rem, 1.4rem + 2.6vw, 3.5rem);
}

.section-lead {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 1.06rem;
}

/* ---------- Toolbar ---------- */
.toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}

.search {
  position: relative;
  min-width: 0;
}

.search-input {
  width: 100%;
  height: 52px;
  padding: 0 52px 0 48px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
}

.search-input::placeholder {
  color: var(--ink-mute);
}

.search-input:hover {
  border-color: var(--ink-mute);
}

.search-input:focus-visible {
  outline-offset: 2px;
}

.search-input::-webkit-search-cancel-button,
.search-input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 17px;
  width: 20px;
  height: 20px;
  color: var(--ink-mute);
  transform: translateY(-50%);
  pointer-events: none;
}

.search-clear {
  position: absolute;
  top: 50%;
  right: 4px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  transform: translateY(-50%);
}

.search-clear:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.search-clear .icon {
  width: 18px;
  height: 18px;
}

.chips {
  display: flex;
  gap: 8px;
  margin-inline: calc(var(--gutter) * -1);
  padding: 6px var(--gutter);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  position: relative; /* keeps visually-hidden children inside the scroller */
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 8px 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s var(--ease-out);
}

.chip:hover {
  border-color: var(--ink-mute);
}

.chip:active {
  transform: scale(0.97);
}

.chip .icon {
  width: 17px;
  height: 17px;
  margin-right: -2px;
  color: var(--ink-soft);
}

.chip[aria-pressed="true"] {
  border-color: transparent;
  background: var(--accent);
  color: var(--accent-ink);
}

.chip[aria-pressed="true"] .icon {
  color: inherit;
}

.chip-count {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  font-size: 0.8rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.chip[aria-pressed="true"] .chip-count {
  background: rgba(1, 39, 70, 0.14);
}

.result-count {
  min-height: 1.6em;
  margin: 6px 0 18px;
  color: var(--ink-mute);
  font-size: 0.95rem;
}

/* ---------- Product grid & cards ---------- */
.product-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 0;
  list-style: none;
}

.card-item {
  min-width: 0;
}

.card-item.is-entering {
  animation: card-in 0.6s var(--ease-out) both;
  animation-delay: calc(min(var(--i, 0), 14) * 45ms);
}

.card {
  position: relative;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  box-shadow: var(--shadow-1);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), border-color 0.3s;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-2);
}

.card:active {
  transform: translateY(-1px) scale(0.99);
}

.card-media {
  position: relative;
  container-type: inline-size;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--skeleton);
}

.card-media img,
.dialog-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s var(--ease-out), transform 0.7s var(--ease-out);
}

.card-media img.is-loaded,
.dialog-media img.is-loaded {
  opacity: 1;
}

.card:hover .card-media img {
  transform: scale(1.05);
}

.ph {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8%;
  padding: 10%;
  background:
    radial-gradient(circle at 28% 18%, rgba(244, 182, 63, 0.16), transparent 55%),
    radial-gradient(circle at 70% 90%, #0b3c66, var(--brand-navy) 70%);
  color: var(--brand-cream);
  text-align: center;
}

.ph img {
  width: 26%;
  height: auto;
  opacity: 1;
}

.ph-name {
  font-family: var(--font-display);
  font-size: clamp(0.72rem, 10cqi, 1.5rem);
  font-weight: 560;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding-right: 6px;
}

.card-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  list-style: none;
}

.card-tags {
  margin-bottom: 4px;
}

.card-tags:empty {
  display: none;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

.tag .icon {
  width: 13px;
  height: 13px;
}

.card-name {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: 1.2rem;
  font-weight: 560;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.card-meta {
  color: var(--ink-mute);
  font-size: 0.9rem;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
}

.price {
  font-size: 1.05rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.price--pending {
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 500;
}

/* "Consultá precio" inside a card: tappable hint (the card itself is the button). */
.price-hint {
  cursor: pointer;
  text-decoration: underline dotted;
  text-decoration-color: var(--accent);
  text-underline-offset: 4px;
  transition: color 0.2s var(--ease-out);
}

.price-hint:hover {
  color: var(--accent-text);
}

/* "Consultá precio" in the product detail: a real button. */
.price-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  min-height: 44px;
  margin: 2px 0 0 -10px;
  padding: 0 12px 0 10px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}

.price-action .icon {
  width: 18px;
  height: 18px;
  color: var(--accent-text);
}

.price-action:hover {
  background: var(--accent-soft);
}

.price-action:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Toast: short, non-blocking notice (top layer via popover when supported). */
.toast {
  position: fixed;
  inset: auto auto max(20px, env(safe-area-inset-bottom)) 50%;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  max-width: min(calc(100vw - 32px), 440px);
  margin: 0;
  padding: 14px 20px 14px 16px;
  border: 1px solid var(--accent-soft);
  border-radius: var(--radius-md);
  background: var(--surface-3);
  color: var(--ink);
  box-shadow: var(--shadow-2);
  font: 500 0.95rem/1.45 var(--font-body);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition: opacity 0.25s var(--ease-out), transform 0.4s var(--ease-out);
}

.toast[popover]:not(:popover-open) {
  display: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast-icon {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--accent-text);
}

@media (prefers-reduced-motion: reduce) {
  .toast,
  .toast.is-visible {
    transform: translate(-50%, 0);
    transition: opacity 0.2s linear;
  }
}

.card-more {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
}

.card-more-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.more-arrow {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface-2);
  transition: background-color 0.3s, color 0.3s, transform 0.35s var(--ease-out);
}

.more-arrow .icon {
  width: 16px;
  height: 16px;
}

.card:hover .more-arrow {
  background: var(--accent);
  color: var(--accent-ink);
  transform: translateX(2px);
}

/* Skeleton cards */
.card-skeleton {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  grid-template-rows: 1fr 1fr;
  gap: 10px 16px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.sk-media {
  grid-row: 1 / span 2;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
}

.sk-line {
  align-self: end;
  width: 78%;
  height: 14px;
  border-radius: 7px;
}

.sk-line--short {
  align-self: start;
  width: 46%;
}

/* Empty & error states */
.state-panel {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: clamp(36px, 6vw, 64px) 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
}

.state-art {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin-bottom: 4px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-text);
}

.state-art .icon {
  width: 28px;
  height: 28px;
}

.state-title {
  font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.8rem);
}

.state-text {
  max-width: 42ch;
  margin-bottom: 8px;
  color: var(--ink-soft);
}

/* ---------- Cómo comprar ---------- */
.how {
  position: relative;
  border-top: 1px solid var(--line);
  background: var(--bg-deep);
}

.how-grid {
  display: grid;
  gap: 44px;
}

.how-head {
  min-width: 0;
}

.how-cta {
  margin-top: 28px;
}

.steps {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.step:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 64px;
  bottom: 0;
  left: 31px;
  width: 2px;
  background: var(--line-strong);
}

.step:first-child::before {
  background: linear-gradient(to bottom, var(--accent), var(--line-strong));
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding-bottom: 28px;
}

.step:last-child {
  padding-bottom: 0;
}

.step-num {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--bg-deep);
  color: var(--accent-text);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  font-variant-numeric: lining-nums;
}

.step:first-child .step-num {
  border-color: transparent;
  background: var(--accent);
  color: var(--accent-ink);
}

.step-body {
  min-width: 0;
  padding-top: 12px;
}

.step-title {
  font-size: clamp(1.45rem, 1.25rem + 0.9vw, 2rem);
}

.step-text {
  max-width: 46ch;
  margin-top: 8px;
  color: var(--ink-soft);
}

.step-body .text-link {
  margin-top: 6px;
}

.step-note {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.35;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding-block: 48px 28px;
}

.footer-grid {
  display: grid;
  gap: 28px;
}

.footer-logo {
  width: 132px;
  height: auto;
}

.footer-tagline {
  margin-top: 10px;
  color: var(--ink-mute);
  font-size: 0.95rem;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  padding: 0;
  list-style: none;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--ink-soft);
  font-weight: 500;
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 5px;
}

.footer-nav .icon {
  width: 16px;
  height: 16px;
}

.footer-copy {
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--ink-mute);
  font-size: 0.9rem;
}

/* ---------- Product dialog ---------- */
.product-dialog {
  width: 100%;
  max-width: 100%;
  max-height: 92dvh;
  margin: auto 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  overflow: visible;
}

.product-dialog::backdrop {
  background: var(--scrim);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.dialog-card {
  position: relative;
  display: grid;
  max-height: 92dvh;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  background: var(--surface);
  box-shadow: 0 -20px 60px -20px rgba(0, 8, 16, 0.6);
}

.product-dialog[open] .dialog-card {
  animation: sheet-in 0.42s var(--ease-out);
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--ink);
  transition: transform 0.25s var(--ease-out), background-color 0.2s;
}

.dialog-close:hover {
  transform: rotate(90deg);
}

.dialog-close .icon {
  width: 20px;
  height: 20px;
}

.dialog-media {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--skeleton);
}

.dialog-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
}

.dialog-title {
  font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.7rem);
  line-height: 1.04;
}

.dialog-meta {
  color: var(--ink-mute);
  font-size: 1rem;
}

.dialog-desc {
  color: var(--ink-soft);
}

.dialog-price {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  margin-top: 4px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.dialog-price-label {
  color: var(--ink-mute);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dialog-price .price {
  font-size: 1.25rem;
}

.dialog-price .price--pending {
  color: var(--ink);
  font-size: 1.1rem;
}

.dialog-cta {
  width: 100%;
  margin-top: 8px;
}

.dialog-hint {
  align-self: center;
  color: var(--ink-mute);
  font-size: 0.85rem;
}

/* ---------- Motion ---------- */
@keyframes shimmer {
  from {
    background-position: 120% 0;
  }
  to {
    background-position: -120% 0;
  }
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

@keyframes sheet-in {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .hero-copy > * {
    animation: rise 0.8s var(--ease-out) both;
  }

  .hero-copy > :nth-child(2) {
    animation-delay: 60ms;
  }

  .hero-copy > :nth-child(3) {
    animation-delay: 120ms;
  }

  .hero-copy > :nth-child(4) {
    animation-delay: 160ms;
  }

  .hero-copy > :nth-child(n + 5) {
    animation-delay: 220ms;
  }

  .hero-visual {
    animation: rise 1s 0.12s var(--ease-out) both;
  }

  :root.theme-switching,
  :root.theme-switching *,
  :root.theme-switching *::before {
    transition: background-color 0.4s var(--ease-soft), color 0.4s var(--ease-soft), border-color 0.4s var(--ease-soft), fill 0.4s var(--ease-soft) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Breakpoints ---------- */
@media (min-width: 560px) {
  .hero-title .inline-photo {
    display: inline-block;
    width: 1.5em;
    height: 0.74em;
    margin-inline: 0.02em;
    vertical-align: -0.04em;
  }

  .hero-thumbs {
    display: none;
  }

  .seal {
    width: 108px;
  }
}

@media (min-width: 768px) {
  :root {
    --header-h: 72px;
  }

  .header-bar {
    display: flex;
    gap: 24px;
    min-height: 72px;
  }

  .brand-mark {
    width: 28px;
  }

  .brand-word {
    font-size: 1.6rem;
  }

  .site-nav {
    margin-inline: auto;
    padding-bottom: 0;
    border-top: 0;
  }

  .header-cta .cta-long {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
  }

  .header-cta .cta-short {
    display: none;
  }

  .toolbar {
    position: sticky;
    top: calc(var(--header-h) + 10px);
    z-index: 20;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: var(--toolbar-bg);
    -webkit-backdrop-filter: saturate(1.3) blur(14px);
    backdrop-filter: saturate(1.3) blur(14px);
    box-shadow: var(--shadow-1);
  }

  .search {
    flex: 0 1 380px;
  }

  .search-input {
    height: 48px;
  }

  .chips {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 4px;
  }

  .result-count {
    margin-top: 14px;
  }

  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }

  .card {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    border-radius: var(--radius-lg);
  }

  .card-media {
    border-radius: calc(var(--radius-lg) - 8px);
  }

  .card-body {
    height: 100%;
    padding: 16px 6px 6px;
  }

  .card-name {
    font-size: 1.32rem;
  }

  .card-tags:empty {
    display: block;
    min-height: 24px;
  }

  .card-foot {
    margin-top: auto;
    padding-top: 14px;
  }

  .card-more-text {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
  }

  .card-skeleton {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    gap: 12px;
    padding: 10px 10px 18px;
    border-radius: var(--radius-lg);
  }

  .sk-media {
    grid-row: auto;
    border-radius: calc(var(--radius-lg) - 8px);
  }

  .sk-line {
    margin-inline: 6px;
  }

  .product-dialog {
    width: calc(100% - 48px);
    max-width: 940px;
    max-height: calc(100dvh - 48px);
    margin: auto;
  }

  .dialog-card {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    max-height: calc(100dvh - 48px);
    border-bottom: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: 0 40px 90px -30px rgba(0, 8, 16, 0.7);
  }

  .product-dialog[open] .dialog-card {
    animation-name: dialog-in;
  }

  .dialog-media {
    aspect-ratio: 1;
    height: 100%;
  }

  .dialog-body {
    justify-content: center;
    padding: 56px 36px 36px;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .footer-copy {
    grid-column: 1 / -1;
  }
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: clamp(48px, 6vw, 96px);
    align-items: center;
  }

  .hero-lead {
    margin-top: 26px;
  }

  .hero-actions {
    margin-top: 36px;
  }

  .seal {
    top: auto;
    right: auto;
    bottom: 14%;
    left: -54px;
    width: 116px;
  }

  .values-list {
    display: flex;
    justify-content: center;
    gap: 0;
    padding: 22px 0;
  }

  .value {
    padding-inline: clamp(20px, 3vw, 44px);
  }

  .value + .value {
    border-left: 1px solid var(--line-strong);
  }

  .how-grid {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: clamp(48px, 7vw, 112px);
    align-items: start;
  }

  .how-head {
    position: sticky;
    top: calc(var(--header-h) + 40px);
  }

  .steps {
    gap: 0;
  }

  .step:not(:last-child)::before {
    top: 80px;
    left: 39px;
  }

  .step {
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 28px;
    padding-bottom: 52px;
  }

  .step-num {
    width: 80px;
    height: 80px;
    font-size: 1.7rem;
  }

  .step-body {
    padding-top: 16px;
  }
}

@media (min-width: 1120px) {
  .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
  }
}
