/* ETHNIC_HOMEPAGE_PRODUCT_TABS_V1 */

.ethnic-home-product-tabs {
  width: 100%;
  margin: 36px auto 48px;
}

.ethnic-home-tabs-nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-bottom: 24px;
}

.ethnic-home-tab {
  position: relative;
  display: inline-block;
  padding: 11px 0 13px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ethnic-ui-ink, #222d31);
  font-size: clamp(17px, 1.8vw, 23px);
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
  transition: color 0.18s ease;
}

.ethnic-home-tab + .ethnic-home-tab {
  margin-left: 0;
}

.ethnic-home-tab:hover,
.ethnic-home-tab.is-active {
  color: var(--ethnic-ui-green, #91c51b);
}

.ethnic-home-tab::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  height: 3px;
  border-radius: 2px;
  background: var(--ethnic-ui-green, #91c51b);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.18s ease;
}

.ethnic-home-tab.is-active::after {
  transform: scaleX(1);
}

.ethnic-home-tab:focus-visible {
  outline: 2px solid var(--ethnic-ui-green, #91c51b);
  outline-offset: 4px;
}

.ethnic-home-tab-panel[hidden] {
  display: none !important;
}

.ethnic-home-tab-panel .products {
  margin-top: 0;
}

.ethnic-home-tabs-empty {
  padding: 24px 0;
  color: var(--ethnic-text-muted, #667277);
}

@media (max-width: 767px) {
  .ethnic-home-product-tabs {
    margin-top: 24px;
    margin-bottom: 32px;
  }

  .ethnic-home-tabs-nav {
    gap: 8px 16px;
    margin-bottom: 18px;
  }

  .ethnic-home-tab {
    font-size: 16px;
    padding: 9px 0 12px;
  }
}

/* END_ETHNIC_HOMEPAGE_PRODUCT_TABS_V1 */

/* ETHNIC_HOME_TABS_GRID_V3
   Reuse the existing Ethnic featured-products panel.
   Scope: homepage tabs only.
*/

body#index #ethnic-home-product-tabs {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  background: linear-gradient(
    180deg,
    #e6ebe3 0%,
    var(--ethnic-section, #e8ede5) 100%
  );
  border: 1px solid var(--ethnic-section-border, #d1d9cf);
  border-radius: 20px;
  padding: 28px 24px 32px;
}

body#index #ethnic-home-product-tabs .ethnic-home-tabs-nav {
  margin-bottom: 24px;
  align-items: center;
}

body#index #ethnic-home-product-tabs .ethnic-home-tab {
  appearance: none;
  box-shadow: none;
  text-transform: none;
}

body#index #ethnic-home-product-tabs .ethnic-home-tab-panel {
  min-width: 0;
}

/* Replace inherited Bootstrap/flex/float layout with a stable grid. */
body#index #ethnic-home-product-tabs .ethnic-home-tab-panel .products.row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
  justify-content: stretch !important;
  width: 100%;
  min-width: 0;
  margin: 0 !important;
}

/* Reset Bootstrap column sizing on direct product children. */
body#index #ethnic-home-product-tabs .ethnic-home-tab-panel .products.row > * {
  display: block;
  position: relative;
  float: none !important;
  clear: none !important;
  flex: none !important;
  width: 100% !important;
  min-width: 0;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

body#index #ethnic-home-product-tabs .products .product-miniature .thumbnail-container {
  height: 100%;
}

@media (max-width: 991.98px) {
  body#index #ethnic-home-product-tabs .ethnic-home-tab-panel .products.row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  body#index #ethnic-home-product-tabs {
    padding: 18px 12px 22px;
    border-radius: 16px;
  }

  body#index #ethnic-home-product-tabs .ethnic-home-tab-panel .products.row {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  body#index #ethnic-home-product-tabs .ethnic-home-tabs-nav {
    gap: 8px 16px;
  }
}

/* END_ETHNIC_HOME_TABS_GRID_V3 */

/* ETHNIC_HOME_TABS_SINGLE_CENTER_V5
   Center a single product at the 991px breakpoint.
   Keep the same card width as the existing promo section.
*/
@media (min-width: 576px) and (max-width: 991.98px) {
  body#index #ethnic-home-product-tabs
  .ethnic-home-tab-panel .products.row > :only-child {
    grid-column: 1 / -1;
    justify-self: center;
    width: 100% !important;
    max-width: 255px !important;
  }
}
/* END_ETHNIC_HOME_TABS_SINGLE_CENTER_V5 */

/* ETHNIC_HOME_TABS_CARD_DIMENSIONS_V6
   Consistent card dimensions across responsive breakpoints.
   Align desktop card gutters with existing promo products.
   Override V5's 255px single-product cap.
*/

body#index #ethnic-home-product-tabs
.ethnic-home-tab-panel .products.row {
  align-items: stretch !important;
}

body#index #ethnic-home-product-tabs
.ethnic-home-tab-panel .products.row > * {
  box-sizing: border-box;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: 100%;
}

body#index #ethnic-home-product-tabs
.ethnic-home-tab-panel .products.row
> * .thumbnail-container {
  box-sizing: border-box;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
}

/* Large desktop: four equal columns and native-style gutters. */
@media (min-width: 1200px) {
  body#index #ethnic-home-product-tabs
  .ethnic-home-tab-panel .products.row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    column-gap: 28px !important;
    padding-right: 12px !important;
    padding-left: 12px !important;
  }
}

/* Small desktop: match the Classic three-column breakpoint. */
@media (min-width: 992px) and (max-width: 1199.98px) {
  body#index #ethnic-home-product-tabs
  .ethnic-home-tab-panel .products.row {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    column-gap: 24px !important;
    padding-right: 12px !important;
    padding-left: 12px !important;
  }
}

/* Tablet: identical 285px cards, centered within two columns. */
@media (max-width: 991.98px) {
  body#index #ethnic-home-product-tabs
  .ethnic-home-tab-panel .products.row {
    justify-items: center !important;
    column-gap: 20px !important;
    row-gap: 28px !important;
  }

  body#index #ethnic-home-product-tabs
  .ethnic-home-tab-panel .products.row > * {
    justify-self: center !important;
    width: 100% !important;
    max-width: 285px !important;
  }

  body#index #ethnic-home-product-tabs
  .ethnic-home-tab-panel .products.row > :only-child {
    grid-column: 1 / -1;
    justify-self: center !important;
    width: 100% !important;
    max-width: 285px !important;
  }
}

/* Mobile: one centered card per row, without horizontal overflow. */
@media (max-width: 575.98px) {
  body#index #ethnic-home-product-tabs
  .ethnic-home-tab-panel .products.row {
    grid-template-columns: minmax(0, 1fr) !important;
    row-gap: 16px !important;
  }
}

/* END_ETHNIC_HOME_TABS_CARD_DIMENSIONS_V6 */

/* ETHNIC_HOME_TABS_MOBILE_GUTTER_V7
   Restore the native product-column inner gutters
   on mobile.

   Keep the existing rounded panel padding.
   Keep tablet and desktop layout unchanged.
*/
@media (max-width: 575.98px) {
  body#index #ethnic-home-product-tabs
  .ethnic-home-tab-panel .products.row {
    box-sizing: border-box !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
}
/* END_ETHNIC_HOME_TABS_MOBILE_GUTTER_V7 */
