/* Progressive rendering and visual rhythm for the home page.
   content-visibility only pays off for the heavy tabbed product grid below;
   the smaller hook_box blocks (manufacturer strip, banners, the stray
   clearfix) are cheap to render and their real height is nowhere near this
   placeholder, so applying it there just produced a large, visible collapse
   once each block entered the viewport. */
#index #content > .tabs {
  content-visibility: auto;
  contain-intrinsic-size: auto 720px;
}

#index #content > .tabs,
#index .hook_box > * {
  margin-bottom: clamp(18px, 3vw, 34px);
}

#index #home-page-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

#index #home-page-tabs > li {
  flex: 0 0 auto;
}

#index #home-page-tabs > li > a {
  border-radius: var(--at-radius-sm) var(--at-radius-sm) 0 0;
}

#index #homepage-slider {
  border-radius: var(--at-radius);
  overflow: hidden;
  background: var(--at-surface-soft);
}

#index .home_man,
#index #home_cat_product .bx_box {
  border-radius: var(--at-radius-sm);
}

@media (max-width: 767px) {
  #index #content > .tabs {
    contain-intrinsic-size: auto 520px;
  }
}

@supports not (content-visibility: auto) {
  #index #content > .tabs {
    contain: none;
  }
}

/* Homepage catalog sections follow the same spacing as the finder. */
body#index #slider_row.dfc-home-overview {
  gap: 26px;
  max-width: none;
  margin: 8px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#index .dfc-home-overview > .clearfix {
  display: none;
}

#index .dfc-home-overview .home-trust-bar {
  order: 1;
  margin: 0;
  background: var(--at-border);
  border-radius: 10px;
}

#index .dfc-home-overview .home-trust-item {
  min-height: 66px;
  padding: 12px 16px;
}

#index .dfc-home-overview .home-trust-marker {
  flex-basis: 32px;
  width: 32px;
  height: 32px;
  color: var(--at-primary-dark);
  background: #eef4fa;
  font-size: 19px;
  font-weight: 400;
}

#index .dfc-home-overview a.home-trust-item:hover {
  background: #f8fafc;
  text-decoration: none;
}

body#index #slider_row.dfc-home-overview #home_categories {
  order: 2;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
}

#index .dfc-home-overview #home_categories .homecat_title {
  display: block;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  color: var(--at-text);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.25;
  text-transform: none;
}

#index .dfc-home-overview #home_categories .homecat_title span {
  margin: 0;
  border: 0;
}

#index .dfc-home-overview #home_categories > ul.row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
}

#index .dfc-home-overview #home_categories > ul.row::before,
#index .dfc-home-overview #home_categories > ul.row::after {
  display: none;
}

#index .dfc-home-overview #home_categories ul li.cat_block {
  float: none;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}

#index .dfc-home-overview #home_categories .cat-container {
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--at-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(16, 24, 40, .035);
}

#index .dfc-home-overview #home_categories ul li .catimg_container {
  float: none;
  width: 100%;
  height: 150px;
  margin: 0;
  padding: 12px;
  border-radius: 0;
  border-bottom: 1px solid var(--at-border);
  background: #fff;
}

#index .dfc-home-overview #home_categories .catimg_container > a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

#index .dfc-home-overview #home_categories .catimg_container img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
}

#index .dfc-home-overview #home_categories .catlinks_container {
  float: none;
  width: 100%;
  padding: 16px;
  text-align: left;
}

#index .dfc-home-overview #home_categories ul li .homecat_name {
  justify-content: flex-start;
  min-height: 4.05em;
  margin: 0 0 12px;
  text-align: left;
}

#index .dfc-home-overview #home_categories ul li .homecat_name a {
  font-size: 15px;
  font-weight: 650;
  line-height: 1.4;
  text-align: left;
  text-transform: none;
  overflow-wrap: anywhere;
}

#index .dfc-home-overview #home_categories ul li .homecat_name span {
  display: none;
}

#index .dfc-home-overview #home_categories ul li a.view_more {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 38px;
  padding: 8px 0 0;
  border: 0;
  border-top: 1px solid var(--at-border);
  border-radius: 0;
  color: var(--at-primary-dark);
  background: transparent;
  box-shadow: none;
  font-size: 12px;
  font-weight: 600;
}

#index .dfc-home-overview #home_categories a.view_more::after {
  content: "\2192";
  font-size: 18px;
}

body#index #slider_row.dfc-home-overview #top_column {
  order: 3;
  margin: 0;
}

/* Keep all banner content visible; constrain media instead of cropping text. */
#index .dfc-home-overview #top_column #homepage-slider {
  margin: 0;
  border: 1px solid var(--at-border);
  border-radius: 12px;
  background: #f5f7fa;
  box-shadow: none;
}

#index .dfc-home-overview #top_column #homepage-slider img {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  object-position: center;
}

#index .dfc-home-overview #angarbanners_top {
  margin-top: 16px;
}

#index .dfc-home-overview .angarbanners .item-link {
  display: block;
  overflow: hidden;
  border: 1px solid var(--at-border);
  border-radius: 12px;
}

#index .dfc-home-overview .angarbanners .item-img {
  display: block;
  width: 100%;
  max-height: 240px;
  object-fit: contain;
}

#index #content.page-home .home-products-intro {
  margin: 34px 0 12px;
  padding: 0;
  text-align: left;
}

#index #content.page-home .home-products-intro h2 {
  font-size: 24px;
  font-weight: 700;
}

#index #content.page-home .home-products-intro p {
  font-size: 13px;
  line-height: 1.5;
}

#index #content.page-home > .tabs {
  margin-top: 0;
}

#index #content.page-home #home-page-tabs {
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 20px;
  border: 0;
}

#index #content.page-home #home-page-tabs > li {
  margin: 0;
}

#index #content.page-home #home-page-tabs > li > a {
  padding: 10px 16px;
  border: 1px solid var(--at-border);
  border-radius: 8px;
  color: #526073;
  background: #fff;
  font-size: 12px;
  line-height: 1.4;
  text-transform: none;
}

#index #content.page-home #home-page-tabs > li.active > a {
  border-color: #b9cee2;
  color: var(--at-primary-dark);
  background: #eef4fa;
}

#index #content.page-home #tab-content {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

@media (max-width: 767px) {
  body#index #slider_row.dfc-home-overview {
    gap: 22px;
    margin-top: 0;
  }

  #index .dfc-home-overview .home-trust-bar {
    grid-template-columns: 1fr;
  }

  #index .dfc-home-overview .home-trust-item {
    min-height: 58px;
    padding: 10px 12px;
  }

  #index .dfc-home-overview #home_categories .homecat_title,
  #index #content.page-home .home-products-intro h2 {
    font-size: 21px;
  }

  #index .dfc-home-overview #home_categories > ul.row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  #index .dfc-home-overview #home_categories ul li .catimg_container {
    height: 125px;
    padding: 10px;
  }

  #index .dfc-home-overview #home_categories .catlinks_container {
    padding: 12px;
  }

  #index .dfc-home-overview #home_categories ul li .homecat_name {
    min-height: 5.4em;
    margin-bottom: 8px;
  }

  #index .dfc-home-overview #home_categories ul li .homecat_name a {
    font-size: 13px;
  }

  #index .dfc-home-overview #home_categories ul li a.view_more {
    min-height: 44px;
  }

  #index #content.page-home .home-products-intro {
    margin-top: 26px;
  }

  #index #content.page-home #home-page-tabs > li > a {
    min-height: 44px;
    padding: 12px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #index .dfc-home-overview #home_categories .cat-container,
  #index .dfc-home-overview #home_categories .cat-container:hover {
    transform: none;
    transition: none;
  }
}
