/* ==========================================================================
   Tienda · listado y ficha
   Mismo mundo visual que el home, movimiento contenido (modo Operate).
   ========================================================================== */

/* --------------------------------------------------------------------------
   Cabecera del listado
   -------------------------------------------------------------------------- */
.shop-head {
  position: relative;
  background: var(--teal);
  color: var(--choco-950);
  overflow: hidden;
  padding: calc(var(--nav-h) + 72px) var(--gutter) 56px;
}
.shop-head__inner { position: relative; z-index: 2; max-width: 1240px; margin: 0 auto; }
.shop-head h1 { max-width: 11ch; font-size: clamp(2.8rem, 6vw, 5.4rem); }
.shop-tools { margin-top: 32px; display: grid; gap: 18px; max-width: 720px; }

.search { display: grid; gap: 8px; }
.search__label { font-weight: 650; }
.search__field { position: relative; }
.search__field i {
  position: absolute; left: 20px; top: 50%; translate: 0 -50%;
  font-size: 22px; color: var(--choco-900); pointer-events: none;
}
.search__field input {
  width: 100%;
  min-height: 56px;
  padding: 0 22px 0 54px;
  border: 2px solid transparent;
  border-radius: var(--r-pill);
  background: var(--cream);
  color: var(--choco-950);
  font: inherit;
  font-size: 1rem;
  box-shadow: 0 12px 30px -20px rgba(61, 31, 22, 0.5);
  transition: border-color var(--dur-ui) ease;
}
.search__field input::placeholder { color: var(--ink-soft); }
.search__field input:focus { outline: none; border-color: var(--fucsia-800); }
.search__field input::-webkit-search-cancel-button { cursor: pointer; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.shop-head .chip { background: color-mix(in srgb, var(--cream) 55%, transparent); }
.shop-head .chip[aria-pressed="true"] { background: var(--choco-950); color: var(--cream); }
@media (hover: hover) and (pointer: fine) {
  .shop-head .chip:not([aria-pressed="true"]):hover { background: color-mix(in srgb, var(--cream) 80%, transparent); }
}
.chip i { font-size: 1.1em; }

.shop-head__cake { position: absolute; z-index: 1; pointer-events: none; }
.shop-head__cake img { width: 100%; }
.shop-head__cake--a { right: -4vw; top: 18%; width: min(34vw, 460px); rotate: -8deg; }
.shop-head__cake--b { right: 22vw; bottom: -14%; width: min(20vw, 280px); rotate: 10deg; }

@media (max-width: 900px) {
  .shop-head { padding: calc(var(--nav-h) + 48px) 20px 32px; }
  .shop-head__cake--a { width: 46vw; right: -16vw; top: 9%; }
  .shop-head__cake--b { display: none; }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 -20px; padding: 0 20px 4px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
}

/* --------------------------------------------------------------------------
   Catálogo
   -------------------------------------------------------------------------- */
.catalog { max-width: 1240px; margin: 0 auto; padding: 40px var(--gutter) clamp(72px, 9vw, 120px); }
.catalog__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 28px; }
.catalog__count { font-weight: 600; color: var(--ink-soft); }
.catalog__custom { font-weight: 650; display: inline-flex; align-items: center; gap: 8px; }

.grid {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 48px 28px;
}
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 14px; } }

.card { position: relative; container-type: inline-size; }
.card__link { display: grid; gap: 6px; text-decoration: none; color: inherit; border-radius: var(--r-surface); }
.card__plate {
  position: relative;
  aspect-ratio: 1;
  display: grid; place-items: center;
  margin-bottom: 12px;
}
.card__plate::before {
  content: "";
  position: absolute; inset: 7%;
  border-radius: 50%;
  background: var(--tint);
  transition: transform 420ms var(--ease-out);
}
.card__img {
  position: relative;
  width: 100%;
  transition: transform 420ms var(--ease-out), opacity 260ms ease;
}
.card__img--cut { position: absolute; inset: 0; margin: auto; opacity: 0; }
.card__name { font-size: clamp(1.35rem, 2vw, 1.7rem); line-height: 1; }
.card__price { font-size: 1.05rem; }
.card__meta { font-size: 0.92rem; color: var(--ink-soft); }

.card__badges { position: absolute; left: 0; top: 0; display: flex; gap: 6px; }
.badge {
  display: inline-flex; align-items: center;
  height: 28px; padding: 0 12px;
  border-radius: var(--r-pill);
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.01em;
}
.badge--new { background: var(--fucsia-800); color: var(--cream); }
.badge--sold { background: var(--choco-950); color: var(--cream); }

.card__add {
  position: absolute;
  right: 6cqw; top: calc(100cqw - 64px);
  width: 48px; height: 48px;
  border: 0; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--choco-950); color: var(--cream);
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 10px 20px -10px rgba(61, 31, 22, 0.6);
  transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-ui) ease;
  text-decoration: none;
}
.card__add:active { transform: scale(0.92); }
.card__add[disabled] { opacity: 0.35; cursor: not-allowed; }
.card.is-sold .card__img { filter: saturate(0.35); opacity: 0.75; }

@media (hover: hover) and (pointer: fine) {
  .card__link:hover .card__plate::before { transform: scale(1.04); }
  .card__link:hover .card__img { transform: translateY(-8px) rotate(-2deg); }
  .card__link:hover .card__img:not(.card__img--cut) { opacity: var(--main-hover-opacity, 1); }
  .card.has-cut .card__link:hover { --main-hover-opacity: 0; }
  .card.has-cut .card__link:hover .card__img--cut { opacity: 1; }
  .card__add:not([disabled]):hover { background: var(--fucsia-800); }
}

/* Esqueleto con la forma del plato */
.card--skeleton .card__plate::before {
  background: linear-gradient(100deg, var(--cream-200) 30%, #fff5e4 50%, var(--cream-200) 70%);
  background-size: 300% 100%;
  animation: shimmer 1.3s linear infinite;
}
.sk-line { height: 18px; border-radius: 9px; background: var(--cream-200); }
.sk-line--w { width: 70%; height: 24px; }
.sk-line--s { width: 40%; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

.grid-empty { padding: 64px 8px; }
.empty__title { font-size: 2rem; }
.grid-empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* --------------------------------------------------------------------------
   Ficha de producto
   -------------------------------------------------------------------------- */
.pdp {
  --tint: var(--peach);
  max-width: 1340px; margin: 0 auto;
  padding: calc(var(--nav-h) + 40px) var(--gutter) clamp(64px, 8vw, 110px);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}
.pdp__visual {
  position: relative;
  background: var(--tint);
  border-radius: 36px;
  padding: 24px 24px 22px;
  display: grid; gap: 14px;
}
.crumbs { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.95rem; }
.crumbs a { color: var(--choco-950); }
.pdp__stage { position: relative; aspect-ratio: 1.05; display: grid; place-items: center; }
.pdp__disc {
  position: absolute; width: 76%; aspect-ratio: 1; border-radius: 50%;
  background: color-mix(in srgb, var(--cream) 70%, var(--tint));
}
.pdp__imgs { position: relative; z-index: 1; width: 94%; aspect-ratio: 1.3; }
.pdp__imgs img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  opacity: 0; transform: scale(0.96); filter: blur(4px);
  transition: opacity 300ms ease, transform 420ms var(--ease-out), filter 300ms ease;
}
.pdp__imgs img.is-active { opacity: 1; transform: none; filter: none; }
.pdp__bit { position: absolute; z-index: 0; width: 16px; height: 54px; border-radius: 99px; background: var(--c); rotate: var(--r, 0deg); }
.pdp__bit--dot { width: 28px; height: 28px; border-radius: 50%; }

.pdp__thumbs { display: flex; gap: 10px; justify-content: center; }
.pdp__thumbs button {
  width: 72px; height: 72px; border-radius: 50%;
  border: 3px solid transparent;
  background: color-mix(in srgb, var(--cream) 70%, transparent);
  padding: 6px; cursor: pointer;
  transition: border-color var(--dur-ui) ease, transform var(--dur-press) var(--ease-out);
}
.pdp__thumbs button:active { transform: scale(0.95); }
.pdp__thumbs button[aria-pressed="true"] { border-color: var(--choco-950); }
.pdp__thumbs img { width: 100%; height: 100%; object-fit: contain; }

.pdp__info { display: grid; gap: 18px; justify-items: start; padding-top: 8px; }
.pdp__info h1 { font-size: clamp(2.6rem, 4.6vw, 4.4rem); }
.pdp__price { font-size: 1.9rem; }
.pdp__desc { max-width: 46ch; color: var(--choco-900); font-size: 1.1rem; }

.sizes { border: 0; margin: 4px 0 0; padding: 0; width: 100%; }
.sizes legend { font-weight: 700; margin-bottom: 10px; padding: 0; }
.sizes__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.size { position: relative; }
.size input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.size label {
  display: grid; gap: 2px;
  padding: 14px 16px;
  border-radius: var(--r-small);
  background: color-mix(in srgb, var(--choco) 6%, transparent);
  box-shadow: inset 0 0 0 2px transparent;
  cursor: pointer;
  transition: box-shadow var(--dur-ui) ease, background-color var(--dur-ui) ease, transform var(--dur-press) var(--ease-out);
}
.size label strong { font-size: 1.05rem; }
.size label span { font-size: 0.9rem; color: var(--ink-soft); }
.size label b { font-weight: 650; font-variant-numeric: tabular-nums; margin-top: 4px; }
.size input:checked + label { background: var(--cream-200); box-shadow: inset 0 0 0 2px var(--choco-950); }
.size input:focus-visible + label { outline: 3px solid var(--fucsia); outline-offset: 3px; }
.size input:active + label { transform: scale(0.98); }
.size input:disabled + label { opacity: 0.5; cursor: not-allowed; }

.pdp__buy { display: flex; gap: 12px; width: 100%; align-items: center; }
.stepper--lg { margin: 0; height: 56px; padding: 0 6px; }
.stepper--lg button { width: 44px; height: 44px; }
.pdp__add { flex: 1; min-height: 56px; }
.pdp__sold { color: var(--fucsia-800); font-weight: 600; }

.facts { list-style: none; margin: 8px 0 0; padding: 18px 0 0; display: grid; gap: 14px; width: 100%; border-top: 1px solid color-mix(in srgb, var(--choco) 14%, transparent); }
.facts li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; }
.facts i { font-size: 24px; color: var(--teal-800); }

.related { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter) clamp(72px, 9vw, 120px); }
.related h2 { margin-bottom: 36px; font-size: clamp(2.2rem, 4vw, 3.4rem); }

/* Barra de compra fija en móvil */
.buybar { display: none; }
@media (max-width: 900px) {
  .pdp { grid-template-columns: minmax(0, 1fr); padding: calc(var(--nav-h) + 28px) 16px 56px; }
  .pdp__visual { padding: 18px 14px 16px; border-radius: var(--r-surface); }
  .pdp__thumbs button { width: 60px; height: 60px; }
  .pdp__info h1 { font-size: 2.8rem; }
  .buybar {
    position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: calc(var(--z-nav) - 1);
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 10px 10px 20px;
    border-radius: var(--r-pill);
    background: var(--choco-950); color: var(--cream);
    box-shadow: 0 18px 40px -16px rgba(61, 31, 22, 0.7);
    transform: translateY(calc(100% + 30px));
    transition: transform 220ms var(--ease-out);
  }
  .buybar.is-visible { transform: none; transition: transform 380ms var(--ease-drawer); }
  .buybar > div { display: grid; line-height: 1.2; }
  .buybar__name { font-weight: 650; }
  .buybar__price { font-size: 0.95rem; opacity: 0.85; }
  .product-page .wa-float { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .card--skeleton .card__plate::before { animation: none; }
  .card__img, .pdp__imgs img { transition-duration: 1ms; transform: none; filter: none; }
}

/* ==========================================================================
   WordPress: piezas que el prototipo dibujaba con JS o que no tenía
   ========================================================================== */

/* Listado */
.shop-head__desc { margin-top: 14px; max-width: 46ch; font-size: 1.1rem; color: var(--choco-900); }
.shop-tools { margin-bottom: 0; }
.shop-tools .search > .sr-only:focus { position: static; width: auto; height: auto; clip: auto; margin: 0; }
.chip .ph { width: 1.1em; height: 1.1em; }
.catalog__custom .ph { width: 1.2em; height: 1.2em; }
.card__add .ph { width: 22px; height: 22px; }
.grid-empty[hidden], .card[hidden] { display: none; }

/* Avisos de WooCommerce (agregar al carrito sin JS, errores) */
.woocommerce-notices-wrapper:empty { display: none; }
.woocommerce-notices-wrapper { width: 100%; }
.catalog .woocommerce-notices-wrapper { margin-bottom: 20px; }
.woocommerce-message, .woocommerce-error, .woocommerce-info {
  list-style: none; margin: 0 0 8px; padding: 14px 18px;
  border-radius: var(--r-small);
  background: color-mix(in srgb, var(--teal) 18%, var(--cream));
  color: var(--choco-950); font-weight: 600;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
}
.woocommerce-error { background: color-mix(in srgb, var(--fucsia) 14%, var(--cream)); }
.woocommerce-error li { margin: 0; }
.woocommerce-message .button { order: 2; margin-left: auto; color: var(--choco-950); }

/* Ficha */
.pdp__badges { display: flex; gap: 6px; }
.pdp__form { display: grid; gap: 18px; width: 100%; }
.sizes--options .sizes__list { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.sizes--options .size label { padding: 12px 14px; }
.sizes--options .size label strong { font-size: 0.98rem; line-height: 1.2; }
.size label b:empty { display: none; }
.stepper--lg .ph { width: 20px; height: 20px; }
.stepper__input {
  width: 2.6ch; padding: 0; border: 0; background: transparent;
  font: inherit; font-weight: 650; font-variant-numeric: tabular-nums;
  text-align: center; color: inherit; -moz-appearance: textfield; appearance: textfield;
}
.stepper__input::-webkit-outer-spin-button,
.stepper__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper button[disabled] { opacity: 0.4; cursor: not-allowed; }
.pdp__add .ph-fill { width: 1.25em; height: 1.25em; }

.pdp__field { display: grid; gap: 8px; }
.pdp__field label { font-weight: 700; }
.pdp__field label span { font-weight: 500; color: var(--ink-soft); }
.pdp__field input {
  width: 100%; min-height: 52px; padding: 0 18px;
  border: 2px solid transparent; border-radius: var(--r-small);
  background: color-mix(in srgb, var(--choco) 6%, transparent);
  color: var(--choco-950); font: inherit; font-size: 1rem;
  transition: border-color var(--dur-ui) ease, background-color var(--dur-ui) ease;
}
.pdp__field input:focus { outline: none; border-color: var(--choco-950); background: var(--cream-200); }
.pdp__hint { font-size: 0.92rem; color: var(--ink-soft); }
.pdp__hint a { color: var(--choco-950); font-weight: 650; }
.pdp__error { color: var(--fucsia-800); font-weight: 650; }
.sizes.is-invalid legend { color: var(--fucsia-800); }
.pdp__sold a { color: inherit; }

/* Venta cruzada: velas */
.addon {
  width: 100%; display: grid; gap: 14px;
  padding: 18px; border-radius: var(--r-surface);
  background: color-mix(in srgb, var(--yellow) 26%, var(--cream));
}
.addon__head { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: center; }
.addon__head > .ph { width: 32px; height: 32px; color: var(--fucsia-800); }
.addon__title { font-size: 1.5rem; line-height: 1; }
.addon__head p { font-size: 0.95rem; color: var(--ink-soft); margin-top: 4px; }
.addon__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; }
.addon__form { margin: 0; }
.addon__item {
  width: 100%; min-height: 56px; padding: 10px 12px 10px 16px;
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center;
  border: 0; border-radius: var(--r-small);
  background: var(--cream); color: var(--choco-950);
  font: inherit; text-align: left; cursor: pointer;
  box-shadow: 0 8px 18px -14px rgba(61, 31, 22, 0.5);
  transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-ui) ease;
  -webkit-tap-highlight-color: transparent;
}
.addon__item:active { transform: scale(0.97); }
.addon__name { font-weight: 650; line-height: 1.2; }
.addon__price { grid-row: 2; font-size: 0.9rem; color: var(--ink-soft); }
.addon__item .ph {
  grid-row: 1 / span 2; grid-column: 2;
  width: 32px; height: 32px; padding: 7px; border-radius: 50%;
  background: var(--choco-950); color: var(--cream);
}
.addon__item.is-added .ph { background: var(--teal-800); }
@media (hover: hover) and (pointer: fine) {
  .addon__item:hover { background: #fff; }
}

/* Datos de la torta (solo si tienen valor) */
.pdp__data { margin: 0; width: 100%; display: grid; gap: 12px; padding-top: 18px; border-top: 1px solid color-mix(in srgb, var(--choco) 14%, transparent); }
.pdp__data div { display: grid; gap: 2px; }
.pdp__data dt { font-weight: 700; }
.pdp__data dd { margin: 0; color: var(--choco-900); }

.facts .ph { width: 24px; height: 24px; }
.crumbs .ph { width: 14px; height: 14px; }

/* Descripción larga */
.pdp-long { max-width: 860px; margin: 0 auto; padding: 0 var(--gutter) clamp(56px, 7vw, 96px); }
.pdp-long h2 { font-size: clamp(2rem, 3.6vw, 3rem); margin-bottom: 18px; }
.pdp-long__body { display: grid; gap: 14px; font-size: 1.08rem; }

/* Barra de compra */
.buybar .btn[disabled] { opacity: 0.5; }

/* Movimiento de la ficha sin GSAP: confites que flotan y la torta que respira */
@media (prefers-reduced-motion: no-preference) {
  .pdp__bit { animation: tm-bit 3.4s ease-in-out infinite alternate; }
  .pdp__bit:nth-of-type(2n) { animation-duration: 4.1s; animation-delay: -1.2s; }
  .pdp__bit:nth-of-type(3n) { animation-duration: 2.8s; animation-delay: -0.6s; }
  .pdp__imgs { animation: tm-breathe 3s ease-in-out 1.2s infinite alternate; }
}
@keyframes tm-bit { from { translate: 0 -30%; } to { translate: 0 30%; } }
@keyframes tm-breathe { from { translate: 0 0; } to { translate: 0 -8px; } }

/* Rendimiento: la foto cortada solo sirve con cursor (hover); en táctiles no se descarga. */
@media (hover: none) { .card__img--cut { display: none; } }
/* Los chips reservan su alto para no empujar la grilla (CLS). */
.filters { min-height: 48px; }
/* Las tortas de la cabecera flotan con CSS (la tienda no carga GSAP al abrir). */
@media (prefers-reduced-motion: no-preference) {
  .shop-head__cake--a { animation: tm-float-a 3s ease-in-out 0.4s infinite alternate; }
  .shop-head__cake--b { animation: tm-float-b 4s ease-in-out 0.6s infinite alternate; }
}
@keyframes tm-float-a { from { translate: 0 0; } to { translate: 0 12px; } }
@keyframes tm-float-b { from { translate: 0 0; } to { translate: 0 -10px; } }

/* ==========================================================================
   Tienda · diseño de oct 2026 (Tienda.pdf)
   Medidas en px de la mesa de 1864.8 (--u). Cabecera amarilla con foto de familia en círculo
   y tortas flotando; tarjetas con círculo pastel turquesa, amarillo o café; "+" al pasar el puntero.
   ========================================================================== */
.woocommerce-shop, .tax-product_cat, .post-type-archive-product, .search-results { --u: max(calc(100vw / 1864.8), 0.62px); }
.shop-head {
  background: #ffca6c; min-height: calc(552 * var(--u));
  padding: calc(var(--nav-h) + 26 * var(--u)) var(--gutter) calc(64 * var(--u));
  overflow: hidden;
}
.shop-head__inner { max-width: none; margin: 0 0 0 calc(302 * var(--u) - var(--gutter)); }
.shop-head h1 { max-width: none; font-weight: 400; font-size: clamp(2.6rem, calc(80.2 * var(--u)), 96px); line-height: 1.05; color: #3d1f16; letter-spacing: 0; }
.shop-head h1 strong { font-weight: 700; }
.shop-head__desc { margin-top: calc(18 * var(--u)); font-family: var(--font-display); font-size: clamp(1.05rem, calc(26.9 * var(--u)), 32px); color: #3d1f16; }
.shop-tools { margin-top: calc(26 * var(--u)); max-width: calc(716 * var(--u)); gap: calc(44 * var(--u)); }
.shop-head .search__field i { display: none; }
.shop-head .search__field input {
  min-height: calc(61 * var(--u)); padding: 0 calc(28 * var(--u));
  background: rgba(255, 255, 255, 0.5); box-shadow: none;
  font-size: clamp(1rem, calc(22 * var(--u)), 26px);
}
.shop-head .search__field input::placeholder { color: color-mix(in srgb, #3d1f16 55%, transparent); }
.shop-head .search__field input:focus { border-color: #41bbbe; background: rgba(255, 255, 255, 0.75); }
.shop-head .filters { gap: calc(8 * var(--u)); }
.shop-head .chip {
  min-height: calc(46 * var(--u)); padding: 0 calc(18 * var(--u));
  background: rgba(255, 255, 255, 0.55); color: #3d1f16;
  font-family: var(--font-display); font-weight: 400; font-size: clamp(0.9rem, calc(18.7 * var(--u)), 22px);
}
.shop-head .chip[aria-pressed="true"] { background: #41bbbe; color: #fff; }
@media (hover: hover) and (pointer: fine) {
  .shop-head .chip:not([aria-pressed="true"]):hover { background: rgba(255, 255, 255, 0.8); }
}

/* Foto en círculo con anillo turquesa */
.shop-head__photo { position: absolute; z-index: 1; margin: 0; left: calc(1180 * var(--u)); top: calc(-26 * var(--u)); width: calc(415 * var(--u)); pointer-events: none; }
.shop-head__photo::before { content: ""; position: absolute; z-index: -1; left: calc(35 * var(--u)); top: calc(155 * var(--u)); width: calc(396 * var(--u)); aspect-ratio: 1; border-radius: 50%; background: #41bbbe; }
.shop-head__photo img { display: block; width: 100%; height: auto; }
/* Tortas que flotan, cortadas por los bordes como en el diseño */
.shop-head__float { position: absolute; z-index: 0; pointer-events: none; rotate: var(--rot, 0deg); }
.shop-head__float img { display: block; width: 100%; height: auto; animation: shop-float var(--dur, 6s) ease-in-out infinite alternate; }
.shop-head__float--1 { left: calc(1529 * var(--u)); top: calc(-44 * var(--u)); width: calc(473 * var(--u)); --rot: -10deg; --dur: 6.4s; }
.shop-head__float--2 { left: calc(-197 * var(--u)); top: calc(189 * var(--u)); width: calc(462 * var(--u)); --rot: 8deg; --dur: 5.6s; }
.shop-head__float--3 { left: calc(50 * var(--u)); top: calc(-125 * var(--u)); width: calc(394 * var(--u)); --rot: -6deg; --dur: 7s; }
.shop-head__float--4 { left: calc(817 * var(--u)); top: calc(-175 * var(--u)); width: calc(456 * var(--u)); --rot: 5deg; --dur: 6s; }
.shop-head__float--5 { left: calc(1659 * var(--u)); top: calc(268 * var(--u)); width: calc(332 * var(--u)); --rot: -8deg; --dur: 5.2s; }
.shop-head__float--6 { left: calc(905 * var(--u)); top: calc(355 * var(--u)); width: calc(381 * var(--u)); --rot: 12deg; --dur: 6.8s; }
@keyframes shop-float { from { transform: translateY(0) rotate(0deg); } to { transform: translateY(-12px) rotate(2deg); } }
@media (prefers-reduced-motion: reduce) { .shop-head__float img { animation: none; } }

/* Barra: contador y cotizar en cápsulas crema */
.catalog { max-width: calc(1440 * var(--u) + 2 * var(--gutter)); padding-top: calc(14 * var(--u)); }
.catalog__bar { margin-bottom: calc(110 * var(--u)); }
.catalog__count, .catalog__custom {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: calc(44 * var(--u)); padding: 0 calc(18 * var(--u));
  border-radius: 8px; background: #fff5e4; color: #3d1f16;
  font-family: var(--font-display); font-weight: 500; font-size: clamp(0.85rem, calc(18.7 * var(--u)), 22px);
}
.catalog__count { margin-left: calc(108 * var(--u)); }
.catalog__custom { text-decoration: underline; text-underline-offset: 3px; }

/* Tarjetas */
.grid { gap: calc(208 * var(--u)) calc(44 * var(--u)); }
.card__plate { aspect-ratio: 329 / 249; margin-bottom: calc(10 * var(--u)); }
.card__plate::before { inset: auto; left: 50%; top: 50%; width: 73%; aspect-ratio: 1; translate: -50% -50%; background: var(--plate, #ebf2eb); }
.grid > .card:nth-child(3n + 1) { --plate: color-mix(in srgb, #41bbbe 10%, #fff9f1); }
.grid > .card:nth-child(3n + 2) { --plate: color-mix(in srgb, #ffca6c 28%, #fff9f1); }
.grid > .card:nth-child(3n + 3) { --plate: color-mix(in srgb, #4d2110 10%, #fff9f1); }
.card__img { width: 100%; height: 100%; object-fit: contain; }
.card__badges { left: calc(25 * var(--u)); top: calc(-35 * var(--u)); z-index: 2; }
.badge--new { background: #41bbbe; color: #fff; height: calc(29 * var(--u)); min-height: 22px; padding: 0 calc(12 * var(--u)); font-family: var(--font-display); font-weight: 400; font-size: clamp(0.78rem, calc(18.7 * var(--u)), 22px); }
.card__name { font-weight: 500; font-size: clamp(1.1rem, calc(26.9 * var(--u)), 32px); color: #3d1f16; padding-left: calc(25 * var(--u)); margin-top: calc(12 * var(--u)); }
.card__price { font-family: var(--font-display); font-weight: 500; color: #41bbbe; font-size: clamp(0.95rem, calc(22 * var(--u)), 26px); padding-left: calc(24 * var(--u)); }
.card__meta { font-family: var(--font-display); color: #3d1f16; font-size: clamp(0.85rem, calc(18.7 * var(--u)), 22px); padding-left: calc(24 * var(--u)); margin-top: -4px; }
/* "+" turquesa abajo a la derecha del círculo: aparece al pasar el puntero (nota del diseño) */
.card__add {
  /* Círculo: diámetro 73cqw, centro en (50cqw, 37.8cqw); el botón va a 45° sobre su borde */
  --b: clamp(32px, calc(40 * var(--u)), 46px);
  right: auto; left: calc(75.8cqw - var(--b) / 2); top: calc(63.6cqw - var(--b) / 2);
  width: var(--b); height: var(--b);
  background: #41bbbe; color: #fff; font-size: 20px; box-shadow: 0 8px 18px -10px rgba(61, 31, 22, 0.55);
}
@media (hover: hover) and (pointer: fine) {
  .card__add { opacity: 0; scale: 0.6; transition: opacity 200ms ease, scale 260ms var(--ease-out), background-color var(--dur-ui) ease; }
  .card:hover .card__add, .card:focus-within .card__add { opacity: 1; scale: 1; }
  .card__add:not([disabled]):hover { background: #119393; }
}

@media (max-width: 900px) {
  .shop-head { min-height: 0; padding: calc(var(--nav-h) + 24px) 20px 28px; }
  .shop-head__inner { margin: 0; position: relative; z-index: 2; }
  .shop-head h1 { max-width: 9ch; }
  .shop-tools { max-width: none; gap: 16px; }
  .shop-head__photo { left: auto; right: -14vw; top: calc(var(--nav-h) - 10px); width: 42vw; opacity: 0.95; }
  .shop-head__float--1, .shop-head__float--2, .shop-head__float--4, .shop-head__float--5, .shop-head__float--6 { display: none; }
  .shop-head__float--3 { left: -10vw; top: -8vw; width: 34vw; }
  .catalog__count { margin-left: 0; }
  .catalog__bar { margin-bottom: 40px; }
  .grid { gap: 52px 14px; }
  .card__name, .card__price, .card__meta { padding-left: 4px; }
  .card__badges { left: 4px; top: -8px; }
}
/* Todas las fotos ocupan el mismo plato, sin importar su proporción: los nombres quedan alineados */
.card__plate > .card__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 600px) {
  .shop-head__photo { display: none; }
  .shop-head h1 { max-width: none; }
}

/* Corrección 15 oct: tortas flotantes con el tamaño visible del arte (en el PDF cada imagen tiene
   márgenes transparentes; aquí van recortadas, así que se usa el recuadro de la torta), sin inclinar.
   El contenido de la cabecera baja hasta la altura del arte (titular a 178 px de la mesa). */
.shop-head__float { rotate: 0deg; }
.shop-head__float--1 { left: calc(1636 * var(--u)); top: calc(69 * var(--u)); width: calc(250 * var(--u)); }
.shop-head__float--2 { left: calc(-96 * var(--u)); top: calc(331 * var(--u)); width: calc(270 * var(--u)); }
.shop-head__float--3 { left: calc(107 * var(--u)); top: calc(-43 * var(--u)); width: calc(272 * var(--u)); }
.shop-head__float--4 { left: calc(893 * var(--u)); top: calc(-48 * var(--u)); width: calc(319 * var(--u)); }
.shop-head__float--5 { left: calc(1696 * var(--u)); top: calc(349 * var(--u)); width: calc(258 * var(--u)); }
.shop-head__float--6 { left: calc(963 * var(--u)); top: calc(436 * var(--u)); width: calc(249 * var(--u)); }
@media (min-width: 901px) {
  .shop-head { padding-top: max(calc(var(--nav-h) + 12px), calc(170 * var(--u))); padding-bottom: calc(50 * var(--u)); }
}

/* ==========================================================================
   Tienda · cabecera en el celular (16 oct): foto de familia en círculo arriba, con dos tortas
   flotando a los lados, y debajo el título centrado, el buscador y los filtros.
   ========================================================================== */
@media (max-width: 900px) {
  .shop-head { display: flex; flex-direction: column; align-items: center; padding: calc(var(--nav-h) + 22px) 20px 26px; text-align: center; }
  .shop-head__photo { display: block !important; position: relative; order: -1; left: auto; top: auto; right: auto; width: min(52vw, 230px); margin: 0 auto 6px; opacity: 1; }
  .shop-head__photo::before { left: 8.4%; top: 27%; width: 95%; }
  .shop-head__inner { width: 100%; justify-items: center; }
  .shop-head h1 { max-width: none; font-size: clamp(2.1rem, 9.4vw, 2.8rem); line-height: 1.02; }
  .shop-head h1 strong { display: inline; }
  .shop-head__desc { margin-top: 10px; font-size: 1.02rem; }
  .shop-tools { margin: 18px auto 0; width: 100%; }
  .shop-head .search__field input { min-height: 50px; text-align: left; }
  .shop-head .filters { justify-content: flex-start; text-align: left; }
  .shop-head__float { display: none; }
  .shop-head__float--1, .shop-head__float--5 { display: block; width: 30vw; top: calc(var(--nav-h) + 70px); }
  .shop-head__float--1 { left: auto; right: -7vw; }
  .shop-head__float--5 { left: -7vw; top: calc(var(--nav-h) + 150px); }
}

/* ==========================================================================
   Tienda · animación (16 oct). Entrada de la cabecera y tarjetas que aparecen al llegar a la pantalla.
   Las tarjetas animan su enlace interno (no el <li>) para no chocar con el reacomodo de los filtros.
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .shop-head h1 { animation: shop-rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.1s backwards; }
  .shop-head__desc { animation: shop-rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.25s backwards; }
  .shop-head .search { animation: shop-rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.38s backwards; }
  .shop-head .filters .chip { animation: shop-pop 0.6s cubic-bezier(0.34, 1.5, 0.64, 1) backwards; }
  .shop-head .filters .chip:nth-child(1) { animation-delay: 0.5s; }
  .shop-head .filters .chip:nth-child(2) { animation-delay: 0.56s; }
  .shop-head .filters .chip:nth-child(3) { animation-delay: 0.62s; }
  .shop-head .filters .chip:nth-child(4) { animation-delay: 0.68s; }
  .shop-head .filters .chip:nth-child(5) { animation-delay: 0.74s; }
  .shop-head__photo { animation: shop-photo 1.1s cubic-bezier(0.34, 1.3, 0.64, 1) 0.2s backwards; }
  .shop-head__photo::before { animation: shop-ring 1s cubic-bezier(0.16, 1, 0.3, 1) 0.45s backwards; }
  .shop-head__float { animation: shop-float-in 1.2s cubic-bezier(0.16, 1, 0.3, 1) backwards; }
  .shop-head__float--1, .shop-head__float--5 { --fx: 60px; }
  .shop-head__float--2, .shop-head__float--3 { --fx: -60px; }
  .shop-head__float--4, .shop-head__float--6 { --fx: 0px; }
  .shop-head__float--1 { animation-delay: 0.3s; } .shop-head__float--2 { animation-delay: 0.4s; } .shop-head__float--3 { animation-delay: 0.2s; }
  .shop-head__float--4 { animation-delay: 0.35s; } .shop-head__float--5 { animation-delay: 0.5s; } .shop-head__float--6 { animation-delay: 0.6s; }

  .grid.will-reveal > .card > * { transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1); transition-delay: var(--rd, 0s); }
  .grid.will-reveal > .card:not(.is-in) > * { opacity: 0; transform: translateY(28px) scale(0.96); }
}
@keyframes shop-rise { from { opacity: 0; transform: translateY(24px); } }
@keyframes shop-pop { from { opacity: 0; transform: translateY(12px) scale(0.85); } }
@keyframes shop-photo { from { opacity: 0; transform: scale(0.7) rotate(-6deg); } }
@keyframes shop-ring { from { opacity: 0; transform: scale(0.6); } }
@keyframes shop-float-in { from { opacity: 0; transform: translate(var(--fx, 0px), 40px) scale(0.8); } }

/* Opción elegida bien visible (16 oct): turquesa de la marca con su marca de verificación */
.size label { position: relative; transition: background-color 200ms ease, color 200ms ease, box-shadow 200ms ease, transform 140ms ease; }
.size input:checked + label { background: #41bbbe; color: #fff; box-shadow: 0 10px 24px -14px rgba(17, 147, 147, 0.9); }
.size input:checked + label span, .size input:checked + label b, .size input:checked + label strong { color: #fff; }
.size input:checked + label::after {
  content: ""; position: absolute; top: 12px; right: 12px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23119393' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 15px no-repeat;
}
@media (hover: hover) and (pointer: fine) {
  .size input:not(:checked):not(:disabled):hover + label { box-shadow: inset 0 0 0 2px #41bbbe; }
}

/* Velas agregadas: quedan marcadas en turquesa de la marca con su check y la cantidad (16 oct) */
.addon__item { position: relative; transition: transform var(--dur-press) var(--ease-out), background-color 200ms ease, color 200ms ease, box-shadow 200ms ease; }
.addon__item.is-added { background: #41bbbe; color: #fff; box-shadow: 0 10px 24px -14px rgba(17, 147, 147, 0.9); }
.addon__item.is-added .addon__price { color: #fff; }
.addon__item.is-added > i:last-of-type, .addon__item.is-added > .tm-icon { background: #fff; color: #119393; }
.addon__count { grid-column: 1 / -1; margin-top: 4px; font-size: 0.82rem; font-weight: 600; color: #fff; display: inline-flex; align-items: center; gap: 4px; }
.addon__count::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23119393' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round' d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 10px no-repeat; }
@media (hover: hover) and (pointer: fine) { .addon__item.is-added:hover { background: #119393; } }
.addon__head > i, .addon__head > .tm-icon { color: #41bbbe; }

/* Velas: aparecen después de agregar la torta (16 oct) */
.js .addon[data-after-add]:not(.is-open) { display: none; }
.addon[data-after-add].is-open { animation: addon-in 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes addon-in { from { opacity: 0; transform: translateY(14px); } }
/* Estado del botón principal cuando la opción ya está en el carrito */
.pdp__add[data-mode="open"] { --btn-bg: #41bbbe; --btn-ink: #fff; }
.pdp__add[data-mode="update"] { --btn-bg: #623427; --btn-ink: #fff; }
.pdp__incart { margin-top: 10px; font-size: 0.92rem; color: #623427; }
@media (prefers-reduced-motion: reduce) { .addon[data-after-add].is-open { animation: none; } }

/* Porciones por WhatsApp (17 oct) */
.pdp__portions {
  margin-top: 18px; padding: 14px 16px;
  display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center;
  border-radius: var(--r-small); background: #d9f1f2; color: #3d1f16;
}
.pdp__portions-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #119393; font-size: 22px; }
.pdp__portions p { font-size: 0.98rem; line-height: 1.3; }
.pdp__portions strong { display: block; font-weight: 600; }
.pdp__portions-btn { --btn-bg: #41bbbe; --btn-ink: #fff; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .pdp__portions-btn:hover { --btn-bg: #119393; } }
@media (max-width: 520px) {
  .pdp__portions { grid-template-columns: 40px 1fr; }
  .pdp__portions-btn { grid-column: 1 / -1; justify-content: center; }
}

/* Foto de la ficha según el tamaño (17 oct): cambio suave de imagen o de escala */
.pdp__visual img { transition: scale 420ms cubic-bezier(0.34, 1.3, 0.64, 1), opacity 180ms ease, filter 180ms ease; scale: var(--size-scale, 1); }
.pdp__visual img.is-swapping { opacity: 0; filter: blur(4px); }
@media (prefers-reduced-motion: reduce) { .pdp__visual img { transition: none; } }
