/* ==========================================================================
   Boutique home page — application/views/home/boutique.php
   Selected in Admin -> Settings -> Home page design.

   Every rule is scoped under .hm-bt, so nothing here reaches the classic or
   editorial home pages, or any other page that shares the header, footer
   and product card.

   Colours are the theme's. theme_color_vars() (scentroso_helper.php) writes
   the admin's Settings -> Theme colour into --violet, --violet-dark and
   --coral; the names below map onto those, so changing the theme colour
   restyles this page with no edit here.
   ========================================================================== */

.hm-bt {
  --primary-color: var(--violet);
  --primary-color-dark: var(--violet-dark);
  --accent-color: var(--coral);
  --text-color: var(--ink);
  --muted-color: var(--muted);
  --background-color: #fff;
  --band-color: var(--mist);
  --bt-line: rgba(31, 27, 46, .1);
  --bt-space: clamp(2rem, 4.5vw, 3.75rem);
  --bt-gap: clamp(.75rem, 1.6vw, 1.25rem);
  --bt-circle: clamp(84px, 25vw, 104px);

  background: var(--background-color);
  color: var(--text-color);
  font-family: 'Jost', 'Inter', sans-serif;
}
@media (min-width: 768px)  { .hm-bt { --bt-circle: 120px; } }
@media (min-width: 1200px) { .hm-bt { --bt-circle: 140px; } }

/* ---- shared pieces ------------------------------------------------------ */

.hm-bt .bt-section { padding: var(--bt-space) 0; }
/* Two plain sections in a row would double the gap between them. */
.hm-bt .bt-section:not(.bt-band) + .bt-section:not(.bt-band) { padding-top: 0; }
.hm-bt .bt-band { background: var(--band-color); }

.hm-bt .bt-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(1rem, 2vw, 1.5rem);
}
.hm-bt .bt-head--center { justify-content: center; text-align: center; }

.hm-bt .bt-title {
  margin: 0;
  font-family: 'Jost', 'Inter', sans-serif;
  font-weight: 500;
  font-size: clamp(1.1rem, 1.5vw, 1.5rem);
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--text-color);
}
.hm-bt .bt-title--lg { font-size: clamp(1.25rem, 2vw, 1.85rem); }

.hm-bt .bt-link {
  flex: none;
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--primary-color);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}
.hm-bt .bt-link:hover { color: var(--primary-color-dark); }

.hm-bt .bt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .6rem 1.75rem;
  border: 1px solid var(--primary-color);
  border-radius: 2px;
  background: var(--primary-color);
  color: #fff;
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background .2s ease, border-color .2s ease;
}
.hm-bt .bt-btn:hover {
  background: var(--primary-color-dark);
  border-color: var(--primary-color-dark);
  color: #fff;
}
.hm-bt .bt-btn:focus-visible,
.hm-bt .bt-tile:focus-visible,
.hm-bt .bt-circle:focus-visible,
.hm-bt .bt-label-tile:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 3px;
}

/* The filled round arrows of the reference, in the page's ink colour. */
.hm-bt .slider-nav-btn {
  width: 38px;
  height: 38px;
  border: 0;
  background: var(--text-color);
  color: #fff;
}
@media (hover: hover) and (pointer: fine) {
  .hm-bt .slider-nav-btn:hover { background: var(--primary-color); color: #fff; }
}
.hm-bt .slider-nav-btn:disabled,
.hm-bt .slider-nav-btn:disabled:hover { opacity: .25; background: var(--text-color); color: #fff; }

/* ---- hero ---------------------------------------------------------------
   partials/hero_slider.php and hero-slider.js unchanged; only the shape of
   the band is set here. The classic page's sizing is scoped to its own
   .hero wrapper and does not apply. */

/* The navbar is position: fixed and reserves no space; 75px is its height. */
.hm-bt .bt-hero { padding-top: 75px; }
.hm-bt .bt-hero-frame { position: relative; }

/* Edge to edge, and the same band as the classic page: 620px tall, or the
   photograph's own height at this width if that is less. It used to grow to
   80% of the window, which on a 1920px screen put the 1920px slide on show
   nearly full-screen at 1:1. The pixels were the same as the classic page's,
   but at that size the photo's own softness was what you saw, and it read
   as a drop in quality next to the classic banner. */
.hm-bt .bt-hero .hero-slider {
  aspect-ratio: auto;
  height: min(620px, calc(100vw * var(--slide-h, .5625)));
  /* In whole pixels. A height like 610.39px (what the old 80vh produced)
     puts the photo between pixels, and the browser re-samples it to fit:
     measured side by side, the same slide was visibly softer than at 610px
     or 620px. Browsers without round() keep the line above. */
  height: round(down, min(620px, calc(100vw * var(--slide-h, .5625))), 1px);
  border-radius: 0;
  box-shadow: none;
}
.hm-bt .bt-hero .hero-slider__slide img { object-fit: cover; }
.hm-bt .bt-hero .hero-slider__arrow--prev { left: 1.25rem; }
.hm-bt .bt-hero .hero-slider__arrow--next { right: 1.25rem; }

/* Just the button, above the dots. No shade over the photo: a headline
   across a group shot covered the garments, so the h1 is kept for search
   engines and screen readers only (below). */
.hm-bt .bt-hero-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3.1rem;
  z-index: 2;
  display: flex;
  justify-content: center;
  /* Swipes and taps on the photo still reach the slider underneath. */
  pointer-events: none;
}
.hm-bt .bt-hero-copy a {
  pointer-events: auto;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .22);
}
.hm-bt .bt-hero-title {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Tablets: the band takes the photograph's own shape, so all of it shows. */
@media (max-width: 991.98px) {
  .hm-bt .bt-hero .hero-slider {
    height: auto;
    aspect-ratio: var(--slide-ratio, 16 / 9);
  }
}

/* Phones: the phone photo's shape where slides have one (Admin -> Settings),
   the same rules as the classic page. */
@media (max-width: 767.98px) {
  .hm-bt .bt-hero .hero-slider { aspect-ratio: var(--slide-ratio-phone, 3 / 2); }
  .hm-bt .bt-hero .hero-slider__slide picture img { object-position: 50% 70%; }
  .hm-bt .bt-hero .hero-slider__arrow { display: none; }
  .hm-bt .bt-hero .hero-slider__dots { bottom: .6rem; }

  .hm-bt .bt-hero-copy { bottom: 2.3rem; }
  .hm-bt .bt-hero-copy .bt-btn {
    min-height: 36px;
    padding: .4rem 1.2rem;
    font-size: .7rem;
  }
}

/* ---- tiles: categories, collections, sets ------------------------------ */

.hm-bt .bt-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--bt-gap);
}
.hm-bt .bt-tiles--n2 { max-width: 760px; margin-inline: auto; }
@media (min-width: 768px) {
  .hm-bt .bt-tiles--n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hm-bt .bt-tiles--n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.hm-bt .bt-tile { display: block; color: inherit; text-decoration: none; }
.hm-bt .bt-tile-media {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--band-color);
}
.hm-bt .bt-band .bt-tile-media { background: #fff; }
.hm-bt .bt-tile--tall .bt-tile-media { aspect-ratio: 3 / 4; }
.hm-bt .bt-tile-media img,
.hm-bt .bt-label-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
  transition: transform .6s ease, opacity .4s ease;
}
.hm-bt .bt-tile-name {
  display: block;
  margin-top: .7rem;
  text-align: center;
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: color .2s ease;
}
@media (hover: hover) and (pointer: fine) {
  .hm-bt .bt-tile:hover .bt-tile-media img,
  .hm-bt .bt-label-tile:hover img { transform: scale(1.04); }
  .hm-bt .bt-tile:hover .bt-tile-name { color: var(--primary-color); }
}

/* Sets: the name sits on the photo in a white label, as in the reference. */
.hm-bt .bt-label-tile {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--band-color);
  color: var(--text-color);
  text-decoration: none;
}
.hm-bt .bt-label {
  position: absolute;
  left: 50%;
  bottom: clamp(.75rem, 2vw, 1.25rem);
  transform: translateX(-50%);
  max-width: calc(100% - 1.5rem);
  padding: .5rem 1.25rem;
  overflow: hidden;
  background: #fff;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease;
}
.hm-bt .bt-label-tile:hover .bt-label { background: var(--primary-color); color: #fff; }

/* ---- title beside a row: category circles and product rows ------------- */

.hm-bt .bt-split { display: grid; gap: 1rem; }
.hm-bt .bt-split-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.hm-bt .bt-arrows { display: none; gap: .5rem; }

/* Desktop: the title sits in a column to the left of its row. */
@media (min-width: 992px) {
  .hm-bt .bt-split {
    grid-template-columns: 200px minmax(0, 1fr);
    align-items: center;
    gap: 2rem;
  }
  .hm-bt .bt-split-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .hm-bt .bt-arrows { display: flex; }
}

.hm-bt .bt-section--tight { padding-top: clamp(1.5rem, 3vw, 2.5rem); }

/* ---- category circles -------------------------------------------------- */

.hm-bt .bt-scroller {
  display: flex;
  gap: clamp(.9rem, 2vw, 1.75rem);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  padding: .25rem;
  margin: -.25rem;
}
.hm-bt .bt-scroller::-webkit-scrollbar { display: none; }

.hm-bt .bt-circle {
  flex: 0 0 auto;
  width: var(--bt-circle);
  scroll-snap-align: start;
  text-align: center;
  color: inherit;
  text-decoration: none;
}
.hm-bt .bt-circle-media {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 50%;
  background: var(--band-color);
  box-shadow: 0 0 0 1px var(--bt-line);
  transition: box-shadow .2s ease;
}
.hm-bt .bt-circle-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 15%;
}
.hm-bt .bt-circle-name {
  display: block;
  margin-top: .6rem;
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.hm-bt .bt-circle:hover .bt-circle-media { box-shadow: 0 0 0 2px var(--primary-color); }
.hm-bt .bt-circle:hover .bt-circle-name { color: var(--primary-color); }

/* ---- product rows ------------------------------------------------------
   The cards are script.js's productCardHTML(), with its add-to-cart, stock
   and sale logic untouched; only their look changes here: photo-led, the
   bag button on the photo, name and price beneath. */

.hm-bt .bt-products .product-slider,
.hm-bt .bt-products .product-slider.is-two-row {
  display: flex;   /* one row, never the classic page's two */
  gap: var(--bt-gap);
}
.hm-bt .bt-products .product-slider .product-slide { width: clamp(190px, 21vw, 270px); }

.hm-bt .bt-products .product-card {
  position: relative;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
@media (hover: hover) and (pointer: fine) {
  .hm-bt .bt-products .product-card:hover { transform: none; box-shadow: none; }
  .hm-bt .bt-products .product-card:hover .product-media img { transform: scale(1.04); }
}
.hm-bt .bt-products .product-media {
  aspect-ratio: 3 / 4;
  background: var(--band-color);
}
.hm-bt .bt-products .product-tag { border-radius: 2px; }
.hm-bt .bt-products .wish-btn { width: 30px; height: 30px; font-size: .85rem; }

.hm-bt .bt-products .product-card .p-3 {
  position: relative;   /* the bag button is placed against this, on the photo */
  padding: .7rem .1rem 0 !important;
}
/* Category and stars: the row title already says what this is. */
.hm-bt .bt-products .product-card .p-3 > .d-flex:first-child { display: none !important; }
.hm-bt .bt-products .product-card h6 {
  margin-bottom: .2rem !important;
  font-family: 'Jost', 'Inter', sans-serif;
  font-size: .88rem;
  font-weight: 400 !important;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hm-bt .bt-products .card-meta-line { font-size: .74rem; margin-bottom: .2rem !important; }
.hm-bt .bt-products .color-swatches { margin-bottom: .2rem !important; }
.hm-bt .bt-products .color-swatch { width: 12px; height: 12px; }
.hm-bt .bt-products .product-card .p-3 > .d-flex.mt-3 { margin-top: .15rem !important; }
.hm-bt .bt-products .price-now {
  font-family: 'Jost', 'Inter', sans-serif;
  font-size: .9rem;
  font-weight: 600;
}
.hm-bt .bt-products .price-old { font-size: .8rem; }
.hm-bt .bt-products .qty-stepper { display: none; }
.hm-bt .bt-products .product-card .p-3 > .d-flex:last-child { margin: 0 !important; }
.hm-bt .bt-products .add-cart-btn {
  position: absolute;
  right: .6rem;
  top: calc(-.6rem - 38px);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  color: var(--text-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .14);
}
.hm-bt .bt-products .add-cart-btn:hover:not(:disabled) { background: var(--primary-color); color: #fff; }
.hm-bt .bt-products .add-cart-btn:disabled { background: #fff; color: var(--muted-color); opacity: .8; }

/* Phones: still a sideways row (the classic page stacks them one per screen),
   two cards and the edge of a third, so it reads as a row to swipe. */
@media (max-width: 575.98px) {
  .hm-bt .bt-products .product-slider,
  .hm-bt .bt-products .product-slider.is-two-row {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: .25rem 0 .5rem;
    margin: 0;
  }
  .hm-bt .bt-products .product-slider .product-slide {
    width: 41vw;
    margin-bottom: 0;
    scroll-snap-align: start;
  }
}

/* Rows run to the screen's right edge on phones, so a cut-off card or
   circle shows there is more to swipe to. */
@media (max-width: 767.98px) {
  .hm-bt .bt-scroller,
  .hm-bt .bt-products .product-slider,
  .hm-bt .bt-products .product-slider.is-two-row {
    margin-right: calc(var(--bs-gutter-x, 1.5rem) * -.5);
    padding-right: calc(var(--bs-gutter-x, 1.5rem) * .5);
  }
}

/* ---- our story --------------------------------------------------------- */

.hm-bt .bt-about {
  display: grid;
  background: var(--band-color);
}
@media (min-width: 768px) {
  .hm-bt .bt-about { grid-template-columns: 1fr 1fr; }
}
.hm-bt .bt-about-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 260px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.hm-bt .bt-about-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1rem;
  padding: clamp(1.5rem, 4vw, 3.5rem);
}
.hm-bt .bt-kicker {
  margin: 0;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--primary-color);
}
.hm-bt .bt-about-title {
  margin: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  font-size: clamp(1.7rem, 2.6vw, 2.5rem);
  line-height: 1.15;
}
.hm-bt .bt-about-copy p:not(.bt-kicker) {
  margin: 0;
  max-width: 34rem;
  line-height: 1.7;
  color: var(--muted-color);
}

/* ---- reviews ----------------------------------------------------------- */

.hm-bt .bt-reviews {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--bt-gap);
}
.hm-bt .bt-review {
  display: flex;
  flex-direction: column;
  gap: .9rem;
  margin: 0;
  padding: clamp(1.25rem, 2vw, 1.75rem);
  background: #fff;
  border: 1px solid var(--bt-line);
}
.hm-bt .bt-review .rating-stars { font-size: .9rem; letter-spacing: .1em; }
.hm-bt .bt-review blockquote {
  margin: 0;
  font-size: .95rem;
  line-height: 1.65;
}
.hm-bt .bt-review figcaption {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: auto;
  font-size: .88rem;
  font-weight: 500;
}
.hm-bt .bt-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--band-color);
  color: var(--primary-color);
  font-weight: 600;
}
.hm-bt .bt-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Phones: a sideways row of cards rather than a tall stack. */
@media (max-width: 767.98px) {
  .hm-bt .bt-reviews {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    margin-right: calc(var(--bs-gutter-x, 1.5rem) * -.5);
    padding-right: calc(var(--bs-gutter-x, 1.5rem) * .5);
  }
  .hm-bt .bt-reviews::-webkit-scrollbar { display: none; }
  .hm-bt .bt-review { flex: 0 0 82%; scroll-snap-align: start; }
}

/* ---- contact (partials/home_contact.php) ------------------------------- */

.hm-bt #contact .btn-gradient { border-radius: 2px !important; letter-spacing: .1em; text-transform: uppercase; font-size: .85rem; }

@media (prefers-reduced-motion: reduce) {
  .hm-bt .bt-tile-media img,
  .hm-bt .bt-label-tile img { transition: none; }
}
