/*
 * Shared styles for the brand sections and product cards (heritage fall palette).
 * Loaded once, site-wide, from layout/theme.html.
 */
body {
  background-color: #f6f4ef;
}

.bs-display {
  font-family: var(--bs-display);
  letter-spacing: 0;
}

/* "+ Add" button that opens the theme's quick-add size picker */
.bs-add-modal summary::-webkit-details-marker {
  display: none;
}

.bs-add {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  list-style: none;
  color: #1c1d1f;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  background: #efece6;
  border: 1px solid #dcd6cb;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.bs-add:hover {
  color: #fff;
  background: #b4532a;
  border-color: #b4532a;
}

/* Top loading bar shown the moment a product link is tapped */
html.bs-navigating::before {
  position: fixed;
  inset: 0 0 auto;
  z-index: 2147483647;
  height: 3px;
  content: "";
  background: linear-gradient(90deg, transparent 0%, #b4532a 30%, #c19a6b 60%, transparent 100%) 0 0 / 50% 100% no-repeat;
  animation: bs-navigating 0.9s ease-in-out infinite;
}

@keyframes bs-navigating {
  from {
    background-position: -50% 0;
  }

  to {
    background-position: 150% 0;
  }
}

.bs-add.loading .bs-add__label {
  visibility: hidden;
}

/* The theme's spinner renders as .loading--rotator; centered over the hidden label while the size picker loads */
.bs-add.loading > .loading--rotator {
  position: absolute;
  inset: 0;
  display: flex;
  width: 18px;
  height: 18px;
  margin: auto;
}

.bs-add .loading--rotator svg {
  width: 100%;
  height: 100%;
}

.bs-add--primary {
  padding: 0 18px;
  font-family: var(--bs-ui);
  font-size: 14px;
  color: #fff;
  background: #b4532a;
  border-color: #b4532a;
}

.bs-add--primary:hover {
  background: #9a4523;
  border-color: #9a4523;
}

.bs-add--soldout {
  color: #5c5a54;
  cursor: default;
}

/* Full-width add-to-cart on product cards */
.bs-add--block {
  display: flex;
  width: 100%;
  min-height: 44px;
  font-size: 13px;
  letter-spacing: 0.08em;
}

theme-quick-add-modal:has(> details > .bs-add--block) {
  display: block;
  width: 100%;
}

/* Color dots: buttons that preview the color on the card */
.bs-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  align-items: center;
  min-height: 32px;
  margin-left: -3px;
}

.bs-swatches__dot {
  position: relative;
  width: 32px;
  height: 32px;
  padding: 0;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 50%;
}

.bs-swatches__dot::before {
  position: absolute;
  inset: 3px;
  content: "";
  background-color: var(--bs-swatch, #d5d0c6);
  background-image: var(--bs-swatch-img, none);
  background-position: center 30%;
  background-size: cover;
  border: 1px solid rgb(28 29 31 / 15%);
  border-radius: 50%;
}

.bs-swatches__dot:hover::before {
  border-color: #1c1d1f;
}

.bs-swatches__dot[aria-pressed="true"]::after {
  position: absolute;
  inset: 1px;
  content: "";
  border: 1.5px solid #1c1d1f;
  border-radius: 50%;
}

.bs-swatches__dot:focus-visible {
  outline: 2px solid #b4532a;
  outline-offset: 1px;
}

.bs-swatches__dot.is-extra {
  display: none;
}

.bs-swatches.is-expanded .bs-swatches__dot.is-extra {
  display: inline-block;
}

.bs-swatches__more {
  min-width: 28px;
  height: 32px;
  padding: 0 4px;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  color: #5c5a54;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 13px;
}

.bs-swatches__more:hover {
  color: #1c1d1f;
  background: #efece6;
}

.bs-swatches__name {
  margin-left: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #424f40;
}

.bs-swatches__name:empty {
  display: none;
}

.bs-swatches--on-dark .bs-swatches__dot[aria-pressed="true"]::after {
  border-color: #f6f4ef;
}

.bs-swatches--on-dark .bs-swatches__more,
.bs-swatches--on-dark .bs-swatches__name {
  color: #c19a6b;
}

/* Once a color is picked, hover no longer swaps to the default second photo */
.is-color-picked .bs-card__img--secondary,
.is-color-picked .bs-top3__img--secondary {
  display: none;
}

/* Product card used by the curated grid */
.bs-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid #dcd6cb;
  border-radius: 8px;
  transition: border-color 0.2s ease;
}

.bs-card:hover {
  border-color: #2b2d2f;
}

.bs-card[hidden] {
  display: none;
}

.bs-card__media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #efece6;
}

.bs-card__media img,
.bs-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bs-card__img--primary {
  transition: transform 0.35s ease;
}

.bs-card__img--secondary {
  opacity: 0;
  transition: opacity 0.28s ease;
}

@media (hover: hover) {
  .bs-card__media:hover .bs-card__img--secondary {
    opacity: 1;
  }

  .bs-card__media:hover .bs-card__img--primary {
    transform: scale(1.02);
  }
}

.bs-card__badges {
  position: absolute;
  inset-block-start: 10px;
  inset-inline-start: 10px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

.bs-card__save {
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: #d32f2f;
  border-radius: 4px;
}

.bs-card__badge {
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f6f4ef;
  background: rgb(28 29 31 / 90%);
  border-radius: 4px;
}

.bs-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
}

.bs-card__title {
  display: -webkit-box;
  min-height: 2.6em;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: #1c1d1f;
  text-decoration: none;
}

.bs-card__footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  padding: 4px 14px 14px;
}

.bs-price {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 6px;
  align-items: baseline;
  min-width: 0;
}

.bs-price__sale {
  font-family: var(--bs-ui);
  font-size: 22px;
  font-weight: 700;
  color: #1c1d1f;
}

.bs-price__compare {
  font-size: 15px;
  color: #5c5a54;
}

.bs-price__save {
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: #d32f2f;
  border-radius: 4px;
}

.bs-price__sale--lg {
  font-size: 26px;
}

.bs-card__footer theme-quick-add-modal,
.bs-top3__footer theme-quick-add-modal {
  display: block;
}

@media (max-width: 959px) {
  .bs-card__body {
    padding: 10px 8px;
  }

  .bs-card .bs-swatches {
    flex-wrap: nowrap;
    overflow: hidden;
  }

  /* 5 swatches + "+N" must fit a 2-column card on a 375px phone */
  .bs-card .bs-swatches__dot,
  .bs-card .bs-swatches__more {
    flex-shrink: 0;
    width: 24px;
    min-width: 24px;
    height: 24px;
  }

  .bs-card .bs-swatches__dot::before {
    inset: 2px;
  }

  .bs-card__save {
    padding: 4px 8px;
    font-size: 10px;
  }

  .bs-card .bs-swatches__name {
    display: none;
  }

  .bs-card__footer {
    padding: 8px 10px 10px;
  }

  .bs-card__title {
    font-size: 12px;
  }

  .bs-price__sale {
    font-size: 18px;
  }

  .bs-price__compare {
    font-size: 13px;
  }

  .bs-card__footer {
    gap: 8px;
  }

  .bs-card .bs-add {
    min-height: 40px;
    font-size: 12px;
    letter-spacing: 0.04em;
  }

  .bs-price__sale--lg {
    font-size: 22px;
  }
}


/*
 * The theme colors every link via `a:not(.button)`, which outranks single-class selectors.
 * Re-assert our link colors with a parent class so buttons and titles stay readable.
 */
.bs-hero a.bs-hero__cta,
.bs-hero a.bs-hero__cta:hover {
  color: #fff;
}

.bs-size a.bs-size__button,
.bs-size a.bs-size__button:hover {
  color: #f6f4ef;
}

.bs-picks a.bs-picks__more-link {
  color: #1c1d1f;
}

.bs-picks a.bs-picks__more-link:hover {
  color: #f6f4ef;
}

.bs-bundle a.bs-bundle__item-title,
.bs-bundle a.bs-bundle__item-title:hover {
  color: #fff;
}

.bs-card a.bs-card__title,
.bs-card a.bs-card__title:hover,
.bs-top3 a.bs-top3__name,
.bs-top3 a.bs-top3__name:hover {
  color: #1c1d1f;
}

.bs-faq .bs-faq__answer a {
  color: #b4532a;
}

[data-bs-card] a.bs-add--soldout {
  color: #5c5a54;
}
/* Trust strip (picks section and the standalone Trust strip section) */
.bs-trust {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  margin: 40px 0 0;
  list-style: none;
}

.bs-trust li {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: #1c1d1f;
  background: #efece6;
  border: 1px solid #dcd6cb;
  border-radius: 8px;
}

.bs-trust svg {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #424f40;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-trust {
  padding-block: 20px;
  background: #f6f4ef;
}

.brand-trust .bs-trust {
  margin: 0;
}

.brand-trust--dark {
  background: #1c1d1f;
}

.brand-trust--dark .bs-trust li {
  color: #f6f4ef;
  background: transparent;
  border-color: rgb(255 255 255 / 15%);
}

.brand-trust--dark .bs-trust svg {
  stroke: #c19a6b;
}

@media (max-width: 959px) {
  .bs-trust {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .bs-trust li {
    gap: 8px;
    padding: 10px 12px;
    font-size: 12px;
  }

  .brand-trust {
    padding-block: 12px;
  }

  /* compact 2x2 grid; a swipe row cut the second card's text off at the screen edge */
  .brand-trust .bs-trust {
    gap: 6px;
  }

  .brand-trust .bs-trust li {
    gap: 6px;
    min-width: 0;
    padding: 8px 10px;
    font-size: 11px;
    line-height: 1.3;
  }

  .brand-trust .bs-trust svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
  }
}
