/* NetYadak v6.4.9 — uniform normal product-card width + deterministic RTL ordering.
   The original #nySpecial featured showcase is excluded from the normal-card
   flex rules so its large right visual + 3x3 mini-grid remains intact. */

html body .ny-home {
  --nyp-home-card-width: 286px;
}

/* Every live data container starts from the right. */
html body .ny-home .ny-category-track,
html body .ny-home .ny-flash-products,
html body .ny-home #nyTopProducts .ny-best-products,
html body .ny-home .ny-section--second-products .ny-product-grid,
html body .ny-home .ny-vehicle-row,
html body .ny-home .ny-brand-row,
html body .ny-home .ny-review-row,
html body .ny-home #nyArticles .ny-article-grid,
html body .ny-home #nyArticles .ny-article-stack,
html body .ny-home .ny-banner-grid {
  direction: rtl !important;
}

/* Product rows: never stretch a lone item across the section. */
@media (min-width: 901px) {
  html body .ny-home .ny-section--flash .ny-flash-products,
  html body .ny-home #nyTopProducts .ny-best-products,
    html body .ny-home .ny-section--second-products .ny-product-grid {
    display: flex !important;
    flex-flow: row wrap !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 18px !important;
    direction: rtl !important;
  }

  html body .ny-home .ny-section--flash .ny-flash-products {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }

  html body .ny-home .ny-section--flash .ny-flash-products > .ny-best-card,
  html body .ny-home #nyTopProducts .ny-best-products > .ny-best-card,
  html body .ny-home .ny-section--second-products .ny-product-grid > .ny-best-card {
    box-sizing: border-box !important;
    flex: 0 0 var(--nyp-home-card-width) !important;
    width: var(--nyp-home-card-width) !important;
    min-width: var(--nyp-home-card-width) !important;
    max-width: var(--nyp-home-card-width) !important;
  }
}

/* Tablet: keep the exact same card width where possible; scroll instead of stretch. */
@media (max-width: 900px) and (min-width: 681px) {
  html body .ny-home .ny-section--flash .ny-flash-products,
  html body .ny-home #nyTopProducts .ny-best-products,
    html body .ny-home .ny-section--second-products .ny-product-grid {
    display: flex !important;
    flex-flow: row nowrap !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    gap: 14px !important;
    direction: rtl !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important;
  }
  html body .ny-home .ny-section--flash .ny-flash-products::-webkit-scrollbar,
  html body .ny-home #nyTopProducts .ny-best-products::-webkit-scrollbar,
  html body .ny-home .ny-section--second-products .ny-product-grid::-webkit-scrollbar {
    display: none !important;
  }
  html body .ny-home .ny-section--flash .ny-flash-products > .ny-best-card,
  html body .ny-home #nyTopProducts .ny-best-products > .ny-best-card,
  html body .ny-home .ny-section--second-products .ny-product-grid > .ny-best-card {
    flex: 0 0 var(--nyp-home-card-width) !important;
    width: var(--nyp-home-card-width) !important;
    min-width: var(--nyp-home-card-width) !important;
    max-width: var(--nyp-home-card-width) !important;
  }
}

/* Mobile: all product sections share the same responsive card footprint. */
@media (max-width: 680px) {
  html body .ny-home {
    --nyp-home-card-mobile-width: min(82vw, 360px);
  }
  html body .ny-home .ny-section--flash .ny-flash-products,
  html body .ny-home #nyTopProducts .ny-best-products,
    html body .ny-home .ny-section--second-products .ny-product-grid {
    display: flex !important;
    flex-flow: row nowrap !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    gap: 12px !important;
    direction: rtl !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important;
    scroll-snap-type: x proximity !important;
  }
  html body .ny-home .ny-section--flash .ny-flash-products::-webkit-scrollbar,
  html body .ny-home #nyTopProducts .ny-best-products::-webkit-scrollbar,
  html body .ny-home .ny-section--second-products .ny-product-grid::-webkit-scrollbar {
    display: none !important;
  }
  html body .ny-home .ny-section--flash .ny-flash-products > .ny-best-card,
  html body .ny-home #nyTopProducts .ny-best-products > .ny-best-card,
  html body .ny-home .ny-section--second-products .ny-product-grid > .ny-best-card {
    box-sizing: border-box !important;
    flex: 0 0 var(--nyp-home-card-mobile-width) !important;
    width: var(--nyp-home-card-mobile-width) !important;
    min-width: var(--nyp-home-card-mobile-width) !important;
    max-width: var(--nyp-home-card-mobile-width) !important;
    scroll-snap-align: start !important;
  }
}

/* Other dynamic rails also start at the right without reversing DOM data order. */
html body .ny-home .ny-category-track,
html body .ny-home .ny-vehicle-row,
html body .ny-home .ny-brand-row,
html body .ny-home .ny-review-row {
  justify-content: flex-start !important;
}

html body .ny-home #nyArticles .ny-article-grid,
html body .ny-home #nyArticles .ny-article-stack {
  direction: rtl !important;
}


/* Restore the original featured showcase ordering without changing its grid geometry. */
html body .ny-home #nySpecial .ny-special-layout,
html body .ny-home #nySpecial .ny-mini-grid {
  direction: rtl !important;
}
