/* ==========================================================
   Carruseles, vista rápida, galería, marquesina, opiniones
   ========================================================== */

/* ---- titulares letra por letra ---- */
[data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .09em .08em 0; margin-right: -.09em; }
[data-split] .c { display: inline-block; transition: transform .8s var(--ease), opacity .5s var(--ease); transition-delay: calc(var(--i) * 20ms); }
.js [data-split]:not(.is-in) .c { transform: translateY(105%) rotate(7deg); opacity: 0; }

/* ---- contador del carrito ---- */
.cart-btn__count { overflow: hidden; }
.cart-btn__count span { display: block; }

/* ---- carrusel ---- */
.car { display: flex; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.car::-webkit-scrollbar { display: none; }
.car img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: center; scroll-snap-stop: always; user-select: none; }
.card__media { cursor: pointer; }
.has-cursor .card__media, .has-cursor .card__media .car { cursor: none; }
.card__flag { z-index: 2; }
.car__dots { position: absolute; left: 0; right: 0; bottom: .7rem; display: flex; justify-content: center; gap: 5px; pointer-events: none; z-index: 2; }
.car__dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(250, 247, 239, .55); transition: width .35s var(--ease), background .35s; }
.car__dots i.on { width: 18px; border-radius: 3px; background: var(--paper); }
.car__nav {
  position: absolute; top: 50%; z-index: 3; width: 40px; height: 40px; margin-top: -20px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: var(--paper); color: var(--olive-ink); cursor: pointer;
  opacity: 0; transition: opacity .25s, transform .25s var(--ease), background .2s;
}
.car__nav--prev { left: .6rem; transform: translateX(-6px); }
.car__nav--next { right: .6rem; transform: translateX(6px); }
.card__media:hover .car__nav, .qv__media .car__nav, .car__nav:focus-visible { opacity: 1; transform: none; }
.car__nav:hover { background: var(--olive); color: var(--cream); }
.car__nav[disabled] { opacity: 0 !important; pointer-events: none; }
@media (hover: none) { .card__media .car__nav { display: none; } }

.card__name button { all: unset; cursor: pointer; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size .4s var(--ease); }
.card__name button:hover { background-size: 100% 1.5px; }
.card__name button:focus-visible { outline: 2px solid var(--crust-deep); outline-offset: 3px; }

/* ---- cursor con etiqueta ---- */
.cursor { position: fixed; left: 0; top: 0; z-index: 140; pointer-events: none; display: none; }
.has-cursor .cursor { display: block; }
.cursor span {
  display: grid; place-items: center; width: 68px; height: 68px; margin: -34px 0 0 -34px; border-radius: 50%;
  background: var(--olive); color: var(--cream); font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  transform: scale(0); transition: transform .35s var(--ease);
}
.cursor.is-on span { transform: scale(1); }

/* ---- marquesina ---- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); background: var(--cream); padding: 1.1rem 0; }
.marquee__track { display: flex; align-items: center; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track span { font-family: var(--f-display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: clamp(1.5rem, 3.2vw, 2.4rem); line-height: 1; color: var(--olive-ink); white-space: nowrap; }
.marquee__track span:nth-of-type(even) { color: var(--olive); }
.marquee__track i { width: 9px; height: 9px; border-radius: 50%; background: var(--crust); margin: 0 clamp(1.2rem, 3vw, 2.4rem); flex: none; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---- ken burns (usa la propiedad scale para no chocar con el parallax) ---- */
@keyframes kb { from { scale: 1; } to { scale: 1.09; } }
.hero__main img, .obrador figure img { animation: kb 18s ease-in-out infinite alternate; }
.obrador__b img { animation-delay: -9s; }
.hero__main video, .obrador figure video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- galería horizontal ---- */
.strip { background: var(--paper); border-block: 1px solid var(--line); position: relative; }
.strip__pin { padding-block: clamp(2.5rem, 6vw, 4rem) 0; }
.strip__track { display: flex; gap: clamp(.8rem, 1.6vw, 1.4rem); padding-inline: var(--gutter); overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter); scrollbar-width: none; padding-bottom: 2rem; }
.strip__track::-webkit-scrollbar { display: none; }
.strip__head { flex: none; width: min(78vw, 25rem); align-self: center; scroll-snap-align: start; padding-right: 1rem; }
.strip__hint { display: inline-flex; align-items: center; gap: .5rem; margin-top: 1.6rem; color: var(--muted); font-weight: 500; font-size: .92rem; }
.strip__hint svg { animation: nudge 1.6s var(--ease) infinite; }
@keyframes nudge { 50% { transform: translateX(6px); } }
.strip__hint-desk { display: none; }
.strip__item { flex: none; width: min(70vw, 22rem); aspect-ratio: 4 / 5; position: relative; overflow: hidden; background: var(--sand); scroll-snap-align: center; }
.strip__item:nth-child(odd) { margin-top: 2.2rem; }
.strip__item img { width: 100%; height: 100%; object-fit: cover; transition: scale .9s var(--ease); }
.strip__item:hover img { scale: 1.05; }
.strip__item figcaption { position: absolute; left: .7rem; bottom: .6rem; font-family: var(--f-display); font-style: italic; font-weight: 800; font-size: 1.5rem; color: var(--paper); text-shadow: 0 1px 12px rgba(0,0,0,.45); }
.strip__bar { height: 2px; background: var(--line); margin-inline: var(--gutter); margin-bottom: clamp(2rem, 5vw, 3rem); }
.strip__bar i { display: block; height: 100%; background: var(--olive); transform: scaleX(0); transform-origin: left; }

.strip--pinned .strip__pin { position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); display: flex; flex-direction: column; justify-content: center; padding-block: 0; overflow: hidden; }
.strip--pinned .strip__track { overflow: visible; width: max-content; scroll-snap-type: none; will-change: transform; padding-bottom: 0; align-items: center; height: min(62vh, 560px); }
.strip--pinned .strip__head { width: 30rem; padding-right: 3rem; }
.strip--pinned .strip__item { width: auto; height: 100%; }
.strip--pinned .strip__item:nth-child(odd) { margin-top: 0; height: 82%; }
.strip--pinned .strip__bar { margin-top: 2.2rem; margin-bottom: 0; }
.strip--pinned .strip__hint-desk { display: inline; }
.strip--pinned .strip__hint-touch { display: none; }

/* ---- opiniones ---- */
.voices__list { columns: 1; column-gap: 1.6rem; }
.voice { break-inside: avoid; margin-bottom: 1.6rem; padding: 1.5rem 1.5rem 1.3rem; border-top: 1.5px solid var(--olive-ink); background: var(--paper); }
.voice blockquote { font-family: var(--f-serif); font-style: italic; font-size: clamp(1.25rem, 2vw, 1.55rem); line-height: 1.3; color: var(--olive-ink); }
.voice blockquote::before { content: "\201C"; display: block; font-family: var(--f-display); font-style: italic; font-weight: 800; font-size: 3.2rem; line-height: .6; color: var(--crust); margin-bottom: .2rem; height: 1.6rem; }
.voice cite { display: block; margin-top: 1rem; font-style: normal; font-size: .85rem; font-weight: 700; letter-spacing: .04em; color: var(--muted); }
.voice:nth-child(3n + 1) { background: var(--olive); border-top-color: var(--olive); }
.voice:nth-child(3n + 1) blockquote, .voice:nth-child(3n + 1) cite { color: var(--cream); }
.voice:nth-child(3n + 1) blockquote::before { color: #e6c79a; }
@media (min-width: 640px) { .voices__list { columns: 2; } }
@media (min-width: 1000px) { .voices__list { columns: 4; } }

/* ---- pet friendly ---- */
.pet { display: flex; align-items: center; gap: .7rem; margin: -.4rem 0 1.8rem; color: var(--olive-ink); }
.pet svg { color: var(--olive); flex: none; }

/* ---- vista rápida ---- */
.qv {
  padding: 0; border: 0; background: var(--paper); color: var(--ink); overflow: hidden;
  width: min(960px, calc(100% - 2rem)); max-height: min(640px, calc(100dvh - 2rem));
  box-shadow: 0 30px 80px rgba(28, 33, 17, .35); transform-origin: 0 0;
}
.qv[open] { display: grid; grid-template-columns: 1.05fr 1fr; }
.qv::backdrop { background: rgba(28, 33, 17, .55); animation: fadeIn .4s var(--ease); transition: opacity .3s; }
.qv.is-closing::backdrop { opacity: 0; }
@keyframes fadeIn { from { opacity: 0; } }
.qv__close { position: absolute; right: .6rem; top: .6rem; z-index: 4; background: var(--paper); }
.qv__media { position: relative; background: var(--sand); min-height: 0; aspect-ratio: 4 / 5; max-height: min(640px, calc(100dvh - 2rem)); }
.qv__car:focus-visible { outline-offset: -3px; }
.qv.is-single .car__nav { display: none; }
.qv__count { position: absolute; left: .8rem; bottom: .7rem; z-index: 2; background: var(--paper); padding: .2rem .6rem; font-size: .78rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.qv__count:empty { display: none; }
.qv__info { padding: clamp(1.4rem, 3vw, 2.6rem); padding-top: clamp(2.6rem, 4vw, 3.2rem); display: flex; flex-direction: column; overflow-y: auto; min-height: 0; }
.qv__name { font-family: var(--f-display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: clamp(2.2rem, 4.4vw, 3.4rem); line-height: .94; color: var(--olive-ink); }
.qv__price { font-family: var(--f-display); font-weight: 700; font-size: 1.9rem; margin: .7rem 0 1rem; font-variant-numeric: tabular-nums; }
.qv__desc { font-family: var(--f-serif); font-style: italic; font-size: 1.25rem; line-height: 1.4; color: var(--olive-ink); }
.qv__facts { margin: 1.4rem 0 1.6rem; padding-top: 1.1rem; border-top: 1px solid var(--line); display: grid; gap: .45rem; font-size: .92rem; color: var(--muted); }
.qv__facts li { display: flex; align-items: center; gap: .7rem; }
.qv__facts li::before { content: ""; width: 18px; height: 1.5px; background: var(--crust); flex: none; }
.qv__act { margin-top: auto; margin-bottom: .7rem; }
.qv__act .btn { width: 100%; }
.qv__act .stepper { height: 52px; grid-template-columns: 56px 1fr 56px; }
@media (max-width: 720px) {
  .qv { width: 100%; max-width: 100%; max-height: 92dvh; margin: auto 0 0; overflow-y: auto; }
  .qv[open] { display: block; }
  .qv__media { aspect-ratio: 1 / 1; max-height: 46dvh; width: 100%; }
  .qv__info { padding-top: 1.4rem; overflow: visible; }
}

/* ---- carrito: asa para arrastrar en móvil ---- */
@media (hover: none) {
  .cart::before { content: ""; position: absolute; left: 6px; top: 50%; width: 4px; height: 44px; margin-top: -22px; border-radius: 4px; background: var(--line); }
}

.rm.js [data-split]:not(.is-in) .c { transform: none; opacity: 1; }
.rm .marquee__track { animation: none; }
