/**
 * Storefront homepage polish — cream layout tokens + accents from settings.
 * Brand accents follow :root --bfrontshop-brand-primary (admin brand_primary_color).
 * Gold ticker background (`.bf-gold-ticker`) uses the same brand primary token.
 * Optional --bfrontshop-storefront-bg (admin homepage_background_color) overrides cream.
 * Homepage section polish: body.bf-homepage.
 * Shared chrome (header/ticker/bottom-nav): body.bf-homepage + body.bf-storefront-chrome.
 * Background itself is storefront-wide via app.blade.php.
 */

:is(body.bf-homepage, body.bf-storefront-chrome) {
  --bf-cream: #faf8f4;
  --bf-surface: #ffffff;
  --bf-ink: #1f1a14;
  --bf-muted: #7a7368;
  --bf-line: rgba(31, 26, 20, 0.08);
  --bf-radius: 1rem;
  --bf-radius-lg: 1.4rem;
  --bf-shadow: 0 10px 30px rgba(31, 26, 20, 0.08);
  --bf-shadow-sm: 0 2px 10px rgba(31, 26, 20, 0.05);
  /* Accents track tenant brand primary from settings (fallback = former hard gold). */
  --bf-gold: var(--bfrontshop-brand-primary, #c5a059);
  --bf-gold-deep: color-mix(in srgb, var(--bfrontshop-brand-primary, #c5a059) 82%, #1c1712);
  --bf-gold-soft: color-mix(in srgb, var(--bfrontshop-brand-primary, #c5a059) 35%, #ffffff);
  --bf-dark: #1c1712;

  --bs-primary: var(--bfrontshop-brand-primary, #c5a059);
  --bs-link-color: var(--bfrontshop-brand-primary, #c5a059);
  --bs-link-hover-color: var(--bf-gold-deep);

  background-color: var(--bfrontshop-storefront-bg, var(--bf-cream)) !important;
  color: var(--bf-ink);
}

:is(body.bf-homepage, body.bf-storefront-chrome) #main-container {
  padding-bottom: 5.75rem;
  max-width: 1100px;
}

/* Under Storefront chrome, vertical rhythm is owned by storefront-theme-bridge.
   Keep a light fallback only when polish runs without the redesign chrome. */
body.bf-homepage:not(.bf-storefront-chrome) .section-item {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Do not zero vertical margins here — storefront-theme-bridge owns homepage rhythm. */
body.bf-homepage.bf-storefront-chrome .section-item {
  padding-inline: 0;
}

/* ========== Gold ticker (brand primary — e.g. Nami emerald) ========== */
:is(body.bf-homepage, body.bf-storefront-chrome) .bf-gold-ticker {
  background: var(--bfrontshop-brand-primary) !important;
  color: #f3e6c8;
  width: 100%;
}

:is(body.bf-homepage, body.bf-storefront-chrome) .bf-gold-ticker .header-gold-price-row {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  padding: 0.5rem 0.75rem;
}

:is(body.bf-homepage, body.bf-storefront-chrome) .bf-gold-ticker .fixed-gold-price-note {
  color: #f3e6c8 !important;
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 0.9;
}

:is(body.bf-homepage, body.bf-storefront-chrome) .bf-gold-ticker .fixed-gold-price-box {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0;
  color: inherit !important;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

:is(body.bf-homepage, body.bf-storefront-chrome) .bf-gold-ticker .fixed-gold-price-value {
  color: #e8c97a !important;
  font-weight: 700;
}

:is(body.bf-homepage, body.bf-storefront-chrome) .bf-gold-ticker .fixed-gold-price-label,
:is(body.bf-homepage, body.bf-storefront-chrome) .bf-gold-ticker .fixed-gold-price-currency {
  color: #f3e6c8 !important;
}

:is(body.bf-homepage, body.bf-storefront-chrome) .bf-gold-ticker .fixed-gold-price-icon {
  color: #7dcea0 !important;
}

body:not(.bf-homepage):not(.bf-storefront-chrome) .bf-gold-ticker {
  background: transparent;
}

body:not(.bf-homepage):not(.bf-storefront-chrome) .fixed-gold-price-box {
  border-radius: 999px;
  box-shadow: var(--bf-shadow-sm);
}

/* ========== Header ========== */
:is(body.bf-homepage, body.bf-storefront-chrome) #main-header.bf-header--home {
  background-color: #ffffff !important;
  backdrop-filter: none;
  border-bottom: 1px solid var(--bf-line);
  padding-bottom: 0.7rem;
}

:is(body.bf-homepage, body.bf-storefront-chrome) #main-header.bf-header--home .header-content {
  min-height: 3.5rem;
  padding-top: 0.7rem;
  padding-bottom: 0.35rem;
}

:is(body.bf-homepage, body.bf-storefront-chrome) #main-header.bf-header--home .logo {
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

:is(body.bf-homepage, body.bf-storefront-chrome) #main-header.bf-header--home .logo-img {
  height: 38px;
}

:is(body.bf-homepage, body.bf-storefront-chrome) #main-header.bf-header--home .logo-title {
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--bf-ink) !important;
  margin: 0;
  white-space: nowrap;
}

:is(body.bf-homepage, body.bf-storefront-chrome) #main-header.bf-header--home .logo-subtitle {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--bf-muted);
  margin: 0;
  line-height: 1.2;
}

@media (max-width: 575.98px) {
  :is(body.bf-homepage, body.bf-storefront-chrome) #main-header.bf-header--home .logo-type {
    display: none;
  }
}

@media (min-width: 576px) {
  :is(body.bf-homepage, body.bf-storefront-chrome) #main-header.bf-header--home .logo-type {
    display: block !important;
    text-align: center;
  }
}

:is(body.bf-homepage, body.bf-storefront-chrome) #main-header.bf-header--home .search-bar-container {
  width: 100%;
  justify-content: flex-start;
  gap: 0.35rem;
  position: relative;
  z-index: 3;
}

:is(body.bf-homepage, body.bf-storefront-chrome) #main-header.bf-header--home .discount-btn,
:is(body.bf-homepage, body.bf-storefront-chrome) #main-header.bf-header--home .bf-header-basket {
  margin-inline-start: auto;
}

:is(body.bf-homepage, body.bf-storefront-chrome) #main-header.bf-header--home .discount-btn + .bf-header-basket {
  margin-inline-start: 0;
}

/*
 * Nami labeled header: 3-column grid — menu | logo | actions
 * Avoids absolute-centered logo overlapping the left action group.
 */
:is(body.bf-homepage, body.bf-storefront-chrome) #main-header.bf-header--home.bf-header--labeled-actions .header-content {
  display: grid;
  grid-template-columns: minmax(2.5rem, auto) minmax(0, 1fr) minmax(9rem, auto);
  align-items: center;
  column-gap: 0.65rem;
  min-height: 4.35rem;
  padding-top: 0.55rem;
  padding-bottom: 0.45rem;
}

:is(body.bf-homepage, body.bf-storefront-chrome) #main-header.bf-header--home.bf-header--labeled-actions .logo {
  position: static !important;
  transform: none !important;
  inset: auto !important;
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  z-index: 1;
  max-width: 100%;
  min-width: 0;
}

:is(body.bf-homepage, body.bf-storefront-chrome) #main-header.bf-header--home.bf-header--labeled-actions .logo-title {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

:is(body.bf-homepage, body.bf-storefront-chrome) #main-header.bf-header--home.bf-header--labeled-actions .logo-subtitle {
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

:is(body.bf-homepage, body.bf-storefront-chrome) #main-header.bf-header--home.bf-header--labeled-actions .search-bar-container {
  display: contents;
  width: auto;
}

:is(body.bf-homepage, body.bf-storefront-chrome) #main-header.bf-header--home.bf-header--labeled-actions .bf-header-menu-btn {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  z-index: 2;
}

:is(body.bf-homepage, body.bf-storefront-chrome) #main-header.bf-header--home.bf-header--labeled-actions .discount-btn {
  display: none !important;
}

:is(body.bf-homepage, body.bf-storefront-chrome) #main-header.bf-header--home.bf-header--labeled-actions .bf-header-actions {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  margin-inline-start: 0 !important;
  z-index: 2;
}

/* Labeled header actions: icon above, label below — compact left cluster */
:is(body.bf-homepage, body.bf-storefront-chrome) .bf-header-actions {
  display: inline-flex;
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: 0.55rem;
  flex-shrink: 0;
}

:is(body.bf-homepage, body.bf-storefront-chrome) .bf-header-action {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.18rem;
  color: var(--bf-ink) !important;
  text-decoration: none !important;
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  padding: 0.1rem 0;
  width: 3.6rem;
  max-width: 3.6rem;
  white-space: normal;
}

:is(body.bf-homepage, body.bf-storefront-chrome) .bf-header-action:hover,
:is(body.bf-homepage, body.bf-storefront-chrome) .bf-header-action:focus-visible {
  color: var(--bfrontshop-brand-primary, var(--bf-gold)) !important;
}

:is(body.bf-homepage, body.bf-storefront-chrome) .bf-header-action__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

:is(body.bf-homepage, body.bf-storefront-chrome) .bf-header-action__icon svg {
  width: 22px;
  height: 22px;
  color: currentColor !important;
  stroke: currentColor;
  fill: currentColor;
}

:is(body.bf-homepage, body.bf-storefront-chrome) .bf-header-action.bf-header-basket {
  width: 3.6rem;
  height: auto;
  border-radius: 0;
  background: transparent;
}

:is(body.bf-homepage, body.bf-storefront-chrome) .bf-header-action .bf-header-action__badge,
:is(body.bf-homepage, body.bf-storefront-chrome) .bf-header-action .bf-header-basket-badge,
:is(body.bf-homepage, body.bf-storefront-chrome) .bf-header-action .bf-header-wishlist-badge {
  position: absolute;
  top: -2px;
  left: auto;
  right: -2px;
  width: auto;
}

:is(body.bf-homepage, body.bf-storefront-chrome) .bf-header-basket,
:is(body.bf-homepage, body.bf-storefront-chrome) .bf-header-menu-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  color: var(--bf-ink) !important;
  background: transparent;
  border: none;
  text-decoration: none;
  flex-shrink: 0;
}

/* Desktop: hide hamburger; inline nav replaces it */
@media (min-width: 768px) {
  :is(body.bf-homepage, body.bf-storefront-chrome) .bf-header-menu-btn {
    display: none !important;
  }
}

:is(body.bf-homepage, body.bf-storefront-chrome) .bf-header-basket svg {
  width: 22px;
  height: 22px;
  color: var(--bf-ink) !important;
  stroke: currentColor;
}

:is(body.bf-homepage, body.bf-storefront-chrome) .bf-header-menu-btn {
  flex-direction: column;
  gap: 4px;
  padding: 0;
  cursor: pointer;
}

:is(body.bf-homepage, body.bf-storefront-chrome) .bf-header-menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--bf-ink);
  border-radius: 2px;
}

/* Desktop header nav line (homepage) */
:is(body.bf-homepage, body.bf-storefront-chrome) .bf-header-inline-nav {
  border-top: 1px solid var(--bf-line);
  margin-top: 0.15rem;
  padding: 0.35rem 0 0.15rem;
}

:is(body.bf-homepage, body.bf-storefront-chrome) .bf-header-inline-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

:is(body.bf-homepage, body.bf-storefront-chrome) .bf-header-inline-nav__item {
  display: inline-flex;
  align-items: center;
}

:is(body.bf-homepage, body.bf-storefront-chrome) .bf-header-inline-nav__item:not(:last-child)::after {
  content: "·";
  display: inline-block;
  margin-inline: 0.65rem;
  color: var(--bf-muted);
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

:is(body.bf-homepage, body.bf-storefront-chrome) .bf-header-inline-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--bf-ink) !important;
  text-decoration: none !important;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  padding: 0.2rem 0;
}

:is(body.bf-homepage, body.bf-storefront-chrome) .bf-header-inline-nav__link:hover,
:is(body.bf-homepage, body.bf-storefront-chrome) .bf-header-inline-nav__link:focus-visible {
  color: var(--bfrontshop-brand-primary, var(--bf-gold)) !important;
}

:is(body.bf-homepage, body.bf-storefront-chrome) .bf-header-inline-nav__link .item-icon {
  width: 16px;
  height: 16px;
}

:is(body.bf-homepage, body.bf-storefront-chrome) .bf-header-basket-badge,
:is(body.bf-homepage, body.bf-storefront-chrome) .bf-header-wishlist-badge {
  position: absolute;
  top: -2px;
  left: auto;
  right: -2px;
  min-width: 18px;
  width: auto;
  height: 18px;
  padding: 1px 5px 0;
  border-radius: 999px;
  background: var(--bfrontshop-brand-primary, var(--c, #c4122f)) !important;
  color: #fff !important;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  display: none;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  transform: none;
}
:is(body.bf-homepage, body.bf-storefront-chrome) .bf-header-basket-badge.on,
:is(body.bf-homepage, body.bf-storefront-chrome) .bf-header-wishlist-badge.on {
  display: inline-flex !important;
}

/* Header wishlist count — polished pill aligned with header heart */
body.bf-homepage .bf-header-wishlist-badge,
body.bf-homepage #header-wishlist-counter-top {
  top: -2px;
  right: -2px;
  left: auto;
  inset-inline-end: auto;
  min-width: 18px;
  height: 18px;
  padding: 1px 5px 0;
  line-height: 1;
  border: 2px solid #fff;
  background: linear-gradient(165deg, #e11d48 0%, #be123c 100%) !important;
  color: #fff !important;
  font-size: 10px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 1px rgba(190, 18, 60, 0.12),
    0 2px 6px rgba(190, 18, 60, 0.28);
  transform: none;
}
body.bf-homepage .bf-header-wishlist-badge.on,
body.bf-homepage .bf-header-wishlist-badge.is-on,
body.bf-homepage #header-wishlist-counter-top.on,
body.bf-homepage #header-wishlist-counter-top.is-on {
  display: inline-flex !important;
}

/* Search row — light gray pill like mockup */
:is(body.bf-homepage, body.bf-storefront-chrome) .bf-home-search-row {
  padding-top: 0.3rem;
  padding-bottom: 0.2rem;
}

:is(body.bf-homepage, body.bf-storefront-chrome) .bf-search-bar--home-row {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

:is(body.bf-homepage, body.bf-storefront-chrome) .bf-search-bar--home-row .search-input-wrapper {
  border-radius: 999px !important;
  background: #f0eee9 !important;
  border: 1px solid transparent !important;
  box-shadow: none !important;
  padding: 0.4rem 0.95rem !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 0.4rem !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

:is(body.bf-homepage, body.bf-storefront-chrome) .bf-search-bar--home-row .search-input-wrapper input,
:is(body.bf-homepage, body.bf-storefront-chrome) .bf-search-bar--home-row input {
  font-size: 0.9rem;
  color: var(--bf-ink) !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  text-align: start !important;
  order: 2;
}

:is(body.bf-homepage, body.bf-storefront-chrome) .bf-search-bar--home-row input::placeholder {
  color: #9a958c !important;
  text-align: start !important;
}

:is(body.bf-homepage, body.bf-storefront-chrome) .bf-search-bar--home-row .search-btn {
  background: transparent !important;
  border: none !important;
  color: #8a847a !important;
  padding: 0.15rem;
  flex-shrink: 0;
  order: 1;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

/* Keep icon glued to the start edge of the text (RTL-safe), not at the far opposite side */
:is(body.bf-homepage, body.bf-storefront-chrome) .bf-home-search-row {
  max-width: 640px;
  margin-inline: auto;
}

/* Homepage CMS strip visibility is owned by storefront-theme (desktop show / mobile hide). */

/* ========== Section titles ========== */
body.bf-homepage .section-item .section-title,
body.bf-homepage .section-product-type .section-product-head__title {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--bf-ink) !important;
  text-align: start;
  margin-bottom: 0.9rem;
}

/* Horizontal title accent (__ ) removed — storefront keeps only the vertical ::before bar. */
body.bf-homepage .section-item .section-title::after,
body.bf-homepage .section-product-type .section-product-head__title::after {
  content: none !important;
  display: none !important;
}

body.bf-homepage .section-product-type .section-product-head {
  align-items: center;
  margin-top: 0;
  margin-bottom: 0.7rem;
}

body.bf-homepage .section-product-type .section-product-head__title {
  border-bottom: none !important;
  padding-bottom: 0;
  margin-bottom: 0;
}

body.bf-homepage .section-product-head__view-all,
body.bf-homepage .sec-h a.more {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--bf-gold, var(--cd, #8e0c22)) !important;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  margin-inline-start: auto;
  flex-shrink: 0;
}

/* Same chevron as categories «همه» — stroke, not filled triangle */
body.bf-homepage .section-product-head__view-all svg,
body.bf-homepage .sec-h a.more svg {
  width: 18px !important;
  height: 18px !important;
  color: inherit !important;
  stroke: currentColor !important;
  fill: none !important;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

body.bf-homepage .section-product-type .section-product-head__nav {
  display: none !important;
}

/* ========== Hero ========== */
body.bf-homepage .section-banner-type:not(.section-banner-4col-type) .banner-section .swiper {
  border-radius: var(--bf-radius-lg) !important;
  overflow: hidden;
  box-shadow: var(--bf-shadow);
}

body.bf-homepage .section-banner-type:not(.section-banner-4col-type) .banner-section .swiper .item-link {
  aspect-ratio: 16 / 10;
}

@media (min-width: 992px) {
  body.bf-homepage .section-banner-type:not(.section-banner-4col-type) .banner-section .swiper .item-link {
    aspect-ratio: 21 / 9;
  }

  body.bf-homepage .section-banner-type:not(.section-banner-4col-type) .banner-show-three-banners .swiper .item-link {
    aspect-ratio: 4 / 3;
  }
}

body.bf-homepage .banner-section .swiper-pagination-bullet {
  background: rgba(255, 255, 255, 0.55);
  opacity: 1;
}

body.bf-homepage .banner-section .swiper-pagination-bullet-active,
body.bf-homepage .banner-4col-section .swiper-pagination-bullet-active {
  background: var(--bf-gold) !important;
}

/* ========== Circular categories ========== */
body.bf-homepage .banner-4col-section--chips {
  margin: 0 -0.25rem;
}

body.bf-homepage .banner-4col-chips {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.9rem;
  overflow-x: auto;
  padding: 0.4rem 0.25rem 0.9rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

body.bf-homepage .banner-4col-chips::-webkit-scrollbar {
  display: none;
}

body.bf-homepage .banner-4col-chip {
  flex: 0 0 auto;
  scroll-snap-align: start;
  width: 5.6rem;
}

body.bf-homepage .banner-4col-chip__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--bf-ink) !important;
}

body.bf-homepage .banner-4col-chip__media {
  width: 5.4rem;
  height: 5.4rem;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  border: 2px solid var(--bf-gold) !important;
  box-shadow: var(--bf-shadow-sm);
  display: block;
}

body.bf-homepage .banner-4col-chip__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.bf-homepage .banner-4col-chip__label {
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.25;
  max-width: 5.6rem;
  white-space: normal;
  color: var(--bf-ink) !important;
}

@media (min-width: 768px) {
  body.bf-homepage .banner-4col-chips {
    justify-content: center;
    flex-wrap: wrap;
    overflow: visible;
  }

  body.bf-homepage .banner-4col-chip {
    width: 6.6rem;
  }

  body.bf-homepage .banner-4col-chip__media {
    width: 6.3rem;
    height: 6.3rem;
  }
}

body.bf-homepage .categories-section .categories-container.rounded-avatar {
  gap: 0.9rem;
  padding: 0.4rem 0 0.9rem;
}

body.bf-homepage .categories-section .categories-container.rounded-avatar .category-card {
  box-shadow: none;
  background: transparent;
  /* Fixed card width keeps circle centres evenly spaced regardless of label length. */
  width: 5.4rem;
  flex: 0 0 auto;
  margin: 0;
}

body.bf-homepage .categories-section .categories-container.rounded-avatar .card-link {
  padding: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

body.bf-homepage .categories-section .categories-container.rounded-avatar .image-container {
  width: 5.4rem;
  height: 5.4rem;
  border-radius: 50%;
  border: 2px solid var(--bf-gold) !important;
  box-shadow: var(--bf-shadow-sm);
  overflow: hidden;
  margin: 0;
}

body.bf-homepage .categories-section .categories-container.rounded-avatar .content-container {
  width: 100%;
}

body.bf-homepage .categories-section .categories-container.rounded-avatar .category-title {
  font-size: 0.78rem;
  font-weight: 600;
  /* Wrap long titles inside the fixed card width so they never widen the card. */
  white-space: normal;
  max-width: 100%;
}

@media (min-width: 768px) {
  body.bf-homepage .categories-section .categories-container.rounded-avatar {
    justify-content: space-between;
  }
}

/* ========== Product cards — gold price + gold outline CTA ========== */
body.bf-homepage .products-section .products-container {
  gap: 0.9rem;
  padding-bottom: 0.55rem;
  scrollbar-width: none;
  /* Storefront chrome uses CSS grid rows — do not keep the old carousel overflow. */
  overflow: visible;
}

body.bf-homepage .products-section .products-container::-webkit-scrollbar {
  display: none;
}

body.bf-homepage .products-section .product-box {
  /* Fill the grid track — fixed carousel widths left huge empty gutters. */
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border-radius: var(--bf-radius);
  box-shadow: var(--bf-shadow);
  border: 1px solid var(--bf-line);
  background: var(--bf-surface) !important;
  padding: 0.8rem 0.8rem 0.95rem;
  margin: 0 !important;
  backdrop-filter: none;
  flex: none;
}

body.bf-homepage .products-section .product-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(31, 26, 20, 0.12);
}

body.bf-homepage .products-section .product-box .product-anchor {
  min-height: 0;
  gap: 0.4rem;
  text-align: start;
  align-items: stretch;
}

body.bf-homepage .products-section .product-image-wrapper {
  position: relative;
  border-radius: 0.85rem;
  overflow: hidden;
  background: #f4f1ea;
}

body.bf-homepage .products-section .product-card-image {
  height: 150px;
  border-radius: 0.85rem;
  margin-bottom: 0;
  box-shadow: none;
  object-fit: cover;
}

body.bf-homepage .products-section .product-content-container {
  align-items: flex-start;
  text-align: start;
  gap: 0.2rem !important;
}

body.bf-homepage .products-section .product-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0.35rem 0 0.15rem;
  text-align: start;
  line-height: 1.35;
  color: var(--bf-ink) !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.bf-homepage .products-section .product-weight-badge-wrapper {
  position: absolute;
  inset-inline-start: 0.45rem;
  bottom: 0.45rem;
  z-index: 2;
}

body.bf-homepage .products-section .product-weight-badge {
  background: rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  font-size: 0.72rem;
  color: var(--bf-muted);
  box-shadow: var(--bf-shadow-sm);
}

body.bf-homepage .products-section .product-raw-price,
body.bf-homepage .products-section .product-raw-price-container .product-price-currency {
  color: #b0a99c !important;
}

body.bf-homepage .products-section .product-price-container .product-price,
body.bf-homepage .products-section .product-price {
  color: var(--bf-gold) !important;
  font-size: 1.05rem;
  font-weight: 800;
}

body.bf-homepage .products-section .product-price-container .product-price-currency {
  color: var(--bf-gold) !important;
  font-weight: 600;
  font-size: 0.75rem;
}

body.bf-homepage .products-section .add-to-basket-container {
  padding-top: 0.6rem;
  padding-bottom: 0;
}

body.bf-homepage .products-section .add-to-basket-container .btn,
body.bf-homepage .products-section .add-to-basket-container .add-to-cart,
body.bf-homepage .products-section .add-to-basket-container .btn-outline-primary {
  width: 100%;
  border-radius: 999px !important;
  border: 1.5px solid var(--bf-gold) !important;
  color: var(--bf-ink) !important;
  background: #fff !important;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  box-shadow: none !important;
}

body.bf-homepage .products-section .add-to-basket-container .btn svg,
body.bf-homepage .products-section .add-to-basket-container .add-to-cart svg {
  color: var(--bf-gold) !important;
  fill: currentColor;
}

body.bf-homepage .products-section .add-to-basket-container .btn:hover,
body.bf-homepage .products-section .add-to-basket-container .add-to-cart:hover,
body.bf-homepage .products-section .add-to-basket-container .btn-outline-primary:hover {
  background: var(--bf-gold) !important;
  color: #fff !important;
  border-color: var(--bf-gold) !important;
}

body.bf-homepage .products-section .add-to-basket-container .btn:hover svg,
body.bf-homepage .products-section .add-to-basket-container .add-to-cart:hover svg {
  color: #fff !important;
}

@media (min-width: 992px) {
  body.bf-homepage .products-section .product-card-image {
    height: 180px;
  }
}

/* Kill leftover brand-blue on homepage product chrome */
body.bf-homepage .products-section .text-primary,
body.bf-homepage .products-section .btn-primary,
body.bf-homepage .products-section a.text-primary {
  color: var(--bf-gold) !important;
}

/* ========== Trust / features — Design-1 horizontal strip ========== */
body.bf-homepage:not(.bf-storefront-chrome) .section-feature-type {
  margin-top: 2.1rem;
  margin-bottom: 2.1rem;
}

body.bf-homepage .section-feature-type .section-title {
  display: none; /* mockup has no title over trust strip */
}

body.bf-homepage .feature-section .feature-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: space-between;
  background: transparent;
  border: none;
  padding: 0.25rem 0;
}

body.bf-homepage .feature-section .feature-box {
  flex: 1 1 42%;
  min-width: 130px;
  max-width: none;
  margin: 0 !important;
  border-radius: 0;
  box-shadow: none !important;
  border: none !important;
  background: transparent !important;
  padding: 0.65rem 0.35rem;
  text-align: center;
}

body.bf-homepage .feature-section .feature-box .image-container .item-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  margin: 0 auto 0.55rem;
  object-fit: contain;
  background: #fff;
  padding: 0.4rem;
  border: 1.5px solid var(--bf-gold) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bf-gold) !important;
  font-size: 1.1rem;
  line-height: 1;
}

body.bf-homepage .feature-section .feature-box:nth-child(1) .item-icon--placeholder::before { content: "✓"; }
body.bf-homepage .feature-section .feature-box:nth-child(2) .item-icon--placeholder::before { content: "✈"; }
body.bf-homepage .feature-section .feature-box:nth-child(3) .item-icon--placeholder::before { content: "✿"; }
body.bf-homepage .feature-section .feature-box:nth-child(4) .item-icon--placeholder::before { content: "↺"; }

body.bf-homepage .feature-section .feature-box .title {
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  margin-bottom: 0.15rem !important;
  color: var(--bf-ink) !important;
}

body.bf-homepage .feature-section .feature-box .description {
  font-size: 0.7rem !important;
  color: var(--bf-muted) !important;
}

@media (min-width: 768px) {
  body.bf-homepage .feature-section .feature-box {
    flex: 1 1 20%;
  }
}

/* ========== About — dark + gold CTA (mockup) ========== */
body.bf-homepage .message-section .message-container {
  border-radius: var(--bf-radius-lg);
  box-shadow: var(--bf-shadow);
  min-height: 190px;
  padding: 1.6rem 1.2rem !important;
  background: var(--bf-dark) !important;
}

body.bf-homepage .message-section .message-container .item-background-image {
  opacity: 0.4;
}

body.bf-homepage .message-section .message-container .title {
  color: #fff !important;
  font-size: 1.2rem !important;
  font-weight: 800 !important;
}

body.bf-homepage .message-section .message-container .description {
  color: rgba(255, 255, 255, 0.86) !important;
}

body.bf-homepage .message-section .message-container .button {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 999px;
  background: transparent !important;
  border: none !important;
  color: var(--bf-gold) !important;
  font-weight: 700;
  padding: 0.45rem 0;
  box-shadow: none !important;
  text-decoration: none;
}

body.bf-homepage .message-section .message-container .button::after {
  content: "‹";
  font-size: 1.1em;
  margin-inline-start: 0.15rem;
}

/* ========== Bottom nav — gold active ========== */
:is(body.bf-homepage, body.bf-storefront-chrome) #bottom-navbar.navbar {
  border-radius: 1.4rem;
  box-shadow: 0 12px 32px rgba(31, 26, 20, 0.14);
  border: 1px solid var(--bf-line);
  background: #ffffff !important;
  backdrop-filter: blur(14px);
  max-width: min(460px, 94vw);
  margin-bottom: 0.85rem;
}

:is(body.bf-homepage, body.bf-storefront-chrome) #bottom-navbar .nav-link {
  font-size: 0.7rem;
  font-weight: 500;
  color: #8a847a !important;
  padding: 0.65rem 0.3rem 0.55rem;
}

:is(body.bf-homepage, body.bf-storefront-chrome) #bottom-navbar .nav-link svg {
  opacity: 1;
  color: #8a847a !important;
}

:is(body.bf-homepage, body.bf-storefront-chrome) #bottom-navbar .nav-link:hover,
:is(body.bf-homepage, body.bf-storefront-chrome) #bottom-navbar .nav-link:focus,
:is(body.bf-homepage, body.bf-storefront-chrome) #bottom-navbar .nav-link.is-active {
  color: var(--bf-gold) !important;
  font-weight: 700;
}

:is(body.bf-homepage, body.bf-storefront-chrome) #bottom-navbar .nav-link:hover svg,
:is(body.bf-homepage, body.bf-storefront-chrome) #bottom-navbar .nav-link:focus svg,
:is(body.bf-homepage, body.bf-storefront-chrome) #bottom-navbar .nav-link.is-active svg {
  color: var(--bf-gold) !important;
}

:is(body.bf-homepage, body.bf-storefront-chrome) #bottom-navbar #header-basket-counter.bdg,
:is(body.bf-homepage, body.bf-storefront-chrome) #bottom-navbar #header-basket-counter.badge {
  background: var(--bfrontshop-brand-primary, var(--c, #c4122f)) !important;
  color: #fff !important;
  top: -2px !important;
  left: auto !important;
  right: 0 !important;
  width: auto !important;
}

:is(body.bf-homepage, body.bf-storefront-chrome) #bottom-navbar.bf-bottom-nav--home {
  max-width: min(460px, 94vw);
}

/* ========== Global brand-blue kill-switch on storefront chrome ========== */
:is(body.bf-homepage, body.bf-storefront-chrome) .btn-primary,
:is(body.bf-homepage, body.bf-storefront-chrome) .btn-outline-primary {
  --bs-btn-color: var(--bf-ink);
  --bs-btn-border-color: var(--bf-gold);
  --bs-btn-hover-bg: var(--bf-gold);
  --bs-btn-hover-border-color: var(--bf-gold);
  --bs-btn-active-bg: var(--bf-gold-deep);
  --bs-btn-active-border-color: var(--bf-gold-deep);
}

:is(body.bf-homepage, body.bf-storefront-chrome) a:not(.nav-link):not(.button):hover {
  color: var(--bf-gold);
}

:is(body.bf-homepage, body.bf-storefront-chrome) footer a {
  color: var(--bf-muted) !important;
}

/* ========== Desktop ========== */
@media (min-width: 992px) {
  :is(body.bf-homepage, body.bf-storefront-chrome) #main-container {
    max-width: 1140px;
  }

  body.bf-homepage .section-item .section-title,
  body.bf-homepage .section-product-type .section-product-head__title {
    font-size: 1.35rem;
  }

  :is(body.bf-homepage, body.bf-storefront-chrome) .bf-home-search-row {
    max-width: 640px;
    margin-inline: auto;
  }

  body.bf-homepage .feature-section .feature-container {
    gap: 1rem;
  }
}
