/* =====================================================================
   /yerbas · góndola de yerbas (mobile-first)
   Pared oscura, estantes de madera, paquetes a color (agotados apagados) y un
   carrito fijo abajo al centro que se va llenando.
   ===================================================================== */

.y-page {
  --wall:        #0d0c0b;
  --wall-2:      #191613;
  --wood:        #4a3426;
  --wood-dark:   #2a1d15;
  --wood-edge:   #6b4c37;
  --ink:         #111;
  --paper:       #f4f0e8;
  --sheet-bg:    #ffffff;
  --sheet-fg:    #111111;
  --sheet-muted: #6b6b6b;
  --sheet-line:  #e7e3dc;
  --ok:          #2f6b3a;
  --warn:        #9a5b13;
  --bad:         #b42318;
  --top-h:       60px;        /* mismo alto que el header de la tienda */
  --tabs-h:      48px;
  --dock-h:      100px;       /* alto del carrito flotante */
  --wrap-pad:    0px;         /* margen interno del contenedor (como .catalog-section) */

  background: radial-gradient(120% 70% at 50% 0%, var(--wall-2) 0%, var(--wall) 60%) fixed, var(--wall);
  color: var(--text);
  /* Inter se carga solo para los títulos: el resto sigue con la letra del sistema, como antes */
  font-family: system-ui, -apple-system, sans-serif;
  min-height: 100dvh;
  overflow: hidden;           /* sin scroll de página: se recorre por góndolas */
}
html.y-locked, html.y-locked body { overflow: hidden; }

/* ---------- Encabezado ----------
   Igual que el de la tienda (.site-header .header-inner): 90vw de ancho,
   24 px de margen (40 px en escritorio), 60 px de alto, logo de 38 px a la
   izquierda y el ícono de cuenta (40 px) en el borde derecho. */
.y-top {
  padding-top: env(safe-area-inset-top);
  background: #000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.y-top-inner {
  max-width: 90vw;
  height: var(--top-h);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.y-back {
  position: relative;
  display: flex;
  align-items: center;
  justify-self: start;
  color: var(--text-secondary);
}
/* la flecha de volver va en el margen, a la izquierda del logo: el logo queda
   en el mismo lugar que en la tienda */
.y-back svg { position: absolute; right: 100%; top: 50%; margin-right: 2px; transform: translateY(-50%); }
.y-back:hover, .y-back:focus-visible { color: var(--text); }
.y-back:hover img { opacity: 0.6; }
.y-back img { height: 38px; width: auto; }
.y-heading { text-align: center; line-height: 1; }
/* «GÓNDOLA DE / YERBAS»: la letra de los títulos de sección de Povmatero
   (Inter en mayúsculas, espaciada) */
.y-eyebrow {
  font-family: var(--font);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.y-heading h1 {
  font-family: var(--font);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-right: -0.15em;      /* compensa el espaciado de la última letra: queda centrado */
}
.y-icon-btn { justify-self: end; }

/* ---------- Marcas ---------- */
.y-brands {
  height: var(--tabs-h);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
  background: #000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.y-brands::-webkit-scrollbar { display: none; }
.y-tab {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--text-secondary);
  font-size: 13px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: background var(--t), color var(--t), border-color var(--t);
}
.y-tab:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.5); }
.y-tab.active { background: #fff; color: #000; border-color: #fff; font-weight: 600; }

/* ---------- Pasillo: una góndola por pantalla, se desliza de costado ---------- */
.y-aisle {
  position: relative;
  height: calc(100dvh - var(--top-h) - var(--tabs-h) - env(safe-area-inset-top));
}
.y-track {
  height: 100%;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.y-track::-webkit-scrollbar { display: none; }

.y-gondola {
  flex: 0 0 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow-y: auto;
  overflow-x: hidden;         /* los estantes llegan a los bordes sin hacer scroll de costado */
  padding: 14px 0 calc(var(--dock-h) + 28px + env(safe-area-inset-bottom));
  scrollbar-width: thin;
}
/* Mismo contenedor que el catálogo de la tienda (.catalog-section):
   90 % del ancho, con 24 px de margen interno (40 px en escritorio).
   En celular sin margen interno, para que entren dos yerbas por estante.
   Si cambia, actualizar shelfRows() en js/yerbas/main.js. */
.y-gondola-head,
.y-shelves {
  width: 90%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--wrap-pad);
  padding-right: var(--wrap-pad);
}
.y-gondola-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
/* Nombre de la marca: misma letra que el título «GÓNDOLA DE YERBAS» */
.y-gondola-head h2 {
  font-family: var(--font);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.y-gondola-head p { font-size: 12px; color: var(--text-secondary); letter-spacing: 0.04em; }
/* Mismo margen que el header (.y-top-inner, 24 px): en el celular la marca queda
   alineada con el logo y el contador con el ícono de cuenta, como en escritorio. */
.y-gondola-head { padding-left: max(var(--wrap-pad), 24px); padding-right: max(var(--wrap-pad), 24px); }
.y-gondola-head h2 { min-width: 0; overflow-wrap: anywhere; }
.y-gondola-head p { flex: none; white-space: nowrap; }

/* Un estante: tabla de madera con las yerbas paradas encima. Cada yerba es un
   grupo con sus presentaciones juntas; entre yerbas distintas hay una
   separación (--group-gap). Medidas: --pack-w = ancho del paquete de 1 kg
   (lo fija main.js según el ancho de la pantalla).
   La tabla tiene profundidad: una superficie (--depth) detrás del borde de
   adelante. El paquete de adelante apoya en el borde; el de atrás, sobre la
   superficie, más al fondo: los dos quedan apoyados en el mismo estante. */
.y-shelf {
  --pad-top: 22px;
  --group-h: calc(var(--pack-w, 92px) * 1.56);   /* alto de un paquete 2:3 + el fondo de la tabla */
  --depth: calc(var(--pack-w, 92px) * 0.085);     /* profundidad visible de la tabla */
  --edge: 13px;                                   /* grosor del borde de adelante */
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 0 var(--group-gap, 22px);
  padding: var(--pad-top) 6px 0;
  margin-bottom: 16px;
}
/* superficie de la tabla (de atrás, más oscura, hacia el borde).
   La tabla va de lado a lado de la pantalla aunque los paquetes respeten el
   ancho del contenedor (.y-gondola recorta lo que sobra). */
.y-shelf::before {
  content: "";
  position: absolute;
  left: calc(50% - 50vw);
  right: calc(50% - 50vw);
  top: calc(var(--pad-top) + var(--group-h) - var(--depth));
  height: var(--depth);
  background: linear-gradient(180deg, #1c140e 0%, #2e2017 55%, #3d2b1f 100%);
  z-index: 0;
  pointer-events: none;
}
/* borde de adelante de la tabla */
.y-shelf::after {
  content: "";
  position: absolute;
  left: calc(50% - 50vw);
  right: calc(50% - 50vw);
  top: calc(var(--pad-top) + var(--group-h));
  height: var(--edge);
  border-radius: 0 0 2px 2px;
  background:
    linear-gradient(180deg, var(--wood-edge) 0 2px, transparent 2px),
    linear-gradient(180deg, var(--wood) 0%, var(--wood-dark) 100%);
  box-shadow: 0 10px 18px -6px rgba(0, 0, 0, 0.8), inset 0 -2px 0 rgba(0, 0, 0, 0.35);
  z-index: 1;
  pointer-events: none;
}

/* ---------- Una yerba en el estante ---------- */
.y-item {
  position: relative;
  z-index: 2;                 /* paquetes y carteles por encima de la tabla */
  flex: 0 0 auto;
  width: calc(var(--pack-w, 92px) * var(--units, 1));
  display: flex;
  flex-direction: column;
  color: var(--text);
  min-width: 0;
}
.y-group { position: relative; height: var(--group-h); }
.y-variant {
  position: absolute;
  bottom: 0;
  left: 0;
  width: calc(var(--pack-w, 92px) * var(--scale, 1));
  padding: 0;
  z-index: 1;
  -webkit-tap-highlight-color: transparent;
}
/* Dos presentaciones: la grande atrás (sobre la superficie, más al fondo) y
   a la izquierda; la chica adelante (en el borde), a la derecha, tapando
   solo el borde de la de atrás. */
.y-item--n2 .y-variant--back { bottom: calc(var(--depth) * 0.8); z-index: 1; }
.y-item--n2 .y-variant--front { left: calc(var(--pack-w, 92px) * 0.74); z-index: 2; }
.y-item--n2 .y-variant--back:not(.is-out) .y-pack { filter: brightness(0.92); }
/* Tres o más (poco común): escalonadas */
.y-item--n3 .y-variant { left: calc(var(--pack-w, 92px) * 0.66 * var(--i, 0)); bottom: calc(var(--depth) * 0.4 * (2 - var(--i, 0))); z-index: calc(1 + var(--i, 0)); }

.y-variant-pack {
  position: relative;
  display: block;
  transition: transform 0.18s ease;
  transform-origin: 50% 100%;
}
/* Sombra de contacto: la base del paquete apoyada sobre la madera */
.y-variant-pack::before {
  content: "";
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: -3px;
  height: 8px;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.35) 60%, transparent);
  z-index: -1;
  pointer-events: none;
}
/* El grupo reacciona junto: al señalar o tocar cualquiera de sus
   presentaciones, se mueven las dos (sin cambiar quién queda adelante).
   Cada paquete sigue siendo su propio botón. */
@media (hover: hover) {
  .y-group:hover .y-variant-pack { transform: translateY(-5px); }
}
/* con teclado (no con el mouse): el grupo del paquete enfocado también se levanta */
.y-group:has(.y-variant:focus-visible) .y-variant-pack { transform: translateY(-5px); }
/* tocar (celular) o hacer clic: el grupo se hunde un poco (lo marca main.js) */
.y-group.is-pressed .y-variant-pack { transform: translateY(-2px) scale(0.97); }
/* con teclado, el paquete enfocado pasa adelante para que se vea su contorno */
.y-variant:focus-visible { z-index: 4; }
.y-variant:focus-visible { outline: none; }
.y-variant:focus-visible .y-pack { outline: 2px solid #fff; outline-offset: 3px; border-radius: 4px; }

/* ---------- Carteles de precio (en el borde de la tabla) ----------
   Uno por presentación, debajo de su paquete: «500 g · $5.600».
   En pantallas angostas va en dos líneas para que no se pisen. */
.y-tags {
  position: relative;
  height: var(--tag-h, 19px);
  margin-top: 3px;            /* sobre el borde de la tabla */
}
.y-tag {
  position: absolute;
  top: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 0.3em;
  padding: 3px 6px;
  border-radius: 2px;
  background: #000;
  color: #fff;
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}
.y-tag-size { color: rgba(255, 255, 255, 0.72); }
.y-tag-size::after { content: "·"; margin-left: 0.3em; color: rgba(255, 255, 255, 0.45); }
.y-tag-price { font-weight: 700; }
.y-tag.is-out { background: #1b1b1b; color: #8c8c8c; }
.y-tag.is-out .y-tag-size { color: #8c8c8c; }
.y-tag.is-out .y-tag-price { font-weight: 500; }
/* posición: una sola, centrada; dos, cada una alineada con el borde de su paquete */
.y-tag--solo { left: 50%; transform: translateX(-50%); }
.y-item--n2 .y-tag--back { left: 0; }
.y-item--n2 .y-tag--front { right: 0; }
.y-item--n3 .y-tags { display: flex; justify-content: space-between; gap: 2px; height: auto; }
.y-item--n3 .y-tag { position: static; }
/* angosto: en dos líneas (presentación chica arriba, precio abajo) */
.y-shelves[data-tags="stack"] { --tag-h: 29px; }
.y-shelves[data-tags="stack"] .y-tag { flex-direction: column; align-items: flex-start; gap: 0; padding: 3px 6px 4px; }
.y-shelves[data-tags="stack"] .y-tag-size { font-size: 9px; letter-spacing: 0.04em; }
.y-shelves[data-tags="stack"] .y-tag-size::after { content: none; }
.y-shelves[data-tags="stack"] .y-tag-price { font-size: 11px; }
.y-shelves[data-tags="stack"] .y-tag--solo { align-items: center; }
.y-shelves[data-tags="stack"] .y-item--n2 .y-tag--front { align-items: flex-end; }

.y-item-meta {
  display: block;
  margin-top: 5px;
  padding: 0;
  color: inherit;
  text-align: center;
}
.y-item-name {
  font-size: 12px;
  line-height: 1.2;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.y-item-badge {
  position: absolute;
  top: -9px;
  right: -7px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: #fff;
  color: #000;
  font-size: 11px;
  font-weight: 700;
  line-height: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  z-index: 3;
}

/* Agotado: cada presentación por separado, apagada y con su etiqueta */
.y-variant.is-out .y-pack { filter: grayscale(1) brightness(0.5) contrast(0.9); }
.y-item.is-out .y-item-name { color: var(--text-muted); }
.y-out-tag {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-8deg);
  padding: 2px 6px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  z-index: 2;
}

/* ---------- El paquete en sí (también en la ficha y el carrito) ---------- */
.y-pack {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 7px 7px 5px 5px;
  background: linear-gradient(180deg, #fbf8f2 0%, var(--paper) 55%, #e6dfd2 100%);
  box-shadow: 0 3px 4px -2px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  isolation: isolate;
}
/* volumen: sombras a los costados y brillo */
.y-pack::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.28) 0%, transparent 16%, transparent 78%, rgba(0, 0, 0, 0.32) 100%),
    linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.28) 42%, transparent 54%);
  pointer-events: none;
  z-index: 3;
}
/* sellado de arriba */
.y-pack-seal {
  position: absolute;
  inset: 0 0 auto;
  height: 11%;
  background: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.12) 0 2px, transparent 2px 5px), var(--label, #444);
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
  z-index: 2;
}
.y-pack-face {
  position: absolute;
  inset: 16% 0 9%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.y-pack-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.y-pack.is-loaded .y-pack-img { opacity: 1; }
.y-pack.is-loaded .y-pack-text { display: none; }
/* franja inferior del paquete */
.y-pack-face::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 0;
}
.y-pack::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 9%;
  background: var(--label, #444);
  z-index: 2;
}
/* sin foto: la marca y el nombre sobre una banda de color */
.y-pack-text {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
  padding: 10% 6%;
  background: var(--label, #444);
  color: #fff;
  text-align: center;
  line-height: 1.05;
}
.y-pack-text small {
  font-size: 0.5em;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.85;
}
.y-pack-text b {
  font-family: 'Times New Roman', Times, serif;
  font-weight: 400;
  font-size: 1em;
  overflow-wrap: anywhere;
}
.y-item .y-pack { font-size: clamp(9px, 2.6vw, 13px); }

/* Imagen de góndola (PNG vertical 2:3, idealmente sin fondo): el envase entero,
   apoyado en el estante. contain: si no es exactamente 2:3, no se deforma. */
.y-pack--shelf { background: none; box-shadow: none; border-radius: 0; overflow: visible; }
.y-pack--shelf::after, .y-pack--shelf::before { display: none; }
.y-pack--shelf .y-pack-img {
  object-fit: contain;
  object-position: 50% 100%;
  /* --trim: margen transparente de abajo del PNG (lo mide main.js): la base
     visible del envase queda justo sobre el estante, tenga o no margen. */
  transform: translateY(var(--trim, 0%));
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5));
}
.y-variant.is-out .y-pack--shelf { filter: grayscale(1) brightness(0.5) contrast(0.9); }

.y-pack--lg { font-size: 14px; }
.y-pack--xs { font-size: 6px; border-radius: 4px 4px 3px 3px; box-shadow: 0 3px 6px -3px rgba(0, 0, 0, 0.5); }
.y-pack--line { font-size: 6px; border-radius: 4px 4px 3px 3px; box-shadow: 0 4px 8px -4px rgba(0, 0, 0, 0.5); }
.y-pack--mini { font-size: 4px; border-radius: 3px 3px 2px 2px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.45); }
.y-pack--mini .y-pack-text { padding: 6% 4%; }
.y-pack--mini .y-pack-text small { display: none; }
.y-pack--shelf.y-pack--mini .y-pack-img { filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5)); }

/* ---------- Cargando / vacío ---------- */
.y-skel {
  display: block;
  aspect-ratio: 2 / 3;
  width: min(100%, 92px);
  margin: 0 auto;
  border-radius: 7px;
  background: linear-gradient(100deg, #1d1a17 30%, #2a2622 50%, #1d1a17 70%) 0 0 / 300% 100%;
  animation: y-shimmer 1.4s infinite linear;
}
@keyframes y-shimmer { to { background-position: -100% 0; } }
.y-gondola--loading .y-shelf { margin-top: 40px; }
.y-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  color: var(--text-secondary);
}

/* ---------- Flechas (pantallas grandes) y ayuda ---------- */
.y-pager {
  position: absolute;
  top: 45%;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  z-index: 5;
}
.y-pager:hover { background: #000; border-color: #fff; }
.y-pager--prev { left: 12px; }
.y-pager--next { right: 12px; }
@media (hover: hover) and (min-width: 760px) { .y-pager:not([hidden]) { display: flex; } }

.y-hint {
  position: absolute;
  left: 50%;
  bottom: calc(var(--dock-h) + 16px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 32px);
  font-size: 11px;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.55);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.y-hint { z-index: 31; }
.y-hint.is-gone { opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0s 0.4s; }

/* Pie oscuro detrás del carrito: separa el carrito de los productos que pasan por debajo.
   Va pegado al borde de abajo del pasillo (no de la ventana): así cubre los
   productos hasta el final del área que se desplaza, aunque Safari en iPhone
   ubique los elementos fijos por encima de su barra de direcciones. Debajo del
   pasillo solo queda el fondo oscuro de la página, del mismo color. */
.y-aisle::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--dock-h) + 34px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(13, 12, 11, 0) 0%, rgba(13, 12, 11, 0.82) 45%, rgba(13, 12, 11, 0.96) 100%);
  pointer-events: none;
  z-index: 30;
}
@media (hover: hover) and (min-width: 760px) { .y-hint { display: none; } }

/* ---------- Carrito fijo ---------- */
.y-cart {
  position: fixed;
  left: 50%;
  /* En el celular, casi pegado al borde (sobre el área segura del iPhone) */
  bottom: calc(2px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: 146px;
  height: var(--dock-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  color: #fff;
  z-index: 40;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.75));
}
.y-cart-art { position: relative; width: 130px; height: 91px; }
.y-cart-back, .y-cart-front { position: absolute; inset: 0; width: 100%; height: 100%; }
.y-cart-back path, .y-cart-back circle {
  fill: none;
  stroke: #fff;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.y-cart-back circle { fill: #000; }
.y-cart-basket { fill: rgba(255, 255, 255, 0.04); stroke: #fff; stroke-width: 3.4; stroke-linejoin: round; }
.y-cart-mesh { fill: none; stroke: rgba(255, 255, 255, 0.26); stroke-width: 1.3; }
.y-cart-front { pointer-events: none; }

/* Paquetes dentro de la canasta: parados sobre el fondo, se ven a través de
   la malla y asoman por arriba. 1 kg más grande que 500 g; si hay muchos,
   se acomodan más juntos. */
.y-cart-load {
  --mini-w: 25px;
  --ov: -3px;
  position: absolute;
  left: 21%;
  right: 7%;
  top: -14%;
  bottom: 31%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}
.y-cart-load[data-count="4"] { --ov: -6px; }
.y-cart-load[data-count="5"] { --ov: -10px; }
.y-cart-load[data-count="6"] { --ov: -13px; }
.y-cart-load[data-count="7"], .y-cart-load[data-count="8"] { --ov: -15px; }
.y-mini {
  position: relative;
  flex: 0 0 auto;
  width: calc(var(--mini-w) * var(--scale, 1));
  margin-left: var(--ov);
  transform: rotate(calc((var(--i) - 3) * 1.6deg));
  transform-origin: 50% 100%;
  z-index: calc(10 - var(--i));
}
.y-mini:first-child { margin-left: 0; }
.y-mini.is-arriving { opacity: 0; }
.y-mini.drop { animation: y-land 0.42s cubic-bezier(.3, 1.45, .6, 1); }
@keyframes y-land {
  from { transform: translateY(-16px) scale(0.92); }
  to   { transform: rotate(calc((var(--i) - 3) * 1.6deg)); }
}
.y-cart.bump .y-cart-art { animation: y-bump 0.42s ease; }
@keyframes y-bump {
  0% { transform: none; } 30% { transform: translateY(4px) scale(1.03, 0.97); }
  65% { transform: translateY(-2px) rotate(-1.5deg); } 100% { transform: none; }
}

/* Copia del paquete que viaja de la góndola al carrito (main.js la anima) */
.y-flight {
  position: fixed;
  z-index: 85;
  pointer-events: none;
  will-change: transform;
}
.y-flight-inner { width: 100%; height: 100%; will-change: transform; transform-origin: 50% 60%; filter: drop-shadow(0 14px 12px rgba(0, 0, 0, 0.45)); }
.y-flight .y-pack { width: 100%; }

.y-cart-count {
  position: absolute;
  top: 11px;
  right: 2px;
  z-index: 3;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 11px;
  background: var(--details);
  border: 2px solid #fff;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  transform: scale(0);
  transition: transform 0.2s ease;
}
.y-cart.has-items .y-cart-count { transform: scale(1); }
.y-cart-total {
  margin-top: -2px;
  padding: 1px 10px;
  border-radius: var(--radius-pill);
  background: #fff;
  color: #000;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* Vacío: sin texto (el total aparece al agregar; guarda su lugar para que el carrito no salte) */
.y-cart:not(.has-items) .y-cart-total { visibility: hidden; }
.y-cart-total:empty::before { content: "\200b"; }
.y-cart:focus-visible { outline: none; }
.y-cart:focus-visible .y-cart-total { box-shadow: 0 0 0 2px #000, 0 0 0 4px #fff; }
.y-cart:not(.has-items):focus-visible .y-cart-art { outline: 2px solid #fff; outline-offset: 2px; border-radius: 6px; }

/* ---------- Hojas (abajo en celular, centradas en escritorio) ---------- */
.y-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
  z-index: 60;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.y-scrim.open { opacity: 1; }
.y-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: min(88dvh, 760px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--sheet-bg);
  color: var(--sheet-fg);
  border-radius: 18px 18px 0 0;
  padding: 10px 18px calc(18px + env(safe-area-inset-bottom));
  z-index: 70;
  transform: translateY(100%);
  transition: transform 0.26s cubic-bezier(.2, .8, .2, 1);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.45);
}
.y-sheet.open { transform: none; }
.y-sheet:focus { outline: none; }
@media (min-width: 760px) {
  .y-sheet {
    left: 50%;
    right: auto;
    bottom: auto;
    top: 50%;
    width: min(460px, calc(100% - 32px));
    border-radius: 16px;
    padding: 22px 24px 24px;
    transform: translate(-50%, calc(-50% + 24px));
    opacity: 0;
    transition: transform 0.22s ease, opacity 0.22s ease;
  }
  .y-sheet.open { transform: translate(-50%, -50%); opacity: 1; }
  .y-sheet-grip { display: none; }
}
.y-sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: #d6d1c8; margin: 0 auto 10px; }
.y-sheet-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sheet-muted);
}
.y-sheet-close:hover { background: #f1eee9; color: var(--sheet-fg); }

.y-sheet-head { display: flex; gap: 16px; align-items: center; padding-right: 32px; margin-bottom: 14px; }
.y-sheet-pack { flex: 0 0 74px; }
.y-sheet-kicker { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--sheet-muted); }
.y-sheet h2 {
  font-family: 'Times New Roman', Times, serif;
  font-weight: 400;
  font-size: 26px;
  line-height: 1.1;
  color: var(--sheet-fg);
}
.y-sheet-sub { font-size: 13px; color: var(--sheet-muted); margin-top: 4px; }

/* presentaciones */
.y-presentations { list-style: none; margin: 0 0 16px; padding: 0; border-top: 1px solid var(--sheet-line); }
.y-pres {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--sheet-line);
}
.y-pres-info { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: baseline; flex: 1; min-width: 0; }
.y-pres-thumb { flex: 0 0 38px; height: 57px; display: flex; align-items: flex-end; justify-content: center; }
.y-pres-thumb .y-pack { width: calc(38px * var(--scale, 1)); }
.y-pres.is-out .y-pres-thumb .y-pack { filter: grayscale(1) opacity(0.6); }
.y-pres.is-focus { background: #f6f2ea; margin: 0 -10px; padding-left: 10px; padding-right: 10px; border-radius: 10px; }
.y-pres-info strong { font-size: 17px; }
.y-pres-price { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.y-pres-stock { grid-column: 1 / -1; font-size: 12px; color: var(--ok); margin-top: 2px; }
.y-pres-stock.is-low { color: var(--warn); }
.y-pres-stock.is-out { color: var(--bad); }
.y-pres.is-out strong, .y-pres.is-out .y-pres-price { color: #a3a3a3; text-decoration: line-through; text-decoration-thickness: 1px; }

.y-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d6d1c8;
  border-radius: var(--radius-pill);
  overflow: hidden;
  flex-shrink: 0;
}
.y-stepper button {
  width: 40px;
  height: 40px;
  font-size: 20px;
  line-height: 1;
  color: var(--sheet-fg);
}
.y-stepper button:hover:not(:disabled) { background: #f1eee9; }
.y-stepper button:disabled { color: #c9c4bb; cursor: default; }
.y-stepper output { min-width: 26px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Aviso de reposición (presentación agotada) */
.y-notify-btn {
  flex-shrink: 0;
  padding: 8px 12px;
  border: 1px solid #000;
  border-radius: var(--radius-pill);
  background: #fff;
  color: #000;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: background var(--t), color var(--t);
}
.y-notify-btn:hover:not(:disabled) { background: #000; color: #fff; }
.y-notify { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0; text-align: right; }
.y-notify { max-width: 23ch; }
.y-pres.has-notify { flex-wrap: wrap; }
.y-pres-notify { flex: 0 0 100%; display: flex; justify-content: flex-end; }
.y-notify-state { font-size: 12px; font-weight: 600; color: #000; }
.y-notify-how { font-size: 11px; line-height: 1.35; color: var(--sheet-muted); }
.y-notify-cancel { font-size: 12px; font-weight: 600; color: #c62828; text-decoration: underline; padding: 4px 0; }
.y-notify-cancel:hover:not(:disabled) { color: #9b1c1c; }
.y-notify-cancel:focus-visible { outline: 2px solid #c62828; outline-offset: 2px; }
.y-notify-btn:disabled, .y-notify-cancel:disabled { opacity: 0.6; cursor: progress; }
.y-pres.is-out .y-notify-btn, .y-pres.is-out .y-notify { text-decoration: none; }

/* botones */
.y-btn-primary, .y-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 50px;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}
.y-btn-primary { background: #000; color: #fff; }
.y-btn-primary:hover:not(:disabled) { background: var(--details); }
.y-btn-primary:disabled { background: #d9d5ce; color: #7a7a7a; cursor: default; }
.y-btn-ghost { border: 1px solid #cfc9bf; color: var(--sheet-fg); background: #fff; }
.y-page .y-empty .y-btn-ghost { width: auto; background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.y-btn-ghost:hover { border-color: #000; }
.y-link { display: block; margin: 6px auto 0; font-size: 14px; color: var(--sheet-muted); text-decoration: underline; padding: 8px; }

/* carrito (hoja) */
/* Título: la letra de títulos de la góndola («GÓNDOLA DE YERBAS»): Inter en mayúsculas, espaciada */
.y-sheet h2.y-cart-title {
  padding-right: 36px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.3;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.y-lines { list-style: none; margin: 14px 0 0; padding: 0; border-top: 1px solid var(--sheet-line); }
.y-line {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 4px 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--sheet-line);
}
.y-line-pack { grid-row: span 2; height: 84px; display: flex; align-items: flex-end; justify-content: center; }
.y-line-pack .y-pack { width: calc(56px * var(--scale, 1)); }
.y-line-info { display: flex; flex-direction: column; min-width: 0; }
.y-line-info strong { font-size: 15px; line-height: 1.25; }
.y-line-info span { font-size: 13px; color: var(--sheet-muted); }
.y-line-max { font-size: 11px; color: var(--warn); }
.y-line-side { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.y-line-side .y-stepper button { width: 34px; height: 34px; font-size: 18px; }
.y-line-total { font-weight: 700; font-variant-numeric: tabular-nums; margin-left: auto; }
.y-line-remove { font-size: 12px; color: var(--sheet-muted); text-decoration: underline; padding: 6px 0 6px 4px; }
.y-line-remove:hover { color: var(--bad); }

.y-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 14px 0 12px;
  font-size: 15px;
}
.y-total strong { font-size: 22px; font-variant-numeric: tabular-nums; }

.y-phone { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; font-size: 13px; font-weight: 600; }
.y-phone input {
  font: inherit;
  font-weight: 400;
  font-size: 16px;
  padding: 11px 12px;
  border: 1px solid #cfc9bf;
  border-radius: 10px;
  color: var(--sheet-fg);
}
.y-phone input:focus { outline: none; border-color: #000; box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08); }
.y-phone small { font-weight: 400; color: var(--sheet-muted); }

.y-msg {
  font-size: 13px;
  color: var(--bad);
  background: #fdf1f0;
  border: 1px solid #f3c9c4;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.y-msg.ok { color: var(--ok); background: #eef6ef; border-color: #c7e1cb; }
.y-fineprint { font-size: 12px; color: var(--sheet-muted); text-align: center; margin-top: 10px; line-height: 1.45; }
.y-cart-empty { display: flex; flex-direction: column; gap: 6px; padding: 20px 0 6px; text-align: center; }
.y-cart-empty p:first-child { font-size: 17px; font-weight: 600; }
.y-cart-empty .y-btn-ghost { margin-top: 12px; }

.y-sent { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 16px 0 4px; }
.y-sent p { color: var(--sheet-muted); font-size: 14px; max-width: 34ch; }
.y-sent .y-sent-number { color: var(--sheet-fg); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.y-sent-actions { display: flex; flex-direction: column; gap: 10px; width: 100%; margin-top: 6px; }
/* «Pedido realizado correctamente»: la otra letra de títulos de Povmatero
   (Inter en mayúsculas, espaciada, como «GÓNDOLA DE YERBAS» y el carrito) */
.y-sheet h2.y-sent-title {
  font-family: var(--font);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-right: -0.14em;      /* compensa el espaciado de la última letra: queda centrado */
  max-width: 22ch;
}
/* «Avisar por WhatsApp»: mismo botón que los demás, con el verde de WhatsApp
   (el texto, un verde más oscuro de la misma familia para que se lea bien). */
.y-btn-ghost.y-btn-wa { background: transparent; border-color: #25d366; color: #11833b; }
.y-btn-ghost.y-btn-wa:hover { background: #effbf3; border-color: #1ebe5b; color: #0b6e30; }
.y-btn-ghost.y-btn-wa:focus-visible { outline: 2px solid #25d366; outline-offset: 2px; }
.y-btn-wa .y-wa-icon { flex: none; }
.y-line-stock { display: block; font-size: 12px; color: var(--sheet-muted); }
.y-sent-mark {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef6ef;
  color: var(--ok);
}

/* El aviso flotante va arriba del carrito (no lo tapa) */
.y-page .toast { bottom: calc(var(--dock-h) + 26px + env(safe-area-inset-bottom)); z-index: 80; }

/* ---------- Pantallas grandes ---------- */
/* margen interno del contenedor: el mismo que .catalog-section en la tienda */
@media (min-width: 640px) { .y-page { --wrap-pad: 24px; } }
@media (min-width: 1024px) {
  .y-page { --wrap-pad: 40px; }
  .y-top-inner { padding: 0 40px; }
}
@media (min-width: 760px) {
  .y-page { --tabs-h: 56px; }
  .y-cart { bottom: 10px; }
  .y-brands { justify-content: center; }
  .y-heading h1 { font-size: 19px; }
  .y-gondola-head h2 { font-size: 28px; }
  .y-item-name { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .y-sheet, .y-scrim, .y-variant-pack { transition: none; }
  .y-mini.drop, .y-cart.bump .y-cart-art, .y-skel { animation: none; }
  .y-flight { display: none; }
  .y-track { scroll-behavior: auto; }
}

