/* ==========================================================================
   AMMY TERRA — components.css
   Iconos, botones, chips, badges, favorito, tarjeta de producto, migas de pan,
   formularios, avisos, WhatsApp flotante, drawer de carrito, toast, skeleton.
   (Base de .btn, .chip, campos, .alert y .price en base.css; aqui se amplian.)
   Propiedad: Claude (T01). Solo variables de tokens.css.
   ========================================================================== */

/* ---------------------------------------------------------------- Iconos */
.icon {
  width: 24px; height: 24px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 3;
  stroke-linecap: round; stroke-linejoin: round;
  vertical-align: middle;
}
.icon--xs { width: 14px; height: 14px; stroke-width: 4; }
.icon--sm { width: 18px; height: 18px; stroke-width: 3.6; }
.icon--lg { width: 32px; height: 32px; }

/* Boton de icono: objetivo tactil 44x44 */
.icon-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;
  background: transparent; border: 0; border-radius: var(--r-btn);
  color: var(--c-green); cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}
.icon-btn .icon { width: 25px; height: 25px; stroke-width: 3.2; }
.icon-btn:hover { background: var(--c-green-050); color: var(--c-green); }
.icon-btn--outline { border: 1px solid var(--c-border); background: var(--c-surface); width: 42px; height: 42px; }
.icon-btn--outline .icon { width: 19px; height: 19px; stroke-width: 3.6; }

.cart-count {
  position: absolute; top: 2px; right: 0;
  min-width: 20px; height: 20px; padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--c-green); color: var(--c-surface);
  border: 2px solid var(--c-surface);
  border-radius: var(--r-pill);
  font-size: 10.5px; font-weight: var(--fw-ui-semi); line-height: 1;
}
.cart-count.is-empty { display: none; }
.cart-count.is-bump { animation: bump .4s ease; }
@keyframes bump { 50% { transform: scale(1.25); } }

/* --------------------------------------------------------------- Botones */
.btn .icon { width: 18px; height: 18px; stroke-width: 3.6; }
.btn--lg { min-height: 52px; padding: 12px 28px; font-size: 15px; letter-spacing: .01em; gap: 14px; }
.btn--light { background: var(--c-surface); color: var(--c-green); border-color: var(--c-green); }
.btn--light:hover { background: var(--c-green); color: var(--c-surface); }
.btn--outline { background: var(--c-surface); color: var(--c-green); border-color: var(--c-green-700); }
.btn--outline:hover { background: var(--c-green); color: var(--c-surface); }
.btn--terracotta:hover { background: var(--c-green); color: var(--c-surface); }
.btn--whatsapp { background: var(--c-green-600); color: var(--c-surface); }
.btn--whatsapp:hover { background: var(--c-green); color: var(--c-surface); }
.btn[disabled], .btn.is-loading { opacity: .65; cursor: progress; }

/* ---------------------------------------------------------------- Badges */
.badge {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border-radius: var(--r-pill);
  font-size: 10.5px; font-weight: var(--fw-ui-semi); letter-spacing: .06em; text-transform: uppercase;
  background: var(--c-surface); color: var(--c-green);
  box-shadow: var(--sh-soft);
}
.badge--ok { background: var(--c-ok-bg); color: var(--c-ok); }
.badge--offer { background: var(--c-terracotta); color: var(--c-surface); }
.badge--new { background: var(--c-green); color: var(--c-surface); }
.badge--order { background: var(--c-warn-bg); color: var(--c-terracotta); }

/* ----------------------------------------------------- Favorito (corazon) */
.fav-btn {
  position: absolute; top: 4px; right: 4px;
  width: 44px; height: 44px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; cursor: pointer;
}
.fav-btn__circle {
  width: 32px; height: 32px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--c-surface); color: var(--c-terracotta);
  box-shadow: var(--sh-soft);
  transition: transform var(--t-fast);
}
.fav-btn .icon { width: 17px; height: 17px; stroke-width: 4; }
.fav-btn:hover .fav-btn__circle { transform: scale(1.08); }
.fav-btn[aria-pressed="true"] .icon { fill: currentColor; }

/* ------------------------------------------------ Tarjeta de producto */
.product-card {
  display: flex; flex-direction: column;
  min-width: 0; height: 100%;
  background: var(--c-surface);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-card);
  box-shadow: var(--sh-soft);
  overflow: hidden;
  transition: box-shadow var(--t-base), transform var(--t-base);
}
.product-card:hover { box-shadow: var(--sh-hover); }
.product-card__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--c-bg-alt); }
.product-card__media > a, .product-card__media picture { display: block; width: 100%; height: 100%; }
.product-card__img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  transition: transform .5s var(--t-base);
}
.product-card:hover .product-card__img { transform: scale(1.04); }
.product-card__badge { position: absolute; top: 12px; left: 12px; }

.product-card__body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 18px; }
.product-card__cat {
  margin: 0 0 6px;
  font-size: 10.5px; font-weight: var(--fw-ui-med); letter-spacing: var(--ls-cat); text-transform: uppercase;
  color: var(--c-text-muted);
}
.product-card__name {
  margin: 0 0 8px;
  font-family: var(--font-title); font-size: 18px; font-weight: 500; line-height: 1.25;
  color: var(--c-text);
}
.product-card__name a { color: inherit; }
.product-card__name a:hover { color: var(--c-green); }
.product-card__price { margin: 0 0 14px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 6px; }
.product-card__price .price { color: var(--c-text); font-size: var(--fs-price); font-weight: var(--fw-ui-semi); }
.product-card__price .price--offer { color: var(--c-terracotta); }
.product-card__price .price--compare { margin: 0; }
.product-card__note { margin: -6px 0 12px; font-size: 12px; line-height: 1.4; color: var(--c-terracotta); }
.product-card__actions { margin-top: auto; display: flex; gap: 10px; align-items: center; }
.product-card__add { flex: 1; min-height: 42px; padding: 8px 12px; gap: 8px; font-size: 13.5px; }
.product-card__add .icon { width: 16px; height: 16px; }

@media (max-width: 767px) {
  .product-card__body { padding: 12px 12px 14px; }
  .product-card__name { font-size: 17px; }
  .product-card__price .price { font-size: 16px; }
  .product-card__actions .icon-btn--outline { display: none; }   /* ERS 3.2: boton a ancho completo en movil */
  .product-card__add { min-height: 44px; }
}

/* Lista de productos: 5 col >=1280; carrusel con snap 4/3/2 por debajo (ERS 2.3 "carrusel/grid") */
.products-rail {
  display: grid; gap: 20px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
@media (max-width: 1279px) {
  .products-rail {
    --per: 4;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - (var(--per) - 1) * 20px) / var(--per));
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    padding: 4px 2px 14px; margin: -4px -2px 0;
    scrollbar-width: thin; scrollbar-color: var(--c-border) transparent;
  }
  .products-rail > * { scroll-snap-align: start; }
}
@media (max-width: 1023px) { .products-rail { --per: 3; } }
@media (max-width: 767px)  { .products-rail { --per: 2; gap: 12px; grid-auto-columns: calc((100% - 12px) / 2); } }

/* Variante 4 columnas (relacionados de la ficha): 4 col >=1024, carrusel 3/2 debajo */
@media (min-width: 1024px) {
  .products-rail--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-flow: row; grid-auto-columns: auto;
    overflow: visible; scroll-snap-type: none; padding: 0; margin: 0;
  }
}

/* ------------------------------------------------ Selector de cantidad */
.qty {
  display: inline-flex; align-items: stretch;
  height: 52px;
  border: 1px solid var(--c-border); border-radius: var(--r-btn);
  background: var(--c-surface); overflow: hidden;
}
.qty__btn {
  width: 48px; flex: none; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; color: var(--c-green); cursor: pointer;
  transition: background var(--t-fast);
}
.qty__btn:hover { background: var(--c-green-050); }
.qty__btn:disabled { color: var(--c-border); cursor: not-allowed; background: transparent; }
.qty__btn .icon { width: 18px; height: 18px; stroke-width: 4; }
.qty__input {
  width: 56px; min-height: 0; height: 100%; padding: 0;
  border: 0; border-inline: 1px solid var(--c-border); border-radius: 0;
  text-align: center; font-weight: var(--fw-ui-semi); font-size: 16px;
  -moz-appearance: textfield; appearance: textfield;
}
.qty__input::-webkit-outer-spin-button, .qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty__input:focus { box-shadow: inset 0 0 0 2px var(--c-green-600); }

.icon-btn--solid { background: var(--c-green); color: var(--c-surface); }
.icon-btn--solid:hover { background: var(--c-green-700); color: var(--c-surface); }
.chip .icon { width: 14px; height: 14px; stroke-width: 4.5; }

/* ------------------------------------- Pestanas (acordeon en movil) */
.tabs__list {
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--c-border);
  overflow-x: auto; scrollbar-width: none;
}
.tabs__list::-webkit-scrollbar { display: none; }
.tabs__tab {
  position: relative; flex: none;
  min-height: 48px; padding: 0 18px;
  background: transparent; border: 0; cursor: pointer;
  font-family: var(--font-ui); font-size: 14.5px; font-weight: var(--fw-ui-med);
  color: var(--c-text-muted);
  transition: color var(--t-fast);
}
.tabs__tab::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px;
  background: var(--c-green); transform: scaleX(0); transition: transform var(--t-base);
}
.tabs__tab:hover { color: var(--c-green); }
.tabs__tab[aria-selected="true"] { color: var(--c-green); font-weight: var(--fw-ui-semi); }
.tabs__tab[aria-selected="true"]::after { transform: scaleX(1); }
.tabs__acc-heading { display: none; margin: 0; }
.tabs__section { display: none; }
.tabs__section.is-active { display: block; }
.tabs__panel { padding: 26px 4px 4px; max-width: 78ch; font-size: 15.5px; line-height: 1.7; }
.tabs__panel:focus-visible { outline-offset: 4px; }
.tabs__panel > :last-child { margin-bottom: 0; }
.tabs__subtitle { margin: 18px 0 8px; font-size: 17px; }

@media (max-width: 767px) {
  .tabs__list { display: none; }
  .tabs__section, .tabs__section.is-active { display: block; border-bottom: 1px solid var(--c-border); }
  .tabs__section:first-of-type { border-top: 1px solid var(--c-border); }
  .tabs__acc-heading { display: block; font-family: var(--font-ui); }
  .tabs__acc {
    width: 100%; min-height: 54px; padding: 0 4px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    background: transparent; border: 0; cursor: pointer; text-align: left;
    font-family: var(--font-ui); font-size: 15px; font-weight: var(--fw-ui-semi); color: var(--c-text);
  }
  .tabs__acc .icon { color: var(--c-green); transition: transform var(--t-base); }
  .tabs__acc[aria-expanded="true"] .icon { transform: rotate(180deg); }
  .tabs__panel { display: none; padding: 0 4px 20px; font-size: 15px; }
  .tabs__section.is-open .tabs__panel { display: block; }
}

.spec-list { margin: 0; display: grid; }
.spec-list div { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--c-border-soft); }
.spec-list dt { color: var(--c-text-muted); }
.spec-list dd { margin: 0; font-weight: var(--fw-ui-med); }
@media (max-width: 479px) { .spec-list div { grid-template-columns: 1fr; gap: 2px; } }

.check-list { list-style: none; padding: 0; margin: 0 0 12px; }
.check-list li { position: relative; padding-left: 26px; margin-bottom: 6px; }
.check-list li::before {
  content: ""; position: absolute; left: 4px; top: .55em; width: 10px; height: 6px;
  border-left: 2px solid var(--c-green-600); border-bottom: 2px solid var(--c-green-600);
  transform: rotate(-45deg);
}

/* ---------------------------------------------- Tarjeta compacta */
.mini-card {
  display: grid; grid-template-columns: 104px 1fr auto; align-items: center; gap: 16px;
  padding: 12px; min-width: 0;
  background: var(--c-surface); border: 1px solid var(--c-border-soft);
  border-radius: var(--r-card); box-shadow: var(--sh-soft);
}
.mini-card__media { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--r-btn); }
.mini-card__media picture { display: block; width: 100%; height: 100%; }
.mini-card__img { width: 100%; height: 100%; object-fit: cover; }
.mini-card__body { min-width: 0; }
.mini-card__body .product-card__cat { margin-bottom: 2px; }
.mini-card__name { margin: 0 0 4px; font-size: 16.5px; font-weight: 500; line-height: 1.25; color: var(--c-text); }
.mini-card__name a { color: inherit; }
.mini-card__name a:hover { color: var(--c-green); }
.mini-card__price { margin: 0; font-weight: var(--fw-ui-semi); color: var(--c-text); }
.mini-card__add .icon { width: 20px; height: 20px; stroke-width: 4; }

/* ======================================= Flujo de compra (T08) */
/* Tarjeta con borde #D8DDD8 (checklist Z15) */
.card-box {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-card);
  box-shadow: var(--sh-soft);
  padding: 24px;
}

/* Pasos numerados */
.steps { margin: 28px 0 30px; }
.steps__list { display: flex; align-items: center; justify-content: center; gap: 0; margin: 0; padding: 0; list-style: none; }
.steps__item { display: flex; align-items: center; flex: 0 1 auto; }
.steps__item + .steps__item::before {
  content: ""; width: clamp(28px, 9vw, 150px); height: 1px; margin: 0 16px;
  background: var(--c-border);
}
.steps__item.is-done + .steps__item::before, .steps__item.is-current::before { background: var(--c-green-600); }
.steps__link { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; color: var(--c-text-muted); }
a.steps__link:hover { color: var(--c-green); }
.steps__num {
  width: 36px; height: 36px; flex: none; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--c-border); background: var(--c-surface);
  font-size: 15px; font-weight: var(--fw-ui-semi); color: var(--c-text-muted);
}
.steps__num .icon { width: 18px; height: 18px; stroke-width: 5; }
.steps__label { font-size: 15px; font-weight: var(--fw-ui-med); }
.is-current .steps__num { background: var(--c-green); border-color: var(--c-green); color: var(--c-surface); }
.is-current .steps__label { color: var(--c-text); font-weight: var(--fw-ui-semi); }
.is-done .steps__num { background: var(--c-green-050); border-color: var(--c-green-600); color: var(--c-green); }
.is-done .steps__label { color: var(--c-green); }
@media (max-width: 767px) {
  .steps { margin: 18px 0 20px; }
  .steps__item + .steps__item::before { width: 18px; margin: 0 8px; }
  .steps__link { gap: 8px; }
  .steps__num { width: 30px; height: 30px; font-size: 13px; }
  .steps__label { font-size: 12.5px; }
  .steps__item:not(.is-current) .steps__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Cantidad compacta (lineas de carrito) */
.qty--sm { height: 40px; }
.qty--sm .qty__btn { width: 36px; }
.qty--sm .qty__input { width: 40px; font-size: 15px; }
@media (max-width: 767px) {
  .qty--sm { height: 44px; }
  .qty--sm .qty__btn { width: 44px; }
}

/* Resumen de totales */
.summary { margin: 0; }
.summary__row[hidden] { display: none; }
.summary__row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 7px 0; font-size: 15px; }
.summary__row dt { color: var(--c-text); }
.summary__row dd { margin: 0; font-weight: var(--fw-ui-semi); color: var(--c-text); text-align: right; }
.summary__row--discount dd { color: var(--c-terracotta); }
.summary__muted { font-weight: 400; color: var(--c-text-muted); font-size: 14px; }
.summary__quote { color: var(--c-terracotta); }
.summary__row--total {
  align-items: center;
  margin-top: 10px; padding-top: 16px; border-top: 1px solid var(--c-border);
}
.summary__row--total dt { font-size: 18px; font-weight: var(--fw-ui-semi); }
.summary__row--total dd {
  padding: 8px 14px; border-radius: var(--r-btn);
  background: var(--c-bg-alt); font-size: 22px; font-weight: 700;
}
.summary__note { margin: 8px 0 0; font-size: 13px; color: var(--c-text-muted); }
.summary__note:empty { display: none; }

/* Pildora de estado de pedido */
.status-pill { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: var(--r-pill); font-size: 13px; font-weight: var(--fw-ui-semi); }
.status-pill--ok { background: var(--c-ok-bg); color: var(--c-ok); }
.status-pill--warn { background: var(--c-warn-bg); color: var(--c-warn); }
.status-pill--danger { background: var(--c-danger-bg); color: var(--c-danger); }

/* Estado vacio */
.cart-empty { max-width: 520px; margin: 24px auto 16px; padding: 48px 24px; text-align: center; }
.cart-empty[hidden] { display: none; }
.cart-empty__icon {
  width: 88px; height: 88px; margin: 0 auto 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-green-050); color: var(--c-green);
}
.cart-empty__icon .icon { width: 42px; height: 42px; stroke-width: 2.6; }
.cart-empty__title { font-size: clamp(24px, 1vw + 16px, 30px); margin-bottom: 8px; }
.cart-empty p { color: var(--c-text-muted); margin-bottom: 22px; }

/* Lineas de carrito (carrito y resumen del checkout) */
.cart-lines__head {
  display: grid; grid-template-columns: 1fr 132px 110px 44px; gap: 16px;
  padding: 0 0 12px; border-bottom: 1px solid var(--c-border-soft);
  font-size: 13px; font-weight: var(--fw-ui-semi); color: var(--c-text);
}
.cart-lines__head-sub { text-align: right; }
.cart-lines__head--compact { grid-template-columns: 1fr auto; }
.cart-lines__list { margin: 0; padding: 0; list-style: none; }
.cart-lines__status { margin: 10px 0 0; font-size: var(--fs-sm); color: var(--c-ok); }
.cart-lines__status:empty { display: none; }
.cart-lines__status.is-error { color: var(--c-danger); }

.cart-line {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 132px 110px 44px;
  grid-template-areas: "media info qty total remove";
  gap: 16px; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--c-border-soft);
  transition: opacity var(--t-base);
}
.cart-line.is-busy { opacity: .55; }
.cart-line.is-removing { opacity: 0; }
.cart-line__media { grid-area: media; aspect-ratio: 1 / 1; overflow: hidden; border-radius: var(--r-btn); background: var(--c-bg-alt); }
.cart-line__media picture { display: block; width: 100%; height: 100%; }
.cart-line__img { width: 100%; height: 100%; object-fit: cover; }
.cart-line__ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--c-green-600); }
.cart-line__info { grid-area: info; min-width: 0; }
.cart-line__name { margin: 0 0 2px; font-family: var(--font-title); font-size: 17px; font-weight: 500; line-height: 1.25; color: var(--c-text); }
.cart-line__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 6px; font-size: 13px; color: var(--c-text-muted); }
.cart-line__unit { font-weight: var(--fw-ui-semi); color: var(--c-text); }
.cart-line__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.cart-line__tags .chip { padding: 3px 10px; font-size: 11.5px; }
.cart-line__note { margin: 6px 0 0; font-size: 12px; color: var(--c-terracotta); }
.cart-line__qty { grid-area: qty; margin: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.js .cart-line__update { display: none; }
.cart-line__total { grid-area: total; margin: 0; text-align: right; font-weight: 700; font-size: 16px; color: var(--c-text); }
.cart-line__remove { grid-area: remove; margin: 0; }
.cart-line__remove .icon-btn { color: var(--c-text-muted); }
.cart-line__remove .icon-btn:hover { color: var(--c-danger); background: var(--c-danger-bg); }
.cart-line__remove .icon { width: 18px; height: 18px; stroke-width: 4; }

/* Compacta (resumen del checkout, como el mockup) */
.cart-line--compact {
  grid-template-columns: 72px minmax(0, 1fr) auto;
  grid-template-areas: "media info qty" "media info total";
  gap: 4px 14px; padding: 14px 0;
}
.cart-line--compact .cart-line__name { font-size: 15.5px; }
.cart-line--compact .cart-line__meta { margin-bottom: 4px; }
.cart-line--compact .cart-line__total { font-size: 14.5px; align-self: start; }
.cart-line--compact .cart-line__remove { display: none; }
.cart-line--compact .cart-line__qty { align-items: flex-end; }

@media (max-width: 1023px) {
  .cart-line--compact { grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-areas: "media info info" "media qty total"; gap: 8px 12px; }
  .cart-line--compact .cart-line__qty { align-items: flex-start; }
  .cart-line--compact .cart-line__total { align-self: center; }
}
@media (max-width: 767px) {
  .cart-lines__head { display: none; }
  .cart-line {
    grid-template-columns: 76px minmax(0, 1fr) auto;
    grid-template-areas: "media info remove" "media qty total";
    gap: 8px 12px;
  }
  .cart-line__media { align-self: start; }
  .cart-line__total { align-self: center; }
  .cart-line__remove { align-self: start; justify-self: end; }
  .cart-line--compact .cart-line__qty { align-items: flex-start; }
}

/* ---------------------------------------------------- Titulo de seccion */
.section-head { text-align: center; margin-bottom: 30px; }
.section-title {
  margin: 0;
  font-family: var(--font-title); font-weight: 500;
  font-size: clamp(21px, .8vw + 13px, 27px);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--c-green);
}
.section-rule {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 6px; color: var(--c-green-600);
}
.section-rule::before, .section-rule::after {
  content: ""; width: 110px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--c-border));
}
.section-rule::after { background: linear-gradient(90deg, var(--c-border), transparent); }
.section-rule .icon { width: 20px; height: 20px; stroke-width: 3.4; transform: rotate(-12deg); }

/* ----------------------------------------------------------- Migas de pan */
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; margin: 0; padding: 14px 0; list-style: none; font-size: var(--fs-xs); color: var(--c-text-muted); }
.breadcrumbs li + li::before { content: "›"; margin-inline: 8px; color: var(--c-border); }
.breadcrumbs a { color: var(--c-text-muted); }
.breadcrumbs a:hover { color: var(--c-green); }
.breadcrumbs [aria-current] { color: var(--c-text); }

/* --------------------------------------------------- Formularios (extras) */
.field__hint { font-size: var(--fs-xs); color: var(--c-text-muted); margin-top: 4px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; cursor: pointer; }
.check input { width: 20px; min-height: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--c-green); flex: none; }
select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--c-green) 50%), linear-gradient(135deg, var(--c-green) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px;
}
.alert { border: 1px solid transparent; }
.alert--ok { border-color: color-mix(in srgb, var(--c-ok) 25%, transparent); }
.alert--error { border-color: color-mix(in srgb, var(--c-danger) 25%, transparent); }
.alert--warn { border-color: color-mix(in srgb, var(--c-warn) 25%, transparent); }

/* ------------------------------------------------- WhatsApp flotante */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 55;
  width: 56px; height: 56px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--c-green-600); color: var(--c-surface);
  box-shadow: var(--sh-hover);
  transition: transform var(--t-fast), background var(--t-fast);
}
.wa-float:hover { background: var(--c-green); color: var(--c-surface); transform: translateY(-2px); }
.wa-float .icon { width: 28px; height: 28px; stroke-width: 3.2; }
@media (max-width: 767px) { .wa-float { right: 14px; bottom: 14px; width: 52px; height: 52px; } }

/* ------------------------------------------------------ Drawer carrito */
.drawer__title { margin: 0; font-size: var(--fs-h4); }
.drawer__body { padding: var(--s3); }
.drawer__status { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 var(--s2); font-size: 15px; }
.drawer__status .icon { color: var(--c-ok); margin-top: 1px; }
.drawer__totals { margin: 0; padding-top: var(--s2); border-top: 1px solid var(--c-border); }
.drawer__totals div { display: flex; justify-content: space-between; }
.drawer__totals dt { color: var(--c-text-muted); }
.drawer__totals dd { margin: 0; font-weight: var(--fw-ui-semi); color: var(--c-green); }
.drawer__foot { margin-top: auto; padding: var(--s3); display: grid; gap: 10px; border-top: 1px solid var(--c-border-soft); }

/* ----------------------------------------------------------------- Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 120;
  max-width: min(440px, calc(100vw - 32px));
  padding: 12px 18px; border-radius: var(--r-card);
  background: var(--c-green); color: var(--c-surface); font-size: var(--fs-sm);
  box-shadow: var(--sh-hover);
  transform: translateX(-50%);
}
.toast[hidden] { display: none; }
.toast.is-error { background: var(--c-danger); }

/* -------------------------------------------------------------- Skeleton */
.skeleton {
  display: block; border-radius: var(--r-btn);
  background: linear-gradient(90deg, var(--c-border-soft) 25%, var(--c-bg-alt) 50%, var(--c-border-soft) 75%);
  background-size: 200% 100%;
  animation: skeleton 1.3s ease-in-out infinite;
}
.skeleton--text { height: 12px; margin-bottom: 8px; }
.skeleton--media { aspect-ratio: 4 / 3; border-radius: 0; }
@keyframes skeleton { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.img-placeholder { display: block; width: 100%; height: 100%; background: var(--c-bg-alt); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    /* accesibilidad (WCAG 2.3.3): anula animaciones si el usuario lo pide */
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
