/* Public searcher + product ficha. Dark by default; light via data-theme. */

:root,
html[data-theme="dark"] {
  color-scheme: dark;
  --bg0: #071412;
  --bg1: #0d2420;
  --bg2: #081a17;
  --ink: #f2f7f4;
  --muted: #8fa39a;
  --accent: #d4f34a;
  --accent-ink: #102016;
  --line: rgba(242, 247, 244, 0.12);
  --panel: rgba(15, 40, 34, 0.72);
  --win: #d4f34a;
  --surface: rgba(7, 20, 18, 0.65);
  --surface-soft: rgba(7, 20, 18, 0.4);
  --surface-tabs: rgba(7, 20, 18, 0.55);
  --cam-panel: #0c1f1b;
  --img-wash: rgba(255, 255, 255, 0.06);
  --placeholder: rgba(143, 163, 154, 0.55);
  --glow-a: rgba(212, 243, 74, 0.16);
  --glow-b: rgba(46, 120, 98, 0.28);
  --stripe: rgba(242, 247, 244, 0.55);
  --stripe-soft: rgba(242, 247, 244, 0.35);
  --dot-ring: rgba(7, 20, 18, 0.35);
  --tooltip-bg: rgba(7, 20, 18, 0.92);
  --chart-grid: rgba(242, 247, 244, 0.08);
  --font-display: "Bricolage Grotesque", "Segoe UI", sans-serif;
  --font-body: "Figtree", "Segoe UI", sans-serif;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg0: #f3f6f1;
  --bg1: #e7efe8;
  --bg2: #dce8df;
  --ink: #102016;
  --muted: #5c7168;
  --accent: #c5e832;
  --accent-ink: #102016;
  --line: rgba(16, 32, 22, 0.12);
  --panel: rgba(255, 255, 255, 0.78);
  --win: #d4f34a;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-soft: rgba(255, 255, 255, 0.72);
  --surface-tabs: rgba(255, 255, 255, 0.7);
  --cam-panel: #ffffff;
  --img-wash: rgba(16, 32, 22, 0.04);
  --placeholder: rgba(92, 113, 104, 0.55);
  --glow-a: rgba(212, 243, 74, 0.28);
  --glow-b: rgba(46, 120, 98, 0.12);
  --stripe: rgba(16, 32, 22, 0.12);
  --stripe-soft: rgba(16, 32, 22, 0.08);
  --dot-ring: rgba(255, 255, 255, 0.65);
  --tooltip-bg: rgba(255, 255, 255, 0.96);
  --chart-grid: rgba(16, 32, 22, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: var(--font-body);
  background: var(--bg0);
}

body {
  position: relative;
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 55% at 50% -10%, var(--glow-a), transparent 55%),
    radial-gradient(circle at 90% 80%, var(--glow-b), transparent 40%),
    linear-gradient(165deg, var(--bg0), var(--bg1) 55%, var(--bg2));
  transition: background 0.25s ease;
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 2px,
    var(--stripe) 2px,
    var(--stripe) 3px,
    transparent 3px,
    transparent 7px,
    var(--stripe-soft) 7px,
    var(--stripe-soft) 9px,
    transparent 9px,
    transparent 14px
  );
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 70%);
  animation: drift 28s linear infinite;
}

html[data-theme="light"] .atmosphere::after {
  opacity: 0.28;
}

@keyframes drift {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-28px);
  }
}

.shell {
  position: relative;
  z-index: 1;
  width: min(44rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.search-chrome {
  position: relative;
}

/* —— Compact chrome after search: results take the stage —— */
body.has-results .shell,
.shell.has-results {
  padding-top: 0.85rem;
}

.shell.has-results .search-chrome {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0 -0.35rem;
  padding: 0.55rem 0.35rem 0.7rem;
  background: color-mix(in srgb, var(--bg0) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.shell.has-results .top {
  margin-bottom: 0.45rem;
  animation: none;
}

.shell.has-results .brand {
  font-size: 1.35rem;
  letter-spacing: -0.04em;
}

.shell.has-results .rate {
  display: none;
}

.shell.has-results .theme-toggle {
  min-width: 2.45rem;
  min-height: 2.45rem;
  height: 2.45rem;
  padding: 0 0.55rem;
}

.shell.has-results .theme-toggle .theme-label {
  display: none;
}

.shell.has-results .hero {
  animation: none;
}

.shell.has-results .headline,
.shell.has-results .lede,
.shell.has-results .scan-label {
  display: none;
}

.shell.has-results .mode-tabs {
  margin-top: 0;
  max-width: none;
  width: 100%;
  padding: 0.2rem;
}

.shell.has-results .city-tabs {
  margin-top: 0.4rem;
  max-width: none;
  width: 100%;
}

.shell.has-results .mode-tab {
  min-height: 2.25rem;
  font-size: 0.85rem;
  padding: 0.35rem 0.65rem;
}

.shell.has-results .city-tab {
  min-height: 2rem;
  font-size: 0.8rem;
  padding: 0.3rem 0.55rem;
}

.shell.has-results .scan {
  margin-top: 0.45rem;
}

.shell.has-results .scan-row {
  gap: 0.4rem;
}

.shell.has-results .scan-row input {
  padding: 0.65rem 0.85rem;
  font-size: 1rem;
  border-radius: 12px;
}

.shell.has-results .scan-row .btn-go,
.shell.has-results .scan-row .btn-cam {
  border-radius: 12px;
  padding: 0 0.9rem;
  font-size: 0.9rem;
}

.shell.has-results .scan-hint:not([hidden]) {
  margin-top: 0.4rem;
  font-size: 0.78rem;
}

.shell.has-results #results {
  margin-top: 0.35rem;
}

.shell.has-results .result {
  margin-top: 0.85rem;
}

.shell.has-results .foot {
  padding-top: 2rem;
  font-size: 0.75rem;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  animation: rise 0.7s ease both;
}

.top-tools {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
  max-width: 62%;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.nav-link {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
  padding: 0.35rem 0.55rem;
  border-radius: 0.55rem;
  border: 1px solid transparent;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--ink);
  text-decoration: none;
  border-color: var(--line);
}

.nav-link.is-current {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: transparent;
}

.nav-carrito {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
  padding: 0.35rem 0.55rem;
  border-radius: 0.55rem;
  border: 1px solid transparent;
  white-space: nowrap;
}

.nav-carrito:hover {
  color: var(--ink);
  text-decoration: none;
  border-color: var(--line);
}

.theme-toggle {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  width: auto;
  height: 2.75rem;
  padding: 0 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  margin: 0;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.theme-toggle:active {
  transform: translateY(1px);
}

.theme-toggle svg {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  display: block;
}

.theme-toggle .icon-moon,
.theme-toggle .icon-sun circle {
  fill: currentColor;
  stroke: none;
}

.theme-toggle .icon-sun path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.theme-toggle .theme-label {
  display: none;
}

.theme-toggle .icon-sun,
html[data-theme="light"] .theme-toggle .icon-moon {
  display: none !important;
}

html[data-theme="light"] .theme-toggle .icon-sun {
  display: block !important;
}

html[data-theme="dark"] .theme-toggle .icon-moon,
html:not([data-theme]) .theme-toggle .icon-moon {
  display: block !important;
}

.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 8vw, 3.4rem);
  letter-spacing: -0.05em;
  line-height: 0.95;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
  color: var(--accent);
}

.rate {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.hero {
  animation: rise 0.8s ease 0.08s both;
}

.headline {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.35rem, 4.2vw, 1.75rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  max-width: 16ch;
}

.lede {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.45;
  max-width: 32ch;
}

.mode-tabs {
  display: flex;
  gap: 0.25rem;
  margin-top: 1.5rem;
  padding: 0.3rem;
  width: 100%;
  max-width: 22rem;
  box-sizing: border-box;
  background: var(--surface-tabs);
  border: 1px solid var(--line);
  border-radius: 999px;
  -webkit-tap-highlight-color: transparent;
}

.city-tabs {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.75rem;
  padding: 0.25rem;
  width: 100%;
  max-width: 22rem;
  box-sizing: border-box;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  -webkit-tap-highlight-color: transparent;
}

.city-tabs--pdp {
  margin: 0 0 1.25rem;
  max-width: 26rem;
}

.city-tab {
  -webkit-appearance: none;
  appearance: none;
  flex: 1 1 0;
  min-width: 0;
  min-height: 2.35rem;
  margin: 0;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: -0.01em;
  color: var(--muted);
  text-decoration: none;
  text-align: center;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

a.city-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.city-tab:hover {
  color: var(--ink);
}

.city-tab.is-active {
  color: var(--accent-ink);
  background: var(--accent);
}

.city-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  vertical-align: middle;
  white-space: nowrap;
}

.city-scope {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.hits-meta--city {
  margin-bottom: 0.25rem;
}

.mode-tab {
  -webkit-appearance: none;
  appearance: none;
  flex: 1 1 0;
  min-width: 0;
  min-height: 2.75rem;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  color: var(--muted);
  text-decoration: none;
  text-align: center;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  border: 0;
  background: transparent;
  cursor: pointer;
  line-height: 1.2;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background 0.15s ease, color 0.15s ease;
}

.mode-tab:hover,
.mode-tab:focus-visible {
  color: var(--ink);
  text-decoration: none;
  outline: none;
}

.mode-tab.is-active {
  color: var(--accent-ink);
  background: var(--accent);
}

.scan {
  margin-top: 1.15rem;
}

.scan-label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.55rem;
}







.scan-row {
  display: flex;
  gap: 0.55rem;
  align-items: stretch;
}

.scan-row input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.scan-row input::placeholder {
  color: var(--placeholder);
  letter-spacing: 0;
}

.scan-row input:focus {
  border-color: color-mix(in srgb, var(--accent) 65%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.scan-row button,
.scan-row .btn-go,
.scan-row .btn-cam {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  border: 0;
  border-radius: 14px;
  padding: 0 1.2rem;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.scan-row .btn-go {
  background: var(--accent);
  color: var(--accent-ink);
}

.scan-row .btn-cam {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.scan-row .btn-go:hover,
.scan-row .btn-cam:hover {
  filter: brightness(1.05);
}

.scan-row button:active {
  transform: translateY(1px);
}

.scan-hint {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
  max-width: 36rem;
}

.scan-hint--soft {
  font-size: 0.78rem;
  opacity: 0.9;
}

.mode-switch-note {
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.65rem;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.35;
}

.mode-switch-note strong {
  color: var(--ink);
  font-weight: 600;
}

body.cam-open {
  overflow: hidden;
}

.cam-sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: end center;
  padding: 1rem;
  background: rgba(4, 12, 10, 0.72);
  backdrop-filter: blur(6px);
  animation: rise 0.25s ease both;
}

.cam-sheet[hidden] {
  display: none !important;
}

.cam-panel {
  width: min(28rem, 100%);
  background: var(--cam-panel);
  border: 1px solid var(--line);
  border-radius: 20px 20px 16px 16px;
  padding: 1rem 1rem 1.15rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.cam-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.cam-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cam-close {
  font: inherit;
  font-weight: 600;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  cursor: pointer;
}

.cam-reader {
  overflow: hidden;
  border-radius: 14px;
  background: #000;
  min-height: 220px;
}

.cam-reader video,
.cam-reader img {
  display: block;
  width: 100% !important;
  max-height: 55dvh;
  object-fit: cover;
  border-radius: 14px;
}

.cam-note {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.result {
  margin-top: 2.25rem;
  animation: rise 0.55s ease both;
}

#results.is-loading {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

#results:empty {
  display: none;
}

.state {
  padding: 1.35rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  backdrop-filter: blur(10px);
}

.state-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
}

.state-copy {
  margin: 0.45rem 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.match {
  display: grid;
  gap: 1.1rem;
}

.match-main {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1rem;
  align-items: center;
}

.match-img {
  width: 5.5rem;
  height: 5.5rem;
  object-fit: contain;
  border-radius: 16px;
  background: var(--img-wash);
  border: 1px solid var(--line);
}

.match-img--empty,
.match-img--ph {
  background: transparent;
  object-fit: cover;
  padding: 0;
}

.match-brand {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.match-name {
  margin: 0.2rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3.5vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-transform: uppercase;
}

.match-ean {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
}

.winner {
  padding: 1.25rem 1.3rem;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(212, 243, 74, 0.95), #b6e028);
  color: #102016;
  animation: pop 0.55s cubic-bezier(0.2, 0.85, 0.25, 1.15) both;
}

.winner-kicker {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  opacity: 0.75;
}

.winner-store {
  margin: 0.35rem 0 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.winner-price {
  margin: 0.45rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.9rem;
  align-items: baseline;
}

.winner-usd {
  font-family: var(--font-display);
  font-size: clamp(2rem, 7vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.winner-ves {
  font-size: 0.95rem;
  opacity: 0.75;
  font-variant-numeric: tabular-nums;
}

.ladder {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--panel);
  backdrop-filter: blur(10px);
}

.rung {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  grid-template-areas:
    "rank store price"
    "rank date price";
  gap: 0.1rem 0.75rem;
  align-items: center;
  padding: 0.95rem 1.05rem;
  border-top: 1px solid var(--line);
  animation: rise 0.45s ease both;
}

.rung:first-child {
  border-top: 0;
}

.rung:nth-child(1) {
  animation-delay: 0.05s;
}
.rung:nth-child(2) {
  animation-delay: 0.12s;
}
.rung:nth-child(3) {
  animation-delay: 0.18s;
}

.rung--win {
  background: color-mix(in srgb, var(--store, var(--accent)) 12%, transparent);
  box-shadow: inset 3px 0 0 var(--store, var(--accent));
}

.rung-rank {
  grid-area: rank;
  width: 1.55rem;
  height: 1.55rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  border: 1px solid var(--line);
}

.rung--win .rung-rank {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
}

.rung-store {
  grid-area: store;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.store-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px var(--dot-ring);
}

.store-dot--on-win {
  box-shadow: 0 0 0 2px rgba(16, 32, 22, 0.2);
}

.rung-price {
  grid-area: price;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.rung-price strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
}

.rung-price em,
.rung-ves {
  display: block;
  font-style: normal;
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 0.15rem;
  font-variant-numeric: tabular-nums;
}

.rung-date {
  grid-area: date;
  color: var(--muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.fine {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.hits-meta {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.hits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.hits > li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
  align-items: stretch;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
  animation: rise 0.45s ease both;
}

.hit {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 0.75rem;
  align-items: center;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.hit:hover {
  text-decoration: none;
}

.hit-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 12px;
  background: var(--img-wash);
}

.hit-img--empty,
.hit-img--ph {
  background: transparent;
  object-fit: cover;
  padding: 0;
}

.hit-copy {
  min-width: 0;
}

.hit-brand {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hit-name {
  margin: 0.15rem 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  line-height: 1.25;
  text-transform: uppercase;
}

.hit-price {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.hit-price strong {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-right: 0.35rem;
}

.hit-ves {
  display: inline;
  margin-right: 0.35rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.hit-price em {
  font-style: normal;
  opacity: 0.8;
}

.hit-compare {
  align-self: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent);
  text-decoration: none;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  white-space: nowrap;
  text-align: center;
  line-height: 1.2;
}

.hit-compare:hover {
  text-decoration: none;
  filter: brightness(1.05);
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.85rem;
}

.trust-chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
}

.trust-chip--soft {
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--line);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

.fine--disclaimer {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.pdp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.action-btn {
  appearance: none;
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
}

.action-btn:hover {
  filter: brightness(1.05);
}

.action-btn.is-on {
  background: var(--surface);
  border-color: var(--accent);
  color: var(--ink);
}

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

.cart-savings {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-ink);
  background: color-mix(in srgb, var(--accent) 35%, transparent);
  padding: 0.45rem 0.65rem;
  border-radius: 0.55rem;
}

.cart-share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.foot {
  margin-top: auto;
  padding-top: 3rem;
  color: var(--muted);
  font-size: 0.82rem;
  display: grid;
  gap: 0.35rem;
  animation: rise 0.9s ease 0.15s both;
}

.foot p {
  margin: 0;
}

.muted {
  color: var(--muted);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 520px) {
  .brand {
    font-size: clamp(1.75rem, 8.5vw, 2.35rem);
    min-width: 0;
  }

  .top-tools {
    max-width: none;
  }

  .top-nav .nav-link:not(.nav-carrito) {
    display: none;
  }

  .rate {
    display: none;
  }

  .theme-toggle {
    min-width: 3rem;
    min-height: 3rem;
    height: 3rem;
    padding: 0 0.85rem;
    gap: 0.4rem;
  }

  .theme-toggle .theme-label {
    display: inline;
  }

  .shell.has-results .theme-toggle {
    min-width: 2.6rem;
    min-height: 2.6rem;
    height: 2.6rem;
    padding: 0;
  }

  .shell.has-results .theme-toggle .theme-label {
    display: none;
  }

  .shell.has-results .brand {
    font-size: 1.2rem;
  }

  .shell.has-results .search-chrome {
    margin: 0 -0.25rem;
    padding: 0.45rem 0.25rem 0.6rem;
  }

  .shell.has-results .scan-row .btn-cam,
  .shell.has-results .scan-row .btn-go {
    flex: 0 0 auto;
    padding: 0.65rem 0.8rem;
  }

  .shell.has-results .scan-row input {
    flex: 1 1 auto;
  }

  .mode-tabs {
    max-width: none;
  }

  .mode-tab {
    min-height: 3rem;
    font-size: 1rem;
  }

  .scan-row {
    flex-wrap: wrap;
  }

  .scan-row input {
    flex: 1 1 100%;
  }

  .scan-row .btn-cam,
  .scan-row .btn-go {
    flex: 1 1 calc(50% - 0.3rem);
    padding: 0.95rem 1rem;
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
  }

  .shell.has-results .scan-row {
    flex-wrap: nowrap;
  }

  .match-main {
    grid-template-columns: 4.5rem 1fr;
  }

  .match-img {
    width: 4.5rem;
    height: 4.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .atmosphere::after,
  .top,
  .hero,
  .result,
  .rung,
  .winner,
  .foot,
  .pdp,
  .chart-card {
    animation: none;
  }
}

/* —— Product detail (PDP) —— */

.shell--product {
  width: min(52rem, calc(100% - 2rem));
}

.back-row {
  margin: -1rem 0 1.75rem;
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  animation: rise 0.55s ease both;
}

.back-row .dot {
  opacity: 0.5;
}

.pdp {
  display: grid;
  gap: 1.35rem;
  animation: rise 0.6s ease 0.05s both;
}

.pdp-hero {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1.15rem;
  align-items: center;
}

.pdp-img {
  width: 7rem;
  height: 7rem;
  object-fit: contain;
  border-radius: 18px;
  background: var(--img-wash);
  border: 1px solid var(--line);
}

.pdp-img--empty,
.pdp-img--ph {
  background: transparent;
  object-fit: cover;
  padding: 0;
}

.pdp-brand {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pdp-name {
  margin: 0.25rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
  text-transform: uppercase;
}

.pdp-meta {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
}

.pdp-block {
  display: grid;
  gap: 0.75rem;
}

.pdp-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.pdp-section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pdp-section-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.chart-card {
  padding: 1rem 0.85rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  backdrop-filter: blur(10px);
  height: 15.5rem;
  animation: rise 0.55s ease both;
}

.chart-card canvas {
  width: 100% !important;
  height: 100% !important;
}

.hits--similar {
  gap: 0.55rem;
}

.hits--similar > li {
  grid-template-columns: 1fr;
}

.hit-price .store-dot {
  margin: 0 0.15rem 0 0.35rem;
  vertical-align: middle;
}

@media (max-width: 520px) {
  .pdp-hero {
    grid-template-columns: 5.25rem 1fr;
  }

  .pdp-img {
    width: 5.25rem;
    height: 5.25rem;
  }

  .chart-card {
    height: 14rem;
    padding-left: 0.45rem;
    padding-right: 0.45rem;
  }
}
