/* Boutique tab layout on the salon page: brand list (left), tiles / product grid
   (centre), inline basket (right, >= 1280px). Tokens come from boutique.css.
   No overflow:hidden on any ancestor of the sticky columns (Safari). */
.bshop { --bshop-top: calc(var(--pp2-tabs-h, 52px) + 16px); display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px 32px; align-items: start; scroll-margin-top: var(--bshop-top); }
.bshop [hidden] { display: none !important; }
.bshop-main { min-width: 0; }
.bshop .boutique-head { margin-top: 4px; }

/* ---------- Brand list: chips below 1024px, column above ---------- */
.bshop-brands__title { display: none; margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--bq-muted); }
.bshop-brands__list { display: flex; gap: 9px; margin: 0 -20px; padding: 4px 20px 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.bshop-brands__list::-webkit-scrollbar { display: none; }
.bshop-brand {
  flex: 0 0 auto; display: inline-flex; align-items: baseline; gap: 6px; min-height: 44px; padding: 9px 16px;
  border: 1px solid var(--pp2-border-6, #E4DED7); border-radius: 100px; background: #fff; color: var(--pp2-ink, #111);
  font: 700 13px/1.2 var(--bq-font); white-space: nowrap; cursor: pointer; text-decoration: none;
}
.bshop-brand__count { font-weight: 500; opacity: .7; }
.bshop-brand[aria-current="true"] { background: var(--pp2-ink, #111); border-color: var(--pp2-ink, #111); color: #fff; }
.bshop-brand:focus-visible, .bshop-tile:focus-visible, .bshop-crumbs__link:focus-visible, .bshop-search__input:focus-visible,
.bshop-title:focus-visible { outline: 2px solid var(--bq-accent); outline-offset: 2px; }
.bshop-title:focus { outline: none; }

/* ---------- Search ---------- */
.bshop-search { margin: 0 0 16px; }
.bshop-search__input {
  width: 100%; height: 48px; padding: 0 18px; border: 1px solid var(--pp2-border-6, #E4DED7); border-radius: 999px;
  background: #fff; color: var(--bq-text); font: 500 16px/1 var(--bq-font); -webkit-appearance: none; appearance: none;
}
.bshop-empty { margin: 24px 0; padding: 24px 16px; border-radius: var(--bq-radius); background: var(--bq-bg); color: var(--bq-body); text-align: center; font-size: 15px; }

/* ---------- Header / breadcrumb ---------- */
.bshop-header { margin: 0 0 16px; }
.bshop-crumbs { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--bq-muted); }
.bshop-crumbs__link { padding: 4px 0; text-decoration: none; color: var(--bq-accent); font: inherit; font-weight: 600; cursor: pointer; }
.bshop-crumbs__link:hover { text-decoration: underline; }
.bshop-crumbs__current { color: var(--bq-body); }
.bshop-title { margin: 4px 0 0; font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }

/* ---------- Brand tiles ---------- */
.bshop-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.bshop-tile {
  position: relative; display: block; aspect-ratio: 4 / 3; padding: 0; border: 0; border-radius: 16px;
  overflow: hidden; background: var(--bq-bg); color: #fff; text-align: left; cursor: pointer; text-decoration: none;
  font-family: var(--bq-font); -webkit-tap-highlight-color: transparent;
}
.bshop-tile__media { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.bshop-tile__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.bshop-tile:hover .bshop-tile__media img { transform: scale(1.04); }
.bshop-tile__band {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 2px; padding: 10px 14px;
  background: rgba(17, 17, 17, .82);
}
.bshop-tile__name { font-size: 15px; font-weight: 700; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bshop-tile__count { font-size: 12px; opacity: .8; }

/* ---------- Product groups ---------- */
.bshop-group + .bshop-group { margin-top: 28px; }
.bshop-group__title { margin: 0 0 12px; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.bshop[data-bshop-view="brand"] .bshop-group__title, .bshop--one .bshop-group__title { display: none; }
.boutique-card__stock { margin: 0; font-size: 12px; font-weight: 600; color: var(--bq-low); }

/* ---------- Inline basket (>= 1280px only; below it the drawer + floating bar are used) ---------- */
.bshop-basket { display: none; }

@media (min-width: 1024px) {
  .bshop { grid-template-columns: 220px minmax(0, 1fr); }
  .bshop--solo { grid-template-columns: minmax(0, 1fr); }
  .bshop-brands { position: sticky; top: var(--bshop-top); align-self: start; }
  .bshop-brands__title { display: block; }
  .bshop-brands__list { flex-direction: column; gap: 2px; margin: 0; padding: 0; overflow: visible; }
  .bshop-brand {
    justify-content: space-between; width: 100%; min-height: 40px; padding: 8px 12px; border: 0; border-radius: 10px;
    background: none; color: var(--bq-body); font-weight: 500; font-size: 15px; white-space: normal; text-align: left;
  }
  .bshop-brand:hover { background: var(--bq-bg); }
  .bshop-brand[aria-current="true"] { background: var(--bq-soft); color: var(--bq-accent); font-weight: 700; }
  .bshop .boutique-products { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); max-width: none; }
  .bshop-tiles { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
  .bshop-title { font-size: 30px; }
}

@media (min-width: 1280px) {
  .bshop { grid-template-columns: 220px minmax(0, 1fr) 300px; }
  .bshop--solo { grid-template-columns: minmax(0, 1fr) 300px; }
  .bshop-basket {
    display: block; position: sticky; top: var(--bshop-top); align-self: start; padding: 20px;
    border: 1px solid var(--bq-line); border-radius: 16px; background: #fff;
  }
  .bshop-basket[hidden] { display: none; }
  /* The inline basket replaces the floating bar while the Boutique tab is open. */
  body:has([data-pp2-tab-panel="boutique"]:not([hidden]) .bshop-basket:not([hidden])) .boutique-float { display: none !important; }
}
.bshop-basket__title { margin: 0 0 12px; font-size: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.bshop-basket__empty { margin: 0; font-size: 14px; color: var(--bq-muted); }
.bshop-basket__lines { max-height: 50vh; overflow-y: auto; }
.bshop-line { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--bq-line-soft); }
.bshop-line__info { min-width: 0; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.bshop-line__name { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.bshop-line__total { margin: 0; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bshop-line__issue { margin: 0; font-size: 12px; font-weight: 600; color: var(--bq-low); }
.bshop-basket__total { display: flex; justify-content: space-between; margin: 16px 0 4px; font-size: 16px; }
.bshop-basket__pickup { margin: 0 0 14px; font-size: 13px; color: var(--bq-muted); }
.bshop-basket__cta { width: 100%; }

@media (prefers-reduced-motion: reduce) { .bshop-tile__media img { transition: none; } }
