/* Search and initial responsive geometry shared by public pages. */
body ul.ui-autocomplete.ui-corner-all.dfc-search-suggestions {
  max-width: calc(100vw - 24px);
  padding: 4px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #ccd6df;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(20, 35, 52, .18);
  z-index: 1100;
}
body ul.dfc-search-suggestions.ui-autocomplete li.ui-menu-item { margin: 0; border-color: #edf0f4; }
body ul.dfc-search-suggestions.ui-autocomplete li.ui-menu-item > a {
  display: flex;
  gap: 10px;
  min-height: 74px;
  margin: 0;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #253344;
  background: #fff;
}
body ul.dfc-search-suggestions.ui-autocomplete li.ui-menu-item > a:is(.ui-state-focus,.ui-state-active,:hover) {
  margin: 0;
  border-color: #b4cee5;
  color: #253344;
  background: #eef5fb;
}
body ul.dfc-search-suggestions .search_left { flex: 0 0 48px; float: none; width: 48px; }
body ul.dfc-search-suggestions .search_left img { width: 48px; height: 48px; border: 0; object-fit: contain; }
body ul.dfc-search-suggestions .search_right { flex: 1 1 auto; float: none; width: auto; min-width: 0; padding: 0; }
body ul.dfc-search-suggestions .search_right .search_name { white-space: normal; overflow-wrap: anywhere; font-size: 13px; line-height: 1.4; font-weight: 600; text-transform: none; }
body ul.dfc-search-suggestions .search_right .search_brand { color: #5b6979; font-size: 11px; }
body ul.dfc-search-suggestions .search_right .search_price { margin-top: 4px; color: #a51622; font-size: 13px; }
body ul.dfc-search-suggestions .clearfix { display: none; }
#search #main .dfc-search-title { overflow-wrap: anywhere; text-transform: none; }

/* These columns were previously hidden by a late script after first paint. */
@media (max-width: 1199px) {
  :is(#category,#search,#manufacturer,#supplier,#best-sales,#new-products,#prices-drop,#product) #left-column,
  :is(#category,#search,#manufacturer,#supplier,#best-sales,#new-products,#prices-drop,#product) #right-column { display: none !important; }
  :is(#category,#search,#manufacturer,#supplier,#best-sales,#new-products,#prices-drop,#product) #content-wrapper { width: 100%; max-width: 100%; flex-basis: 100%; }
}

/* A separate, labeled view-control row avoids overlapping the sort dropdown. */
#content-wrapper #products .grid_switcher {
  position: static;
  float: none;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin: -6px 0 16px;
  padding: 0;
}
#content-wrapper #products .grid_switcher .dfc-view-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #475569;
  background: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
}
#content-wrapper #products .grid_switcher .dfc-view-button i,
#content-wrapper #products .grid_switcher .dfc-view-button i:hover {
  color: inherit;
  font-size: 20px;
  width: 20px; height: 20px; min-width: 0; border: 0; border-radius: 0; background: transparent; padding: 0;
}
#content-wrapper #products .grid_switcher .dfc-view-button:hover {
  border-color: #1268ad;
  color: #1268ad;
  background: #f0f7fc;
}
#content-wrapper #products .grid_switcher .dfc-view-button[aria-pressed="true"] {
  border-color: #1268ad;
  color: #0e568f;
  background: #eaf4fc;
}
#content-wrapper #products .grid_switcher .dfc-view-button:focus-visible {
  outline: 3px solid #1268ad;
  outline-offset: 3px;
}
/* The native list layout starts above 481px; preserve its existing mobile rule. */
@media (max-width: 481px) {
  #content-wrapper #products .grid_switcher { display: none; }
}

.dfc-sort-caption { display: none; }
@media (max-width: 767px) {
  .dfc-sort-caption { display: inline; margin-right: 4px; font-weight: 600; }
}
