/* Match All Products' grid and side gutters. Cards inherit the shared catalog
   typography, image proportions, padding and borders without home-only sizing. */
#bestsellers {
  padding-inline: clamp(18px, 3.5vw, 56px);
}

#bestsellers > .product-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: clamp(14px, 1.6vw, 22px) !important;
}

/* No stale static choices while the live selection loads. Keep the heading
   visible so the section never seems to disappear during a slow connection. */
html.managed-bestsellers #bestsellers:not([data-catalog-ready]) > .product-grid,
#bestsellers.bestsellers-empty > .section-head,
#bestsellers.bestsellers-empty > .product-grid {
  display: none !important;
}

@media (max-width: 1100px) {
  #bestsellers > .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  #bestsellers {
    padding-inline: 12px;
  }
  #bestsellers > .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
}

@media (max-width: 700px) {
  #bestsellers > .product-grid {
    gap: 10px !important;
  }
}

@media (orientation: landscape) and (max-height: 500px) and (max-width: 1100px) {
  #bestsellers > .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
}
