/* ==========================================================================
   Woof-me / Miau-me — landing comercial compartida
   La marca se define con data-brand="woof" | "miau" en <body>.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --font-display: "Fredoka", "Trebuchet MS", sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  --paper: #ffffff;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-xl: 40px;
  --radius-pill: 999px;

  --container: 1160px;
  --gutter: 20px;
  --header-h: 68px;
  --section-pad: clamp(72px, 10vw, 128px);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drop: cubic-bezier(0.34, 1.4, 0.64, 1);
}

[data-brand="woof"] {
  --brand: #0072fc;
  --brand-deep: #0050b8;
  --brand-soft: #eaf2ff;
  --brand-tint: #d4e5ff;
  --ink: #13233a;
  --ink-soft: #4a5b73;
  --line: #d9e3f2;
  /* Botón: azul un poco más profundo para pasar AA con texto blanco */
  --cta-bg: #0063dc;
  --cta-bg-hover: #0050b8;
  --cta-fg: #ffffff;
  --on-brand: #ffffff;
}

[data-brand="miau"] {
  --brand: #fe6d01;
  --brand-deep: #b84a00;
  --brand-soft: #fff1e6;
  --brand-tint: #ffdcc2;
  --ink: #2e1a0e;
  --ink-soft: #6b4f3d;
  --line: #f3dccb;
  /* El naranja no soporta texto blanco (2.8:1): el botón lleva tinta */
  --cta-bg: #fe6d01;
  --cta-bg-hover: #ff8226;
  --cta-fg: #2e1a0e;
  --on-brand: #2e1a0e;
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg { display: block; max-width: 100%; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

a { color: inherit; }

button { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 28px;
  border: 0;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 140ms var(--ease-out),
    background-color 180ms ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:active { transform: scale(0.97); }

.btn--primary {
  background: var(--cta-bg);
  color: var(--cta-fg);
  box-shadow: 0 4px 0 var(--brand-deep);
}

.btn--primary:active {
  transform: translateY(3px) scale(0.98);
  box-shadow: 0 1px 0 var(--brand-deep);
}

@media (hover: hover) {
  .btn--primary:hover { background: var(--cta-bg-hover); }
}

.btn--small {
  min-height: 44px;
  padding: 0 20px;
  font-size: 1.0625rem;
}

.btn--block { width: 100%; }

.link-quiet {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  color: var(--ink);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  text-decoration-color: var(--brand);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}

.site-header.is-scrolled { border-bottom-color: var(--line); }

.admin-bar .site-header { top: 32px; }

@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}

@media (max-width: 600px) {
  .admin-bar .site-header { top: 0; }
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--header-h);
}

.site-header__logo { display: block; margin-right: auto; }
.site-header__logo img { height: 50px; width: auto; }

.site-nav__list {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 160ms ease;
}

@media (hover: hover) {
  .site-nav__link:hover { background: var(--brand-soft); }
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--brand-soft);
  cursor: pointer;
}

.nav-toggle .icon { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 767px) {
  :root { --header-h: 62px; }

  .site-header__logo img { height: 40px; }
  .nav-toggle { display: inline-flex; order: 3; }
  .site-header .btn--small { padding: 0 16px; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 8px var(--gutter) 20px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px -18px rgb(0 0 0 / 0.18);
    opacity: 0;
    transform: translateY(-8px);
    visibility: hidden;
    transition:
      opacity 180ms var(--ease-out),
      transform 220ms var(--ease-out),
      visibility 0s linear 220ms;
  }

  .site-nav.is-open {
    opacity: 1;
    transform: none;
    visibility: visible;
    transition:
      opacity 180ms var(--ease-out),
      transform 220ms var(--ease-out);
  }

  .site-nav__list { flex-direction: column; }
  .site-nav__link { width: 100%; min-height: 52px; font-size: 1.125rem; }
}

/* ---------- Hero ---------- */
.hero {
  background: var(--brand-soft);
  padding-block: clamp(36px, 7vw, 96px) clamp(64px, 9vw, 112px);
  overflow: hidden;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(40px, 6vw, 80px);
}

.hero__title {
  font-size: clamp(2.6rem, 6.4vw, 4.75rem);
  font-weight: 700;
  line-height: 0.98;
  max-width: 13ch;
}

.hero__title-line { display: block; text-wrap: balance; }

.hero__lead {
  margin-top: 22px;
  max-width: 34rem;
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
}

.hero__lead strong { color: var(--ink); }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin-top: 32px;
}

.perks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.perks li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 10px;
  border-radius: var(--radius-pill);
  background: var(--paper);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
}

.perks .icon { color: var(--brand-deep); width: 20px; height: 20px; }

/* Disponible en App Store / Google Play */
.apps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 24px;
}

.apps--center {
  justify-content: center;
  margin-top: clamp(40px, 6vw, 56px);
}

.apps__label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.apps__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px 0 12px;
  border-radius: 12px;
  background: #000;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: transform 140ms var(--ease-out);
}

a.store-badge:active { transform: scale(0.97); }
.store-badge__icon { width: 22px; height: 22px; flex: none; }

/* Mapa */
.hero__visual {
  position: relative;
  padding: 0 0 28px 20px;
}

.map-card {
  position: relative;
  aspect-ratio: 13 / 11;
  border: 5px solid var(--brand);
  border-radius: var(--radius-xl);
  background: var(--brand-tint);
  overflow: hidden;
  rotate: 2deg;
  box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--brand-deep) 55%, transparent);
}

.map-card__svg { width: 100%; height: 100%; }

.map-pin {
  position: absolute;
  left: 63%;
  top: 46%;
  width: 25%;
  translate: -50% -100%;
  filter: drop-shadow(0 8px 10px rgb(0 0 0 / 0.2));
}

.map-pin svg { width: 100%; height: auto; overflow: visible; }

.map-pulse {
  position: absolute;
  left: 63%;
  top: 46%;
  width: 26%;
  aspect-ratio: 2 / 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: var(--brand);
  opacity: 0;
}

.map-pulse--base {
  width: 9%;
  opacity: 0.28;
}

.notice {
  position: absolute;
  left: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(320px, 86%);
  padding: 14px 18px 14px 14px;
  border-radius: var(--radius-md);
  background: var(--paper);
  box-shadow:
    0 1px 2px rgb(0 0 0 / 0.06),
    0 16px 36px -12px rgb(0 0 0 / 0.22);
}

.notice__avatar {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--brand);
}

.notice__title {
  font-weight: 700;
  line-height: 1.25;
}

.notice__meta {
  font-size: 0.875rem;
  color: var(--ink-soft);
  line-height: 1.3;
}

/* Secuencia de entrada del hero (única animación no provocada por el usuario) */
@media (prefers-reduced-motion: no-preference) {
  .js .map-pin { opacity: 0; transform: translateY(-40%) scale(0.9); }
  .js .map-pulse--base { opacity: 0; }
  .js .map-route { clip-path: inset(0 100% 0 0); }
  .js .notice { opacity: 0; transform: translateY(14px) scale(0.96); }

  .js .is-ready .map-route {
    clip-path: inset(0 0 0 0);
    transition: clip-path 700ms var(--ease-in-out) 100ms;
  }

  .js .is-ready .map-pin {
    opacity: 1;
    transform: none;
    transition:
      opacity 200ms ease-out 650ms,
      transform 550ms var(--ease-drop) 650ms;
  }

  .js .is-ready .map-pulse--base {
    opacity: 0.28;
    transition: opacity 200ms ease-out 950ms;
  }

  .js .is-ready .map-pulse--ring {
    animation: pulse 2.4s var(--ease-out) 1.1s infinite;
  }

  .js .is-ready .notice {
    opacity: 1;
    transform: none;
    transition:
      opacity 300ms var(--ease-out) 1000ms,
      transform 450ms var(--ease-out) 1000ms;
  }
}

@keyframes pulse {
  0%   { opacity: 0.35; transform: scale(0.3); }
  100% { opacity: 0;    transform: scale(1.6); }
}

@media (max-width: 899px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__title { max-width: 13ch; }
  .hero__visual { max-width: 520px; width: 100%; margin-inline: auto; padding-left: 0; }
  .map-card { rotate: 1.5deg; }
  .notice { left: 12px; }
}

@media (max-width: 599px) {
  .hero__actions { margin-top: 26px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .hero__actions .link-quiet { margin-inline: auto; }
  .perks { gap: 8px; margin-top: 22px; }
  .perks li { font-size: 0.875rem; padding: 6px 12px 6px 8px; }
}

/* ---------- Secciones ---------- */
.section { padding-block: var(--section-pad); }
.section--soft { background: var(--brand-soft); }

.section__head { max-width: 40rem; margin-bottom: clamp(40px, 6vw, 64px); }
.section__head--center { margin-inline: auto; text-align: center; }

.section__title { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }

.section__lead {
  margin-top: 16px;
  font-size: 1.125rem;
  color: var(--ink-soft);
}

/* ---------- Orden de secciones en móvil ----------
   En móvil el producto va antes de "¿Cómo funciona?" (hero → intro → producto → cómo funciona → preguntas). */
@media (max-width: 767px) {
  .landing-main { display: flex; flex-direction: column; }
  .landing-main > #como-funciona { order: 1; }
  .landing-main > #preguntas { order: 2; }
  .landing-main > .intro + .section { padding-top: var(--section-pad); }
  .landing-main > .intro { padding-bottom: clamp(56px, 9vw, 96px); }
}

/* ---------- Cómo funciona ---------- */
.steps {
  --steps: 3;
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--steps), minmax(0, 1fr));
  gap: 40px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

/* La ruta punteada une los pasos, como el recorrido del mapa */
.steps::before {
  content: "";
  position: absolute;
  top: 30px;
  left: calc(50% / var(--steps));
  right: calc(50% / var(--steps));
  border-top: 4px dotted color-mix(in srgb, var(--brand) 55%, transparent);
}

.step {
  position: relative;
  text-align: center;
  counter-increment: step;
}

.step__marker {
  position: relative;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin: 0 auto 28px;
  border-radius: 50% 50% 50% 6px;
  rotate: -45deg;
  background: var(--brand);
  box-shadow: 0 0 0 8px var(--paper);
}

.step__marker::after {
  content: counter(step);
  rotate: 45deg;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--on-brand);
}

.step__title { font-size: 1.5rem; }

.step__text {
  max-width: 19rem;
  margin: 10px auto 0;
  color: var(--ink-soft);
}

@media (max-width: 767px) {
  .steps { grid-template-columns: 1fr; gap: 36px; }

  .steps::before {
    top: 30px;
    bottom: 30px;
    left: 28px;
    right: auto;
    border-top: 0;
    border-left: 4px dotted color-mix(in srgb, var(--brand) 55%, transparent);
  }

  .step {
    display: grid;
    grid-template-columns: 60px 1fr;
    column-gap: 20px;
    text-align: left;
  }

  .step__marker { grid-row: span 2; margin: 0; }
  .step__title { align-self: end; }
  .step__text { margin: 6px 0 0; }
}

.steps--2 { --steps: 2; max-width: 760px; margin-inline: auto; }
.steps--1 { --steps: 1; }
.steps--1::before { display: none; }

/* ---------- Producto ---------- */
.product {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.gallery { position: sticky; top: calc(var(--header-h) + 24px); }

.gallery__stage {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  background: var(--paper);
  overflow: hidden;
}

.gallery__slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 220ms ease;
}

.gallery__slide.is-active { opacity: 1; }

.gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.gallery__thumb {
  position: relative;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--paper);
  overflow: hidden;
  cursor: pointer;
  transition: transform 140ms var(--ease-out);
}

.gallery__thumb:active { transform: scale(0.96); }

.gallery__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 3px solid transparent;
  border-radius: inherit;
  transition: border-color 160ms ease;
}

.gallery__thumb[aria-current="true"]::after { border-color: var(--brand); }

/* Placeholders de fotos */
.ph {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  width: 100%;
  height: 100%;
  padding: 24px;
  color: var(--brand-deep);
  text-align: center;
}

.ph__device { width: 62%; height: auto; }
.ph .icon { width: 44px; height: 44px; stroke-width: 1.5; opacity: 0.7; }
.ph__label { font-size: 0.9375rem; font-weight: 600; }
.gallery__thumb .ph { padding: 8px; }
.gallery__thumb .ph .icon { width: 26px; height: 26px; }
.gallery__thumb .ph__device { width: 72%; }

.buy__title { font-size: clamp(2rem, 4vw, 2.75rem); }

.price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin-top: 16px;
}

.price__amount {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.price__note { font-weight: 600; color: var(--ink-soft); }

.order {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
}

.order__label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.qty {
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--paper);
}

.qty__btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition:
    transform 120ms var(--ease-out),
    background-color 160ms ease;
}

.qty__btn:active { transform: scale(0.9); }
.qty__btn:disabled { opacity: 0.35; cursor: not-allowed; }

@media (hover: hover) {
  .qty__btn:not(:disabled):hover { background: var(--brand-soft); }
}

.qty__input {
  width: 44px;
  border: 0;
  background: transparent;
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  text-align: center;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
  appearance: textfield;
}

.qty__input::-webkit-inner-spin-button,
.qty__input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.order__total { text-align: right; }
.order__total-label { display: block; font-weight: 600; color: var(--ink-soft); }

.order__total-amount {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.order__shipping {
  margin-top: 12px;
  font-size: 0.9375rem;
  text-align: right;
  color: var(--ink-soft);
}

.order__shipping.is-free { font-weight: 700; color: #0f7b4a; }

.buy__cta { margin-top: 20px; min-height: 62px; font-size: 1.3125rem; }

.trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.trust li { display: inline-flex; align-items: center; gap: 6px; }
.trust .icon { width: 18px; height: 18px; }

@media (max-width: 899px) {
  .product { grid-template-columns: 1fr; }
  .gallery { position: static; }
}

/* ---------- FAQ ---------- */
.faq {
  max-width: 780px;
  margin-inline: auto;
}

.faq__item {
  border-radius: var(--radius-md);
  background: var(--brand-soft);
}

.faq__item + .faq__item { margin-top: 12px; }

.faq__q-wrap { margin: 0; font-size: inherit; }

.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  min-height: 68px;
  padding: 18px 22px 18px 26px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}

.faq__chevron {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  background: var(--paper);
  transition:
    transform 260ms var(--ease-out),
    background-color 160ms ease;
}

.faq__item.is-open .faq__chevron {
  transform: rotate(180deg);
  background: var(--brand);
  color: var(--on-brand);
}

.faq__a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 280ms var(--ease-out);
}

.faq__item.is-open .faq__a { grid-template-rows: 1fr; }

.faq__a-inner {
  overflow: hidden;
  visibility: hidden;
  transition: visibility 0s linear 280ms;
}

.faq__item.is-open .faq__a-inner {
  visibility: visible;
  transition: none;
}

.faq__a-content {
  max-width: 62ch;
  padding: 0 26px 24px;
  color: var(--ink-soft);
}

.faq__a-content > * + * { margin-top: 12px; }
.faq__a-content ul,
.faq__a-content ol { padding-left: 1.25em; }
.faq__a-content a { color: var(--ink); text-decoration-color: var(--brand); text-underline-offset: 3px; }

/* ---------- Footer ---------- */
.site-footer {
  padding-block: 28px calc(28px + var(--buybar-space, 0px));
  background: var(--ink);
  color: color-mix(in srgb, var(--paper) 72%, var(--ink));
  font-size: 0.875rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}

.site-footer__logo img { height: 40px; width: auto; }

.site-footer__links {
  display: flex;
  gap: 4px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-underline-offset: 4px;
}

/* ---------- Barra de compra fija (móvil) ---------- */
.buybar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  background: var(--paper);
  border-top: 1px solid var(--line);
  box-shadow: 0 -12px 30px -18px rgb(0 0 0 / 0.25);
  transform: translateY(110%);
  transition: transform 300ms var(--ease-out);
}

.buybar.is-visible { transform: none; }

.buybar__name { font-weight: 700; line-height: 1.2; }
.buybar__price { font-size: 0.9375rem; color: var(--ink-soft); }

@media (max-width: 899px) {
  .buybar { display: flex; }
  body { --buybar-space: 76px; }
}

/* ---------- Aviso (toast) ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--buybar-space, 0px));
  z-index: 60;
  width: max-content;
  max-width: calc(100% - 2 * var(--gutter));
  padding: 14px 20px;
  border-radius: var(--radius-md);
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  translate: -50% 0;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition:
    opacity 200ms var(--ease-out),
    transform 260ms var(--ease-out);
}

.toast.is-visible { opacity: 1; transform: none; }

/* ---------- Hero: texto del editor ---------- */
.hero__lead p + p { margin-top: 12px; }

/* ---------- Introducción ---------- */
.intro { padding-block: clamp(64px, 9vw, 112px) 0; }
.intro + .section { padding-top: clamp(56px, 8vw, 96px); }

.intro__text {
  max-width: 46rem;
  margin-inline: auto;
  text-align: center;
  font-size: clamp(1.25rem, 2.3vw, 1.625rem);
  line-height: 1.5;
}

.intro__text > * + * { margin-top: 16px; }
.intro__text a { text-decoration-color: var(--brand); text-underline-offset: 4px; }

/* ---------- Producto: fotos ---------- */
.gallery__img,
.gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery__caption {
  position: absolute;
  left: 50%;
  bottom: 16px;
  translate: -50% 0;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgb(255 255 255 / 0.9);
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
}

.delivery {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-weight: 700;
  color: #0f7b4a;
}

.delivery .icon { width: 20px; height: 20px; }

/* ---------- Producto: descripción (editor de ACF) ---------- */
.buy__desc {
  margin-top: 20px;
  color: var(--ink-soft);
}

.buy__desc > * + * { margin-top: 14px; }

.buy__desc ul {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
  color: var(--ink);
}

.buy__desc li {
  position: relative;
  padding-left: 34px;
  line-height: 1.45;
}

.buy__desc li::before,
.buy__desc li::after {
  content: "";
  position: absolute;
}

.buy__desc li::before {
  left: 0;
  top: 0;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: var(--brand);
}

.buy__desc li::after {
  left: 5px;
  top: 5px;
  width: 13px;
  height: 13px;
  background: var(--on-brand);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Producto: color y talla ---------- */
.option {
  position: relative;
  min-width: 0;
  margin: 28px 0 0;
  padding: 0;
  border: 0;
}

.option__legend {
  float: left;
  width: 100%;
  margin-bottom: 12px;
  padding: 0;
  font-weight: 700;
}

.option .swatches,
.option .sizes { clear: both; }

.option__value { font-weight: 500; color: var(--ink-soft); }

.option__guide {
  position: absolute;
  top: -11px;
  right: 0;
  min-height: 44px;
  padding: 0 2px;
  border: 0;
  background: none;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--brand);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  cursor: pointer;
}

.swatches,
.sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.swatch {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.swatch__dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.14);
  transition: transform 140ms var(--ease-out);
}

.swatch::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 3px solid transparent;
  border-radius: 50%;
  transition: border-color 160ms ease;
}

.swatch:has(input:checked)::after { border-color: var(--ink); }
.swatch:active .swatch__dot { transform: scale(0.9); }

.swatch:has(input:focus-visible)::after {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}

.size { cursor: pointer; -webkit-tap-highlight-color: transparent; }

.size__box {
  display: grid;
  place-items: center;
  min-width: 58px;
  height: 48px;
  padding: 0 14px;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease,
    transform 140ms var(--ease-out);
}

@media (hover: hover) {
  .size:hover .size__box { border-color: var(--brand); }
}

.size:active .size__box { transform: scale(0.95); }

.size input:checked + .size__box {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.size input:focus-visible + .size__box {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}

.option__error {
  margin-top: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #b42318;
}

.option.has-error .size__box { border-color: #b42318; }

/* Color y talla en la misma fila (pasan a dos filas si no caben) */
.options-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0 28px;
}

.options-row .option { flex: 0 1 auto; }
.options-row .swatches,
.options-row .sizes { gap: 6px; }
.options-row .swatch { width: 42px; height: 42px; }
.options-row .swatch__dot { width: 32px; height: 32px; }
.options-row .size__box { min-width: 46px; height: 44px; padding: 0 10px; font-size: 1rem; }
.co-unit .options-row .option { margin-top: 18px; }

/* ---------- Guía de tallas ---------- */
.dialog {
  width: min(760px, calc(100% - 24px));
  max-height: calc(100dvh - 32px);
  padding: 12px;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 80px -20px rgb(0 0 0 / 0.4);
}

.dialog::backdrop { background: rgb(0 0 0 / 0.45); }

.dialog__head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  height: 0;
}

.dialog__title { font-size: 1.5rem; }

.dialog__close {
  margin: 4px 4px 0 0;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.15);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--brand-soft);
  cursor: pointer;
}

.dialog__img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

.dialog__full {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  margin-top: 4px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-underline-offset: 4px;
}

@media (prefers-reduced-motion: no-preference) {
  .dialog[open] { animation: dialog-in 240ms var(--ease-out); }
  .dialog[open]::backdrop { animation: fade-in 240ms ease-out; }
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
}

@keyframes fade-in {
  from { opacity: 0; }
}

/* ==========================================================================
   Páginas informativas (términos, privacidad…)
   ========================================================================== */
.legal-hero {
  padding-block: clamp(40px, 7vw, 80px) clamp(32px, 5vw, 56px);
  background: var(--brand-soft);
}

.legal-hero__inner { max-width: 880px; }

.legal-hero__title {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 700;
}

.legal-hero__lead {
  max-width: 44rem;
  margin-top: 14px;
  font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
  color: var(--ink-soft);
}

.legal-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin-top: 20px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.legal-hero__meta span { display: inline-flex; align-items: center; gap: 6px; }
.legal-hero__meta .icon { width: 18px; height: 18px; }

.legal-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
  padding-block: clamp(32px, 5vw, 64px);
}

.legal-layout--single { grid-template-columns: minmax(0, 1fr); max-width: 880px; }

/* Índice */
.legal-toc {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  max-height: calc(100vh - var(--header-h) - 48px);
  overflow-y: auto;
}

.legal-toc__summary {
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.legal-toc__summary::-webkit-details-marker { display: none; }

.legal-toc__list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0 0 0 2px;
  list-style: none;
  border-left: 2px solid var(--line);
}

.legal-toc__link {
  display: block;
  margin-left: -2px;
  padding: 7px 12px;
  border-left: 2px solid transparent;
  font-size: 0.9375rem;
  line-height: 1.35;
  color: var(--ink-soft);
  text-decoration: none;
  transition:
    color 160ms ease,
    border-color 160ms ease;
}

@media (hover: hover) {
  .legal-toc__link:hover { color: var(--ink); }
}

.legal-toc__link[aria-current="true"] {
  border-left-color: var(--brand);
  font-weight: 700;
  color: var(--ink);
}

/* Contenido */
.legal-body {
  max-width: 70ch;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
}

.legal-body > * + * { margin-top: 16px; }

.legal-body h2 {
  margin-top: 48px;
  font-size: clamp(1.375rem, 2.6vw, 1.625rem);
  line-height: 1.25;
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.legal-body h3 { margin-top: 28px; font-size: 1.1875rem; }

.legal-body ul,
.legal-body ol { padding-left: 0; list-style: none; }

.legal-body ul > li {
  position: relative;
  padding-left: 22px;
}

.legal-body ul > li + li { margin-top: 10px; }

.legal-body ul > li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
}

.legal-body a {
  font-weight: 600;
  color: var(--brand-deep);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.legal-body strong { font-weight: 700; }

/* Resumen destacado */
.legal-body .legal-summary {
  margin-top: 0;
  padding: 24px 28px;
  border-left: 5px solid var(--brand);
  border-radius: var(--radius-md);
  background: var(--brand-soft);
}

.legal-body .legal-summary__title {
  margin-top: 0;
  font-size: 1.25rem;
}

.legal-body .legal-summary ul { margin-top: 14px; }

/* Datos pendientes (solo mientras el documento está en borrador) */
.legal-pending {
  padding: 1px 6px;
  border-radius: 6px;
  background: #fff3bf;
  color: #5c3c00;
  font-weight: 700;
}

/* Ayuda al final */
.legal-help { padding-bottom: clamp(48px, 7vw, 88px); }

.legal-help__card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding: 24px 28px;
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
}

.legal-help__title { font-size: 1.375rem; }
.legal-help__text { margin-top: 4px; color: var(--ink-soft); }

.legal-help__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}

.legal-help__actions .icon { width: 20px; height: 20px; fill: currentColor; stroke: none; }

.legal-top {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 16px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink-soft);
}

@media (max-width: 899px) {
  .legal-layout { grid-template-columns: minmax(0, 1fr); }

  .legal-toc {
    position: static;
    max-height: none;
    padding: 4px 18px;
    border: 2px solid var(--line);
    border-radius: var(--radius-md);
  }

  .legal-toc__summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 48px;
    margin: 0;
  }

  .legal-toc__summary::after {
    content: "";
    width: 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    rotate: 45deg;
    translate: 0 -3px;
    transition: rotate 200ms var(--ease-out);
  }

  .legal-toc__details[open] .legal-toc__summary::after { rotate: 225deg; translate: 0 3px; }
  .legal-toc__list { margin-bottom: 14px; }
}

/* Impresión: solo el documento */
@media print {
  .site-header,
  .site-footer,
  .legal-toc,
  .legal-help,
  .wa-float,
  .bhrcredits,
  .toast { display: none !important; }

  .legal-hero { background: none; padding: 0 0 16px; }
  .legal-layout { display: block; padding: 0; }
  .legal-body { max-width: none; font-size: 11pt; }
  .legal-body a { color: inherit; }
}

/* Checkout: aceptación de términos */
.co-consent { margin-top: 28px; }

.co-consent__label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9375rem;
  line-height: 1.5;
  cursor: pointer;
}

.co-consent__input {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  accent-color: var(--brand-deep);
  cursor: pointer;
}

.co-consent__label a { font-weight: 600; color: var(--ink); text-underline-offset: 3px; }
.co-consent.has-error .co-consent__label { color: #b42318; }

/* ---------- Listado de landings ---------- */
.landing-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.landing-list a {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 16px;
  border-radius: var(--radius-lg);
  font-weight: 600;
  text-decoration: none;
}

.landing-list img { width: 200px; height: auto; }

/* ==========================================================================
   Checkout
   ========================================================================== */
.site-header__secure {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.site-header__secure .icon { width: 18px; height: 18px; }

.checkout {
  min-height: 70vh;
  padding-block: clamp(20px, 4vw, 48px) clamp(56px, 8vw, 96px);
  background: var(--brand-soft);
}

.checkout__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
}

.co-step {
  padding: clamp(20px, 4vw, 40px);
  border-radius: var(--radius-lg);
  background: var(--paper);
}

.co-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin: -10px 0 4px;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
}

.co-back .icon { width: 18px; height: 18px; }

@media (hover: hover) {
  .co-back:hover { color: var(--ink); }
}

.co-stepper {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.co-title {
  margin-top: 4px;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.co-title:focus { outline: none; }

.co-lead {
  margin-top: 8px;
  color: var(--ink-soft);
}

.co-alert {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: #fdecea;
  color: #8a1c12;
  font-weight: 600;
}

/* Campos obligatorios y guardado automático */
.field__req {
  margin-left: 2px;
  font-weight: 700;
  color: #d92d20;
}

.co-required-note {
  margin-top: 8px;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.co-block__hint {
  margin: -6px 0 16px;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.co-block__hint a { color: inherit; text-underline-offset: 3px; }

.co-autosave {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-height: 20px;
  margin-top: 6px;
  font-size: 0.8125rem;
  color: var(--ink-soft);
  transition: opacity 200ms ease;
}

.co-autosave:empty { opacity: 0; }
.co-autosave[data-state="saved"] { color: #146c2e; }
.co-autosave .icon { width: 14px; height: 14px; stroke-width: 3; }

/* Unidades (resumen) */
.co-units {
  display: grid;
  gap: 16px;
  margin: 24px 0;
}

.co-unit {
  padding: 18px 20px 20px;
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
}

.co-unit__head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.co-unit__img {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.co-unit__info { flex: 1; }

.co-unit__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
}

.co-unit__price { font-size: 0.9375rem; color: var(--ink-soft); }

.co-unit__remove {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--ink-soft);
  cursor: pointer;
  transition:
    transform 140ms var(--ease-out),
    color 160ms ease;
}

.co-unit__remove:active { transform: scale(0.92); }

@media (hover: hover) {
  .co-unit__remove:hover { color: #b42318; }
}

.co-unit .option { margin-top: 18px; }

/* Bloques del formulario */
.co-block {
  min-width: 0;
  margin: 32px 0 0;
  padding: 0;
  border: 0;
}

.co-block__title {
  margin-bottom: 14px;
  padding: 0;
  font-family: var(--font-display);
  font-size: 1.3125rem;
  font-weight: 600;
}

.field + .field { margin-top: 16px; }

.field__label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9375rem;
  font-weight: 600;
}

.field__optional { font-weight: 400; color: var(--ink-soft); }

.field__input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

select.field__input {
  padding-right: 44px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 14px center;
  background-repeat: no-repeat;
  background-size: 18px;
}

.field__input::placeholder { color: color-mix(in srgb, var(--ink-soft) 60%, transparent); }

.field__input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent);
}

.field.has-error .field__input { border-color: #b42318; }

.field__hint {
  margin-top: 6px;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.field__error {
  margin-top: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #b42318;
}

.field__error:empty { display: none; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.field-row .field + .field { margin-top: 0; }

/* Mascotas */
.co-pets { display: grid; gap: 24px; }

.co-pet + .co-pet {
  padding-top: 24px;
  border-top: 2px dashed var(--line);
}

.collar-preview {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 8px;
  background: var(--brand);
  color: var(--on-brand);
  font-family: var(--font-display);
  font-size: 1rem;
  vertical-align: middle;
}

.co-result__engraving { font-weight: 500; color: var(--ink-soft); }

.co-pet__title {
  margin-bottom: 12px;
  font-weight: 700;
}

.co-pet__title span {
  margin-left: 6px;
  font-weight: 500;
  color: var(--ink-soft);
}

/* Pagar */
.co-pay { margin-top: 32px; min-height: 60px; font-size: 1.25rem; }

.btn.is-loading { cursor: progress; opacity: 0.85; }

.co-note {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 0.875rem;
  text-align: center;
  color: var(--ink-soft);
}

.co-note .icon { width: 16px; height: 16px; flex: none; }

/* Resumen lateral */
.co-summary {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--paper);
}

.co-summary__product {
  display: flex;
  align-items: center;
  gap: 14px;
}

.co-summary__img {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.co-summary__title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.25;
}

.co-summary__price { font-size: 0.875rem; color: var(--ink-soft); }

.co-summary__lines {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.co-summary__lines li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9375rem;
}

.co-summary__meta { color: var(--ink-soft); text-align: right; }

.co-summary__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 16px;
  font-weight: 600;
}

.co-summary__total strong {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-variant-numeric: tabular-nums;
}

.co-summary__rows { margin: 14px 0 0; }

.co-summary__rows div {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 0.9375rem;
}

.co-summary__rows dt { color: var(--ink-soft); }
.co-summary__rows dd { margin: 0; font-variant-numeric: tabular-nums; }
.co-summary__rows dd.is-free { font-weight: 700; color: #0f7b4a; }

.co-summary__hint {
  margin-top: 4px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #0f7b4a;
}

.co-summary__total { padding-top: 12px; border-top: 1px solid var(--line); }

@media (max-width: 899px) {
  .checkout__grid { grid-template-columns: 1fr; }
  .co-summary { position: static; order: -1; padding: 18px 20px; }
  .co-summary__total { margin-top: 12px; }
  .co-summary__total strong { font-size: 1.375rem; }
}

@media (max-width: 599px) {
  .field-row { grid-template-columns: 1fr; }
}

/* Resultado */
.co-result {
  max-width: 720px;
}

.co-result__card,
.co-result__order {
  padding: clamp(24px, 5vw, 48px);
  border-radius: var(--radius-lg);
  background: var(--paper);
}

.co-result__card { text-align: center; }

.co-result__icon {
  display: inline-grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.co-result__icon .icon { width: 36px; height: 36px; stroke-width: 2.5; }
.co-result__icon--pagado { background: #e3f5e8; color: #146c2e; }
.co-result__icon--rechazado { background: #fdecea; color: #b42318; }

@media (prefers-reduced-motion: no-preference) {
  .co-result__icon { animation: result-pop 500ms var(--ease-drop) both; }
}

@keyframes result-pop {
  from { opacity: 0; transform: scale(0.6); }
}

.co-result__card .co-lead { max-width: 34rem; margin-inline: auto; }

.co-result__code {
  display: inline-grid;
  gap: 2px;
  margin-top: 20px;
  padding: 12px 24px;
  border: 2px dashed var(--brand);
  border-radius: var(--radius-md);
  background: var(--brand-soft);
}

.co-result__code span { font-size: 0.875rem; font-weight: 600; color: var(--ink-soft); }

.co-result__code strong {
  font-family: var(--font-display);
  font-size: 1.75rem;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.co-result__delivery {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-weight: 700;
  color: #0f7b4a;
}

.co-result__delivery .icon { width: 20px; height: 20px; }

.co-result__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px 24px;
  margin-top: 28px;
}

.co-result__order { margin-top: 16px; }

.co-result__subtitle {
  font-size: 1.375rem;
}

.co-result__items {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.co-result__items li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.co-result__items span { color: var(--ink-soft); }

.co-result__meta { margin: 8px 0 0; }

.co-result__meta div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.co-result__meta div:last-child { border-bottom: 0; font-weight: 700; }
.co-result__meta dt { color: var(--ink-soft); }
.co-result__meta dd { margin: 0; text-align: right; }

/* ---------- WhatsApp ---------- */
.co-whatsapp {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 8px;
  font-weight: 700;
  color: #0f7b4a;
  text-align: center;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  text-decoration-color: color-mix(in srgb, #0f7b4a 35%, transparent);
  transition: text-decoration-color 160ms ease;
}

@media (hover: hover) {
  .co-whatsapp:hover { text-decoration-color: #0f7b4a; }
}

.co-whatsapp__icon { width: 20px; height: 20px; flex: none; }

.wa-float {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(16px + var(--wa-lift, 0px) + env(safe-area-inset-bottom));
  z-index: 45;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  box-shadow:
    0 2px 4px rgb(0 0 0 / 0.12),
    0 10px 24px -6px rgb(0 0 0 / 0.3);
  transition:
    transform 160ms var(--ease-out),
    opacity 200ms ease,
    visibility 0s linear 0s,
    bottom 300ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}

.wa-float.is-hidden {
  opacity: 0;
  transform: translateY(12px) scale(0.9);
  visibility: hidden;
  pointer-events: none;
  transition:
    transform 200ms var(--ease-out),
    opacity 160ms ease,
    visibility 0s linear 200ms,
    bottom 300ms var(--ease-out);
}

.wa-float:active { transform: scale(0.93); }

@media (hover: hover) {
  .wa-float:hover { transform: scale(1.06); }
}

.wa-float__icon { width: 32px; height: 32px; }

/* En móvil sube cuando aparece la barra de compra fija */
body:has(.buybar.is-visible) .wa-float {
  bottom: calc(16px + var(--buybar-space, 0px) + var(--wa-lift, 0px) + env(safe-area-inset-bottom));
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation: none !important;
  }
}
