/* BDS Commerce Core 0.4 — dynamic storefront/home/directory layer. */
.bds-storefront-home-page .site-content > .ast-container,
.bds-storefront-home-page .site-content > .ast-container-fluid,
.bds-storefront-home-page .site-main,
.bds-storefront-home-page .entry-content { max-width: none !important; width: 100% !important; padding: 0 !important; margin: 0 !important; }
.bds-storefront-home-page .entry-header { display: none !important; }
.bds-storefront-directory-page .entry-header { display: none !important; }
.bds-storefront-directory-page .site-content > .ast-container { width: 100% !important; max-width: none !important; padding-inline: 0 !important; }
.bds-storefront-home-page article.page { padding: 0 !important; margin: 0 !important; }
.bds-home { overflow: clip; background: linear-gradient(180deg, color-mix(in srgb, var(--bds-surface-soft) 72%, #fff) 0, #fff 520px); }
.bds-home-section { padding: 34px 0; }
.bds-home-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.bds-home-heading h2 { margin: 0; color: var(--bds-ink); font-size: clamp(23px, 2.3vw, 34px); line-height: 1.12; letter-spacing: -.025em; }
.bds-home-heading p { margin: 6px 0 0; color: var(--bds-muted); font-size: 14px; }
.bds-home-heading > a { flex: 0 0 auto; color: var(--bds-primary-dark); font-weight: 700; }

/* Hero */
.bds-home-hero { padding: 18px 0 18px; }
.bds-home-hero__viewport { position: relative; overflow: hidden; }
.bds-home-hero__track { position: relative; min-height: clamp(370px, 36vw, 540px); border: 1px solid var(--bds-border); border-radius: calc(var(--bds-radius) + 8px); background: radial-gradient(circle at 77% 36%, color-mix(in srgb, var(--bds-accent) 35%, transparent), transparent 34%), linear-gradient(110deg, #fffaf5 0%, color-mix(in srgb, var(--bds-surface-soft) 82%, #fff) 52%, #f8e8e9 100%); box-shadow: 0 15px 44px rgba(59,35,18,.08); }
.bds-hero-slide { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(330px, .95fr); align-items: center; gap: 50px; padding: clamp(34px, 5vw, 72px); opacity: 0; visibility: hidden; transform: translateX(20px); transition: opacity .45s ease, transform .45s ease, visibility .45s; }
.bds-hero-slide.is-active { opacity: 1; visibility: visible; transform: none; }
.bds-hero-slide__copy { max-width: 650px; }
.bds-hero-slide__eyebrow { display: inline-flex; margin-bottom: 13px; padding: 7px 12px; border: 1px solid color-mix(in srgb, var(--bds-primary) 42%, var(--bds-border)); border-radius: 999px; color: var(--bds-primary-dark); background: rgba(255,255,255,.72); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.bds-hero-slide h1 { max-width: 760px; margin: 0; color: #111; font-size: clamp(35px, 4.2vw, 66px); line-height: .98; letter-spacing: -.05em; }
.bds-hero-slide__price { margin: 22px 0 26px; color: var(--bds-primary-dark); font-size: clamp(23px, 2.2vw, 34px); font-weight: 850; }
.bds-hero-slide__price del { margin-left: 7px; color: var(--bds-muted); font-size: .6em; font-weight: 500; opacity: .7; }
.bds-hero-slide__price ins { text-decoration: none; }
.bds-hero-slide__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.bds-button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; padding: 0 22px; border-radius: 999px; font-weight: 750; text-decoration: none !important; }
.bds-button--primary { background: var(--bds-primary); color: #fff !important; border: 1px solid var(--bds-primary); }
.bds-button--primary:hover { background: var(--bds-primary-dark); }
.bds-button--ghost { background: rgba(255,255,255,.78); color: var(--bds-ink) !important; border: 1px solid var(--bds-border); }
.bds-hero-slide__visual { position: relative; height: min(390px, 30vw); min-height: 270px; display: grid; place-items: center; }
.bds-hero-slide__visual::before { content: ''; position: absolute; width: min(360px, 85%); aspect-ratio: 1; border-radius: 50%; background: rgba(255,255,255,.6); box-shadow: inset 0 0 0 1px rgba(255,255,255,.85); }
.bds-hero-slide__visual img { position: relative; z-index: 1; width: 90%; height: 100%; object-fit: contain; filter: drop-shadow(0 20px 22px rgba(30,18,10,.16)); }
.bds-hero-slide__discount { position: absolute; z-index: 3; top: 8px; right: 7%; display: grid; place-items: center; width: 70px; height: 70px; border-radius: 50%; background: var(--bds-primary); color: #fff; font-weight: 900; box-shadow: 0 8px 20px rgba(80,49,22,.2); transform: rotate(5deg); }
.bds-home-hero__dots { position: absolute; z-index: 5; left: 50%; bottom: 18px; display: flex; gap: 7px; transform: translateX(-50%); }
.bds-home-hero__dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; background: #c5c6c8; cursor: pointer; transition: width .2s ease, background .2s ease; }
.bds-home-hero__dots button.is-active { width: 26px; border-radius: 999px; background: var(--bds-primary); }

/* Category cards */
.bds-category-cards { display: grid; grid-template-columns: repeat(10, minmax(0,1fr)); gap: 18px; }
.bds-category-card { min-width: 0; color: var(--bds-ink) !important; text-align: center; text-decoration: none !important; }
.bds-category-card__media { width: min(86px, 100%); aspect-ratio: 1; display: grid; place-items: center; margin: 0 auto 10px; overflow: hidden; border: 1px solid var(--bds-border); border-radius: 50%; background: linear-gradient(145deg, #fff, var(--bds-surface-soft)); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.bds-category-card:hover .bds-category-card__media { transform: translateY(-3px); border-color: var(--bds-primary); box-shadow: 0 8px 20px rgba(60,38,18,.11); }
.bds-category-card__media img { width: 75%; height: 75%; object-fit: contain; }
.bds-category-card__fallback { display: grid; place-items: center; width: 68%; aspect-ratio: 1; border-radius: 50%; background: color-mix(in srgb, var(--bds-primary) 13%, #fff); color: var(--bds-primary-dark); font-size: 28px; font-weight: 850; }
.bds-category-card strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.bds-category-card small { display: block; margin-top: 4px; color: var(--bds-muted); font-size: 11px; }
.bds-category-cards--directory { grid-template-columns: repeat(8, minmax(0,1fr)); row-gap: 26px; }

/* Dynamic promo */
.bds-home-promo { padding: 14px 0 22px; }
.bds-home-promo__card { min-height: 160px; display: grid; grid-template-columns: 1fr 220px; align-items: center; overflow: hidden; padding: 24px 32px; border-radius: calc(var(--bds-radius) + 5px); background: linear-gradient(100deg, var(--bds-primary-dark), var(--bds-primary)); color: #fff !important; text-decoration: none !important; box-shadow: 0 13px 30px rgba(84,51,23,.16); }
.bds-home-promo__card > div:first-child { min-width: 0; }
.bds-home-promo__card span { display: block; color: var(--bds-accent); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.bds-home-promo__card strong { display: block; max-width: 750px; margin: 7px 0 8px; font-size: clamp(21px, 2.4vw, 34px); line-height: 1.1; }
.bds-home-promo__card em { display: block; color: #fff; font-size: 20px; font-style: normal; font-weight: 800; }
.bds-home-promo__card del { opacity: .65; font-size: .72em; }
.bds-home-promo__card ins { text-decoration: none; }
.bds-home-promo__image { height: 135px; display: grid; place-items: center; }
.bds-home-promo__image img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 10px 18px rgba(0,0,0,.18)); }

/* Product rails */
.bds-product-rail { overflow: hidden; }
.bds-product-rail .bds-product-grid { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
.bds-product-rail .bds-product-card__title { min-height: 42px; }

/* Brand cards */
.bds-brand-cards { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.bds-brand-card { min-width: 0; min-height: 82px; display: flex; align-items: center; gap: 13px; padding: 12px; border: 1px solid var(--bds-border); border-radius: calc(var(--bds-radius) - 3px); background: #fff; color: var(--bds-ink) !important; text-decoration: none !important; transition: border-color .18s ease, transform .18s ease; }
.bds-brand-card:hover { transform: translateY(-2px); border-color: var(--bds-primary); }
.bds-brand-card__mark { flex: 0 0 55px; width: 55px; height: 55px; display: grid; place-items: center; overflow: hidden; border-radius: 10px; background: var(--bds-surface-soft); color: var(--bds-primary-dark); font-weight: 900; }
.bds-brand-card__mark img { width: 88%; height: 88%; object-fit: contain; }
.bds-brand-card strong, .bds-brand-card small { display: block; }
.bds-brand-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.bds-brand-card small { margin-top: 4px; color: var(--bds-muted); font-size: 11px; }

/* Reviews */
.bds-home-reviews { background: var(--bds-surface-soft); border-block: 1px solid var(--bds-border); }
.bds-review-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.bds-review-card { padding: 20px; border: 1px solid var(--bds-border); border-radius: var(--bds-radius); background: #fff; box-shadow: 0 5px 16px rgba(40,25,12,.04); }
.bds-review-card__stars { color: #e39b21; letter-spacing: 2px; }
.bds-review-card p { min-height: 70px; margin: 12px 0 16px; color: var(--bds-ink); line-height: 1.65; }
.bds-review-card footer { display: grid; gap: 3px; }
.bds-review-card footer strong { font-size: 13px; }
.bds-review-card footer a { overflow: hidden; color: var(--bds-primary-dark); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

/* Articles */
.bds-article-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.bds-article-card { overflow: hidden; border: 1px solid var(--bds-border); border-radius: var(--bds-radius); background: #fff; }
.bds-article-card__media { display: block; aspect-ratio: 16/9; overflow: hidden; background: var(--bds-surface-soft); }
.bds-article-card__media img, .bds-article-card__media span { width: 100%; height: 100%; display: block; object-fit: cover; }
.bds-article-card__body { padding: 16px; }
.bds-article-card time { color: var(--bds-muted); font-size: 11px; }
.bds-article-card h3 { margin: 6px 0 7px; font-size: 17px; line-height: 1.35; }
.bds-article-card h3 a { color: var(--bds-ink); }
.bds-article-card p { margin: 0; color: var(--bds-muted); font-size: 13px; line-height: 1.6; }

/* Brand/category directory pages */
.bds-directory { padding: 38px 0 60px; }
.bds-directory .bds-home-heading { margin-bottom: 26px; }

/* Header mega panel upgraded in MB4 */
.bds-mega-menu { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(260px, .85fr); gap: 28px; }
.bds-category-panel .bds-category-cards { grid-template-columns: repeat(6, minmax(0,1fr)); gap: 14px; }
.bds-category-panel .bds-category-card__media { width: 64px; margin-bottom: 7px; }
.bds-category-panel .bds-category-card strong { font-size: 12px; }
.bds-mega-menu__brands { padding-left: 26px; border-left: 1px solid var(--bds-border); }
.bds-mega-menu__brands .bds-brand-cards { grid-template-columns: 1fr; gap: 8px; }
.bds-mega-menu__brands .bds-brand-card { min-height: 60px; padding: 7px; }
.bds-mega-menu__brands .bds-brand-card__mark { flex-basis: 42px; width: 42px; height: 42px; }

@media (max-width: 1120px) {
  .bds-category-cards { grid-template-columns: repeat(6, minmax(0,1fr)); }
  .bds-category-cards--directory { grid-template-columns: repeat(6, minmax(0,1fr)); }
  .bds-product-rail .bds-product-grid { grid-template-columns: repeat(4, minmax(0,1fr)) !important; }
  .bds-product-rail .bds-product-card:nth-child(n+9) { display: none; }
  .bds-mega-menu { grid-template-columns: 1fr; }
  .bds-mega-menu__brands { display: none; }
}

@media (max-width: 921px) {
  .bds-home { background: #fff; }
  .bds-home-hero { padding: 10px 0 6px; }
  .bds-home-hero__viewport { width: min(calc(100% - 16px), var(--bds-container)); }
  .bds-home-hero__track { min-height: 390px; border-radius: 18px; }
  .bds-hero-slide { grid-template-columns: 1fr; align-content: center; gap: 8px; padding: 24px 22px 36px; }
  .bds-hero-slide__copy { align-self: end; position: relative; z-index: 2; }
  .bds-hero-slide__eyebrow { margin-bottom: 8px; padding: 5px 9px; font-size: 9px; }
  .bds-hero-slide h1 { max-width: 80%; font-size: clamp(26px, 8.2vw, 38px); line-height: 1.03; }
  .bds-hero-slide__price { margin: 10px 0 13px; font-size: 21px; }
  .bds-button { min-height: 38px; padding: 0 15px; font-size: 12px; }
  .bds-hero-slide__visual { position: absolute; z-index: 1; right: -4%; bottom: 8%; width: 46%; height: 55%; min-height: 0; opacity: .95; }
  .bds-hero-slide__visual::before { width: 105%; }
  .bds-hero-slide__visual img { width: 100%; }
  .bds-hero-slide__discount { top: 0; right: 0; width: 52px; height: 52px; font-size: 10px; }
  .bds-home-hero__dots { bottom: 12px; }
  .bds-home-section { padding: 24px 0; }
  .bds-home-heading { align-items: center; margin-bottom: 14px; }
  .bds-home-heading h2 { font-size: 22px; }
  .bds-home-heading p { font-size: 11px; }
  .bds-home-heading > a { font-size: 12px; }
  .bds-category-cards, .bds-category-cards--directory { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px 10px; }
  .bds-category-card__media { width: 66px; margin-bottom: 7px; }
  .bds-category-card strong { font-size: 11px; }
  .bds-home-promo__card { min-height: 120px; grid-template-columns: 1fr 110px; padding: 18px; }
  .bds-home-promo__card strong { font-size: 18px; }
  .bds-home-promo__card em { font-size: 16px; }
  .bds-home-promo__image { height: 90px; }
  .bds-product-rail { margin-inline: -8px; padding-inline: 8px; overflow-x: auto; scrollbar-width: none; }
  .bds-product-rail::-webkit-scrollbar { display: none; }
  .bds-product-rail .bds-product-grid { width: max-content; display: flex !important; gap: 10px; }
  .bds-product-rail .bds-product-card { width: min(45vw, 205px) !important; flex: 0 0 min(45vw, 205px); }
  .bds-product-rail .bds-product-card:nth-child(n) { display: block; }
  .bds-review-grid, .bds-article-grid { grid-template-columns: 1fr; }
  .bds-review-card:nth-child(n+4) { display: none; }
  .bds-brand-cards { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .bds-category-panel .bds-category-cards { grid-template-columns: repeat(4, minmax(0,1fr)); }
}

@media (max-width: 520px) {
  .bds-home-heading { gap: 10px; }
  .bds-home-heading p { max-width: 220px; }
  .bds-category-cards, .bds-category-cards--directory { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .bds-category-card__media { width: 58px; }
  .bds-category-card strong { font-size: 10px; }
  .bds-home-promo__card { grid-template-columns: 1fr 86px; padding: 15px; }
  .bds-home-promo__card span { font-size: 9px; }
  .bds-home-promo__card strong { font-size: 16px; }
  .bds-brand-cards { grid-template-columns: 1fr 1fr; gap: 8px; }
  .bds-brand-card { min-height: 68px; gap: 8px; padding: 8px; }
  .bds-brand-card__mark { flex-basis: 43px; width: 43px; height: 43px; }
  .bds-brand-card strong { font-size: 12px; }
  .bds-brand-card small { font-size: 9px; }
}
