/* Estilos comunes de las miniwebs. Los colores y fuentes llegan como variables desde cada plantilla. */
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
.wrap { max-width: 440px; margin: 0 auto; padding: 0 16px 40px; display: flex; flex-direction: column; }
.wrap > * + * { margin-top: 12px; }
.wrap > .hero + .brand { margin-top: -62px; }
.wrap > .brand + * { margin-top: 24px; }

.hero { position: relative; margin: 0 -16px; height: 170px; background: var(--hero-bg); overflow: hidden; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.langs { position: absolute; top: 12px; left: 16px; display: flex; gap: 2px; background: rgba(0,0,0,.35); border-radius: 999px; padding: 3px; backdrop-filter: blur(4px); }
.langs a { color: #fff; text-decoration: none; font-size: 12px; font-weight: 600; letter-spacing: .02em; min-width: 36px; min-height: 30px; display: grid; place-items: center; border-radius: 999px; }
.langs a[aria-current="true"] { background: #fff; color: #111; }
.langs a:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.badge { position: absolute; top: 14px; right: 16px; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }

.brand { position: relative; display: grid; justify-items: center; gap: 6px; text-align: center; }
.logo { width: 120px; height: 120px; border-radius: var(--logo-radius); background: var(--surface); padding: 6px; box-shadow: 0 10px 26px rgba(0,0,0,.22); overflow: hidden; }
.logo img { width: 100%; height: 100%; object-fit: contain; border-radius: calc(var(--logo-radius) - 4px); display: block; }
.mono { width: 100%; height: 100%; border-radius: calc(var(--logo-radius) - 4px); background: var(--ink); color: var(--accent); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: var(--display-weight); font-size: 40px; letter-spacing: -.02em; }
h1 { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 32px; line-height: 1.05; margin: 10px 0 0; letter-spacing: -.01em; text-wrap: balance; }
h1 small { display: block; font-family: var(--font-body); font-weight: 600; font-size: 14px; letter-spacing: .02em; color: var(--accent); margin-bottom: 6px; }
.tagline { color: var(--muted); margin: 0; max-width: 34ch; }
.status { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-weight: 500; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #2E9E66; }
.status[hidden] { display: none; }
.status[data-estado="cerrado"] .dot, .status[data-estado="temporal"] .dot { background: #C8483C; }
.status[data-estado="cierra-pronto"] .dot, .status[data-estado="abre-pronto"] .dot { background: #E0A100; }
.status[data-estado="abierto"] .dot { box-shadow: 0 0 0 3px color-mix(in srgb, #2E9E66 25%, transparent); }

.primary { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; text-decoration: none; background: var(--accent); color: var(--on-accent); border-radius: 18px; padding: 18px; box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 35%, transparent); }
.primary:hover { background: var(--accent-deep); }
.primary strong { display: block; font-family: var(--font-display); font-weight: var(--display-weight); font-size: 22px; line-height: 1.15; }
.primary span span { font-size: 14px; opacity: .92; }
.primary svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.coupon { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 14px 16px; background: var(--surface); border-radius: var(--card-radius); border: 2px dashed var(--ink); }
.coupon .k { font-size: 13px; color: var(--muted); }
.coupon .v { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 22px; }
.btn-sm { background: var(--ink); color: var(--bg); text-decoration: none; border-radius: 10px; padding: 10px 14px; font-weight: 600; font-size: 14px; white-space: nowrap; }

[data-programado][hidden] { display: none !important; }
a.feature { text-decoration: none; }
.feature { padding: 16px; border-radius: var(--card-radius); background: var(--accent); color: var(--on-accent); display: grid; gap: 4px; }
.feature .k { font-size: 13px; font-weight: 600; opacity: .85; }
.feature .v { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 21px; line-height: 1.15; }
.feature .d { font-size: 14px; opacity: .9; }

.services { background: var(--surface); border: 1px solid var(--line); border-radius: var(--card-radius); padding: 16px; }
.services h2, .hours h2 { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 20px; margin: 0 0 8px; }
.services ul { list-style: none; margin: 0; padding: 0; }
.services li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.services li:first-child { border-top: 0; }
.services small { display: block; color: var(--muted); font-size: 13px; }
.services em { font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

.links { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.wrap > .links { margin-top: 16px; }
.link { display: grid; grid-template-columns: 44px 1fr 20px; align-items: center; gap: 14px; text-decoration: none; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--card-radius); padding: 12px 14px; }
a.link:hover { border-color: var(--accent); }
.ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--ico-bg); color: var(--ico-fg); }
.ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.txt b { display: block; font-weight: 600; }
.txt small { display: block; color: var(--muted); font-size: 13px; }
.chev { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2; }
.stars { display: flex; gap: 2px; margin: 2px 0; }
.stars svg { width: 14px; height: 14px; fill: #F2B705; }
.pending { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; border: 1px dashed var(--muted); color: var(--muted); font-size: 11px; font-weight: 600; vertical-align: 2px; }
.link.is-pending { opacity: .7; }

.wrap > .hours { margin-top: 24px; }
.hours dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 15px; }
.hours dt { color: var(--muted); }
.hours dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.hours .today { color: var(--ink); font-weight: 600; }
.hours .note { color: var(--muted); font-size: 13px; margin: 10px 0 0; }

footer { margin-top: 28px !important; text-align: center; color: var(--muted); font-size: 13px; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.tools { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wrap > .tools { margin-top: 16px; }
.tool { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 12px; border-radius: var(--card-radius); border: 1px dashed var(--line); background: transparent; color: var(--ink); font: inherit; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; }
.tool:hover { border-style: solid; border-color: var(--accent); }
.tool svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
button.tool:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Valoración: siempre la primera acción */
.review { display: grid; justify-items: center; gap: 6px; text-align: center; text-decoration: none; background: var(--accent); color: var(--on-accent); border-radius: 20px; padding: 18px 16px 16px; box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 38%, transparent); }
a.review:hover { background: var(--accent-deep); }
.review strong { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 23px; line-height: 1.1; }
.review .rv-sub { font-size: 14px; opacity: .9; }
.rv-stars { display: flex; gap: 6px; }
.rv-stars svg { width: 30px; height: 30px; fill: #F2B705; stroke: var(--star-stroke, transparent); stroke-width: 1.4px; paint-order: stroke; filter: drop-shadow(0 1px 0 rgba(0,0,0,.15)); }
.review.is-pending { opacity: .75; }
.review .pending { border-color: currentColor; color: inherit; }

/* Acción del negocio: segunda, en tinta para no competir con la valoración */
.primary { background: var(--surface); color: var(--ink); border: 2px solid var(--ink); box-shadow: none; padding: 14px 16px; }
.primary:hover { background: var(--ink); color: var(--bg); }
.primary strong { font-size: 19px; }

/* Ajustes por plantilla */
.t-tienda .logo { padding: 8px; }
.t-tienda .mono { background: var(--ink); color: var(--accent); }
.t-restaurante .logo { background: var(--bg); box-shadow: 0 0 0 2px var(--accent), 0 12px 30px rgba(0,0,0,.5); }
.t-restaurante .mono { background: var(--surface); }
.t-restaurante .primary strong { font-weight: 400; }
.t-restaurante .primary { border-color: var(--line); background: var(--surface); }
.t-restaurante .primary:hover { background: var(--ink); color: var(--bg); }
.t-restaurante .feature { background: linear-gradient(135deg, #8E2A33, #5E1A22); color: #F4E9DA; }
.t-restaurante .coupon { border-color: var(--accent); }
.t-servicios .logo { box-shadow: 0 8px 24px rgba(19,49,43,.16); }
.t-servicios .mono { background: var(--accent); color: #fff; }
.t-servicios h1 { font-size: 36px; }
.t-servicios .primary, .t-servicios .review { border-radius: 26px; }
.t-basica .mono { background: var(--accent); color: var(--on-accent); }
