/* MOJÓN LOCAL · estilos. Mobile-first, sin dependencias. */
:root {
  --green: #163626;
  --green-2: #24543c;
  --green-3: #347a56;
  --green-soft: #e2f2e7;
  --cream: #f4f9f4;
  --cream-2: #e6f0e8;
  --paper: rgba(255, 255, 255, 0.92);
  --ink: #14221a;
  --muted: #4e6155;
  --line: #cfe0d3;
  --terra: #b85d28;
  --ok: #216e3f;
  --warn: #8a5a0b;
  --warn-bg: #fdf3dc;
  --err: #a12d24;
  --err-bg: #fbe9e6;
  --wa: #1f8f4e;
  --radius: 16px;
  --shadow: 0 2px 6px rgba(22, 54, 38, .06), 0 10px 28px rgba(22, 54, 38, .08);
  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --tab-h: 64px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.55 var(--sans);
  color: var(--ink);
  background-color: #f4f9f4;
  background-image:
    radial-gradient(at 15% 10%, rgba(167, 232, 189, 0.45) 0px, transparent 50%),
    radial-gradient(at 85% 25%, rgba(255, 255, 255, 0.95) 0px, transparent 55%),
    radial-gradient(at 25% 75%, rgba(188, 238, 203, 0.4) 0px, transparent 55%),
    linear-gradient(160deg, #ffffff 0%, #eef7f0 45%, #e2f1e6 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

/* Fondo orgánico animado verde-blanco */
.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.ambient-bg .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(65px);
  opacity: 0.55;
  will-change: transform;
  animation: floatOrb 22s ease-in-out infinite alternate;
}
.ambient-bg .orb-1 {
  width: 52vw;
  height: 52vw;
  max-width: 620px;
  max-height: 620px;
  top: -12%;
  left: -10%;
  background: radial-gradient(circle, rgba(116, 204, 148, 0.52), rgba(255, 255, 255, 0));
}
.ambient-bg .orb-2 {
  width: 60vw;
  height: 60vw;
  max-width: 700px;
  max-height: 700px;
  bottom: -15%;
  right: -12%;
  background: radial-gradient(circle, rgba(78, 179, 118, 0.42), rgba(255, 255, 255, 0));
  animation-duration: 28s;
  animation-direction: alternate-reverse;
}
.ambient-bg .orb-3 {
  width: 45vw;
  height: 45vw;
  max-width: 520px;
  max-height: 520px;
  top: 40%;
  left: 30%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9), rgba(210, 242, 220, 0.25));
  animation-duration: 19s;
}
@keyframes floatOrb {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(4%, 6%, 0) scale(1.08); }
  100% { transform: translate3d(-3%, -5%, 0) scale(0.95); }
}
main, .foot { position: relative; z-index: 1; }
img { max-width: 100%; display: block; }
a { color: var(--green-2); text-underline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); color: var(--green); line-height: 1.15; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 5vw, 2.4rem); }
h2 { font-size: 1.35rem; }
h3, .h3 { font-size: 1.1rem; font-family: var(--serif); color: var(--green); margin: 1.2em 0 .5em; }
p { margin: 0 0 1em; }
small, .small { font-size: .85rem; }
.muted { color: var(--muted); }
code { background: var(--cream-2); padding: .1em .35em; border-radius: 4px; font-size: .9em; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--paper); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--terra); outline-offset: 2px; }
[hidden] { display: none !important; }

/* Cabecera pública */
.top { position: sticky; top: 0; z-index: 25; display: flex; align-items: center; gap: 10px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  background: rgba(245, 251, 246, .88); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid rgba(45, 95, 65, .14); }
.brand { display: flex; align-items: center; gap: 8px; flex-shrink: 0; text-decoration: none; color: var(--green); font-weight: 600; letter-spacing: .06em; font-size: .95rem; }
.brand b { font-weight: 800; margin-left: 3px; }
.brand small { font-weight: 500; letter-spacing: 0; color: var(--muted); margin-left: 6px; }
.topnav { display: none; align-items: center; gap: 16px; margin-left: auto; }
.topnav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .94rem; padding: 6px 10px; border-radius: 999px; transition: background .2s, color .2s; }
.topnav a:hover { color: var(--green); background: rgba(45, 95, 65, .08); text-decoration: none; }
.topnav a.nav-pill { background: linear-gradient(135deg, #1f5438, #2e7a52); color: #fff; padding: 7px 14px; box-shadow: 0 3px 10px rgba(31, 84, 56, .22); }
.topnav a.nav-pill:hover { background: linear-gradient(135deg, #163e29, #246342); color: #fff; }
.pwa-top-btn { margin-left: auto; flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--green); font: 700 .8rem/1 var(--sans); cursor: pointer; box-shadow: 0 2px 6px rgba(22, 54, 38, .06); }
.pwa-top-btn .ico { width: 18px; height: 18px; }
.cartlink { position: relative; color: var(--green); padding: 8px; display: flex; }
.ico { width: 24px; height: 24px; }
.cart-count { position: absolute; top: 0; right: -2px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--terra); color: #fff; font-size: .72rem; font-weight: 700; display: grid; place-items: center; }

/* Barra inferior (uso con una mano) */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(6, 1fr); background: var(--paper);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -4px 18px rgba(31, 58, 46, .07); }
.tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: var(--tab-h); color: var(--muted);
  text-decoration: none; font-size: .7rem; font-weight: 600; padding: 0 2px; text-align: center; }
.tab.on { color: var(--green); }
.tab.on::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--green); }
.tab .cart-count { top: 8px; right: calc(50% - 22px); }
.tab-wa { color: var(--wa); }

main { max-width: 1080px; margin: 0 auto; padding: 0 16px calc(var(--tab-h) + 32px + env(safe-area-inset-bottom)); }
.sec { padding: 28px 0 8px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sec-h a { font-weight: 600; text-decoration: none; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 700; color: var(--terra); margin-bottom: .6em; }
.lead { font-size: 1.08rem; color: #3b443d; }
.crumbs { font-size: .9rem; margin-bottom: .4em; }

/* Inicio */
.hero { padding: 36px 0 20px; }
.hero h1 { font-size: clamp(2rem, 7vw, 3.1rem); max-width: 18ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.strip { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin-top: 8px; }
.strip-item { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 2px; }
.strip-item .k { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.strip-item .v { font-weight: 600; color: var(--green); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; counter-reset: s; }
.steps li { counter-increment: s; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 16px 16px 60px; position: relative; display: flex; flex-direction: column; }
.steps li::before { content: counter(s); position: absolute; left: 16px; top: 16px; width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: var(--cream); display: grid; place-items: center; font-weight: 700; }
.steps span { color: var(--muted); }
.card-feature { background: var(--green); color: var(--cream); border-radius: 20px; padding: 24px; margin-top: 28px; }
.card-feature h2 { color: var(--cream); }
.card-feature.alt { background: var(--cream-2); color: var(--ink); }
.card-feature.alt h2 { color: var(--green); }
.card-feature .btn-primary { background: var(--cream); color: var(--green); }
.card-feature.alt .btn-primary { background: var(--green); color: var(--cream); }

/* Portada con foto a sangre */
body.pub { overflow-x: clip; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
[id] { scroll-margin-top: calc(var(--tab-h) + 16px); }
.btn, .tab, .chip, .linkbtn, .catlist a, .cattile { touch-action: manipulation; }
h1, h2, h3, .empty-t { text-wrap: balance; }
p, dd, li { text-wrap: pretty; }
@media (pointer: fine) { html { overscroll-behavior: none; } }
/* svh: la barra del navegador móvil no cambia la altura al hacer scroll (evita el salto del hero). */
.hero-photo { position: relative; margin: 0 calc(50% - 50vw); padding: 0; min-height: min(78vh, 640px); min-height: min(78svh, 640px); display: flex; align-items: flex-end;
  background: #2b2a24; color: var(--cream); }
.hero-bg { position: absolute; inset: 0; margin: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
.hero-camino .hero-bg img { object-position: center; }
.hero-dehesa .hero-bg img { object-position: center; }
.hero-photo::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(20, 28, 22, .3) 0%, rgba(20, 28, 22, .5) 45%, rgba(18, 30, 23, .92) 100%); }
.hero-in { position: relative; width: 100%; max-width: 1080px; margin: 0 auto; padding: 120px 20px 40px; z-index: 2; }
.hero-photo h1 { color: #fffaf0; font-size: clamp(2.2rem, 8vw, 3.6rem); max-width: 16ch; text-shadow: 0 1px 3px rgba(0, 0, 0, .55), 0 2px 18px rgba(0, 0, 0, .35); }
.hero-photo .eyebrow { color: #f5cba0; text-shadow: 0 1px 4px rgba(0, 0, 0, .55); }
.hero-photo .lead { color: #efe8d8; max-width: 40ch; }
.hero-camino { min-height: min(62vh, 520px); min-height: min(62svh, 520px); }
.hero-dehesa { min-height: min(58vh, 480px); min-height: min(58svh, 480px); }
.btn-cream { background: var(--cream); color: var(--green); }
.btn-cream:hover { background: #fff; }
.hero-photo + .strip { position: relative; z-index: 2; margin-top: -22px; }

/* Bandas con foto */
.band { position: relative; margin: 36px calc(50% - 50vw) 0; min-height: 420px; display: flex; align-items: flex-end; color: var(--cream); overflow: hidden; }
.band > picture, .band > img { position: absolute; inset: 0; width: 100%; height: 100%; }
.band > picture img { width: 100%; height: 100%; object-fit: cover; }
.band::before { z-index: 1; }
.band .band-in { z-index: 2; }
.band::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(20, 28, 22, 0) 20%, rgba(18, 30, 23, .86) 100%); }
.band-in { position: relative; z-index: 2; width: 100%; max-width: 1080px; margin: 0 auto; padding: 40px 20px 32px; }
.band-in > * { max-width: 46ch; }
.band h2 { color: #fffaf0; font-size: clamp(1.6rem, 5vw, 2.3rem); text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.band .eyebrow { text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.band p { color: #efe8d8; }
.band .eyebrow { color: #f0c79b; }
.local { display: grid; gap: 18px; align-items: center; }
.local picture, .local picture img { width: 100%; }
.local picture img { aspect-ratio: 4 / 3; object-fit: cover; border-radius: 20px; box-shadow: var(--shadow); }

/* Mosaico de categorías */
.cattiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cattile { position: relative; display: block; aspect-ratio: 1 / 1; border-radius: var(--radius); overflow: hidden; background: var(--green-2); text-decoration: none; color: #fff; }
.cattile img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.cattile:hover img { transform: scale(1.04); }
.cattile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(15, 25, 19, .82) 100%); }
.cattile span { position: absolute; z-index: 1; left: 12px; right: 12px; bottom: 10px; font-weight: 700; line-height: 1.2; font-size: .95rem; display: grid; gap: 2px; }
.cattile small { font-weight: 500; opacity: .85; font-size: .78rem; }
.routelist { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.routelist li { display: grid; gap: 2px; padding: 16px; background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--terra); border-radius: 12px; }
.routelist b { font-family: var(--serif); font-size: 1.15rem; color: var(--green); text-transform: capitalize; }
.credits { padding-left: 1.1em; font-size: .9rem; }
.credits li { margin: 6px 0; }
.pimg-wrap { position: relative; }
.illus { position: absolute; left: 8px; bottom: 8px; background: rgba(20, 28, 22, .62); color: #f7f2e8; font-size: .66rem; padding: 2px 7px; border-radius: 6px; letter-spacing: .02em; }
.catlist img { width: 100%; height: auto; aspect-ratio: 16 / 7; object-fit: cover; border-radius: 10px; margin-bottom: 8px; }

/* Chips y categorías */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; font-size: .92rem; font-weight: 500; min-height: 40px; }
.chip b { background: var(--green-soft); color: var(--green); border-radius: 999px; padding: 0 7px; font-size: .78rem; }
.catlist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.catlist a { display: grid; gap: 2px; padding: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: border-color .15s; }
.catlist a:hover { border-color: var(--green-2); }
.catlist b { font-family: var(--serif); color: var(--green); font-size: 1.1rem; }
.catlist span { color: var(--muted); font-size: .92rem; }
.catlist em { font-style: normal; font-size: .82rem; font-weight: 600; color: var(--terra); }

/* Tarjetas de producto */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pcard { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.pcard-link { text-decoration: none; color: inherit; }
.pcard h3 { font-family: var(--sans); font-size: .98rem; font-weight: 600; color: var(--ink); margin: 10px 12px 4px; line-height: 1.25; }
.pcard-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 0 12px; margin-bottom: 10px; }
.pcard .btn { margin: auto 12px 12px; }
.pimg { aspect-ratio: 4 / 3; width: 100%; height: auto; object-fit: cover; background: var(--cream-2); }
.pimg.ph { display: grid; place-items: center; }
.pimg.ph span { font-family: var(--serif); font-size: 2rem; color: rgba(31, 58, 46, .55); letter-spacing: .04em; }
.ph.t1 { background: linear-gradient(135deg, #e3ebe4, #d2e0d4); }
.ph.t2 { background: linear-gradient(135deg, #f1e6cf, #e8d7b4); }
.ph.t3 { background: linear-gradient(135deg, #efe0d4, #e4c9b4); }
.ph.t4 { background: linear-gradient(135deg, #e4e6da, #d3d8c3); }
.ph.t5 { background: linear-gradient(135deg, #e9e3d7, #dcd2bf); }
.pimg.big { border-radius: var(--radius); aspect-ratio: 16 / 10; }

/* Galería del producto en la ficha pública */
.pgallery { display: grid; gap: 10px; }
.pgallery .pg-main img { cursor: grab; }
.pgallery .pg-main { position: relative; }
.pg-main img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); background: var(--cream-2); }
.pg-count { position: absolute; right: 10px; bottom: 10px; background: rgba(20, 28, 22, .68); color: #fff; font-size: .78rem; font-weight: 600; padding: 4px 10px; border-radius: 99px; }
.pg-thumbs { list-style: none; padding: 0; margin: 0; display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.pg-thumbs::-webkit-scrollbar { display: none; }
.pg-thumbs li { flex: none; }
.pg-thumbs button { padding: 0; border: 2px solid rgba(226, 217, 198, .6); border-radius: 10px; background: none; cursor: pointer; touch-action: manipulation; width: 72px; height: 72px; }
.pg-thumbs button.on { border-color: var(--green); }
.pg-thumbs img { width: 100%; height: 100%; object-fit: cover; border-radius: 7px; }
.pshare { display: flex; align-items: center; gap: 10px; margin: 14px 0; }
.pshare .btn { min-height: 44px; }
.share-state { font-weight: 600; color: var(--ok); font-size: .88rem; }
.price { font-weight: 700; color: var(--green); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.price small { font-weight: 500; color: var(--muted); }
.price.na { font-weight: 600; color: var(--muted); font-size: .9rem; }
.pdetail { display: grid; gap: 18px; }
.pd-body h1 { margin-top: 4px; }
.qtyrow { display: flex; gap: 10px; margin: 16px 0; }
.qtyrow .btn { flex: 1; }
.stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); overflow: hidden; }
.stepper button { width: 44px; height: 48px; border: 0; background: none; font-size: 1.3rem; color: var(--green); cursor: pointer; }
.stepper input { width: 44px; height: 48px; border: 0; text-align: center; font: inherit; font-weight: 600; background: none; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Badges y etiquetas */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--cream-2); color: var(--muted); white-space: nowrap; }
.badge.ok, .st-disponible, .st-entregado { background: #dff0e3; color: var(--ok); }
.badge.wait, .st-bajo_pedido, .st-nuevo, .st-presupuestado { background: var(--warn-bg); color: var(--warn); }
.badge.out, .st-agotado, .st-cancelado, .st-desactivado { background: var(--err-bg); color: var(--err); }
.st-confirmado, .st-preparando, .st-en_ruta { background: #e1ecf5; color: #24557a; }
.tag { display: inline-block; padding: 1px 7px; border-radius: 6px; font-size: .7rem; font-weight: 700; letter-spacing: .02em; background: var(--cream-2); color: var(--muted); vertical-align: middle; }
.tag-real { background: #dff0e3; color: var(--ok); }
.tag-estimado { background: var(--warn-bg); color: var(--warn); }
.tag-objetivo { background: #e1ecf5; color: #24557a; }
.tag-prediccion { background: #efe4f4; color: #6a3a80; }
.tag-urg { background: var(--err-bg); color: var(--err); }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent;
  font: 600 1rem/1 var(--sans); text-decoration: none; cursor: pointer; transition: background .15s, transform .05s; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--green); color: var(--cream); }
.btn-primary:hover { background: var(--green-2); }
.btn-secondary { background: var(--green-soft); color: var(--green); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--green); }
.btn-add { background: var(--green); color: var(--cream); min-height: 44px; }
.btn-add.added { background: var(--ok); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-danger { background: var(--err-bg); color: var(--err); border-color: #f1c9c3; }
.btn-block { width: 100%; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: .88rem; border-radius: 9px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--green-2); text-decoration: underline; cursor: pointer; font: inherit; }

/* Formularios */
.form { display: grid; gap: 14px; margin: 12px 0 24px; }
.field { display: grid; gap: 6px; }
.field > span, legend { font-weight: 600; font-size: .93rem; }
input, select, textarea { font: inherit; font-size: 16px; color: var(--ink); background: var(--paper); border: 1px solid #d4c9b2; border-radius: 10px; padding: 11px 12px; min-height: 48px; width: 100%; }
textarea { min-height: auto; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--green-2); outline: 2px solid rgba(45, 81, 65, .2); outline-offset: 0; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.radios, .checks { gap: 8px; }
.radio, .check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.radio input, .check input { width: 22px; height: 22px; min-height: 0; margin: 1px 0 0; flex: none; accent-color: var(--green); }
.radio span, .check span { display: grid; gap: 2px; }
.radio small { color: var(--muted); }
.radio:has(input:checked) { border-color: var(--green-2); background: #f3f7f2; }
.hp { position: absolute; left: -5000px; height: 0; overflow: hidden; }
.search { display: flex; gap: 8px; margin: 8px 0; }
.itemrows { display: grid; gap: 8px; }
.itemrow { display: grid; grid-template-columns: 1fr 80px; gap: 8px; }

/* Carrito y desglose */
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-line .name { font-weight: 600; }
.cart-line .meta { color: var(--muted); font-size: .88rem; }
.cart-line .ctrl { display: flex; align-items: center; gap: 10px; grid-column: 1 / -1; justify-content: space-between; }
.breakdown { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 16px; margin: 16px 0; }
.breakdown > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.breakdown > div:last-child { border-bottom: 0; }
.breakdown dt { color: #3b443d; }
.breakdown dd { margin: 0; text-align: right; font-weight: 600; display: grid; }
.breakdown dd small { font-weight: 400; color: var(--muted); font-size: .78rem; }
.breakdown .total dt, .breakdown .total dd { font-size: 1.15rem; color: var(--green); font-weight: 800; }
.lines { list-style: none; padding: 0; margin: 0 0 12px; }
.lines li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.kv { display: grid; gap: 0; margin: 12px 0; }
.kv > div { display: grid; grid-template-columns: minmax(120px, 40%) 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; }
.confirm-box { background: #f3f7f2; border: 1px solid #c9dccc; border-radius: var(--radius); padding: 16px; margin: 16px 0; }
.order-view .btn-wa { margin: 8px 0 12px; }

/* Avisos */
.flash { padding: 12px 14px; border-radius: 12px; margin: 12px 0; }
.flash.ok { background: #dff0e3; color: #1f4d30; }
.flash.err { background: var(--err-bg); color: var(--err); }
.flash.warn { background: var(--warn-bg); color: var(--warn); }
.note { background: var(--cream-2); border-radius: 12px; padding: 12px 14px; font-size: .93rem; }
.empty { background: var(--paper); border: 1px dashed #cdbf9f; border-radius: var(--radius); padding: 24px; text-align: center; }
.empty-t { font-family: var(--serif); font-size: 1.2rem; color: var(--green); font-weight: 600; margin-bottom: .3em; }
.ticks { padding-left: 1.2em; }
.ticks li { margin: 6px 0; }
.linklist { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 8px; }
.linklist a { display: block; padding: 14px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; font-weight: 600; }
.legal h2 { margin-top: 1.4em; font-size: 1.15rem; }

/* Pie */
.foot { max-width: 1080px; margin: 0 auto; padding: 24px 16px calc(var(--tab-h) + 28px + env(safe-area-inset-bottom)); color: var(--muted); font-size: .88rem; border-top: 1px solid var(--line); }
.foot-brand { font-weight: 700; color: var(--green); }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.foot a { color: var(--muted); }
main + .foot { margin-top: -24px; }

/* Acceso */
.bare { background: var(--cream); }
.login { max-width: 400px; margin: 8vh auto; padding: 28px; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.login img { margin-bottom: 12px; }

@media (min-width: 600px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .cattiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .local { grid-template-columns: 1fr 1fr; gap: 32px; }
  .band { min-height: 480px; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .pdetail { grid-template-columns: 1fr 1fr; align-items: start; gap: 28px; }
}
@media (min-width: 900px) {
  .topnav { display: flex; }
  /* La marca a la izquierda, la navegación a la derecha junto a App y carrito. */
  .pwa-top-btn { margin-left: 4px; }
  .cartlink { margin-left: 8px; }
  .tabbar { display: none; }
  main { padding-bottom: 48px; }
  .foot { padding-bottom: 32px; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cattiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .form { max-width: 640px; }
  .cart .form, .cart [data-cart-items] { max-width: 640px; }
}
/* Portátiles estrechos: la barra completa no cabe junto a la marca. Se ocultan
   las secciones que ya están en el pie (Rutas, Casas rurales) y se aprieta el
   espaciado, en vez de dejar que la navegación se monte encima del logotipo. */
@media (min-width: 900px) and (max-width: 1279px) {
  .topnav { gap: 4px; }
  .topnav a { font-size: .88rem; padding: 6px 8px; }
  .topnav a[href="/rutas"], .topnav a[href="/casas-rurales"] { display: none; }
}
@media (min-width: 900px) and (max-width: 1059px) {
  .topnav a[href="/contacto"] { display: none; }
  .pwa-top-btn span { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ═══════════ PANEL ═══════════ */
.adm { background: #f4f1ea; }
.adm-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px;
  padding-top: max(10px, env(safe-area-inset-top)); background: var(--paper); border-bottom: 1px solid var(--line); }
.adm-menu summary { list-style: none; cursor: pointer; padding: 10px 14px; border-radius: 10px; background: var(--green-soft); color: var(--green); font-weight: 700; min-height: 44px; }
.adm-menu summary::-webkit-details-marker { display: none; }
.adm-menu nav { position: absolute; right: 12px; left: 12px; top: 64px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 8px; display: grid; max-height: 75vh; overflow: auto; overscroll-behavior: contain; }
.adm-menu nav a, .adm-menu .linkbtn { display: block; padding: 12px 14px; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 500; text-align: left; width: 100%; }
.adm-menu nav a.on { background: var(--green-soft); color: var(--green); font-weight: 700; }
.adm-side { display: none; }
.adm-main { padding: 20px 16px 60px; max-width: 1180px; margin: 0; }
.adm-main h1 { font-size: 1.6rem; }
.adm-main h2 { font-size: 1.15rem; margin-top: .2em; }
.adm-main h3 { font-size: 1rem; }
.adm-wrap { display: block; }
.adm .form { max-width: none; }
.grid2 { display: grid; gap: 12px; grid-template-columns: 1fr; align-items: end; }
.form-wide { max-width: 900px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 16px 0; }
/* Lista de puesta en marcha (configuración pendiente) del panel */
.setup-check { border-color: #a9d9b8; background: linear-gradient(135deg, #f0faf3, #dcf2e3); }
.setup-check h2 { margin-bottom: .2em; }
.setup-check ul { margin: 8px 0 0; padding-left: 1.2em; display: grid; gap: 8px; }
.setup-check a { font-weight: 700; color: var(--green); }
.cols { display: grid; gap: 0 16px; }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.kpi { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 4px; }
.kpi-l { font-size: .8rem; color: var(--muted); font-weight: 600; }
.kpi-v { font-size: 1.35rem; font-weight: 800; color: var(--green); font-variant-numeric: tabular-nums; }
.kpi-h { font-size: .75rem; color: var(--muted); }
.big { font-size: 1.8rem; font-weight: 800; color: var(--green); margin: 0; }
.big small { font-size: 1rem; color: var(--muted); font-weight: 500; }
progress { width: 100%; height: 14px; appearance: none; -webkit-appearance: none; border: 0; border-radius: 99px; background: var(--cream-2); overflow: hidden; margin: 8px 0; }
progress::-webkit-progress-bar { background: var(--cream-2); border-radius: 99px; }
progress::-webkit-progress-value { background: var(--green); border-radius: 99px; }
progress::-moz-progress-bar { background: var(--green); border-radius: 99px; }
.rows { list-style: none; padding: 0; margin: 0 0 12px; }
ol.rows { list-style: decimal; padding-left: 1.4em; }
.rows li { padding: 9px 0; border-bottom: 1px solid var(--line); }
.rows li a { text-decoration: none; }
.rows small { display: block; color: var(--muted); }
.rows .badge { margin-left: 4px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.filters input, .filters select { width: auto; flex: 1 1 160px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.inline-form input, .inline-form select { width: auto; flex: 1 1 120px; min-height: 44px; padding: 8px 10px; }
.inline-form input[size] { flex: 0 0 72px; }
form.inline { display: inline; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 8px 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.panel .tbl { font-size: .9rem; }
.tbl th, .tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tbl th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #faf6ee; white-space: nowrap; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tr.warn td { background: var(--warn-bg); }
.tbl td input, .tbl td select { min-height: 42px; padding: 6px 8px; width: auto; }
.tbl td input[size="4"] { width: 64px; }
.tbl td input[size="6"] { width: 84px; }
.pnl .sub td { font-weight: 700; border-top: 2px solid var(--line); }
.pnl .total td { font-weight: 800; font-size: 1.05rem; color: var(--green); border-top: 2px solid var(--green); }
.group { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 8px; }
.msg { font: .85rem/1.45 ui-monospace, Menlo, Consolas, monospace; background: #faf6ee; }
.timeline { list-style: none; padding: 0; margin: 12px 0 0; }
.timeline li { display: grid; padding: 8px 0 8px 12px; border-left: 3px solid var(--line); margin-bottom: 4px; }
.timeline li small { color: var(--muted); }
.timeline .ev-incidencia { border-color: var(--err); }
.timeline .ev-estado { border-color: var(--green-2); }
.timeline .ev-pago { border-color: var(--ok); }
.uploader img[data-preview] { width: 100%; max-width: 320px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.upbtn { position: relative; overflow: hidden; width: fit-content; }
.upbtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; min-height: 0; }

/* Galería de fotos en el formulario de producto (ordenable en el móvil) */
.gal-list { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 8px; }
.gal-row { display: flex; align-items: center; gap: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.gal-row img { width: 64px; height: 64px; object-fit: cover; border-radius: 9px; flex: none; border: 1px solid var(--line); }
.gal-idx { font-size: .78rem; font-weight: 700; color: var(--muted); margin-right: auto; }
.gal-row:first-child .gal-idx { color: var(--green); }
.gal-btns { display: flex; gap: 8px; }
.gal-btns .btn { min-width: 44px; min-height: 44px; }
details > summary { cursor: pointer; font-weight: 600; color: var(--green-2); padding: 8px 0; }

@media (min-width: 700px) {
  .grid2 { grid-template-columns: 1fr 1fr; }
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cols { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
}
@media (min-width: 1000px) {
  .adm-menu { display: none; }
  .adm-wrap { display: grid; grid-template-columns: 220px 1fr; }
  .adm-side { display: block; position: sticky; top: 61px; align-self: start; height: calc(100vh - 61px); overflow: auto; padding: 16px 12px; border-right: 1px solid var(--line); }
  .adm-side nav { display: grid; gap: 2px; margin-bottom: 16px; }
  .adm-side a { padding: 9px 12px; border-radius: 9px; text-decoration: none; color: var(--ink); font-weight: 500; }
  .adm-side a.on { background: var(--green-soft); color: var(--green); font-weight: 700; }
  .adm-main { padding: 24px 32px 60px; }
}

/* ═══════════ MARKETPLACE VECINAL (/unete), GALERÍA Y PWA ═══════════ */
.btn-glass {
  background: rgba(255, 255, 255, .18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.btn-glass:hover { background: rgba(255, 255, 255, .28); }

.strip-3 { grid-template-columns: 1fr; }
.strip-accent {
  background: linear-gradient(135deg, #f0faf3, #dcf2e3);
  border-color: #a9d9b8;
}
.strip-accent a { font-weight: 700; color: var(--green); }

@media (min-width: 720px) {
  .strip-3 { grid-template-columns: repeat(3, 1fr); }
  .pwa-top-btn { margin-left: 4px; }
}

/* Mosaico visual ampliado en portada */
.visual-mosaic {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 14px;
}
.vm-card {
  position: relative;
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  box-shadow: var(--shadow);
  background: var(--green);
}
.vm-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.vm-card:hover img { transform: scale(1.04); }
.vm-card figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 28px 16px 14px;
  background: linear-gradient(180deg, rgba(14, 30, 21, 0) 0%, rgba(14, 30, 21, .88) 100%);
  color: #fff;
  display: grid;
  gap: 2px;
}
.vm-card figcaption b { font-family: var(--serif); font-size: 1.1rem; }
.vm-card figcaption span { font-size: .84rem; opacity: .9; }

@media (min-width: 680px) {
  .visual-mosaic { grid-template-columns: repeat(2, 1fr); }
  .vm-card.vm-wide { grid-column: span 2; aspect-ratio: 21 / 9; }
}
@media (min-width: 960px) {
  .visual-mosaic { grid-template-columns: repeat(3, 1fr); }
  .vm-card.vm-wide { grid-column: span 2; }
}

/* Tarjetas Escrow vs Depósito */
.mode-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 16px;
}
.mode-card {
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow);
  position: relative;
}
.mode-escrow { border-color: #2e7a52; background: linear-gradient(180deg, #ffffff 0%, #f1faf4 100%); }
.mode-deposito { border-color: #b87b28; background: linear-gradient(180deg, #ffffff 0%, #fdfaf2 100%); }
.mode-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  background: var(--green-soft);
  color: var(--green);
  margin-bottom: 10px;
}
.mode-deposito .mode-badge { background: #faeccf; color: #7a4c0c; }
.mode-card h3 { font-size: 1.35rem; margin: 0 0 6px; }
.mode-fee { font-size: 1.15rem; color: var(--green-2); margin-bottom: 12px; }
.mode-steps { padding-left: 1.2em; margin: 12px 0 0; display: grid; gap: 8px; font-size: .94rem; }
@media (min-width: 760px) {
  .mode-cards { grid-template-columns: 1fr 1fr; }
}

/* Simulador de ingresos */
.sim-card {
  background: linear-gradient(135deg, #163626 0%, #23533a 100%);
  color: #fff;
  border-radius: 22px;
  padding: 24px;
  display: grid;
  gap: 20px;
  box-shadow: 0 12px 32px rgba(22, 54, 38, .2);
}
.sim-card h2 { color: #fff; }
.sim-card .muted { color: #cfe6d6; }
.sim-card .eyebrow { color: #9be4b4; }
.sim-controls { display: grid; gap: 12px; margin-top: 12px; }
.sim-controls .field > span { color: #e4f5ea; }
.sim-controls input, .sim-controls select {
  background: rgba(255, 255, 255, .95);
  border-color: transparent;
  color: var(--ink);
  font-weight: 600;
}
.sim-result {
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 16px;
  padding: 18px;
  display: grid;
  gap: 12px;
  align-content: center;
}
.sim-kpi { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 8px; border-bottom: 1px dashed rgba(255, 255, 255, .2); }
.sim-kpi.sim-net { border-bottom: 0; padding-top: 6px; font-size: 1.25rem; color: #9be4b4; }
.sim-kpi.sim-net strong { font-size: 1.65rem; color: #fff; }
@media (min-width: 760px) {
  .sim-card { grid-template-columns: 1.2fr 1fr; align-items: center; padding: 30px; }
}

/* Productores activos */
.producer-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.producer-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.producer-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.producer-card h3 { margin: 2px 0; font-size: 1.12rem; }
.producer-prod { margin: 0; color: var(--green-2); }
.producer-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
@media (min-width: 680px) {
  .producer-grid { grid-template-columns: repeat(3, 1fr); }
}

.form-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  box-shadow: var(--shadow);
}
.form-card .form { max-width: 100%; }

/* Garantía Escrow en vista de pedido */
.escrow-box {
  background: linear-gradient(135deg, #eefaf2, #e0f4e7);
  border: 1px solid #9fd4b2;
  border-radius: 16px;
  padding: 16px;
  margin: 16px 0;
}
.escrow-box h3 { margin-top: 0; color: var(--green); }
.escrow-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.escrow-list li { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; background: #fff; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); }

/* Banner y Modal de instalación PWA */
/* Overlay: el aviso aparece a los 1,2 s (JS) y si va en el flujo empuja todo el
   contenido → CLS. Fijo abajo, encima de la tabbar en móvil. */
.pwa-banner {
  position: fixed;
  z-index: 60;
  left: 12px;
  right: 12px;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  border-radius: 14px;
  background: linear-gradient(90deg, #163626, #24593e);
  color: #fff;
  padding: 10px 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
}
@media (min-width: 720px) {
  .pwa-banner { left: auto; right: 16px; bottom: 16px; max-width: 440px; }
}
.pwa-banner-in {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.pwa-banner-txt { display: grid; flex: 1; min-width: 0; line-height: 1.25; }
/* En móviles estrechos el b se apilaba letra a letra: ancho controlado y ellipsis. */
.pwa-banner-txt b { font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pwa-banner-txt small { font-size: .78rem; color: #cfe6d6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 440px) { .pwa-banner-in > img { display: none; } }
.pwa-banner .btn-primary { background: #fff; color: var(--green); white-space: nowrap; }
.pwa-close {
  background: none;
  border: 0;
  color: inherit;
  opacity: .75;
  font-size: 1.1rem;
  padding: 6px;
  cursor: pointer;
}
.pwa-modal {
  border: 0;
  border-radius: 22px;
  padding: 0;
  max-width: 440px;
  width: calc(100% - 32px);
  background: #fff;
  color: var(--ink);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
.pwa-modal::backdrop { background: rgba(15, 32, 22, .55); backdrop-filter: blur(4px); }
.pwa-modal-box { padding: 22px; display: grid; gap: 16px; }
.pwa-modal-head { display: flex; align-items: center; gap: 12px; }
.pwa-modal-head h2 { margin: 0; font-size: 1.25rem; }
.pwa-modal-head p { margin: 2px 0 0; }
.pwa-modal-head .pwa-close { margin-left: auto; color: var(--muted); }
.pwa-steps { display: grid; gap: 10px; }
.pwa-os { background: var(--cream); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.pwa-os b { display: block; color: var(--green); margin-bottom: 4px; font-size: .92rem; }
.pwa-os p { margin: 0; font-size: .86rem; color: var(--muted); }
.pwa-modal-actions { display: grid; gap: 8px; }

.rich p { margin: 0 0 10px; }
.rich ul.ticks { margin: 0 0 12px; }

/* Activar desde el listado de productos: casilla compacta + botón en la misma celda. */
.act-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.check-mini { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--muted); cursor: pointer; }
.check-mini input { width: 18px; height: 18px; min-height: 0; margin: 0; flex: none; accent-color: var(--green); }

/* Catálogo: filtro activo (todo / se puede pedir). */
.chip.on { background: var(--green); border-color: var(--green); color: #fff; }
.chip.on b { background: rgba(255, 255, 255, .22); color: #fff; }

/* Panel · selección y acciones en bloque sobre productos. */
.bulk-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 10px; padding: 10px 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.bulk-bar .check-mini { flex: 1 1 260px; }
.tbl .checkcol { width: 34px; text-align: center; padding-right: 0; }
.tbl .checkcol input { width: 20px; height: 20px; min-height: 0; margin: 0; }

/* Catálogo · secciones con foto (tira horizontal en móvil, cuadrícula en escritorio). */
.catstrip-wrap { margin: 2px 0 16px; }
.catstrip { list-style: none; padding: 0 2px 2px; margin: 0; display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.catstrip::-webkit-scrollbar { display: none; }
.catstrip li { flex: 0 0 auto; scroll-snap-align: start; }
.catcard { display: grid; width: 146px; text-decoration: none; color: var(--ink); }
.catcard-photo { display: grid; place-items: center; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; background: var(--green-soft); border: 1px solid var(--line); transition: border-color .15s, transform .15s; }
.catcard-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.catcard-init { font-family: var(--serif); font-size: 2.2rem; color: var(--green-2); }
.catcard b { font-size: .88rem; font-weight: 600; line-height: 1.25; margin-top: 6px; color: var(--green); display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.catcard em { font-style: normal; font-size: .76rem; color: var(--muted); }
.catcard:hover .catcard-photo, .catcard:focus-visible .catcard-photo { border-color: var(--green-2); transform: translateY(-1px); }
@media (min-width: 720px) {
  .catstrip { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 12px; overflow: visible; }
  .catcard { width: auto; }
}

/* ───────────── LA FINCA ───────────── */
.fm-hero { position: relative; margin: 0 calc(50% - 50vw); min-height: min(86svh, 700px); display: flex; align-items: flex-end; color: var(--cream); background: #1c2a20; overflow: hidden; }
.fm-hero > picture, .fm-hero > picture img, .fm-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; }
.fm-hero > picture img, .fm-hero > img { object-fit: cover; object-position: center 45%; }
.fm-hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(16, 26, 19, .18) 0%, rgba(16, 26, 19, .45) 45%, rgba(13, 24, 17, .93) 100%); }
.fm-hero-in { position: relative; z-index: 2; width: 100%; max-width: 1080px; margin: 0 auto; padding: 40px 20px 44px; }
.fm-eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; font-weight: 700; color: #f0c79b; margin: 0 0 .6em; }
.fm-hero h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(2.1rem, 8.2vw, 3.9rem); line-height: 1.04; margin: 0 0 .35em; color: #fffaf0; text-shadow: 0 2px 24px rgba(0, 0, 0, .35); max-width: 20ch; }
.fm-lead { font-size: clamp(1rem, 3.6vw, 1.18rem); color: #ece4d4; max-width: 46ch; margin: 0 0 18px; }
.fm-hero-cta, .fm-cta-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.fm-hero .btn-ghost { color: #fffaf0; border-color: rgba(255, 250, 240, .45); background: rgba(255, 255, 255, .06); }
.fm-h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.55rem, 5.6vw, 2.3rem); line-height: 1.12; color: var(--green); margin: 0 0 12px; max-width: 24ch; }
.fm-lead-sm { font-size: 1.02rem; color: var(--muted); max-width: 62ch; }
.fm-intro { display: grid; gap: 22px; }
.fm-facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-content: start; }
.fm-facts li { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.fm-facts b { display: block; font-family: var(--serif); font-size: 1.5rem; color: var(--green); line-height: 1.1; }
.fm-facts span { font-size: .8rem; color: var(--muted); }
.fm-gallery .fm-mosaic { display: grid; grid-template-columns: 1fr; gap: 10px; }
.fm-shot { margin: 0; }
.fm-shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 16px; }
.fm-shot figcaption { font-size: .8rem; color: var(--muted); margin-top: 5px; }
.fm-prov { display: inline-block; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--warn); background: var(--warn-bg); border-radius: 999px; padding: 1px 7px; }
.fm-big { font-family: var(--serif); font-size: clamp(1.15rem, 4.4vw, 1.45rem); line-height: 1.4; color: var(--green); }
.fm-note { border-left: 3px solid var(--green-3); padding: 2px 0 2px 14px; color: var(--green-2); font-weight: 500; }
.fm-principles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fm-principles li { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.fm-principles h3 { margin: 0 0 4px; font-size: .98rem; color: var(--green); }
.fm-principles p { margin: 0; font-size: .86rem; color: var(--muted); }
.fm-forest { display: grid; gap: 22px; align-items: center; }
.fm-layers { display: grid; gap: 6px; align-content: end; }
.fm-layer { border-radius: 10px; padding: 10px 12px; color: #f4f9f4; font-size: .82rem; font-weight: 600; }
.fm-layer.l4 { background: linear-gradient(90deg, #1d3d2a, #2f6144); margin: 0 0; }
.fm-layer.l3 { background: linear-gradient(90deg, #2b5638, #4a7f56); margin: 0 12px; }
.fm-layer.l2 { background: linear-gradient(90deg, #4d7f4f, #79a86f); margin: 0 24px; }
.fm-layer.l1 { background: linear-gradient(90deg, #8a7a4f, #b3a173); margin: 0 36px; }
.fm-seasons .fm-season-radio { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.fm-seasons { position: relative; margin-top: 14px; }
.fm-season-tab { display: inline-flex; flex-direction: column; gap: 1px; padding: 9px 14px; margin: 0 6px 12px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); font-weight: 600; font-size: .92rem; cursor: pointer; }
.fm-season-tab small { font-weight: 400; font-size: .7rem; color: var(--muted); }
.fm-season-radio:checked + .fm-season-tab { background: var(--green); border-color: var(--green); color: #fff; }
.fm-season-radio:checked + .fm-season-tab small { color: rgba(255, 255, 255, .75); }
.fm-season-radio:focus-visible + .fm-season-tab { outline: 2px solid var(--green-3); outline-offset: 2px; }
.fm-season-panel { display: none; }
.fm-seasons:has(#est-primavera:checked) [data-season="primavera"],
.fm-seasons:has(#est-verano:checked) [data-season="verano"],
.fm-seasons:has(#est-otono:checked) [data-season="otono"],
.fm-seasons:has(#est-invierno:checked) [data-season="invierno"] { display: block; }
@supports not selector(:has(*)) { .fm-season-panel { display: block; } }
.fm-season-note { font-size: .86rem; color: var(--muted); margin: 0 0 12px; }
.fm-crops { display: grid; gap: 10px; }
.fm-crop { display: grid; grid-template-columns: 96px 1fr; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.fm-crop-img { background: var(--cream-2); display: grid; place-items: center; }
.fm-crop-img img { width: 100%; height: 100%; object-fit: cover; }
.fm-crop-ph { font-family: var(--serif); font-size: 2rem; color: rgba(31, 58, 46, .45); }
.fm-crop-body { padding: 10px 12px; }
.fm-crop-top { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.fm-crop-top h3 { margin: 0; font-size: .98rem; color: var(--green); }
.fm-crop-body p { margin: 4px 0 0; font-size: .82rem; color: var(--muted); }
.fm-crop-link { display: inline-block; margin-top: 6px; font-size: .82rem; font-weight: 600; color: var(--green-3); }
.badge.soft { background: var(--cream-2); color: var(--muted); }
.fm-legal { font-size: .78rem; color: var(--muted); margin-top: 12px; }
.fm-produce { display: grid; gap: 12px; }
.fm-prod { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.fm-prod img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.fm-prod div { padding: 12px 14px 16px; }
.fm-prod h3 { margin: 0 0 3px; font-family: var(--serif); font-size: 1.15rem; color: var(--green); }
.fm-prod p { margin: 0 0 6px; font-size: .88rem; color: var(--muted); }
.fm-prod a { font-size: .85rem; font-weight: 600; color: var(--green-3); }
.fm-hens { display: grid; gap: 16px; }
.fm-hens-photo { position: relative; border-radius: 18px; overflow: hidden; }
.fm-hens-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.fm-hens-photo .fm-prov { position: absolute; left: 10px; bottom: 10px; background: rgba(253, 243, 220, .94); }
.fm-checks { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 6px; }
.fm-checks li { position: relative; padding-left: 24px; font-size: .9rem; }
.fm-checks li::before { content: "✓"; position: absolute; left: 0; color: var(--green-3); font-weight: 700; }
.fm-preserves { display: grid; gap: 16px; }
.fm-preserve-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: relative; }
.fm-preserve-imgs img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 14px; }
.fm-preserve-imgs .fm-prov { position: absolute; left: 8px; bottom: 8px; }
.fm-compost { display: grid; gap: 16px; }
.fm-cycle { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; counter-reset: c; }
.fm-cycle li { background: var(--green-soft); color: var(--green); border-radius: 999px; padding: 6px 12px; font-size: .82rem; font-weight: 600; counter-increment: c; }
.fm-cycle li::before { content: counter(c) ". "; opacity: .6; }
.fm-future { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.fm-future li { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: .86rem; }
.fm-future b { color: var(--green-3); }
.fm-tags { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.fm-tags li { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; font-size: .88rem; color: var(--muted); }
.tag-own { background: var(--green-soft); color: var(--green); }
.tag-craft { background: #f1e6cf; color: #7a5a14; }
.tag-local { background: #e6eef7; color: #2c5079; }
.tag-shop { background: var(--cream-2); color: var(--muted); }
.fm-journal-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; justify-content: space-between; margin-bottom: 12px; }
.fm-journal-grid { display: grid; gap: 12px; }
.fm-post { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.fm-post img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.fm-post .fm-date, .fm-post h3, .fm-post p, .fm-post .fm-crop-link { margin-left: 14px; margin-right: 14px; }
.fm-post h3 { margin-top: 2px; margin-bottom: 4px; font-family: var(--serif); font-size: 1.1rem; }
.fm-post h3 a { color: var(--green); text-decoration: none; }
.fm-post p { font-size: .86rem; color: var(--muted); }
.fm-post .fm-crop-link { margin-bottom: 14px; }
.fm-date { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--terra); margin-top: 12px; margin-bottom: 0; }
.fm-close { margin-top: 10px; }
.fm-close-in { background: linear-gradient(160deg, #1d3d2a, #2f6144 65%, #3d7a52); color: #eef5ee; border-radius: 22px; padding: 26px 20px; }
.fm-close-in p { color: #dce8dc; max-width: 58ch; }
.fm-close-in .fm-big { color: #fffaf0; font-family: var(--serif); }
.fm-sign { font-weight: 700; letter-spacing: .08em; color: #f0c79b !important; margin-top: 18px; }
.fm-post-page .fm-post-hero { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 18px; margin: 6px 0 18px; }
.fm-post-page .rich { max-width: 68ch; }
@media (min-width: 720px) {
  .fm-intro { grid-template-columns: 1.4fr 1fr; gap: 32px; }
  .fm-mosaic { grid-template-columns: 1.4fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); }
  .fm-mosaic .fm-shot:first-child { grid-row: span 2; }
  .fm-mosaic .fm-shot:first-child img { aspect-ratio: auto; height: 100%; }
  .fm-principles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fm-forest { grid-template-columns: 1.25fr .75fr; }
  .fm-crops { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fm-produce { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fm-prod-wide { grid-column: span 2; display: grid; grid-template-columns: 1fr 1fr; }
  .fm-prod-wide img { aspect-ratio: auto; height: 100%; }
  .fm-hens { grid-template-columns: 1fr 1fr; align-items: center; gap: 28px; }
  .fm-preserves { grid-template-columns: 1.1fr .9fr; align-items: center; gap: 28px; }
  .fm-compost { grid-template-columns: 1.2fr .8fr; align-items: center; }
  .fm-future { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .fm-journal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fm-close-in { padding: 44px 40px; }
  .fm-hero-in { padding: 40px 32px 56px; }
}
@media (min-width: 1000px) { .fm-produce { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Panel · La finca */
.farm-list { display: grid; gap: 8px; margin: 10px 0 14px; }
.farm-row { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.farm-row > summary { cursor: pointer; font-size: .92rem; }
.farm-row > summary small { color: var(--muted); font-weight: 400; }
.farm-row .form { margin-top: 10px; }
.farm-new > summary { color: var(--green-3); }
.checks { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.check-mini { display: inline-flex; align-items: center; gap: 5px; font-size: .86rem; }
.check-mini input { width: 18px; height: 18px; min-height: 0; margin: 0; }
.field-wide { grid-column: 1 / -1; }

/* La finca · vídeo y tiras multimedia */
.fm-video { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 16px; background: #000; display: block; }
.fm-strip { display: flex; gap: 10px; overflow-x: auto; margin-top: 14px; padding-bottom: 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.fm-strip::-webkit-scrollbar { display: none; }
.fm-strip-item { flex: 0 0 82%; max-width: 420px; margin: 0; }
.fm-strip-item img { aspect-ratio: 16 / 10; }
@media (min-width: 720px) { .fm-strip-item { flex-basis: 32%; } }

/* Pedido · avisos push del estado */
.pushbox { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 16px 0; padding: 14px 16px;
  border: 1px solid rgba(45, 95, 65, .2); border-radius: 14px; background: rgba(45, 95, 65, .055); }
.pushbox > div { flex: 1 1 240px; }
.pushbox b { display: block; margin-bottom: 2px; font-size: .95rem; }
.pushbox p { margin: 0; }
.pushbox .btn { flex: 0 0 auto; }
.push-state { flex: 1 1 100%; min-height: 1em; color: var(--green-3); font-weight: 600; }

/* Pedido · seguimiento por pasos */
.osteps { list-style: none; display: flex; gap: 4px; padding: 0; margin: 14px 0 18px; overflow-x: auto; scrollbar-width: none; }
.osteps::-webkit-scrollbar { display: none; }
.osteps li { flex: 1 1 0; min-width: 62px; position: relative; padding-top: 27px; text-align: center; font-size: .7rem; font-weight: 600; color: var(--muted); }
.osteps li::before { content: ""; position: absolute; top: 10px; left: 0; right: 0; height: 3px; background: var(--line); }
.osteps li:first-child::before { left: 50%; }
.osteps li:last-child::before { right: 50%; }
.osteps .ostep-n { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 23px; height: 23px; border-radius: 50%; background: #fff; border: 2px solid var(--line); display: grid; place-items: center; font-size: .68rem; color: var(--muted); }
.osteps li.done { color: var(--green-2); }
.osteps li.done::before { background: var(--green-3); }
.osteps li.done .ostep-n { background: var(--green-3); border-color: var(--green-3); color: #fff; }
.osteps li.on { color: var(--green); }
.osteps li.on .ostep-n { border-color: var(--terra); color: var(--terra); box-shadow: 0 0 0 4px rgba(184, 93, 40, .14); }
.enroute { background: linear-gradient(135deg, #1f5438, #2e7a52); color: #fff; border-radius: 16px; padding: 14px 16px; margin: 0 0 18px; }
.enroute b { display: block; font-size: 1.02rem; margin-bottom: 4px; }
.enroute p { margin: 0 0 6px; color: #e4f2e7; }
.enroute .muted { color: #bcd8c6; }
.enroute-cta { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0 !important; }
.enroute .btn-wa { background: #fff; color: var(--green); }
.enroute .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .08); }
.repeat-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 14px; }
.wa-quote { margin: 10px 0 0; }

/* Panel · parte del día */
.today-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.today-date { font-family: var(--serif); font-size: 1.15rem; color: var(--green); margin: 0; }
.today-sign { margin-top: 26px; color: var(--muted); font-size: .9rem; }
.quick { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.quick h2 { margin: 0 0 2px; }
.quick p { margin: 0; }
.quick-cta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 !important; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checklist > li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.checklist > li.done { opacity: .68; }
.checklist .cb { font-size: 1.35rem; line-height: 1.25; color: var(--green-3); }
.checklist b { display: block; margin-bottom: 4px; }
.checklist .rows { margin: 6px 0; }
.checklist .rows li { border-bottom-style: dashed; }
.kpi-v.diff { color: var(--err); }

/* Impresión: el parte del día en una hoja, sin menús ni botones */
@media print {
  body.adm { background: #fff; }
  .adm-top, .adm-side, .adm-main > h1, .tabbar, .foot, .skip, .today-bar .btn, .flash, .quick { display: none !important; }
  .adm-wrap { display: block; }
  .adm-main { padding: 0; max-width: none; }
  .panel, .checklist > li, .kpi { break-inside: avoid; box-shadow: none; background: #fff; border-color: #bbb; }
  .kpis { grid-template-columns: repeat(4, 1fr); }
  a { color: inherit; text-decoration: none; }
}

/* ═══════════ PRUEBA DE ENTREGA (móvil, en la calle) ═══════════ */
.btn-lg { min-height: 56px; font-size: 1.05rem; }
.deliver-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 12px 0; }
.deliver-card h2 { margin: .3em 0 .1em; }
.deliver-card h2 small { font-weight: 500; color: var(--muted); font-size: .85rem; }
.deliver-addr { font-size: 1.05rem; font-weight: 600; margin: 0 0 10px; }
.deliver-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.deliver-actions .btn { flex: 1 1 140px; }
.deliver-money { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0 0; }
.deliver-money > div { background: var(--cream); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; min-width: 0; }
.deliver-money dt { font-size: .72rem; color: var(--muted); font-weight: 600; }
.deliver-money dd { margin: 2px 0 0; font-weight: 800; color: var(--green); font-variant-numeric: tabular-nums; }
.deliver-money .due dd { color: var(--err); }
.deliver-form { margin-top: 6px; }
.sign-field { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; min-width: 0; }
.sign-field legend { font-weight: 600; padding: 0; margin-bottom: 6px; }
.sign-wrap { position: relative; border: 2px dashed #9fc4aa; border-radius: 14px; background: #fff; overflow: hidden; }
.sign-pad { display: block; width: 100%; height: 200px; touch-action: none; cursor: crosshair; }
.sign-hint { position: absolute; inset: 0; display: grid; place-items: center; color: #7d9184; font-weight: 600; pointer-events: none; font-size: .95rem; }
.sign-hint[hidden] { display: none; }
.sign-tools { display: flex; justify-content: flex-end; }
.photo-pick { position: relative; overflow: hidden; width: 100%; }
.photo-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; min-height: 0; width: 100%; }
.deliver-preview img { width: 100%; max-height: 260px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); display: block; }
.proof-grid { display: grid; gap: 12px; margin-top: 12px; }
.proof-grid figure { margin: 0; }
.proof-grid a { display: block; }
.proof-grid img { width: 100%; border-radius: 12px; border: 1px solid var(--line); background: #fff; display: block; }
.proof-grid figcaption { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.proof-photo img { aspect-ratio: 4 / 3; object-fit: cover; }
.proof-sign img { max-height: 220px; object-fit: contain; }
@media (min-width: 700px) { .proof-grid { grid-template-columns: 1fr 1fr; } }

/* ═══════════ MODO REPARTO (móvil, en la calle) ═══════════ */
.reparto-cta { margin: 10px 0 0; }
.reparto-back { font-size: .9rem; margin: 0 0 10px; }
.reparto-bar { background: linear-gradient(140deg, #1f5438, #2e7a52); color: #fff; border-radius: 16px; padding: 14px 16px; margin: 0 0 14px; }
.rb-date { font-family: var(--serif); font-size: 1.1rem; margin: 0; }
.rb-count { margin: 4px 0 6px; color: #e4f2e7; display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; }
.rb-count b { color: #fff; }
.reparto-bar progress { width: 100%; height: 10px; accent-color: #ffd8a8; }
.rb-cash { margin: 8px 0 0; background: rgba(255, 255, 255, .12); border-radius: 10px; padding: 6px 10px; font-size: .9rem; }
.reparto-flash { margin: 0 0 12px; min-height: 1.2em; color: var(--ok); font-weight: 600; }
.reparto-flash:empty { display: none; }
.reparto-stops { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.reparto-stop { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.reparto-stop.done { opacity: .62; }
.stop-head { display: flex; align-items: flex-start; gap: 10px; }
.stop-num { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .95rem; }
.reparto-stop.done .stop-num { background: var(--ok); }
.stop-where { flex: 1 1 auto; min-width: 0; }
.stop-where b { display: block; line-height: 1.3; overflow-wrap: anywhere; }
.stop-where small { color: var(--muted); }
.stop-move { display: flex; gap: 2px; flex: 0 0 auto; }
.stop-move form { margin: 0; }
.stop-move .btn { min-width: 40px; min-height: 40px; padding: 4px 8px; font-size: 1rem; }
.stop-map { margin: 8px 0 0; }
.stop-orders { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 10px; }
.stop-order { border-top: 1px dashed var(--line); padding-top: 10px; }
.stop-order.done { opacity: .7; }
.so-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.so-code { font-weight: 800; }
.so-total { margin-left: auto; font-weight: 800; color: var(--green); font-variant-numeric: tabular-nums; }
.so-meta { margin: 4px 0 0; font-size: .9rem; color: var(--muted); overflow-wrap: anywhere; }
.so-meta a { color: var(--green-2); }
.so-due { margin: 4px 0 0; font-size: .9rem; color: var(--err); }
.so-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; align-items: flex-start; }
.stop-deliver { margin: 0; }
.stop-deliver > summary { list-style: none; cursor: pointer; }
.stop-deliver > summary::-webkit-details-marker { display: none; }
.stop-deliver[open] > summary { background: var(--green-soft); color: var(--green); }
.deliver-inline { margin-top: 10px; padding: 10px 12px; background: var(--cream); border: 1px solid var(--line); border-radius: 12px; }
.deliver-inline .sign-pad { height: 150px; }
.deliver-inline .field > span { font-size: .88rem; }
.so-proof { margin: 6px 0 0; font-size: .85rem; color: var(--ok); }
.so-proof[hidden] { display: none; }
.reparto-routes { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.reparto-route a { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); text-decoration: none; color: var(--ink); }
.reparto-route.done a { opacity: .65; }
.rr-when { font-weight: 700; color: var(--green); }
.rr-what { font-size: .9rem; color: var(--muted); }
.rr-go { font-size: .9rem; font-weight: 700; color: var(--green-2); }
@media (min-width: 760px) {
  .reparto-stops { grid-template-columns: 1fr 1fr; align-items: start; }
}
