/* Design tokens from the owner's final UI spec (PROYECTO 90-90, Día 14 "Guía de Estilos y
   Especificaciones UI/UX"). Ratio 80/15/5: lila pastel base, olive for borders, icons and reading
   text, gold only on calls to action. Fonts are self-hosted (static/fonts, SIL OFL) so the CSP
   stays 'self'. */
@font-face { font-family: "Playfair Display"; src: url("/static/fonts/playfair-display.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/static/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
:root {
  --color-base: #EFE5FD;        /* lila pastel, 80%: page background */
  --color-surface: #FAF6F1;     /* blanco lino: cards, fields and the highlight box */
  --color-olive: #3D4A3E;       /* 15%: thin borders, card edges, icons, reading text */
  --color-olive-dark: #2C3A2E;  /* headings, text on gold */
  --color-gold: #D4AF37;        /* 5%: calls to action only */
  --color-gold-hover: #E5C158;
  --color-text: var(--color-olive);
  --font-heading: "Playfair Display", "Cormorant Garamond", "Lora", Georgia, serif;
  --font-body: "Inter", "Helvetica Neue", "Montserrat", system-ui, sans-serif;
  --tap-target: 48px;           /* spec: buttons at least 48px ... */
  --tap-ideal: 54px;            /* ... ideally 54px */
  --text-min: 14px;             /* no instruction, price or alert text below 14px */
  --radius: 12px;
}
[hidden] { display: none !important; }
html { background: var(--color-base); color: var(--color-text); font-family: var(--font-body); line-height: 1.5; }
body { margin: 0; padding: 0 16px 32px; font-size: max(var(--text-min), 1rem); }
.site-header, main, footer { max-width: 40rem; margin: 0 auto; }
a { color: var(--color-olive-dark); text-underline-offset: 3px; }
h1, h2, h3, .brand-name { font-family: var(--font-heading); color: var(--color-olive-dark); font-weight: 600; line-height: 1.2; }
h1 { font-size: 2rem; margin: 24px 0 12px; }          /* titles 24-32px */
h2 { font-size: 1.5rem; margin: 24px 0 8px; }
h3 { font-size: 1.25rem; margin: 0 0 4px; }
.site-header { padding: 20px 0 12px; border-bottom: 1px solid var(--color-olive); text-align: center; }
.brand-name { display: block; margin: 0; font-size: 2rem; text-decoration: none; }
.slogan { margin: 4px 0 0; font-family: var(--font-heading); font-style: italic; font-size: 1.125rem; }
.hero { background: var(--color-surface); border: 1px solid var(--color-olive); border-radius: var(--radius); padding: 16px; margin: 24px 0; }
.hero p:first-child { margin-top: 0; }
label { display: block; font-weight: 600; margin-bottom: 6px; }
input, select { box-sizing: border-box; min-height: var(--tap-target); padding: 0 12px; font: inherit; color: var(--color-text); background: var(--color-surface); border: 1px solid var(--color-olive); border-radius: 8px; }
input, select { width: 100%; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 400; }
.check input { flex: none; width: 24px; min-height: 24px; height: 24px; margin: 0; padding: 0; accent-color: var(--color-olive); }
button, .cta { box-sizing: border-box; display: flex; align-items: center; justify-content: center; width: 100%; min-height: var(--tap-ideal); margin: 8px 0; padding: 0 20px; background: var(--color-gold); color: var(--color-olive-dark); border: 0; border-radius: 8px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
button:hover, .cta:hover { background: var(--color-gold-hover); }
button.secondary { background: transparent; border: 1px solid var(--color-olive); min-height: var(--tap-target); }
button.secondary:hover { background: var(--color-surface); }
button:focus-visible, .cta:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--color-olive-dark); outline-offset: 2px; }
.search { margin: 16px 0; }
.card { background: var(--color-surface); border: 1px solid var(--color-olive); border-radius: var(--radius); padding: 16px; margin: 16px 0; }
.card h2 { font-size: 1.5rem; margin: 0 0 4px; }
.card h2 a, .card h3 a { text-decoration: none; }
.card h2 a:hover, .card h3 a:hover { text-decoration: underline; }
/* product photo (owner's spec: large and sharp on the product page, thin olive border) */
.photo { float: left; width: 88px; height: 88px; margin: 0 12px 8px 0; object-fit: contain; border: 1px solid var(--color-olive); border-radius: var(--radius); }
.photo.big { float: none; display: block; width: 100%; max-width: 400px; height: auto; aspect-ratio: 1; margin: 0 auto 16px; }
.card h3 { clear: left; }
.card h3:not(:first-child) { font-family: var(--font-body); font-size: 1rem; margin-top: 16px; }
.brand { margin: 0 0 8px; font-size: var(--text-min); text-transform: uppercase; letter-spacing: 0.06em; }
.price { font-weight: 700; color: var(--color-olive-dark); }
.offers { list-style: none; padding: 0; margin: 0; }
.offers li { padding: 8px 0; border-top: 1px solid var(--color-base); }
.totals { background: var(--color-surface); border: 1px solid var(--color-olive); border-radius: var(--radius); padding: 4px 16px 16px; margin: 24px 0; }
.note { font-size: var(--text-min); }
.brand-prices { width: 100%; border-collapse: collapse; margin: 16px 0; }
.brand-prices th, .brand-prices td { text-align: left; vertical-align: top; padding: 8px 8px 8px 0; border-top: 1px solid var(--color-base); }
.brand-prices th { font-size: var(--text-min); }
footer { margin-top: 32px; padding-top: 12px; border-top: 1px solid var(--color-olive); font-size: var(--text-min); text-align: center; }
@media (min-width: 600px) {
  button, .cta { display: inline-flex; width: auto; }
  .search form, form.search { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
  .search label { width: 100%; }
  .search input { flex: 1; width: auto; min-height: var(--tap-ideal); }
  .offers li { display: flex; align-items: center; gap: 12px; }
  .offers .cta { margin: 0 0 0 auto; }
  select { width: auto; }
  .search button { margin: 0; }
}
/* search filters (_filters.html): olive outline chips, no gold (gold stays on the actions) */
.filters { margin: 8px 0 12px; }
.filters summary { box-sizing: border-box; display: flex; align-items: center; min-height: var(--tap-target); padding: 0 16px; border: 1px solid var(--color-olive); border-radius: 8px; font-weight: 600; cursor: pointer; }
.filters[open] summary { background: var(--color-surface); }
.facet-title { margin: 16px 0 6px; font-weight: 600; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.chip { box-sizing: border-box; display: inline-flex; align-items: center; gap: 4px; min-height: var(--tap-target); padding: 0 14px; border: 1px solid var(--color-olive); border-radius: 24px; background: var(--color-surface); text-decoration: none; }
.chip.on { background: var(--color-olive); color: var(--color-surface); }
.chip .count { font-size: var(--text-min); }
.picked { margin: 8px 0; align-items: center; }
.clear { display: inline-flex; align-items: center; min-height: var(--tap-target); padding: 0 4px; }
.count-line { font-size: var(--text-min); margin: 8px 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* home: the four routine steps as outline buttons, two per row on a phone (no gold: the gold
   action on the home page is Buscar) */
.section-title { font-size: 1.25rem; margin: 24px 0 8px; }
.steps { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0; margin: 0 0 16px; }
.step { box-sizing: border-box; display: flex; align-items: center; justify-content: center; min-height: var(--tap-ideal); padding: 0 8px; border: 1px solid var(--color-olive); border-radius: 8px; background: var(--color-surface); font-weight: 600; text-align: center; text-decoration: none; }
.step:hover { background: var(--color-base); }
@media (min-width: 600px) { .steps { grid-template-columns: repeat(4, 1fr); } }

/* offer rows: only the cheapest gets the gold button; other stores get a compact outline one in
   the same row, so a card is one screen on a phone, not three */
.offers li:not(.best) { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.offers .cta.alt { display: inline-flex; width: auto; min-height: var(--tap-target); margin: 0 0 0 auto; background: transparent; border: 1px solid var(--color-olive); }
.offers .cta.alt:hover { background: var(--color-base); }
.card h1 { font-size: 1.75rem; margin: 0 0 4px; }
@media (max-width: 599px) { .photo.big { max-width: 240px; } }
