/* ==========================================================================
   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 {1
  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;
}
/* The second button on a photo: white, so it reads on any slide and stays
   secondary to the filled one beside it. */
.hm-bt .bt-btn--light {
  gap: .45rem;
  background: #fff;
  border-color: #fff;
  color: var(--text-color);
}
.hm-bt .bt-btn--light i { color: var(--primary-color); }
.hm-bt .bt-btn--light:hover i { color: inherit; }
/* Icons inside any boutique button sit in line with the label. */
.hm-bt .bt-btn i { line-height: 1; }
.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 ---------------------------------------------------------------
   The classic page's hero markup (.hero > .container > .row > .col-lg-5 +
   .col-lg-7 > .hero-visual), so hero-slider.css sizes this banner exactly
   as it sizes that one: 100vw wide, the scrollbar included — a 1920px slide
   on a 1920px screen is drawn at 1:1 — and a whole number of pixels tall.
   With markup of its own the band was the page's width beside the scrollbar
   (1905px on a 1920px screen), so every slide was shrunk ~1% and re-sampled:
   measurably softer than the classic banner.
   Only what this page does differently is set here. */

/* No copy under the band on this page, so none of the classic hero's room
   for it: the navbar's height above (it is fixed and reserves no space),
   nothing below. */
.hm-bt .hero { padding-top: 75px; padding-bottom: 0; }
.hm-bt .hero .hero-visual { margin-bottom: 0; }
/* Kept empty to match the classic structure; hidden so the row's gutter
   does not open a gap under the band. */
.hm-bt .hero .row > .col-lg-5:empty { display: none; }

/* Tablets: full width like phones and desktops — the classic page keeps the
   slider inside the column at these widths, beside its copy. */
@media (min-width: 768px) and (max-width: 991.98px) {
  .hm-bt .hero .hero-visual {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }
  .hm-bt .hero .hero-visual .hero-slider { border-radius: 0; box-shadow: none; }
}

/* 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;
  flex-wrap: wrap;
  justify-content: center;
  gap: .75rem;
  padding: 0 1rem;
  /* 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;
}

/* Phones: the slide's shape, phone photo and hidden arrows come from the
   classic rules. Phone banners carry words of their own (a heading and a
   headline across their lower part), so nothing is laid over the photo here:
   the dots and the buttons sit in a strip directly under it. */
@media (max-width: 767.98px) {
  /* Lets the dots hang below the slide; nothing else in it overflows. */
  .hm-bt .hero .hero-slider { overflow: visible; }
  .hm-bt .hero .hero-slider__dots {
    top: calc(100% + .7rem);
    bottom: auto;
    padding: 0;
    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .hm-bt .hero .hero-slider__dot { background: rgba(31, 27, 46, .22); }
  .hm-bt .hero .hero-slider__dot.is-current { background: var(--primary-color); }

  .hm-bt .bt-hero-copy {
    position: static;
    flex-wrap: nowrap;
    gap: .6rem;
    /* Room above for the dots row. */
    padding: 2.1rem 1rem .25rem;
  }
  /* A single slide has no dots. */
  .hm-bt .hero-visual:not(:has(.hero-slider__dots)) .bt-hero-copy { padding-top: 1rem; }
  .hm-bt .bt-hero-copy .bt-btn {
    flex: 1 1 0;
    max-width: 12rem;
    min-height: 40px;
    padding: .45rem .8rem;
    font-size: .7rem;
    letter-spacing: .12em;
    box-shadow: none;
  }
  /* On the white strip, the white button needs an edge to be seen. */
  .hm-bt .bt-hero-copy .bt-btn--light { border-color: var(--primary-color); }
}

/* ---- 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); }

/* A featured product's circle: a product's name is longer than a
   category's, so it may take two lines, with its price beneath. */
.hm-bt .bt-circle--product .bt-circle-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  min-height: 2.6em;       /* two lines, so every price sits on the same line */
}
.hm-bt .bt-circle-price {
  display: block;
  margin-top: .3rem;
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--primary-color);
}
.hm-bt .bt-circle-price s {
  margin-left: .35rem;
  font-weight: 400;
  color: var(--muted);
}

/* ---- 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);
  }

  /* A few circles sit in the middle; a row that overflows starts at its left
     edge. Auto margins do both: they take up free space when there is some
     and are nothing when there is none, where `justify-content: center`
     would push the first circles off the left edge, out of reach. */
  .hm-bt .bt-scroller > :first-child { margin-left: auto; }
  .hm-bt .bt-scroller > :last-child  { margin-right: auto; }
}

/* ---- 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; }
}

/* Reviewer line: the name, and for a review tied to an order the product. */
.hm-bt .bt-review-who { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.hm-bt .bt-review-who small { font-size: .74rem; font-weight: 400; color: var(--muted-color); }
.hm-bt .bt-review-who a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
