/* NetYadak v6.4.6 — dynamic home hardening
   Keeps Elementor-cached shells usable by ensuring every live-injected section
   has a visible fallback and all WordPress articles remain reachable. */

/* Vehicle/model cards must never vanish just because an admin has not uploaded
   a dedicated model image yet. The taxonomy term remains a real archive link. */
html body .ny-home #nyVehicles .ny-vehicle-fallback {
  display:grid!important;
  place-items:center!important;
  width:114px!important;
  height:114px!important;
  flex:0 0 114px!important;
  margin:0 auto!important;
  border:1px solid #e5e7eb!important;
  border-radius:50%!important;
  color:#0b2448!important;
  background:#f8fafc!important;
}
html body .ny-home #nyVehicles .ny-vehicle-fallback svg {
  display:block!important;
  width:54px!important;
  height:54px!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:1.8!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}

/* Product brands are automatic. If WooCommerce has no logo for a real brand,
   preserve the original card footprint and show the brand name instead. */
html body .ny-home #nyBrands .ny-brand--fallback {
  display:grid!important;
  place-items:center!important;
  min-height:92px!important;
  padding:12px!important;
  border:1px solid #e5e7eb!important;
  border-radius:12px!important;
  background:#fff!important;
}
html body .ny-home #nyBrands .ny-brand-fallback {
  display:block!important;
  max-width:100%!important;
  color:#0b2448!important;
  font-size:15px!important;
  font-weight:800!important;
  line-height:1.5!important;
  text-align:center!important;
  white-space:normal!important;
}

/* The visual bestseller section now uses the exact same live WooCommerce card
   component as the filtered bestseller section. */
html body .ny-home .ny-section--second-products .ny-product-grid.ny-unified-cards {
  min-width:0!important;
}
html body .ny-home .ny-section--second-products .ny-product-grid.ny-unified-cards > .ny-best-card {
  opacity:1!important;
  visibility:visible!important;
}

/* All article sources (normal posts + any article CPT) are returned. Keep the
   first large article unchanged and make the remaining cards a two-row horizontal
   rail so an arbitrary number of posts fits without breaking the Figma height. */
@media (min-width:1101px) {
  html body .ny-home #nyArticles .ny-article-stack {
    display:grid!important;
    grid-template-rows:repeat(2,minmax(0,1fr))!important;
    grid-template-columns:none!important;
    grid-auto-flow:column!important;
    grid-auto-columns:minmax(280px,1fr)!important;
    gap:20px!important;
    min-width:0!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    overscroll-behavior-inline:contain!important;
    scrollbar-width:thin!important;
    scroll-snap-type:x proximity!important;
  }
  html body .ny-home #nyArticles .ny-article-stack .ny-article {
    min-width:280px!important;
    min-height:0!important;
    scroll-snap-align:start!important;
  }
}

@media (max-width:1100px) and (min-width:681px) {
  html body .ny-home #nyArticles .ny-article-stack {
    display:grid!important;
    grid-template-rows:none!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-auto-flow:row!important;
    overflow:visible!important;
  }
}

@media (max-width:680px) {
  html body .ny-home #nyArticles,
  html body .ny-home #nyArticles .ny-article-grid,
  html body .ny-home #nyArticles .ny-article-stack {
    height:auto!important;
    max-height:none!important;
  }
  html body .ny-home #nyArticles .ny-article-stack {
    display:grid!important;
    grid-template-columns:1fr!important;
    grid-template-rows:none!important;
    grid-auto-flow:row!important;
    gap:16px!important;
    overflow:visible!important;
  }
  html body .ny-home #nyArticles .ny-article-stack .ny-article {
    min-height:245px!important;
  }
}

/* Live injected reveal nodes should be visible even if Elementor served an old
   HTML snapshot whose inline IntersectionObserver never saw those new nodes. */
html body .ny-home [data-nyp-live-filled="1"] .ny-reveal,
html body .ny-home .ny-vehicle-row .ny-reveal,
html body .ny-home .ny-brand-row .ny-reveal,
html body .ny-home .ny-article-grid .ny-reveal {
  opacity:1!important;
  visibility:visible!important;
  transform:none!important;
}
