/* POPSTER v3.11.2 — Isolated horizontal product rails.
 * Fixes squeezed 8-column gift rail at compact widths without altering the
 * existing 2-up "I piu amati" grid, shop/category pages, or WooCommerce cart.
 * The front-page template deliberately does NOT put .products__grid or
 * .popster-home-products-grid on horizontally scrolling product rails.
 */
body.home .popster-home-product-section--slider .popster-product-stage {
  display: grid !important;
  grid-template-columns: 44px minmax(0, 1fr) 44px !important;
  align-items: center;
  gap: 10px;
  min-width: 0;
  width: 100%;
}
body.home .popster-home-product-section--slider .popster-product-stage > .popster-products-track {
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  grid-template-columns: none !important;
  grid-auto-columns: auto !important;
  grid-auto-flow: initial !important;
  gap: 16px !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  margin: 0 !important;
  padding: 2px 0 14px !important;
}
body.home .popster-home-product-section--slider .popster-products-track > .product-card {
  box-sizing: border-box !important;
  display: block !important;
  flex: 0 0 calc((100% - 48px) / 4) !important;
  min-width: 0 !important;
  max-width: none !important;
  width: auto !important;
  scroll-snap-align: start;
  align-self: flex-start;
  overflow-wrap: break-word;
}
body.home .popster-home-product-section--slider .popster-products-track .product-card__img {
  width: 100%;
  aspect-ratio: 2 / 3;
  height: auto;
  overflow: hidden;
}
body.home .popster-home-product-section--slider .popster-products-track .product-card__img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
body.home .popster-home-product-section--slider .popster-products-track .product-card__title,
body.home .popster-home-product-section--slider .popster-products-track .product-card__price {
  overflow-wrap: break-word;
  word-break: normal;
}
body.home .popster-home-product-section--slider .popster-products-track .product-card__variant-options {
  min-width: 0;
  max-width: 100%;
}
body.home .popster-home-product-section--slider .popster-products-track .product-card__add {
  width: 100%;
  max-width: 100%;
}
@media (max-width: 1100px) {
  body.home .popster-home-product-section--slider .popster-products-track > .product-card {
    flex-basis: calc((100% - 24px) / 3) !important;
  }
}
@media (max-width: 780px) {
  body.home .popster-home-product-section--slider .popster-products-track > .product-card {
    flex-basis: calc((100% - 12px) / 2) !important;
  }
  body.home .popster-home-product-section--slider .popster-products-track {
    gap: 12px !important;
  }
}
@media (max-width: 767px) {
  body.home .popster-home-product-section--slider .popster-product-stage {
    display: block !important;
    width: 100% !important;
  }
  body.home .popster-home-product-section--slider .popster-product-stage > .popster-scroller-arrow {
    display: none !important; /* use native swipe on phones */
  }
  body.home .popster-home-product-section--slider .popster-product-stage > .popster-products-track {
    width: 100% !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 12px !important;
    padding-bottom: 15px !important;
  }
  body.home .popster-home-product-section--slider .popster-products-track > .product-card {
    flex: 0 0 calc((100% - 12px) / 2) !important;
    min-width: 0 !important;
    width: auto !important;
  }
  body.home .popster-home-product-section--slider .popster-products-track .product-card__variant-options {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }
  body.home .popster-home-product-section--slider .popster-products-track .product-card__variant {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 6px 3px !important;
  }
  body.home .popster-home-product-section--slider .popster-products-track .product-card__title {
    font-size: 13.5px;
    line-height: 1.4;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.home .popster-home-product-section--slider .popster-products-track {
    scroll-behavior: auto !important;
  }
}
