/* ========================================================================== */
/* VDK EMPRENDE · MÓVIL · Nuevos ingresos y Top 15 en carrusel (2026-11-19)    */
/* Solo portada (no en la vista de categoría abierta). Se activa con la clase  */
/* html.emprende-mobile-rails (activa en producción desde 2026-11-19).          */
/* Deslizar con el dedo: 2 tarjetas completas + un pedazo de la tercera.       */
/* ========================================================================== */
@media (max-width: 767px) {
  html.emprende-mobile-rails body.emprende-home:not(.emprende-category-open) .emprende-mobile-section--new .emprende-arrivals__viewport {
    position: relative;
    min-width: 0;
  }
  html.emprende-mobile-rails body.emprende-home:not(.emprende-category-open) .emprende-mobile-section--new .emprende-mobile-grid {
    display: grid !important;
    grid-template-columns: none !important;
    grid-auto-flow: column !important;
    grid-auto-columns: calc((100% - 12px) / 2.2) !important; /* 2 tarjetas + 20% de la tercera */
    gap: 6px !important;
    align-items: start !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    touch-action: pan-x pan-y;
  }
  html.emprende-mobile-rails body.emprende-home:not(.emprende-category-open) .emprende-mobile-section--new .emprende-mobile-grid::-webkit-scrollbar {
    display: none;
  }
  html.emprende-mobile-rails body.emprende-home:not(.emprende-category-open) .emprende-mobile-section--new .emprende-mobile-grid > * {
    min-width: 0 !important;
    width: auto !important;
    scroll-snap-align: start;
  }
  /* Las fotos traen touch-action: pan-y (home-mayorista.css "v28" y "unica foto"),
     que bloquea el deslizamiento horizontal al tocar la imagen. Aquí cada tarjeta
     tiene una sola foto, así que se libera el gesto horizontal para el carrusel. */
  html.emprende-mobile-rails body.emprende-home:not(.emprende-category-open) .emprende-mobile-section--new .emprende-mobile-grid *,
  html.emprende-mobile-rails body.emprende-home:not(.emprende-category-open) .emprende-mobile-section--new .emprende-mobile-grid .product-media,
  html.emprende-mobile-rails body.emprende-home:not(.emprende-category-open) .emprende-mobile-section--new .emprende-mobile-grid .product-card--motel .product-card-gallery--single {
    touch-action: pan-x pan-y pinch-zoom !important;
  }
  /* Mensajes (vacío / error / reintentar) ocupan todo el ancho. */
  html.emprende-mobile-rails body.emprende-home:not(.emprende-category-open) .emprende-mobile-section--new .emprende-mobile-grid > .emprende-mobile-pending {
    grid-column: 1 / -1;
    width: 100% !important;
    min-width: calc(100vw - 32px) !important;
  }
  /* Flechas pequeñas a la derecha del título (además del deslizamiento con el dedo). */
  html.emprende-mobile-rails body.emprende-home:not(.emprende-category-open) .emprende-mobile-section--new {
    position: relative;
  }
  html.emprende-mobile-rails body.emprende-home:not(.emprende-category-open) .emprende-mobile-section--new .emprende-arrivals__viewport {
    position: static;
  }
  html.emprende-mobile-rails body.emprende-home:not(.emprende-category-open) .emprende-mobile-section--new .emprende-mobile-section__head {
    padding-right: 74px;
  }
  html.emprende-mobile-rails body.emprende-home:not(.emprende-category-open) .emprende-mobile-section--new .emprende-arrivals__controls {
    position: absolute;
    top: 1px;
    right: 1px;
    z-index: 3;
    display: flex !important;
    gap: 6px;
  }
  html.emprende-mobile-rails body.emprende-home:not(.emprende-category-open) .emprende-mobile-section--new .emprende-arrivals__arrow {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #dcdcdc;
    border-radius: 50%;
    background: #fff;
    color: #161616;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: opacity .18s ease, border-color .18s ease;
  }
  html.emprende-mobile-rails body.emprende-home:not(.emprende-category-open) .emprende-mobile-section--new .emprende-arrivals__arrow svg {
    width: 16px;
    height: 16px;
  }
  html.emprende-mobile-rails body.emprende-home:not(.emprende-category-open) .emprende-mobile-section--new .emprende-arrivals__arrow:disabled {
    opacity: .3;
  }
  html.emprende-mobile-rails body.emprende-home:not(.emprende-category-open) .emprende-mobile-section--new .emprende-arrivals__arrow:active:not(:disabled) {
    border-color: #111;
  }

  /* Difuminado fijo solo en el borde derecho (indica que se puede deslizar). */
  html.emprende-mobile-rails body.emprende-home:not(.emprende-category-open) .emprende-mobile-section--new .emprende-mobile-grid {
    -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 48px), rgba(0,0,0,.35) 100%);
            mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 48px), rgba(0,0,0,.35) 100%);
  }
  /* Menos aire entre las dos tiras ahora que son cortas. */
  html.emprende-mobile-rails body.emprende-home:not(.emprende-category-open) .emprende-mobile-section--top10 {
    margin-top: 28px;
  }
}
