:root {
  --bg: #F6F6F3;
  --surface: #FFFFFF;
  --surface-2: #FAFAF8;
  --ink: #15171C;
  --muted: #5B6070;
  --line: #E3E3DE;
  --line-soft: #EDEDE8;
  --field: #D5D5CF;
  --accent: #17663F;
  --accent-ink: #135536;
  --accent-soft: #E3F1E8;
  --accent-row: #F3F9F5;
  --note-bg: #FFF3D6;
  --note-ink: #6E4700;
  --danger-ink: #8A3B12;
  --placeholder: #F0F0EC;
  --radius: 16px;
  --font: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Space Grotesk", var(--font);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.5; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }
button, input, select { font: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1240px; margin: 0 auto; padding-inline: 24px; }
.display { font-family: var(--display); letter-spacing: -0.02em; }
.muted { color: var(--muted); }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
/* --header-h is the header's height, kept current by app.js: anchor jumps and
   the sticky product photo stop below the header instead of under it */
html { scroll-padding-top: calc(var(--header-h, 72px) + 12px); }
.site-header .wrap { padding-block: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 24px; letter-spacing: -0.02em; }
.logo-mark { width: 34px; height: 34px; display: block; flex: none; }
.search { flex: 1 1 320px; display: flex; max-width: 560px; }
.search input { flex: 1; min-width: 0; height: 44px; padding: 0 16px; border: 1px solid var(--field); border-right: 0; border-radius: 10px 0 0 10px; font-size: 15px; background: var(--surface-2); }
.search button { height: 44px; padding: 0 18px; border: 0; border-radius: 0 10px 10px 0; background: var(--ink); color: #fff; font-weight: 600; cursor: pointer; }
.main-nav { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 15px; font-weight: 500; }

/* Hero */
.hero { padding-block: 40px 24px; }
.eyebrow { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; }
.hero h1 { margin: 0; max-width: 820px; font-family: var(--display); font-weight: 600; font-size: clamp(32px, 4.2vw, 46px); line-height: 1.05; letter-spacing: -0.03em; }
.ad-slot { position: relative; margin-top: 24px; min-height: 90px; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 12px; }
.ad-label { position: absolute; top: 6px; right: 10px; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
/* opens the product page; .product-main spaces its children 32px apart, which is too far from the breadcrumb */
.ad-slot.ad-top { margin: 0 0 -16px; }
/* catalog page: first thing in its section, 16px above the breadcrumb like the product page */
.ad-slot.ad-catalog { margin: 0 0 16px; }
/* home: above the headline, 24px under the header like the other pages (.hero has 40px top padding) */
.ad-slot.ad-home { margin: -16px 0 24px; }
/* Empty slots only show on a local copy (app.js adds .show-ad-placeholders on
   localhost); on the live site they stay hidden until real ad code goes in. */
.ad-placeholder { display: none; }
.show-ad-placeholders .ad-placeholder { display: flex; border: 1px dashed var(--field); background: var(--surface); }
.ad-placeholder::after { content: "Espacio publicitario · 728 × 90"; font-size: 13px; color: var(--muted); }
.lede { margin: 18px 0 0; max-width: 640px; font-size: 18px; color: var(--muted); }
.badges { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; font-size: 14px; color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }

/* Toolbar */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 44px; padding: 0 18px; border-radius: 999px; font-size: 15px; font-weight: 600; background: var(--surface); color: var(--ink); border: 1px solid var(--field); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip:disabled { background: transparent; color: #7E828C; border-style: dashed; cursor: not-allowed; }
.chips-sub { margin: -6px 0 18px; }
.chip-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.sort { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.sort select { height: 44px; padding: 0 12px; border: 1px solid var(--field); border-radius: 10px; background: var(--surface); }

/* Product grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .15s, border-color .15s; }
.card:hover { color: var(--ink); border-color: #B9C9BE; box-shadow: 0 6px 24px rgba(21, 23, 28, .07); }
.card-media { height: 168px; background: var(--placeholder); display: flex; align-items: center; justify-content: center; position: relative; }
.pill { position: absolute; top: 12px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill.year { left: 12px; background: var(--surface); color: var(--muted); }
.pill.save { right: 12px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
.card-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card-title { margin: 0; font-family: var(--display); font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.card-sub { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.swatches { display: flex; gap: 6px; }
.swatch { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(21, 23, 28, .18); flex: none; }
.card-price { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 4px; }
.card-price .small { font-size: 13px; color: var(--muted); }
.card-price .big { font-family: var(--display); font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.save-text { color: var(--accent-ink); }

.note { display: inline-block; margin: 16px 0 0; padding: 6px 12px; border-radius: 8px; background: var(--note-bg); color: var(--note-ink); font-size: 13px; font-weight: 500; }
.tag { padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.tag.sample { background: var(--note-bg); color: var(--note-ink); }
.tag.old { background: var(--note-bg); color: var(--note-ink); margin-right: 6px; }
.pill.pill-old { background: var(--note-bg); color: var(--note-ink); }
.tag.best { background: var(--accent); color: #fff; font-weight: 700; }

/* Home sections */
.home-section { padding-block: 24px 40px; }
.home-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; margin-bottom: 20px; }
.home-head .page-title { margin: 0; font-family: var(--display); font-size: clamp(30px, 4vw, 40px); font-weight: 600; letter-spacing: -0.02em; }
.main-nav a[aria-current="page"] { color: var(--accent); }
.main-nav { align-items: center; }
.main-nav .nav-cta, .main-nav .nav-cta[aria-current="page"] { height: 40px; padding: 0 16px; border-radius: 10px; color: #fff; }
.home-head h2 { margin: 0; font-family: var(--display); font-size: clamp(26px, 3vw, 32px); font-weight: 600; letter-spacing: -0.02em; }
.home-head p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.home-head .link { font-weight: 600; color: var(--accent); white-space: nowrap; }

.featured { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.feature { position: relative; display: flex; align-items: center; gap: 16px; padding: 18px 18px 18px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); height: 100%; transition: box-shadow .15s, border-color .15s; }
.feature:hover { color: var(--ink); border-color: #B9C9BE; box-shadow: 0 6px 24px rgba(21, 23, 28, .07); }
.rank { position: absolute; top: -10px; left: -6px; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--display); font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.feature-media { flex: none; width: 76px; height: 96px; border-radius: 12px; background: var(--placeholder); display: flex; align-items: center; justify-content: center; }
.feature-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.feature-body .card-title { font-size: 19px; }
.views { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.feature-price { font-size: 14px; color: var(--muted); }
.feature-price strong { color: var(--ink); font-family: var(--display); font-size: 18px; }
.pill-inline { padding: 1px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: 12px; font-weight: 700; }

.deals-band { background: var(--surface); border-block: 1px solid var(--line); }
.deals { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.deal { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); transition: box-shadow .15s, border-color .15s; }
.deal:hover { color: var(--ink); border-color: #B9C9BE; box-shadow: 0 6px 24px rgba(21, 23, 28, .07); }
.deal-pct { align-self: flex-start; margin-bottom: 8px; padding: 4px 10px; border-radius: 8px; background: var(--accent); color: #fff; font-family: var(--display); font-size: 20px; font-weight: 700; }
.deal-head { display: flex; align-items: flex-start; gap: 8px; }
.deal-head .card-title { font-size: 19px; line-height: 1.25; }
/* centered on the title's first line, so a two-line name doesn't float the dot */
.deal-head .swatch { margin-top: 3px; }
.deal .card-sub { margin: 0 0 8px; }
.deal .big { font-family: var(--display); font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.deal .small { font-size: 13px; color: var(--muted); }
.deal-save { margin-top: 8px; font-size: 14px; font-weight: 600; color: var(--accent-ink); }

/* Panels (chart, error messages) */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.panel h3 { margin: 0 0 6px; font-size: 18px; }
.panel p { margin: 0; color: var(--muted); font-size: 15px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.site-footer .wrap { padding-block: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-links a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.footer-links a:hover { color: var(--ink); }

/* Text pages (sobre.html, privacidad.html) */
.prose-page { padding-block: 24px 64px; }
.prose { max-width: 720px; margin-top: 20px; font-size: 16px; line-height: 1.65; }
.prose h1 { margin: 0 0 8px; font-family: var(--display); font-size: clamp(30px, 4vw, 40px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.prose h2 { margin: 36px 0 8px; font-family: var(--display); font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.prose p, .prose ul { margin: 0 0 14px; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose-lede { font-size: 18px; color: var(--muted); }

/* Product page */
.product-main { padding-block: 24px 56px; display: flex; flex-direction: column; gap: 32px; }
.product-main > * { min-width: 0; } /* let the wide table scroll in its box instead of widening the page */
.crumbs { font-size: 14px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.crumbs [aria-current] { color: var(--ink); font-weight: 500; }
.product-top { display: flex; flex-wrap: wrap; gap: 32px; }
.product-media { flex: 1 1 360px; min-height: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; font-size: 13px; color: var(--muted); }
/* long option lists (watch bands) make the info column tall: keep the photo at the top, in view */
.product-media { align-self: flex-start; position: sticky; top: calc(var(--header-h, 72px) + 16px); }
.product-info { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.meta { margin: 0 0 6px; font-size: 14px; color: var(--muted); }
.meta code { color: var(--ink); font-weight: 700; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; }
.product-info h1 { margin: 0; font-family: var(--display); font-size: clamp(34px, 4vw, 48px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; }
fieldset { border: 0; margin: 0; padding: 0; }
legend { padding: 0; margin-bottom: 10px; font-size: 14px; font-weight: 600; }
.options { display: flex; flex-wrap: wrap; gap: 10px; }
.opt { min-width: 96px; height: 48px; padding: 0 18px; border-radius: 12px; font-weight: 600; cursor: pointer; background: var(--surface); color: var(--ink); border: 1px solid var(--field); }
.opt[aria-pressed="true"] { background: var(--ink); color: #fff; border: 2px solid var(--ink); }
.color-opt { width: 48px; height: 48px; padding: 0; border-radius: 50%; background: var(--surface); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--field); }
.color-opt[aria-pressed="true"] { border: 2px solid var(--ink); }
.option-groups { display: flex; flex-direction: column; gap: 22px; }
.spec { margin: 8px 0 0; font-size: 17px; color: var(--muted); }
/* Choosing this value changes another option (that combination isn't sold) */
.opt.opt-alt, .color-opt.opt-alt { border-style: dashed; color: var(--muted); }
.color-opt span { width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(21, 23, 28, .18); }
.best-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-end; justify-content: space-between; }
.best-box .price { font-family: var(--display); font-size: 44px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.stack { display: flex; flex-direction: column; gap: 2px; }
.card-box { padding: 12px 16px; border-radius: 12px; background: var(--accent-soft); }
.card-box .label { font-size: 13px; color: var(--accent-ink); font-weight: 600; }
.card-box .value { font-family: var(--display); font-size: 26px; font-weight: 700; color: #0F4A2E; }
.btn { height: 48px; padding: 0 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--accent); color: #fff; font-weight: 600; border: 0; cursor: pointer; }
.btn:hover { color: #fff; filter: brightness(1.1); }
.best-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.best-actions .btn-outline { height: 48px; padding: 0 18px; font-size: 15px; }
.btn svg { margin-left: 8px; flex: none; }
.btn-outline { height: 44px; padding: 0 16px; display: inline-flex; align-items: center; border: 1px solid var(--field); border-radius: 10px; font-weight: 600; font-size: 14px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.section-head h2 { margin: 0; font-family: var(--display); font-size: 28px; font-weight: 600; letter-spacing: -0.02em; }
.table-box { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 16px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
th { font-size: 13px; font-weight: 600; color: var(--muted); background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
tr.is-best { background: var(--accent-row); }
tr.no-stock { color: #6A6E78; }
.store-cell { display: flex; align-items: center; gap: 10px; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.td-price { font-family: var(--display); font-size: 18px; font-weight: 700; }
.td-sub { display: block; font-size: 12px; color: var(--muted); }
.stock-yes { color: var(--accent-ink); font-weight: 600; }
.stock-no { color: var(--danger-ink); font-weight: 600; }
.bottom-row { display: flex; flex-wrap: wrap; gap: 24px; }
.chart-panel { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.chart-panel h2 { margin: 0; font-family: var(--display); font-size: 24px; font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 18px; height: 3px; border-radius: 2px; display: inline-block; }
.chart svg { display: block; width: 100%; height: auto; font-family: var(--font); }
.alert-form { flex: 1 1 320px; background: var(--ink); color: #fff; border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.alert-form h2 { margin: 0; font-family: var(--display); font-size: 24px; font-weight: 600; }
.alert-form p { margin: 0; font-size: 14px; color: #C5C8D0; }
.alert-form label { font-size: 14px; font-weight: 600; }
.alert-form input { height: 48px; padding: 0 14px; border-radius: 10px; border: 1px solid #3A3D46; background: #22252C; color: #fff; }
.alert-form input::placeholder { color: #9EA2AC; }
.alert-form button { height: 48px; border: 0; border-radius: 10px; background: #fff; color: var(--ink); font-weight: 700; cursor: pointer; }
.alert-form h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.alert-form .soon { font-family: var(--font); font-size: 12px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: #F4C95D; color: var(--ink); }
.alert-form input:disabled, .alert-form button:disabled { opacity: .5; cursor: not-allowed; }
.alert-form .status { padding: 10px 12px; border-radius: 10px; background: #1F3A2B; color: #BFE8CF; }
.error-box { padding: 32px; text-align: center; }

/* Product photos (transparent WebP, trimmed to the device) */
.device-img { display: block; max-width: 100%; height: auto; object-fit: contain; }
.card-media { background: var(--surface-2); }
.card-media .device-img { width: 78%; height: 140px; }
.feature-media { background: var(--surface-2); }
.feature-media .device-img { width: 64px; height: 84px; }
#media .device-img { width: min(100%, 340px); height: 340px; }
.deal { padding-right: 104px; }
.deal-img { position: absolute; top: 16px; right: 16px; width: 80px; height: 96px; object-fit: contain; }

/* ---------------------------------------------------------------------------
   Phones. Header packs logo + nav on one row with search below; lists go two
   up; the store table becomes one card per store so nothing scrolls sideways.
   ------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .wrap { padding-inline: 16px; }

  .site-header .wrap { padding-block: 10px 12px; gap: 10px 12px; flex-wrap: wrap; }
  .logo { flex: none; font-size: 21px; gap: 8px; }
  .logo-mark { width: 30px; height: 30px; }
  /* nav takes the rest of the logo row and scrolls sideways on very narrow phones */
  .main-nav { order: 2; flex: 1 1 0; min-width: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 12px; font-size: 14px; white-space: nowrap; }
  .main-nav > :first-child { margin-left: auto; }
  /* three links (home, catalog) don't fit beside the logo on a phone:
     give them their own row under the search box */
  .main-nav:has(> :nth-child(3)) { order: 4; flex: 1 1 100%; justify-content: flex-start; gap: 20px; overflow: visible; }
  .main-nav:has(> :nth-child(3)) > :first-child { margin-left: 0; }
  .search { order: 3; flex: 1 1 100%; max-width: none; }
  .search input { font-size: 16px; } /* 16px keeps iOS from zooming on focus */

  .hero { padding-block: 28px 8px; }
  .ad-slot { margin-top: 18px; min-height: 100px; }
  .ad-slot.ad-home { margin: -4px 0 20px; } /* .hero has 28px top padding on phones: 24px under the header */
  .ad-placeholder::after { content: "Espacio publicitario · 320 × 100"; }
  .lede { font-size: 16px; margin-top: 14px; }
  .badges { margin-top: 18px; gap: 8px; font-size: 13px; }

  .home-section { padding-block: 20px 32px; }
  .home-head { margin-bottom: 16px; }
  .home-head p { font-size: 14px; }

  /* category chips scroll sideways instead of wrapping into rows */
  .toolbar { gap: 12px; margin-bottom: 16px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding: 2px 16px; scrollbar-width: none; width: calc(100% + 32px); }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; height: 40px; padding: 0 16px; font-size: 14px; }
  .sort { width: 100%; }
  .sort select { flex: 1; font-size: 16px; }

  /* catalog cards and deals, two per row */
  .grid, .deals { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card-media { height: 116px; }
  .card-media svg { max-height: 76px; width: auto; }
  .card-media .device-img { height: 96px; width: 80%; }
  .feature-media .device-img { width: 52px; height: 68px; }
  #media .device-img { height: 190px; }
  .deal { padding-right: 14px; }
  .deal-img { position: static; align-self: center; width: 100%; height: 84px; margin-bottom: 8px; }
  .pill { top: 8px; padding: 2px 7px; font-size: 11px; }
  .pill.year { left: 8px; }
  .pill.save { right: 8px; }
  .card-body { padding: 12px 12px 14px; gap: 8px; }
  .card-title { font-size: 17px; line-height: 1.2; }
  .card-sub { font-size: 13px; }
  .swatches { flex-wrap: wrap; gap: 4px; }
  .swatch { width: 14px; height: 14px; }
  .card-price { padding-top: 8px; gap: 2px; }
  .card-price .small { font-size: 12px; }
  .card-price .big { font-size: 20px; }

  .deal { padding: 14px; gap: 2px; }
  .deal-pct { font-size: 16px; padding: 3px 8px; margin-bottom: 6px; }
  .deal-head { gap: 6px; align-items: flex-start; }
  .deal-head .card-title { font-size: 16px; }
  .deal .card-sub { font-size: 12px; margin-bottom: 6px; }
  .deal .big { font-size: 20px; }
  .deal .small { font-size: 12px; }
  .deal-save { font-size: 13px; margin-top: 6px; }

  .featured { gap: 14px; }
  .feature { padding: 14px 14px 14px 18px; gap: 14px; }
  .feature-media { width: 60px; height: 76px; }
  .feature-media svg { max-height: 56px; width: auto; }

  /* product page */
  .product-main { padding-block: 16px 40px; gap: 28px; }
  .product-top { gap: 20px; }
  .product-media { position: static; align-self: stretch; flex-basis: 100%; min-height: 0; height: 220px; border-radius: var(--radius); gap: 10px; }
  .product-media svg { max-height: 140px; width: auto; }
  .product-info { flex-basis: 100%; gap: 20px; }
  .spec { font-size: 16px; margin-top: 4px; }
  .options { gap: 8px; }
  .opt { min-width: 0; flex: 1 1 calc(33% - 8px); height: 46px; padding: 0 12px; }
  .best-box { padding: 18px; gap: 16px; }
  .best-box > * { flex: 1 1 100%; }
  .best-box .price { font-size: 38px; }
  .best-actions > * { flex: 1 1 auto; }
  .section-head h2, .chart-panel h2, .alert-form h2 { font-size: 22px; }

  .table-box { overflow: visible; }
  .table-box table, .table-box tbody { display: block; }
  .table-box thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-box tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
  .table-box tbody tr:last-child { border-bottom: 0; }
  .table-box td { padding: 0; border: 0; white-space: normal; }
  .td-store { grid-column: 1; grid-row: 1; }
  .store-cell { flex-wrap: wrap; gap: 6px 10px; }
  .td-price { grid-column: 2; grid-row: 1; text-align: right; }
  .td-card, .td-inst { grid-column: 1 / -1; font-size: 14px; }
  .td-card::before, .td-inst::before { content: attr(data-label) ": "; color: var(--muted); }
  .td-card .td-sub { display: inline; margin-left: 6px; }
  .td-empty { display: none; }
  .td-stock { grid-column: 1; font-size: 14px; }
  .td-act { grid-column: 2; text-align: right; }
  .td-act .btn-outline { height: 40px; padding: 0 14px; }

  .bottom-row { gap: 20px; }
  .chart-panel { flex-basis: 100%; padding: 18px; }
  .alert-form { flex-basis: 100%; padding: 20px; }
  .alert-form input { font-size: 16px; }

  .site-footer .wrap { padding-block: 22px; font-size: 13px; }
}

/* ---------------------------------------------------------------------------
   Motion. Everything is opt-in via prefers-reduced-motion: no-preference, so
   people who turn animations off in their OS get a static page. Elements
   animated on render carry --i (their position) for a short stagger.
   ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  /* in-page links (Destacados, Descuentos, Mis alertas, Ver todas las tiendas) glide instead of jumping */
  html { scroll-behavior: smooth; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
  @keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }
  @keyframes price-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
  @keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
  @keyframes shimmer { from { background-position: -400px 0; } to { background-position: 400px 0; } }
  @keyframes glow { 0% { box-shadow: 0 0 0 0 rgba(23, 102, 63, .35); } 100% { box-shadow: 0 0 0 14px rgba(23, 102, 63, 0); } }

  /* lists that render (or re-render on filter): cards, Destacados, deals */
  /* "backwards": hold only the start state, so :hover's transform works after */
  .card, .feature, .deal {
    animation: rise .45s cubic-bezier(.2, .7, .2, 1) backwards;
    animation-delay: calc(min(var(--i, 0), 12) * 45ms);
  }
  .hero > *, .home-head, .product-top, #ofertas, .bottom-row { animation: rise .55s cubic-bezier(.2, .7, .2, 1) backwards; }
  .product-top { animation-duration: .4s; }
  .hero > :nth-child(2) { animation-delay: 60ms; }
  .hero > :nth-child(3) { animation-delay: 120ms; }
  .hero > :nth-child(4) { animation-delay: 180ms; }
  .pill.save, .deal-pct, .rank { animation: pop .4s .25s cubic-bezier(.2, .7, .2, 1) both; }

  /* hover / press feedback */
  .card, .feature, .deal { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
  .card:hover, .feature:hover, .deal:hover { transform: translateY(-3px); }
  .btn, .btn-outline, .chip, .opt, .color-opt, .search button, .alert-form button {
    transition: transform .12s ease, background-color .15s ease, color .15s ease, border-color .15s ease, filter .15s ease;
  }
  .btn:active, .btn-outline:active, .chip:active, .opt:active, .color-opt:active,
  .search button:active, .alert-form button:active { transform: scale(.96); }
  .btn:hover svg { transform: translate(2px, -2px); }
  .btn svg { transition: transform .15s ease; }

  /* product page: price and store table update with the chosen variant */
  .best-box .price.changed, .card-box .value.changed { animation: price-in .35s ease both; }
  .best-box.changed { animation: glow .7s ease-out; }
  #offers tr { animation: fade .35s ease both; animation-delay: calc(var(--i, 0) * 50ms); }
  /* lines carry pathLength="1", so a dash of 1 is the whole line */
  .chart polyline.draw { stroke-dasharray: 1; animation: draw .9s cubic-bezier(.4, 0, .2, 1) both; }
  .chart polyline.ref { animation: fade .6s ease both; }  /* Apple's dashed reference line keeps its dashes */
  .chart circle { animation: pop .35s .7s ease both; transform-box: fill-box; transform-origin: center; }
  .alert-form .status { animation: rise .3s ease both; }

  /* Destacados while visit counts load */
  .featured.loading li {
    height: 132px; border-radius: var(--radius); border: 1px solid var(--line);
    background: linear-gradient(90deg, var(--surface) 0, var(--surface-2) 40%, #EEEEE9 50%, var(--surface-2) 60%, var(--surface) 100%) no-repeat;
    background-size: 800px 100%; animation: shimmer 1.2s linear infinite;
  }
}
