/* By Home Decor — 1:1 visual match (byhomedecor.com Shopify theme) */

:root {
  --bh-accent: #cd3d1c;
  --bh-accent-hover: #c2300f;
  --bh-accent-rgb: 205, 61, 28;
  --bh-bg: #ffffff;
  --bh-bg-secondary: #f3f3f3;
  --bh-text: #000000;
  --bh-text-secondary: #656565;
  --bh-border: #d9d9d9;
  --bh-container: min(1360px, 100% - 2.5rem);
  --bh-section-pad: 3.5rem;
  --bh-font-heading: Poppins, system-ui, sans-serif;
  --bh-font-body: Roboto, system-ui, sans-serif;
}

.bh-body { font-family: var(--bh-font-body); color: var(--bh-text); background: var(--bh-bg); }
.bh-body .tf-main { background: var(--bh-bg); }

/* Announcement */
.bh-announcement {
  background: var(--bh-bg-secondary);
  color: var(--bh-text);
  font-size: 0.8125rem;
  font-weight: 500;
  border-bottom: 1px solid var(--bh-border);
}
.bh-announcement__inner { padding: 0.625rem 0; overflow: hidden; }
.bh-announcement__track { display: flex; justify-content: center; width: 100%; }
.bh-announcement__text { margin: 0; white-space: nowrap; }
.bh-announcement.is-scrolling .bh-announcement__track {
  width: max-content;
  animation: bh-marquee var(--bh-announcement-duration, 24s) linear infinite;
}
.bh-announcement.is-scrolling .bh-announcement__text--clone { padding-left: 3rem; }
@keyframes bh-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Header */
.bh-header { position: sticky; top: 0; z-index: 200; background: #fff; }
.bh-header__row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  min-height: 72px;
  padding: 0.75rem 0;
}
@media (min-width: 990px) {
  .bh-header__row {
    grid-template-columns: auto minmax(140px, 220px) minmax(200px, 1fr) auto;
  }
}
.bh-logo {
  font-family: var(--bh-font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  justify-self: center;
  color: var(--bh-text);
  text-decoration: none;
}
@media (min-width: 990px) {
  .bh-logo { justify-self: start; }
}
.bh-menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
}
.bh-menu-toggle span { display: block; width: 22px; height: 2px; background: #000; }
@media (min-width: 1200px) {
  .bh-menu-toggle { display: none; }
}
.bh-search {
  display: none;
  align-items: stretch;
  background: var(--bh-bg-secondary);
  border-radius: 999px;
  overflow: hidden;
  max-width: 480px;
  width: 100%;
  justify-self: center;
}
@media (min-width: 990px) {
  .bh-search { display: flex; }
}
.bh-search__input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.625rem 1rem;
  font-size: 0.9375rem;
  min-width: 0;
}
.bh-search__btn {
  border: none;
  background: transparent;
  padding: 0 1rem;
  cursor: pointer;
  font-size: 1.1rem;
}
.bh-header__icons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-self: end;
}
.bh-header__icons .tf-cart { color: #000; font-weight: 600; }
.bh-header__icon { text-decoration: none; font-size: 1.1rem; }
.bh-header__nav-wrap { border-top: 1px solid var(--bh-border); display: none; }
@media (min-width: 1200px) {
  .bh-header__nav-wrap { display: block; }
}
.bh-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0.75rem 0;
}
.bh-menu a {
  font-weight: 700;
  font-size: calc(1rem * 1.8 * 0.55);
  letter-spacing: -0.02em;
  color: var(--bh-text);
  text-decoration: none;
}
.bh-menu a:hover { color: var(--bh-accent); }
.bh-header__nav.is-open {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #fff;
  border-bottom: 1px solid var(--bh-border);
  padding: 1rem;
  z-index: 100;
}
@media (max-width: 1199px) {
  .bh-header__nav-wrap { display: block; border: none; }
  .bh-header__nav { display: none; }
  .bh-header__nav.is-open { display: block; }
  .bh-header__nav .bh-menu { flex-direction: column; }
}

/* Sections */
.bh-section { padding: var(--bh-section-pad) 0; }
.bh-section-title {
  font-family: var(--bh-font-heading);
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 600;
  margin: 0;
  color: var(--bh-text);
}
.bh-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.bh-section-head__right {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.bh-link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 600;
  text-decoration: underline;
  color: var(--bh-text);
}
.bh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9375rem;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--bh-font-body);
}
.bh-btn--primary { background: var(--bh-accent); color: #fff; border-color: var(--bh-accent); }
.bh-btn--primary:hover { background: var(--bh-accent-hover); border-color: var(--bh-accent-hover); color: #fff; }
.bh-btn--outline { background: #fff; border-color: var(--bh-text); color: var(--bh-text); }

/* Banner grid (hero) */
.bh-banner-grid { padding-top: 0.8rem; padding-bottom: 3.5rem; }
.bh-banner-grid__list { display: flex; flex-direction: column; gap: 0.8rem; }
@media (min-width: 990px) {
  .bh-banner-grid__list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 0.8rem;
  }
  .bh-banner--hero {
    grid-column: 1 / -1;
    min-height: 420px;
  }
}
.bh-banner {
  position: relative;
  border-radius: 0;
  overflow: hidden;
  min-height: 320px;
  background: #0b453c;
  color: #fff;
}
.bh-banner__link {
  position: absolute;
  inset: 0;
  z-index: 3;
}
.bh-banner__media {
  position: absolute;
  inset: 0;
  background: #333 center/cover no-repeat;
}
.bh-banner__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.15) 55%, transparent 100%);
}
.bh-banner__content {
  position: relative;
  z-index: 2;
  padding: 2rem;
  max-width: 560px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.bh-banner--hero .bh-banner__content { min-height: 420px; }
.bh-banner__badge {
  display: inline-block;
  background: rgba(255,255,255,.15);
  color: #fff;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  width: fit-content;
}
.bh-banner__title {
  font-family: var(--bh-font-heading);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 600;
  margin: 0 0 0.75rem;
  line-height: 1.15;
}
.bh-banner__text {
  font-size: 1rem;
  line-height: 1.5;
  margin: 0 0 1.25rem;
  opacity: 0.95;
}

/* Product card (Shopify card-information order) */
.bh-carousel { overflow: hidden; }
.bh-carousel__track {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.5rem;
}
.bh-carousel__track::-webkit-scrollbar { height: 4px; }
.bh-carousel__track::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
.bh-card {
  flex: 0 0 calc(50% - 0.25rem);
  scroll-snap-align: start;
  min-width: 0;
}
@media (min-width: 576px) {
  .bh-card { flex-basis: calc(33.333% - 0.34rem); }
}
@media (min-width: 990px) {
  .bh-card { flex-basis: calc(16.666% - 0.42rem); }
}
.bh-card__inner { height: 100%; }
.bh-card__media { position: relative; margin-bottom: 0.75rem; }
.bh-card__media-link {
  display: block;
  position: relative;
  padding-bottom: 75%;
  overflow: hidden;
  background: var(--bh-bg-secondary);
}
.bh-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.35s ease;
}
.bh-card__img--hover { opacity: 0; }
.bh-card:hover .bh-card__img--main { opacity: 0; }
.bh-card:hover .bh-card__img--hover { opacity: 1; }
.bh-card__swatches { margin-top: 0.5rem; }
.bh-card__swatches-label {
  display: block;
  font-size: 0.6875rem;
  color: var(--bh-text-secondary);
  margin-bottom: 0.35rem;
}
.bh-card__pills { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.bh-card__pill {
  font-size: 0.6875rem;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--bh-border);
  border-radius: 999px;
  background: #fff;
  color: var(--bh-text);
}
.bh-card__price {
  font-weight: 700;
  font-size: 1rem;
  color: rgb(var(--bh-accent-rgb));
  margin-bottom: 0.25rem;
}
.bh-card__price del { color: var(--bh-text-secondary); font-weight: 400; }
.bh-card__price ins { text-decoration: none; }
.bh-card__vendor {
  font-size: 0.75rem;
  color: var(--bh-text-secondary);
  margin-bottom: 0.25rem;
}
.bh-card__title {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.35;
  font-family: var(--bh-font-body);
}
.bh-card__title a {
  color: var(--bh-text);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bh-card__title a:hover { text-decoration: underline; }
.bh-card__qv {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: underline;
  color: var(--bh-text);
  cursor: pointer;
}
.bh-carousel-nav { display: flex; gap: 0.25rem; }
.bh-carousel-nav--mobile { display: flex; margin-bottom: 1rem; }
@media (min-width: 990px) {
  .bh-carousel-nav--mobile { display: none; }
  [data-carousel-nav="bestsellers-mobile"] { display: none; }
}
@media (max-width: 989px) {
  [data-carousel-nav="bestsellers"] { display: none; }
}
.bh-carousel-nav__btn {
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--bh-border);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

/* Product grid (tabs, trending) */
.bh-product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}
@media (min-width: 750px) {
  .bh-product-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1200px) {
  .bh-product-grid { grid-template-columns: repeat(6, 1fr); }
}
.bh-trending .bh-card { flex: none; }
.bh-trending-track {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}
@media (min-width: 750px) {
  .bh-trending-track { grid-template-columns: repeat(4, 1fr); }
}

/* Top offers */
.bh-offers-grid {
  display: grid;
  gap: 0.8rem;
}
@media (min-width: 750px) {
  .bh-offers-grid { grid-template-columns: repeat(3, 1fr); }
}
.bh-offer-card {
  display: block;
  position: relative;
  min-height: 280px;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
}
.bh-offer-card__media {
  position: absolute;
  inset: 0;
  background: #444 center/cover no-repeat;
}
.bh-offer-card__body {
  position: relative;
  z-index: 1;
  padding: 1.5rem;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(0deg, rgba(0,0,0,.65), transparent);
}
.bh-offer-card__cat { font-size: 0.75rem; font-weight: 600; opacity: 0.9; }
.bh-offer-card__title { font-family: var(--bh-font-heading); font-size: 1.125rem; margin: 0.5rem 0; }
.bh-offer-card__text { font-size: 0.875rem; margin: 0 0 0.75rem; opacity: 0.9; }
.bh-offer-card__cta { font-weight: 700; text-decoration: underline; }

/* Tabs */
.bh-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid var(--bh-border);
  margin-bottom: 1.5rem;
}
.bh-tabs__btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  color: var(--bh-text-secondary);
  margin-bottom: -1px;
}
.bh-tabs__btn.is-active {
  color: var(--bh-text);
  border-bottom-color: var(--bh-accent);
}

/* Promo, policies, collections, faq — keep from prior with token updates */
.bh-promo-banners__grid { display: grid; gap: 0.8rem; }
@media (min-width: 750px) { .bh-promo-banners__grid { grid-template-columns: repeat(3, 1fr); } }
.bh-promo-banner { display: block; position: relative; min-height: 220px; color: #fff; text-decoration: none; }
.bh-promo-banner__media { position: absolute; inset: 0; background: #444 center/cover no-repeat; }
.bh-promo-banner__body {
  position: relative; z-index: 1; padding: 1.5rem; min-height: 220px;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(0deg, rgba(0,0,0,.65), transparent);
}
.bh-promo-banner__title { font-family: var(--bh-font-heading); margin: 0 0 0.5rem; }
.bh-promo-banner__cta { font-weight: 700; text-decoration: underline; }

.bh-policies-grid { display: grid; gap: 1rem; }
@media (min-width: 750px) { .bh-policies-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .bh-policies-grid { grid-template-columns: repeat(4, 1fr); } }
.bh-policy-card {
  display: block; padding: 1.5rem; border: 1px solid var(--bh-border);
  background: var(--bh-bg); height: 100%; text-decoration: none; color: inherit;
}
.bh-policy-card__title { font-family: var(--bh-font-heading); font-size: 1rem; margin: 0 0 0.75rem; }
.bh-policy-card__text { font-size: 0.875rem; color: var(--bh-text-secondary); margin: 0 0 1rem; line-height: 1.5; }
.bh-policy-card__link { font-weight: 700; font-size: 0.875rem; text-decoration: underline; }

.bh-collections-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem;
}
@media (min-width: 750px) { .bh-collections-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .bh-collections-grid { grid-template-columns: repeat(6, 1fr); } }
.bh-collection-card { display: block; text-align: center; text-decoration: none; color: inherit; }
.bh-collection-card__media {
  aspect-ratio: 1; background: var(--bh-bg-secondary) center/cover no-repeat;
  margin-bottom: 0.75rem;
}
.bh-collection-card__title { font-size: 0.9rem; font-weight: 600; margin: 0; }

.bh-faq__inner { display: grid; gap: 2rem; }
@media (min-width: 990px) { .bh-faq__inner { grid-template-columns: 1fr 1.2fr; } }
.bh-faq__intro p { color: var(--bh-text-secondary); line-height: 1.6; }
.bh-faq__item { border-bottom: 1px solid var(--bh-border); padding: 0.75rem 0; }
.bh-faq__question { font-weight: 700; cursor: pointer; list-style: none; }
.bh-faq__question::-webkit-details-marker { display: none; }
.bh-faq__answer { color: var(--bh-text-secondary); font-size: 0.9375rem; padding-top: 0.5rem; }

/* Footer */
.bh-footer { background: #fff !important; color: var(--bh-text); border-top: 1px solid var(--bh-border); margin-top: 2rem; }
.bh-footer__grid {
  display: grid; gap: 2rem; padding: 3rem 0 2rem;
}
@media (min-width: 768px) { .bh-footer__grid { grid-template-columns: 1.5fr 1fr 1fr; } }
.bh-footer h2, .bh-footer h3 { color: var(--bh-text); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; }
.bh-footer__col a { display: block; margin: 0.35rem 0; color: var(--bh-text-secondary); text-decoration: none; font-size: 0.875rem; }
.bh-footer__col a:hover { color: var(--bh-accent); }
.bh-footer__bottom { border-top: 1px solid var(--bh-border); padding: 1rem 0 2rem; font-size: 0.8125rem; color: var(--bh-text-secondary); }

/* Quick view */
.bh-qv-modal[hidden] { display: none; }
.bh-qv-modal {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.bh-qv-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.bh-qv-modal__dialog {
  position: relative; background: #fff; border-radius: 8px;
  max-width: 900px; width: 100%; max-height: 90vh; overflow: auto; padding: 1.5rem;
}
.bh-qv-modal__close {
  position: absolute; top: 0.75rem; right: 0.75rem;
  border: none; background: none; font-size: 1.75rem; cursor: pointer;
}
.bh-qv { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .bh-qv { grid-template-columns: 1fr 1fr; } }
.bh-qv__price { font-size: 1.25rem; font-weight: 700; color: rgb(var(--bh-accent-rgb)); margin: 0.5rem 0 1rem; }
.bh-qv__link { margin-top: 1rem; }

.bh-section-title--center { text-align: center; }
