/* TurnoYa Marketplace — sección "Stories" (videos cortos de los negocios).
   Archivo propio de esta sección: todas las clases usan el prefijo .tys- y leen los tokens de turnoya.css. */

.tys { background: var(--navy); color: var(--white); padding: 56px 0 52px; --tys-gap: 16px; }
.tys .ty-wrap { max-width: 1360px; }

/* Cabecera */
.tys__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.tys__titlebox { min-width: 0; }
.tys__titlerow { display: flex; align-items: center; gap: 16px; }
.tys__ico { width: 56px; height: 56px; flex: none; display: grid; place-items: center; border-radius: 16px; background: linear-gradient(135deg, #ff8a1f 0%, var(--orange) 100%); color: var(--white); box-shadow: 0 8px 20px rgba(226, 90, 6, .35); }
.tys__title { font-size: 44px; line-height: 50px; font-weight: 800; letter-spacing: -1.2px; color: var(--white); position: relative; display: inline-block; }
.tys__swoosh { position: absolute; inset-inline-start: calc(100% + 14px); top: 50%; transform: translateY(-50%); width: 108px; height: 22px; pointer-events: none; }
[dir="rtl"] .tys__swoosh { transform: translateY(-50%) scaleX(-1); }
.tys__sub { margin-top: 10px; font-size: 18px; line-height: 26px; color: rgba(255, 255, 255, .92); }

/* Filtros */
.tys__chips { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tys__chip { display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 22px; border-radius: var(--radius-pill); border: 2px solid rgba(255, 255, 255, .92); background: transparent; color: var(--white); font: 700 17px/1 var(--font-sans); cursor: pointer; white-space: nowrap; }
.tys__chip:disabled { opacity: .35; cursor: default; }
.tys__chip.is-on { background: var(--yellow); border-color: var(--yellow); color: var(--navy); }

/* Carrusel */
.tys__stage { position: relative; margin-top: 34px; }
.tys__track { display: flex; gap: var(--tys-gap); overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 6px; scrollbar-width: none; }
.tys__track::-webkit-scrollbar { display: none; }
.tys__card { cursor: pointer; position: relative; flex: 0 0 calc((100% - 4 * var(--tys-gap)) / 5); scroll-snap-align: start; aspect-ratio: 9 / 17; border-radius: 28px; overflow: hidden; border: 3px solid var(--white); background: #12384f; color: var(--white); text-align: start; box-shadow: 0 12px 30px rgba(0, 0, 0, .28); }
/* La imagen se extiende un 20% por debajo del cuadro: recorta rótulos/marcas de agua que traen algunas fotos en su borde inferior. */
.tys__card > img { position: absolute; top: 0; inset-inline: 0; width: 100%; height: 138%; object-fit: cover; object-position: center 24%; }
.tys__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .28) 0%, rgba(0, 0, 0, 0) 26%, rgba(0, 0, 0, .12) 48%, rgba(0, 0, 0, .86) 100%); }
.tys__top { position: absolute; top: 12px; inset-inline: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; z-index: 2; }
.tys__tag { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border-radius: var(--radius-pill); background: var(--yellow); color: var(--navy); font-weight: 800; font-size: 13px; white-space: nowrap; }
.tys__time { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border-radius: var(--radius-pill); background: rgba(235, 240, 243, .92); color: var(--navy); font-weight: 700; font-size: 13px; white-space: nowrap; margin-inline-start: auto; }
.tys__play { position: absolute; top: 50%; inset-inline-start: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; display: grid; place-items: center; border-radius: 50%; background: rgba(40, 40, 40, .58); color: var(--white); z-index: 2; backdrop-filter: blur(2px); }
[dir="rtl"] .tys__play { margin: -32px -32px 0 0; }
.tys__info { position: absolute; inset-inline: 0; bottom: 0; padding: 0 14px 14px; z-index: 2; }
.tys__biz { display: flex; align-items: center; gap: 10px; }
.tys__avatar { overflow: hidden; background: var(--yellow); color: var(--navy); font-weight: 800; font-size: 20px; width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .9); }
.tys__bizname { font-weight: 700; font-size: 18px; line-height: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tys__ctitle { margin-top: 12px; font-weight: 800; font-size: 16px; line-height: 21px; text-wrap: balance; }
.tys__csub { margin-top: 4px; font-size: 13.5px; line-height: 18px; color: rgba(255, 255, 255, .88); }
.tys__foot { margin-top: 12px; display: flex; align-items: center; gap: 12px; }
.tys__stat { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 500; white-space: nowrap; color: rgba(255, 255, 255, .92); }
.tys__ver { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 16px; border-radius: var(--radius-pill); background: var(--orange); color: var(--white); font: 800 15px/1 var(--font-sans); border: 0; cursor: pointer; }
[dir="rtl"] .tys__ver svg, [dir="rtl"] .tys__arrow svg { transform: scaleX(-1); }
/* En hebreo la palabra "צפיות" no cabe junto a los likes y el botón: el ícono del ojo ya lo indica. */
[dir="rtl"] .tys__vw { display: none; }

.tys__arrow { position: absolute; top: 50%; width: 52px; height: 52px; margin-top: -26px; display: grid; place-items: center; border-radius: 50%; border: 0; background: var(--white); color: var(--navy); box-shadow: 0 6px 18px rgba(0, 0, 0, .3); z-index: 4; cursor: pointer; }
.tys__arrow--prev { inset-inline-start: -26px; }
.tys__arrow--next { inset-inline-end: -26px; }

.tys__dots { display: flex; justify-content: center; gap: 12px; margin-top: 26px; }
.tys__dot { width: 14px; height: 14px; border-radius: 50%; background: rgba(255, 255, 255, .45); }
.tys__dot.is-on { background: var(--yellow); }

/* Pantallas medianas: 4 tarjetas */
@media (max-width: 1279px) {
  .tys__card { flex-basis: calc((100% - 3 * var(--tys-gap)) / 4); }
  .tys__arrow--prev { inset-inline-start: -14px; }
  .tys__arrow--next { inset-inline-end: -14px; }
}

/* Tableta: 3 tarjetas, cabecera en columna */
@media (max-width: 1023px) {
  .tys__card { flex-basis: calc((100% - 2 * var(--tys-gap)) / 3); }
  .tys__head { flex-direction: column; }
  .tys__swoosh { display: none; }
}

/* Móvil: tarjetas deslizables, sin flechas */
@media (max-width: 860px) {
  .tys { padding: 40px 0 36px; }
  .tys .ty-wrap { padding-inline: var(--space-4); }
  .tys__ico { width: 44px; height: 44px; border-radius: 13px; }
  .tys__title { font-size: 32px; line-height: 38px; }
  .tys__sub { font-size: 15px; line-height: 22px; }
  .tys__vw { display: none; }
  .tys__foot { gap: 10px; }
  .tys__ver { padding: 0 14px; }
  .tys__chips { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 4px; scrollbar-width: none; }
  .tys__chips::-webkit-scrollbar { display: none; }
  .tys__chip { height: 44px; padding: 0 18px; font-size: 15px; flex: none; }
  .tys__stage { margin-top: 24px; }
  .tys__track { margin-inline: calc(var(--space-4) * -1); padding-inline: var(--space-4); scroll-padding-inline: var(--space-4); }
  .tys__card { flex-basis: 66%; max-width: 270px; }
  .tys__arrow { display: none; }
  .tys__dots { margin-top: 20px; gap: 10px; }
  .tys__dot { width: 11px; height: 11px; }
}

.tys__avatar img { width: 100%; height: 100%; object-fit: cover; }
.tys__tag--deal { background: var(--orange); color: var(--white); }
.tys__card:focus-visible, .tys__chip:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.tys__card:hover .tys__play { background: rgba(226, 90, 6, .85); }
.tys__csub { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ===== Visor ===== */
html.tyv-lock { overflow: hidden; }
.tyv { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; font-family: var(--font-sans); color: var(--navy); }
.tyv__backdrop { position: absolute; inset: 0; background: rgba(0, 20, 32, .82); backdrop-filter: blur(6px); }
.tyv__dialog { position: relative; display: flex; align-items: center; gap: 14px; max-width: 100vw; }
.tyv__panel { width: 400px; max-height: 88vh; overflow-y: auto; background: var(--white); border-radius: 24px; padding: 26px 24px; display: flex; flex-direction: column; gap: 14px; }
.tyv__bizrow { display: flex; align-items: center; gap: 12px; }
.tyv__avatar { width: 52px; height: 52px; flex: none; border-radius: 50%; overflow: hidden; background: var(--yellow); color: var(--navy); display: grid; place-items: center; font-weight: 800; font-size: 20px; border: 2px solid var(--white); box-shadow: 0 0 0 1px var(--border); }
.tyv__avatar img { width: 100%; height: 100%; object-fit: cover; }
.tyv__bizmeta { display: flex; flex-direction: column; min-width: 0; }
.tyv__bizmeta b { font-size: 18px; line-height: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tyv__bizmeta span { font-size: 13.5px; color: #5b6b78; }
.tyv__title { margin: 0; font-size: 24px; line-height: 29px; font-weight: 800; letter-spacing: -.4px; text-wrap: balance; }
.tyv__desc { margin: 0; font-size: 15px; line-height: 22px; color: #44566a; }
.tyv__btns { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.tyv__btn { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 18px; border-radius: var(--radius-pill); font: 800 16px/1 var(--font-sans); text-decoration: none; border: 2px solid var(--navy); color: var(--navy); background: var(--white); cursor: pointer; }
.tyv__btn--primary { background: var(--orange); border-color: var(--orange); color: var(--white); }
.tyv__btn:hover { filter: brightness(.96); }
.tyv__btn:focus-visible, .tyv__ic:focus-visible, .tyv__nav:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.tyv__feat { margin-top: 6px; }
.tyv__featlbl { font-size: 12.5px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; color: #5b6b78; margin-bottom: 8px; }
.tyv__featcard { position: relative; display: flex; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: 18px; background: #f7f9fb; }
.tyv__featcard > img, .tyv__featimg { width: 64px; height: 64px; flex: none; border-radius: 14px; object-fit: cover; background: var(--yellow); display: grid; place-items: center; }
.tyv__featbody { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.tyv__featbody b { font-size: 15.5px; line-height: 20px; }
.tyv__featmeta { font-size: 13px; color: #5b6b78; }
.tyv__price { font-size: 16px; font-weight: 800; color: var(--orange); }
.tyv__price s { font-weight: 500; color: #8a98a5; font-size: 13px; }
.tyv__avail { position: absolute; top: -10px; inset-inline-end: 12px; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: var(--radius-pill); background: #dff7e6; color: #11703a; font-weight: 800; font-size: 12px; }
.tyv__stagewrap { flex: none; }
.tyv__stage { position: relative; height: min(88vh, 860px); aspect-ratio: 9 / 16; max-width: calc(100vw - 32px); background: #000; border-radius: 24px; overflow: hidden; }
.tyv__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; cursor: pointer; }
.tyv__stage:fullscreen { aspect-ratio: auto; height: 100%; border-radius: 0; }
.tyv__stage:fullscreen .tyv__video { object-fit: contain; }
.tyv__bars { position: absolute; top: 10px; inset-inline: 14px; display: flex; gap: 4px; z-index: 3; pointer-events: none; }
.tyv__bars i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .38); }
.tyv__bars i.is-done { background: #fff; } .tyv__bars i.is-cur { background: var(--yellow); }
.tyv__top { position: absolute; top: 22px; inset-inline: 14px; display: flex; justify-content: space-between; z-index: 3; }
.tyv__ic { width: 42px; height: 42px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(20, 20, 20, .55); color: #fff; cursor: pointer; backdrop-filter: blur(4px); }
.tyv__ic:hover { background: rgba(20, 20, 20, .75); }
.tyv__ic--lg { width: 50px; height: 50px; }
.tyv__side { position: absolute; inset-inline-end: 12px; bottom: 128px; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 4px; color: #fff; font-size: 12px; font-weight: 700; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); }
.tyv__mini { display: none; }
.tyv__ctrl { position: absolute; inset-inline: 0; bottom: 0; padding: 40px 14px 14px; display: flex; align-items: center; gap: 10px; z-index: 3; color: #fff; background: linear-gradient(0deg, rgba(0, 0, 0, .72), transparent); }
.tyv__ctrl .tyv__ic { background: transparent; width: 36px; height: 36px; flex: none; }
.tyv__prog { flex: 1; height: 18px; display: flex; align-items: center; cursor: pointer; position: relative; }
.tyv__prog::before { content: ''; position: absolute; inset-inline: 0; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .35); }
.tyv__prog i { position: relative; display: block; height: 4px; width: 0; border-radius: 2px; background: var(--yellow); }
.tyv__time { font-size: 12.5px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; direction: ltr; }
.is-paused .tyv__stage::after { content: ''; position: absolute; top: 50%; inset-inline-start: 50%; width: 72px; height: 72px; margin: -36px -36px 0 -36px; border-radius: 50%; background: rgba(0, 0, 0, .5) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 6.5v11l9-5.5z'/%3E%3C/svg%3E") center / 38px no-repeat; pointer-events: none; z-index: 2; }
.tyv__nav { width: 48px; height: 48px; flex: none; border-radius: 50%; border: 0; background: #fff; color: var(--navy); display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); }
[dir="rtl"] .tyv__nav svg { transform: scaleX(-1); }
.tyv__toast { position: fixed; bottom: 32px; left: 50%; transform: translate(-50%, 20px); opacity: 0; transition: .25s; background: var(--navy); color: #fff; padding: 12px 20px; border-radius: var(--radius-pill); font-weight: 700; z-index: 2100; }
.tyv__toast.is-in { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1100px) {
  .tyv__panel { width: 330px; padding: 22px 18px; }
}
/* Móvil: video a pantalla completa, info compacta sobre el video */
@media (max-width: 860px) {
  .tyv__panel, .tyv__nav { display: none; }
  .tyv__dialog { width: 100%; height: 100%; gap: 0; }
  .tyv__stagewrap { width: 100%; height: 100%; }
  .tyv__stage { width: 100%; height: 100%; max-width: none; aspect-ratio: auto; border-radius: 0; }
  .tyv__side { bottom: 210px; }
  .tyv__mini { display: block; position: absolute; inset-inline: 0; bottom: 60px; padding: 0 16px; z-index: 3; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .6); }
  .tyv__mini::before { content: ''; position: absolute; inset: -80px 0 -60px; z-index: -1; background: linear-gradient(0deg, rgba(0, 0, 0, .7), transparent); }
  .tyv__minibiz { display: flex; align-items: center; gap: 10px; }
  .tyv__minibiz .tyv__avatar { width: 38px; height: 38px; font-size: 16px; }
  .tyv__minibiz b { font-size: 16px; }
  .tyv__mini p { margin: 8px 0 12px; font-size: 15px; font-weight: 700; }
  .tyv__mini .tyv__btn { height: 46px; width: 100%; text-shadow: none; }
}

.tys__all { display: inline-flex; align-items: center; gap: 4px; margin-top: 14px; color: var(--yellow); font-weight: 800; font-size: 15px; text-decoration: none; }
[dir="rtl"] .tys__all svg { transform: scaleX(-1); }
.tys__all:hover { text-decoration: underline; }
