/* Production gateway layout fixes for the tunneled legacy origin. */
#productGrid.catalog-grid,
.catalog-grid,
html.desktop-shell #productGrid.catalog-grid,
html.desktop-shell .catalog-grid {
  gap: clamp(22px, 2vw, 34px) clamp(8px, .9vw, 14px) !important;
  background: transparent !important;
  border: 0 !important;
}

#productGrid.catalog-grid > .product-card,
.catalog-grid > .product-card,
html.desktop-shell #productGrid.catalog-grid > .product-card,
html.desktop-shell .catalog-grid > .product-card {
  border: 1px solid var(--line) !important;
  overflow: hidden !important;
}

.ai-search-section .ai-layout,
html.desktop-shell .ai-search-section .ai-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  overflow: hidden !important;
}

.ai-search-section .ai-form,
.ai-search-section .ai-results,
.ai-search-section .form-row,
.ai-search-section .ai-form label {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.ai-search-section .ai-form input,
.ai-search-section .ai-form select,
.ai-search-section .ai-form textarea {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
}

.ai-search-section .ai-form select {
  padding-right: 36px !important;
}

.ai-search-section .ai-form textarea {
  padding-top: 12px !important;
  padding-bottom: 12px !important;
}

@media (max-width: 900px) {
  html body:not([data-page="product"]) #home #catalog #productGrid.catalog-grid,
  body:not([data-page="product"]) #productGrid.catalog-grid,
  body:not([data-page="product"]) .catalog-grid,
  html.desktop-shell body:not([data-page="product"]) #productGrid.catalog-grid,
  html.desktop-shell body:not([data-page="product"]) .catalog-grid {
    gap: 18px 8px !important;
    background: transparent !important;
  }

  .ai-search-section .ai-layout,
  html.desktop-shell .ai-search-section .ai-layout {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}
