
/* ── Base de <dialog> ──────────────────────────────────────────────────── */
.a-sheet,
.a-modal {
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--a-ink);
}

.a-sheet::backdrop,
.a-modal::backdrop {
  background: color-mix(in srgb, var(--a-scrim) 55%, transparent);
}

.a-sheet[open]::backdrop,
.a-modal[open]::backdrop {
  animation: a-fade-in var(--a-dur-drawer) ease;
}

/* ── Carrito lateral ───────────────────────────────────────────────────── */
.a-sheet {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: var(--a-z-drawer);
  width: min(420px, 100vw);
  height: 100%;
}

.a-sheet[open] .a-sheet__panel {
  animation: a-sheet-in var(--a-dur-drawer) var(--a-ease-drawer);
}

@keyframes a-sheet-in {
  from { transform: translateX(100%); }
}

.a-sheet__panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--a-surface);
  box-shadow: var(--a-shadow-lg);
}

.a-sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--a-space-3);
  /* 20px a ambos lados: el anillo de foco del botón cerrar nunca toca el borde de la pantalla. */
  padding: var(--a-space-3) var(--a-space-5);
  border-bottom: 1px solid var(--a-line);
}

.a-sheet__title {
  display: flex;
  align-items: center;
  gap: var(--a-space-2);
  font-size: var(--a-text-xl);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.a-sheet__title > .a-icon { color: var(--a-brand-700); }

.a-sheet__count {
  min-width: 26px;
  padding: 2px 8px;
  border-radius: var(--a-radius-pill);
  background: var(--a-brand-50);
  color: var(--a-brand-800);
  font-size: var(--a-text-sm);
  font-weight: 800;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.a-sheet__body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--a-space-1) var(--a-space-5);
}

.a-sheet__foot {
  display: grid;
  gap: var(--a-space-3);
  padding: var(--a-space-4) var(--a-space-5) calc(var(--a-space-4) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--a-line);
  background: var(--a-surface);
}

.a-sheet__note {
  display: flex;
  gap: var(--a-space-2);
  font-size: var(--a-text-sm);
  line-height: 1.45;
  color: var(--a-muted);
}

.a-sheet__note .a-icon { flex-shrink: 0; margin-top: 1px; color: var(--a-brand-700); }

.a-sheet__subtle {
  justify-self: center;
}

/* Línea del carrito (la pinta site.js) */
.a-cline {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: var(--a-space-3);
  padding-block: var(--a-space-4);
  border-bottom: 1px solid var(--a-line);
}

.a-cline:last-child { border-bottom: 0; }

.a-cline__img {
  width: 72px;
  height: 72px;
  overflow: hidden;
  border: 1px solid var(--a-line);
  border-radius: var(--a-radius);
  background: var(--a-paper);
}

.a-cline__img img { width: 100%; height: 100%; object-fit: cover; }

/* Línea sin foto: inicial sobre el tinte de marca (nunca un <img> sin src). */
.a-cline__img { display: grid; place-items: center; }
.a-cline__ph {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: var(--a-brand-50);
  color: var(--a-brand-700);
  font-size: var(--a-text-xl);
  font-weight: 800;
}

.a-cline__body { display: grid; align-content: start; gap: 4px; min-width: 0; }

.a-cline__name {
  display: -webkit-box;
  overflow: hidden;
  font-size: var(--a-text-md);
  font-weight: 600;
  line-height: 1.3;
  color: var(--a-ink);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

a.a-cline__name:hover { color: var(--a-brand-700); text-decoration: underline; }

.a-cline__meta { font-size: var(--a-text-xs); color: var(--a-muted); }

.a-cline__tag {
  justify-self: start;
  padding: 1px 6px;
  border-radius: var(--a-radius-sm);
  background: var(--a-brand-50);
  color: var(--a-brand-800);
  font-size: var(--a-text-xs);
  font-weight: 700;
}

.a-cline__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--a-space-2);
  margin-top: 4px;
}

.a-cline__price { display: grid; justify-items: end; font-variant-numeric: tabular-nums; }
.a-cline__price b { font-size: var(--a-text-md); font-weight: 800; }
.a-cline__price small { font-size: var(--a-text-xs); color: var(--a-muted); }

.a-cline__remove { align-self: start; margin: -6px -8px 0 0; }

/* Vacío del carrito */
.a-sheet .a-empty { margin-block: var(--a-space-10); border: 0; }

/* ── Modal centrado ────────────────────────────────────────────────────── */
.a-modal {
  position: fixed;
  inset: 0;
  z-index: calc(var(--a-z-drawer) + 5);
  display: none;
  width: 100%;
  height: 100%;
  padding: var(--a-space-3);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.a-modal[open] {
  display: grid;
  place-items: center;
}

.a-modal__panel {
  position: relative;
  width: min(100%, 460px);
  border-radius: var(--a-radius-xl);
  background: var(--a-surface);
  box-shadow: var(--a-shadow-lg);
  transform-origin: center;
}

.a-modal[open] .a-modal__panel {
  animation: a-modal-in 220ms var(--a-ease-out);
}

@keyframes a-modal-in {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
}

.a-modal__close {
  position: absolute;
  top: var(--a-space-2);
  right: var(--a-space-2);
  z-index: 2;
  background: var(--a-surface);
}

/* Login / registro */
.a-modal--auth .a-modal__panel {
  display: grid;
  width: min(100%, 920px);
  overflow: hidden;
}

@media (min-width: 860px) {
  .a-modal--auth .a-modal__panel { grid-template-columns: 0.9fr 1.1fr; }
}

.a-auth__aside {
  position: relative;
  display: none;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--a-space-4);
  min-height: 100%;
  padding: var(--a-space-8);
  overflow: hidden;
  background: var(--a-brand-800) url("/images/mujer.webp") center / cover no-repeat;
  color: var(--a-on-fill);
}

@media (min-width: 860px) {
  .a-auth__aside { display: flex; }
}

.a-auth__aside::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--a-scrim-brand) 15%, transparent) 0%, color-mix(in srgb, var(--a-scrim-brand) 84%, var(--a-scrim)) 62%, color-mix(in srgb, var(--a-scrim-brand) 70%, var(--a-scrim)) 100%);
}

.a-auth__aside > * { position: relative; }

/* logoaissa.png es cuadrado con mucho aire: se recorta a 2:1 para que el logo se vea grande. */
.a-auth__aside-logo,
.a-auth__logo { aspect-ratio: 2 / 1; object-fit: cover; object-position: center; }
.a-auth__aside-logo {
  width: 180px;
  height: 90px;
  margin-bottom: auto;
}

.a-auth__aside-title {
  font-size: var(--a-text-3xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.a-auth__aside p { max-width: 34ch; color: var(--a-on-inverse); }

.a-auth__perks { display: grid; gap: var(--a-space-2); font-size: var(--a-text-md); font-weight: 600; }
.a-auth__perks li { display: flex; align-items: center; gap: var(--a-space-2); }
.a-auth__perks .a-icon { color: #9fdff4; }

.a-auth__main {
  display: grid;
  align-content: start;
  gap: var(--a-space-4);
  max-height: calc(var(--auth-vh, 100dvh) - 1.5rem);
  padding: var(--a-space-8) var(--a-space-5) var(--a-space-6);
  overflow-y: auto;
}

@media (min-width: 640px) {
  .a-auth__main { padding: var(--a-space-10) var(--a-space-8) var(--a-space-8); }
}

.a-auth__logo { width: 120px; height: 60px; }

@media (min-width: 860px) {
  .a-auth__logo { display: none; }
}

.a-auth__title { font-size: var(--a-text-2xl); font-weight: 800; letter-spacing: -0.02em; }
.a-auth__sub { margin-top: 2px; font-size: var(--a-text-md); color: var(--a-muted); }

.a-auth__switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding-top: var(--a-space-4);
  border-top: 1px solid var(--a-line);
  font-size: var(--a-text-md);
  color: var(--a-muted);
}

.a-auth__switch button {
  min-height: 44px;
  padding: 0 var(--a-space-2);
  border-radius: var(--a-radius-sm);
  color: var(--a-brand-700);
  font-weight: 800;
}

.a-auth__switch button:hover { text-decoration: underline; }

.a-auth__note { font-size: var(--a-text-xs); line-height: 1.5; color: var(--a-muted); }

/* ── Anuncio (components/announcement-modal) ─────────────────────────── */
/* Afiche editorial: colores planos y formas sólidas (sin degradados).
   Celular: foto arriba. Escritorio: foto en arco a la izquierda, contenido a la derecha. */
.a-modal--announce .a-modal__panel.a-announce-deck {
  --an-pink: #f21364;
  /* Rosa para texto chico y para el botón con texto blanco: el de marca da 4,2:1 y AA pide 4,5:1 */
  --an-pink-text: #d10f55;
  --an-pink-deep: #d10f55;
  --an-pink-soft: #ffe1ec;
  --an-sky: #3cc8f4;
  --an-sun: #ffd166;
  --an-ink: #1d1020;
  display: grid;
  width: min(100%, 460px);
  max-height: calc(100dvh - 32px);
  overflow: hidden auto;
  border-radius: 28px;
  box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.55);
}

:root[data-theme="dark"] .a-modal--announce .a-modal__panel.a-announce-deck {
  --an-pink-soft: #3a1022;
  --an-pink-text: #ff5c93;
  --an-ink: #ffd166;
}

@media (min-width: 760px) {
  .a-modal--announce .a-modal__panel.a-announce-deck.has-media { width: min(100%, 840px); overflow: hidden; }
  .a-announce.has-media { grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr); }
}

.a-announce-deck > .a-modal__close {
  z-index: 5;
  background: var(--a-surface);
  color: var(--a-ink);
  box-shadow: 0 6px 16px -8px rgb(0 0 0 / 0.45);
}

/* Formas sólidas reutilizables */
.a-an-shape { position: absolute; pointer-events: none; }

/* ── Foto ── */
.a-announce__media {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: end center;
  overflow: hidden;
  min-height: 300px;
  padding: 36px 36px 0;
  background: var(--an-pink-soft);
}
@media (min-width: 760px) {
  .a-announce.has-media .a-announce__media { min-height: 480px; padding: 48px 40px 0; }
}

.a-an-shape--sun { z-index: -1; top: 26px; right: -36px; width: 150px; height: 150px; border-radius: 50%; background: var(--an-sky); }
.a-an-shape--ring { z-index: -1; bottom: 38px; left: -34px; width: 120px; height: 120px; border: 14px solid var(--an-pink); border-radius: 50%; }
.a-an-shape--dots { z-index: -1; top: 22px; left: 18px; width: 70px; height: 70px; fill: var(--an-pink); opacity: 0.55; }

/* Foto en arco: esquinas de arriba totalmente redondas. */
.a-announce__frame {
  position: relative;
  width: 100%;
  max-width: 340px;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 999px 999px 0 0;
  background: var(--a-surface);
  box-shadow: 10px 0 0 var(--an-pink);
}
@media (max-width: 759px) {
  .a-announce__frame { max-width: 250px; }
}
.a-announce__frame img { width: 100%; height: 100%; object-fit: cover; }

/* Sticker redondo "Nuevo". */
.a-announce__stamp {
  position: absolute;
  z-index: 2;
  top: 28px;
  right: 28px;
  display: grid;
  place-items: center;
  align-content: center;
  width: 82px;
  height: 82px;
  border: 3px dashed var(--an-ink);
  border-radius: 50%;
  background: var(--an-sun);
  color: #2b1a00;
  transform: rotate(-14deg);
  box-shadow: 0 0 0 5px var(--an-sun);
  line-height: 1;
}
.a-announce__stamp b { font-size: 15px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.a-announce__stamp span { margin-top: 3px; font-size: 14px; color: var(--an-pink); }
:root[data-theme="dark"] .a-announce__stamp { border-color: #2b1a00; }

.a-announce__hurry {
  position: absolute;
  z-index: 2;
  left: 18px;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--an-ink);
  color: var(--a-surface);
  font-size: var(--a-text-xs);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Contenido ── */
.a-announce__body {
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: center;
  gap: var(--a-space-4);
  padding: var(--a-space-6);
  overflow: hidden;
  background: var(--a-surface);
}
@media (min-width: 760px) {
  .a-announce__body { padding: var(--a-space-8) 32px; }
}

.a-an-shape--quarter { z-index: -1; right: -60px; bottom: -60px; width: 140px; height: 140px; border-radius: 50%; background: var(--an-pink-soft); }
.a-an-shape--plus { z-index: -1; top: 70px; right: 26px; font-size: 34px; font-weight: 900; line-height: 1; color: var(--an-sky); }
.a-an-shape--squiggle { z-index: -1; left: 22px; bottom: 16px; width: 64px; height: 16px; fill: none; stroke: var(--an-sun); stroke-width: 4; stroke-linecap: round; }

.a-announce__kicker {
  display: flex;
  align-items: center;
  gap: var(--a-space-3);
  padding-right: var(--a-space-8);
  font-size: var(--a-text-xs);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--an-pink-text);
}
/* Logo PNG transparente, recortado a su zona útil (sin fondo blanco). */
.a-announce__brand { width: 84px; height: 42px; object-fit: cover; }
.a-announce__kicker span { padding-left: var(--a-space-3); border-left: 2px solid var(--a-line); }

.a-announce__title {
  font-size: clamp(1.75rem, 5.2vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.02;
  text-wrap: balance;
  overflow-wrap: normal;
  hyphens: none;
  color: var(--a-ink);
}
/* Marcador amarillo plano bajo el título. */
.a-announce__title span {
  text-decoration-line: underline;
  text-decoration-color: var(--an-sun);
  text-decoration-thickness: 0.3em;
  text-underline-offset: -0.12em;
  text-decoration-skip-ink: none;
}

.a-announce__desc { font-size: var(--a-text-md); line-height: 1.6; color: var(--a-ink-2); white-space: pre-line; }

/* Ticket de vigencia: días grandes y troquel punteado. */
.a-announce__ticket {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--a-space-3);
  padding: 12px 16px;
  border: 2px solid var(--a-ink);
  border-radius: 18px;
  background: var(--a-surface);
}
.a-announce__day { display: grid; justify-items: center; line-height: 1; }
.a-announce__day small { font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--a-muted); }
.a-announce__day b { margin-top: 4px; font-size: 30px; font-weight: 900; letter-spacing: -0.04em; color: var(--a-ink); }
.a-announce__day span { margin-top: 2px; font-size: var(--a-text-xs); font-weight: 800; text-transform: uppercase; color: var(--an-pink-text); }
.a-announce__to { color: var(--a-muted); }

.a-announce__left {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding-left: var(--a-space-4);
  border-left: 2px dashed var(--a-line-strong);
}
.a-announce__left b {
  display: grid;
  place-items: center;
  min-width: 46px;
  height: 46px;
  padding: 0 6px;
  border-radius: 14px;
  background: var(--an-pink);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}
.a-announce__left span { font-size: var(--a-text-xs); font-weight: 800; line-height: 1.2; color: var(--a-ink-2); }

.a-announce__bar { height: 8px; margin-top: calc(-1 * var(--a-space-2)); border-radius: 999px; background: var(--an-pink-soft); overflow: hidden; }
.a-announce__bar span { display: block; width: var(--p); height: 100%; border-radius: inherit; background: var(--an-pink); }

.a-announce__place { display: flex; align-items: center; gap: var(--a-space-2); font-size: var(--a-text-sm); color: var(--a-ink-2); }
.a-announce__place .a-icon { flex-shrink: 0; color: var(--an-pink); }
.a-announce__place b { color: var(--a-ink); }

/* Botón sólido con sombra dura desplazada. */
.a-announce__cta,
.a-announce__cta:hover {
  border: 2px solid var(--an-ink);
  background: var(--an-pink-deep);
  color: #fff;
  box-shadow: 5px 5px 0 var(--an-ink);
  transition: transform 0.15s var(--a-ease-out), box-shadow 0.15s var(--a-ease-out);
}
.a-announce__cta .a-icon { transition: transform 0.25s var(--a-ease-out); }
@media (hover: hover) {
  .a-announce__cta:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--an-ink); }
  .a-announce__cta:hover .a-icon:last-child { transform: translateX(3px); }
}
.a-announce__cta:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--an-ink); }

.a-announce__social { display: flex; align-items: center; justify-content: space-between; gap: var(--a-space-3); }
.a-announce__social > span { font-size: var(--a-text-sm); font-weight: 800; color: var(--a-ink-2); }
.a-announce__social ul { display: flex; gap: var(--a-space-2); }
.a-announce__net {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: #fff;
  transition: transform 0.2s var(--a-ease-out);
}
.a-announce__net--instagram { background: #e1306c; }
.a-announce__net--facebook { background: #1877f2; }
.a-announce__net--tiktok { background: #111; }
.a-announce__net--whatsapp { background: #25d366; }
@media (hover: hover) { .a-announce__net:hover { transform: translateY(-3px) rotate(-6deg); } }

.a-announce__note { font-size: var(--a-text-xs); color: var(--a-muted); text-align: center; }

/* Movimiento: la foto sube, el sticker gira, el contenido entra en cascada y la barra se llena. */
@keyframes a-an-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes a-an-photo { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes a-an-stamp { from { opacity: 0; transform: rotate(-60deg) scale(0.4); } to { opacity: 1; transform: rotate(-14deg) scale(1); } }
@keyframes a-an-spin { to { transform: rotate(360deg); } }
@keyframes a-an-bar { from { width: 0; } }

@media (prefers-reduced-motion: no-preference) {
  .a-modal--announce[open] .a-announce.is-active .a-announce__frame { animation: a-an-photo 620ms var(--a-ease-out) both; }
  .a-modal--announce[open] .a-announce.is-active .a-announce__stamp { animation: a-an-stamp 520ms 380ms cubic-bezier(0.34, 1.56, 0.64, 1) both; }
  .a-modal--announce[open] .a-an-shape--ring { animation: a-an-spin 18s linear infinite; border-right-color: transparent; }
  .a-modal--announce[open] .a-announce.is-active .a-announce__body > :not(.a-an-shape) { animation: a-an-rise 500ms var(--a-ease-out) both; }
  .a-modal--announce[open] .a-announce.is-active .a-announce__body > :nth-child(5) { animation-delay: 70ms; }
  .a-modal--announce[open] .a-announce.is-active .a-announce__body > :nth-child(6) { animation-delay: 130ms; }
  .a-modal--announce[open] .a-announce.is-active .a-announce__body > :nth-child(7) { animation-delay: 190ms; }
  .a-modal--announce[open] .a-announce.is-active .a-announce__body > :nth-child(8) { animation-delay: 250ms; }
  .a-modal--announce[open] .a-announce.is-active .a-announce__body > :nth-child(n + 9) { animation-delay: 310ms; }
  .a-modal--announce[open] .a-announce.is-active .a-announce__bar span { animation: a-an-bar 1.1s 450ms var(--a-ease-out) both; }
}

/* ── Slider de anuncios ── */
/* Las diapositivas se apilan en la misma celda: el panel toma el alto de la más alta y no salta al cambiar. */
.a-announce-track { display: grid; }
.a-announce { display: grid; grid-area: 1 / 1; min-width: 0; background: var(--a-surface); }
.a-announce-deck.is-multi .a-announce:not(.is-active) { visibility: hidden; opacity: 0; pointer-events: none; }

@media (prefers-reduced-motion: no-preference) {
  .a-announce-deck.is-multi .a-announce { transition: opacity 0.4s var(--a-ease-out), transform 0.5s var(--a-ease-out), visibility 0s linear 0.4s; }
  .a-announce-deck.is-multi .a-announce.is-active { transition-delay: 0s; }
  .a-announce-deck.is-multi[data-dir="next"] .a-announce:not(.is-active) { transform: translateX(-24px); }
  .a-announce-deck.is-multi[data-dir="prev"] .a-announce:not(.is-active) { transform: translateX(24px); }
}

/* Indicador discreto: líneas finas arriba, estilo historias. La activa se llena durante el avance automático. */
.a-announce-steps {
  position: absolute;
  z-index: 6;
  top: 10px;
  left: 16px;
  right: 72px;
  display: flex;
  gap: 4px;
  pointer-events: none;
}
.a-announce-steps__line {
  position: relative;
  flex: 1;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(29 16 32 / 0.18);
}
.a-announce-steps__line i { position: absolute; inset: 0; width: 0; border-radius: inherit; background: var(--an-pink); }
.a-announce-steps__line[aria-current="true"] i { width: 100%; }
:root[data-theme="dark"] .a-announce-steps__line { background: rgb(255 255 255 / 0.2); }

@keyframes a-an-tick { from { width: 0; } to { width: 100%; } }
@media (prefers-reduced-motion: no-preference) {
  .a-announce-deck.is-ticking .a-announce-steps__line[aria-current="true"] i { animation: a-an-tick 7s linear both; }
}

/* ── Botones flotantes ─────────────────────────────────────────────────── */
.a-fabs {
  position: fixed;
  right: var(--a-space-4);
  bottom: calc(var(--a-space-4) + env(safe-area-inset-bottom));
  z-index: calc(var(--a-z-header) + 1);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--a-space-3);
  pointer-events: none;
}

.a-fab {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  box-shadow: 0 10px 24px -8px rgba(15, 23, 42, 0.45), 0 2px 6px rgba(15, 23, 42, 0.12);
  pointer-events: auto;
  transition: transform var(--a-dur-press) var(--a-ease-out), box-shadow var(--a-dur) ease;
}

.a-fab:active { transform: scale(0.94); }

@media (hover: hover) {
  .a-fab:hover { box-shadow: 0 14px 30px -10px rgba(15, 23, 42, 0.5), 0 2px 6px rgba(15, 23, 42, 0.14); }
}

.a-fab--whatsapp { background: var(--a-whatsapp); color: var(--a-on-fill); }
.a-fab--cart { background: var(--a-brand-700); color: var(--a-on-primary); }

/* Volver arriba (js/scroll-top.js): frasco de esmalte que se llena con el scroll (--fill 0→1). */
.a-fab--top {
  --fill: 0;
  border: 0;
  background: var(--a-surface);
  color: var(--a-on-fill);
  box-shadow:
    inset 0 0 0 2px color-mix(in srgb, var(--a-offer-600) 35%, transparent),
    0 10px 24px -8px rgba(15, 23, 42, 0.45), 0 2px 6px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  overflow: hidden;
  transition:
    transform var(--a-dur-press) var(--a-ease-out), background-color 0.35s ease, box-shadow 0.35s ease,
    height 0.3s ease, margin 0.3s ease, opacity 0.25s ease, visibility 0s linear 0s;
}

/* Arriba de todo no hace falta: se pliega y WhatsApp vuelve a su lugar. */
.a-fab--top.is-empty {
  height: 0;
  margin-top: calc(var(--a-space-3) * -1);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.6);
  transition:
    height 0.3s ease, margin 0.3s ease, opacity 0.2s ease, transform 0.3s ease, visibility 0s linear 0.3s;
}

.a-fab__bottle,
.a-fab__arrow {
  position: absolute;
  transition: opacity 0.3s ease, transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.a-fab__bottle { width: 38px; height: 38px; }
.a-fab__cap { fill: #2b1a24; }
.a-fab__neck { fill: #5b3a4c; }
.a-fab__glass {
  fill: color-mix(in srgb, var(--a-offer-600) 8%, transparent);
  stroke: color-mix(in srgb, var(--a-offer-600) 70%, var(--a-ink));
  stroke-width: 1.6;
}
.a-fab__polish {
  transform: scaleY(var(--fill));
  transform-box: fill-box;
  transform-origin: bottom;
  transition: transform 0.18s linear;
}
.a-fab__shine { stroke: rgb(255 255 255 / 0.75); stroke-width: 1.8; stroke-linecap: round; }

.a-fab__arrow { opacity: 0; transform: translateY(14px) scale(0.6); }

/* Lleno: el frasco sale y entra la flecha sobre el rosa del esmalte. */
.a-fab--top.is-full {
  background: linear-gradient(160deg, #ff5fa2, var(--a-offer-600));
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--a-offer-600) 22%, transparent),
    0 14px 28px -10px color-mix(in srgb, var(--a-offer-600) 70%, transparent);
}
.a-fab--top.is-full .a-fab__bottle { opacity: 0; transform: translateY(-14px) scale(0.6) rotate(-12deg); }
.a-fab--top.is-full .a-fab__arrow { opacity: 1; transform: none; }

@media (hover: hover) {
  .a-fab--top:not(.is-full):hover .a-fab__bottle { transform: rotate(-8deg); }
  .a-fab--top.is-full:hover .a-fab__arrow { transform: translateY(-3px); }
}

@media (prefers-reduced-motion: reduce) {
  .a-fab--top,
  .a-fab--top.is-empty,
  .a-fab__bottle,
  .a-fab__arrow,
  .a-fab__polish { transition: none; }
}

/* En escritorio el header es fijo y ya muestra el carrito: solo queda WhatsApp. */
@media (min-width: 1024px) {
  .a-fab--cart { display: none; }
}

/*
 * Checkout y cuenta: el carrito ya está en la página. En el
 * celular tampoco WhatsApp: tapaba campos, pedidos y la línea de tiempo; el
 * link vive en la página (.a-help, layouts/app) y en el pie.
 */
.a-fabs--quiet .a-fab--cart { display: none; }

@media (max-width: 1023px) {
  .a-fabs--quiet { display: none; }
}

/*
 * Celular: el pie legal deja libre la columna de la derecha (16px de margen + 56px de botón + aire),
 * donde flota la pila de botones, en vez de reservar todo su alto debajo: sin franja en blanco al final.
 */
@media (max-width: 1023px) {
  body:not(:has(.a-fabs--quiet)) .a-footer__bottom-inner {
    padding-right: calc(var(--a-space-4) + 56px + var(--a-space-3));
  }

  .a-footer__bottom { padding-bottom: env(safe-area-inset-bottom); }
}

.a-fab__badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border: 2px solid var(--a-bg);
  border-radius: var(--a-radius-pill);
  background: var(--a-offer-600);
  color: var(--a-on-fill);
  font-size: var(--a-text-micro);
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}

/* ── Barra de carga (components/loader + public/js/loader.js) ──────────── */
.ldr-bar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  width: 100%;
  height: 3px;
  pointer-events: none;
}

.ldr-bar__fill {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--a-brand-700);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 350ms var(--a-ease-out), opacity 250ms ease-out;
}

.ldr-bar--active .ldr-bar__fill { opacity: 1; }

/* public/js/loader.js mueve la barra con transform: scaleX() (sin animar width). */
.ldr-bar--done .ldr-bar__fill {
  opacity: 0;
  transform: scaleX(1) !important;
  transition: transform 200ms var(--a-ease-out), opacity 400ms ease-out 150ms;
}

@media (prefers-reduced-motion: reduce) {
  .a-sheet[open] .a-sheet__panel,
  .a-modal[open] .a-modal__panel,
  .a-sheet[open]::backdrop,
  .a-modal[open]::backdrop { animation: none; }
}

/* El pie del carrito ya tiene su borde: el total no repite la línea. */
.a-sheet__foot .a-sum__row--total { margin-top: 0; padding-top: 0; border-top: 0; }
