:root {
  --bg: #f5f3ed;
  --surface: #fbfaf6;
  --surface-2: #ebe7dc;
  --ink: #111111;
  --ink-2: #5c5852;
  --line: #d9d4c7;
  --rule: #111111;
  --accent: #00a19a;
  --accent-ink: #1d1c1b;
  --accent-soft: #cfece9;
  --accent-text: #00605b;
  --ok: #2f6b3a;
  --ok-soft: #e1eedf;
  --warn: #7a5300;
  --warn-soft: #fbecc4;
  --danger: #a33a2a;
  --radius: 4px;
  --shadow: none;
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --display: 'DM Serif Display', Georgia, serif;
  --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.05; margin: 0 0 0.5em; letter-spacing: -0.01em; }
[hidden] { display: none !important; }
/* Cursor normal sobre los textos (la barra de texto solo en los campos del formulario) */
body { cursor: default; }
a, button, summary, label, [role='tab'] { cursor: pointer; }
input, textarea, select { cursor: auto; }

.wrap { width: min(1280px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--ink-2); }
.small { font-size: 0.875rem; }
.error { color: var(--danger); font-size: 0.9rem; min-height: 1.2em; margin: 0.5rem 0 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  background: var(--accent); color: var(--accent-ink);
  border: 0; border-radius: 2px; padding: 0.8rem 1.4rem;
  font: 500 1rem var(--sans); text-decoration: none; cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}
.btn:hover { background: #1fb3ab; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; background: var(--accent); }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--rule); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: 0.5rem 0.95rem; font-size: 0.875rem; }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid currentColor; }
.btn-danger:hover { background: #f6e4e0; }

input, textarea, select {
  width: 100%; font: inherit; color: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: 2px;
  padding: 0.65rem 0.8rem;
}
input:focus, textarea:focus, select:focus, .btn:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--ink); outline-offset: 2px;
}
label { display: block; font-weight: 500; font-size: 0.925rem; margin-bottom: 0.9rem; }
label > input, label > textarea, label > select { margin-top: 0.3rem; font-weight: 400; }
label.check { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 400; }
label.check input { width: auto; margin-top: 0.25rem; accent-color: var(--ink); }
fieldset { border: 0; padding: 0; margin: 0 0 1rem; }
legend { font-weight: 500; font-size: 0.925rem; margin-bottom: 0.4rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 600px) { .grid2 { grid-template-columns: 1fr; } }

/* Cabecera */
.demo-banner { background: var(--warn-soft); color: var(--warn); text-align: center; font-size: 0.875rem; padding: 0.45rem 1rem; }
.topbar {
  background: var(--ink); color: #fff; text-align: center;
  font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.5rem 1rem;
}
.site-header { background: var(--bg); }
.site-header .wrap {
  display: flex; align-items: center; gap: 2rem; height: 76px;
  border-bottom: 1px solid var(--rule);
}
.brand {
  font: 400 2rem/1 var(--display); text-transform: uppercase; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none; margin-right: auto; white-space: nowrap;
}
.brand img { height: 30px; width: auto; }
.nav { display: flex; gap: 1.75rem; }
.nav a { text-decoration: none; font-size: 0.95rem; }
.nav a:hover { text-decoration: underline; }
@media (max-width: 760px) {
  .nav { display: none; }
  .brand { font-size: 1.6rem; }
  .brand img { height: 22px; }
  .site-header .wrap { height: 64px; }
}

/* Portada */
.hero { position: relative; margin-top: 16px; overflow: hidden; border-radius: var(--radius); background: var(--surface-2); }
.hero-img { width: 100%; height: clamp(480px, 80vh, 760px); object-fit: cover; object-position: center 40%; }
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 30%, rgba(0, 0, 0, 0.45));
}
.hero-copy {
  position: absolute; inset: auto 0 0; z-index: 1; color: #fff; text-align: center;
  padding: 2rem clamp(1rem, 5vw, 4rem) clamp(2rem, 6vw, 4rem);
}
.hero-logo { width: clamp(72px, min(11vw, 13vh), 140px); height: auto; margin: 0 auto 1.25rem; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 5.5rem); margin: 0 auto 0.3em; max-width: 17ch; text-wrap: balance; }
.hero p { font-size: clamp(1rem, 1.6vw, 1.2rem); max-width: 52ch; margin: 0 auto 1.6rem; color: rgba(255, 255, 255, 0.92); }
.hero p:empty { display: none; }

/* Carrusel de productos */
.marquee { overflow: hidden; border-bottom: 1px solid var(--rule); padding: clamp(1.25rem, 3vw, 2rem) 0; margin-top: 16px; }
.marquee-track { display: flex; width: max-content; animation: marquee var(--mq-duration, 40s) linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.mq-copy { display: flex; }
.mq-item { display: flex; align-items: center; gap: clamp(0.75rem, 1.5vw, 1.25rem); padding-right: clamp(1.5rem, 3vw, 3rem); }
.mq-days {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap;
}
.mq-name { font: 400 clamp(2.4rem, 5.5vw, 4.5rem)/1 var(--serif); white-space: nowrap; letter-spacing: -0.02em; }
.mq-img { width: clamp(52px, 6vw, 84px); height: clamp(52px, 6vw, 84px); border-radius: 50%; object-fit: cover; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee { overflow-x: auto; }
  .marquee-track { animation: none; }
  .mq-copy { display: none; }
}

/* Banda «cómo funciona» */
.band { position: relative; margin-top: clamp(2.5rem, 6vw, 4.5rem); color: #fff; overflow: hidden; }
.band-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.band::before { content: ''; position: absolute; inset: 0; background: rgba(20, 14, 8, 0.58); z-index: 1; }
.band-copy { position: relative; z-index: 2; text-align: center; padding: clamp(3.5rem, 9vw, 7rem) 0; }
.band h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: 2rem; }
.how {
  list-style: none; padding: 0; margin: 0 auto; max-width: 960px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; text-align: left;
}
.how li { border-top: 1px solid rgba(255, 255, 255, 0.6); padding-top: 1rem; }
.how b { display: block; font: 400 1.6rem/1.15 var(--serif); margin-bottom: 0.35rem; }
.how span { color: rgba(255, 255, 255, 0.88); font-size: 0.95rem; }
@media (max-width: 700px) { .how { grid-template-columns: 1fr; } }

/* Pedido */
.order {
  display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 2.5rem; align-items: start;
  padding: clamp(3rem, 7vw, 5rem) 0; scroll-margin-top: 0;
}
@media (max-width: 900px) { .order { grid-template-columns: 1fr; } }
.section-title { font-size: clamp(2.6rem, 6vw, 4.5rem); margin-bottom: 1.5rem; }
.step { border-top: 1px solid var(--rule); padding: 1.5rem 0 2rem; }
.step h2 { font-size: 2rem; display: flex; align-items: baseline; gap: 0.8rem; }
.step h2 .num { flex: none; font: 500 0.8rem var(--sans); letter-spacing: 0.08em; color: var(--ink-2); }
.step h2 .num::before { content: '0'; }
.step.is-locked { opacity: 0.45; }
.note { background: var(--surface-2); border-radius: 2px; padding: 0.7rem 0.9rem; font-size: 0.925rem; color: var(--ink-2); margin: 1rem 0 0; }

.days { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.75rem; }
.day {
  text-align: left; cursor: pointer; font: inherit; color: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: 2px; padding: 0.85rem 0.95rem;
  transition: border-color 0.15s, background 0.15s;
}
.day:hover { border-color: var(--rule); }
.day[aria-pressed='true'] { border-color: var(--rule); background: var(--accent); }
.day .wd { display: block; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.day .dm { display: block; font-family: var(--serif); font-size: 2rem; line-height: 1.1; }
.day .cut { display: block; font-size: 0.78rem; color: var(--ink-2); margin-top: 0.25rem; }
.day[aria-pressed='true'] .cut { color: var(--ink); }

.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.75rem 1.25rem; }
.product { display: flex; flex-direction: column; }
.product.is-out { opacity: 0.5; }
.product-img { aspect-ratio: 4 / 5; background: var(--surface-2); object-fit: cover; width: 100%; border-radius: var(--radius); }
.product-ph {
  aspect-ratio: 4 / 5; display: grid; place-items: center; border-radius: var(--radius);
  background: var(--surface-2); font: 400 3rem var(--serif); color: var(--ink-2);
}
.product-body { padding: 0.8rem 0 0; display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }
.product-body h3 { font-size: 1.75rem; margin: 0; }
.product-body p { margin: 0; font-size: 0.9rem; color: var(--ink-2); flex: 1; }
.product-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 0.7rem; padding-top: 0.7rem; border-top: 1px solid var(--line); }
.price { font-weight: 600; font-size: 1.05rem; }
.badge { display: inline-block; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.15rem 0.5rem; border-radius: 2px; background: var(--accent); color: var(--ink); align-self: flex-start; }
.badge.out { background: var(--ink); color: #fff; }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--rule); border-radius: 2px; overflow: hidden; }
.stepper button {
  width: 36px; height: 36px; border: 0; background: transparent; color: var(--ink);
  font: 500 1.15rem var(--sans); cursor: pointer;
}
.stepper button:hover:not(:disabled) { background: var(--accent); }
.stepper button:disabled { color: var(--line); cursor: not-allowed; }
.stepper output { min-width: 28px; text-align: center; font-weight: 600; }

.points { display: grid; gap: 0.6rem; }
.point { display: flex; gap: 0.75rem; align-items: flex-start; border: 1px solid var(--line); border-radius: 2px; padding: 0.8rem 0.95rem; cursor: pointer; font-weight: 400; margin: 0; background: var(--surface); }
.point:has(input:checked) { border-color: var(--rule); }
.point input { width: auto; margin-top: 0.3rem; accent-color: var(--ink); }
.point b { display: block; }
.point span { font-size: 0.875rem; color: var(--ink-2); }

.cart { position: sticky; top: 1rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 2px; padding: 1.5rem; }
.cart h2 { font-size: 2rem; margin-bottom: 0.2em; }
.cart-when { font-size: 0.9rem; color: var(--ink-2); margin: 0 0 0.8rem; }
.cap::first-letter, .cart-when::first-letter { text-transform: uppercase; }
.cart-lines { list-style: none; padding: 0; margin: 0 0 1rem; }
.cart-lines li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.5rem 0; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.05rem; margin-bottom: 1rem; }
.cart-total strong { font: 400 2.2rem var(--serif); }
@media (max-width: 900px) { .cart { position: static; } }

/* Pie */
.site-footer { background: var(--accent); color: var(--ink); padding: clamp(1.5rem, 4vw, 2.5rem) 0 2rem; font-size: 0.95rem; }
.site-footer a { color: var(--ink); }
.footer-mark { width: 100%; height: auto; margin: 0 0 clamp(1.5rem, 4vw, 2.5rem); }
.footer-row { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; justify-content: space-between; margin-bottom: 1rem; }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a { font-size: 0.85rem; }
/* Páginas secundarias: pie sencillo */
.site-footer:not(:has(.footer-mark)) .wrap { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; justify-content: space-between; }

/* Confirmación */
.confirm { max-width: 640px; margin: 3rem auto 5rem; }
.confirm .card { background: var(--surface); border: 1px solid var(--rule); border-radius: 2px; padding: clamp(1.25rem, 4vw, 2.25rem); }
.confirm h1 { font-size: clamp(2.2rem, 5vw, 3rem); }
.confirm .tick { width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: var(--ink); display: grid; place-items: center; font-size: 1.6rem; margin-bottom: 1rem; }
.code { font: 700 1.6rem ui-monospace, 'Cascadia Mono', Consolas, monospace; letter-spacing: 0.08em; background: var(--surface-2); padding: 0.3rem 0.8rem; border-radius: 2px; display: inline-block; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 1.2rem; margin: 1.25rem 0; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; font-weight: 500; }

.legal { max-width: 760px; margin: 2.5rem auto 5rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 2px; padding: clamp(1.25rem, 4vw, 2.5rem); }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3rem); }
.legal h2 { font-size: 1.75rem; margin-top: 1.75rem; }
.fill { background: var(--warn-soft); color: var(--warn); padding: 0 0.3rem; border-radius: 2px; }

@media print {
  .site-header, .site-footer, .topbar, .demo-banner, .no-print { display: none !important; }
  body { background: #fff; }
  .card, .step { box-shadow: none; border: 0; }
}
@media (max-width: 760px) { .nav.nav-always { display: flex; } }
.brand-mark {
  display: inline-grid; place-items: center; width: 34px; height: 34px; margin-right: 0.5rem; vertical-align: middle;
  background: var(--accent); color: var(--ink); font: 400 1rem var(--sans); border-radius: 2px;
}
img.brand-mark { background: none; border-radius: 50%; }
.login img.brand-mark { width: 72px; height: 72px; }
@media (max-width: 600px) {
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 0.75rem; }
  .product-body h3 { font-size: 1.35rem; }
  .product-foot { flex-wrap: wrap; gap: 0.5rem; }
}

/* Selector de idioma */
.lang-switch { display: flex; border: 1px solid var(--rule); border-radius: 2px; overflow: hidden; }
.lang-switch a { padding: 0.3rem 0.55rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.05em; text-decoration: none; }
.lang-switch a + a { border-left: 1px solid var(--rule); }
.lang-switch a[aria-current='true'] { background: var(--ink); color: #fff; }
.lang-switch a:not([aria-current='true']):hover { background: var(--accent); }
@media (max-width: 760px) { .site-header .wrap { gap: 0.75rem; } }

/* Quiénes somos */
.about {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 1.5rem clamp(2rem, 6vw, 6rem);
  padding: clamp(3rem, 8vw, 6rem) 0 0; scroll-margin-top: 1rem;
}
.about h2 { font-size: clamp(2.6rem, 6vw, 4.5rem); margin: 0; }
.about-text p { font-size: clamp(1.05rem, 1.5vw, 1.25rem); line-height: 1.6; margin: 0 0 1em; }
.about-text p:first-child { font: 400 clamp(1.6rem, 2.6vw, 2.2rem)/1.2 var(--serif); }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } }

/* Banda: notas */
.band-intro { max-width: 60ch; margin: -1rem auto 2.25rem; font-size: 1.05rem; color: rgba(255, 255, 255, 0.9); }
.band-note { max-width: 70ch; margin: 2.25rem auto 0; font-size: 0.95rem; color: rgba(255, 255, 255, 0.9); }
.band-note + .band-note { margin-top: 0.75rem; }
#how-note { border: 1px solid rgba(255, 255, 255, 0.5); padding: 1rem 1.25rem; border-radius: 2px; }

/* Bloques que solo se muestran en un idioma */
html[lang='ca'] [data-only='es'], html[lang='es'] [data-only='ca'] { display: none !important; }
