/* Boutique header, menu drawer, mega menu, search, locale, city panel and mini-cart panel.
   Markup: resources/views/theme/boutique/header.blade.php. Behaviour: header.js. */

.boutique .bq-icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.boutique[data-direction='rtl'] .bq-icon_dir { transform: scaleX(-1); }
.boutique .bq-eyebrow { margin: 0; font: 500 11px/1.4 var(--bt-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--bt-muted); }
html.bq-locked, html.bq-locked body { overflow: hidden; }
.boutique :is(.bq-acc__panel, .bq-drawer, .bq-popover, .bq-search, .bq-scrim, .bq-city-list li)[hidden] { display: none !important; }
.boutique :is(.bq-drawer, .bq-popover, .header-mini-cart-wrapper):focus { outline: none; }

/* Bar */
.boutique .bq-header { position: sticky; top: 0; z-index: 900; width: 100%; color: var(--bt-plum); background: var(--bt-paper); border-bottom: 1px solid var(--bt-line); transition: box-shadow .2s ease; }
.boutique .bq-header::before { display: none; }
.boutique .bq-header.is-scrolled { box-shadow: 0 10px 30px -24px rgba(43, 16, 41, .55); }
.boutique .bq-header__bar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; max-width: var(--bt-width); min-height: 84px; margin-inline: auto; padding-inline: var(--bt-gutter); }
.boutique .bq-header__start, .boutique .bq-header__end { display: flex; align-items: center; gap: 22px; min-width: 0; }
.boutique .bq-header__end { justify-content: flex-end; gap: 18px; }
.boutique .bq-header__logo { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; }
.boutique .bq-header__logo img { display: block; height: 40px; width: auto; max-width: 240px; object-fit: contain; }

.boutique .bq-tool { position: relative; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin: 0; padding: 0 2px; border: 0; background: none; color: var(--bt-plum); font: 500 12px/1 var(--bt-sans); letter-spacing: .14em; text-transform: uppercase; cursor: pointer; white-space: nowrap; transition: color .15s ease; }
.boutique .bq-tool:hover, .boutique .bq-tool[aria-expanded='true'] { color: var(--bt-pink); }
.boutique .bq-tool__label { display: inline-flex; align-items: center; gap: 10px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.boutique .bq-tool__sep { width: 1px; height: 12px; background: var(--bt-line); }
.boutique .bq-tool_icon { justify-content: center; min-width: 44px; padding: 0; }
.boutique .bq-tool_icon > a, .boutique .bq-tool_icon > button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; }
.boutique .bq-header .header-favourites, .boutique .bq-header .header-mini-cart { margin: 0; }
.boutique .bq-header .header-favourites:hover, .boutique .bq-header .header-mini-cart:hover { color: var(--bt-pink); }

.boutique .bq-header .header-mini-favourites__icon-count,
.boutique .bq-header .header-mini-cart__icon-count { position: absolute; top: 4px; inset-inline-end: 0; left: auto; right: auto; inset-inline-start: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bt-pink); color: #fff; font: 600 10.5px/18px var(--bt-sans); letter-spacing: 0; text-align: center; pointer-events: none; }
.boutique[data-direction='ltr'] .bq-header :is(.header-mini-favourites__icon-count, .header-mini-cart__icon-count) { right: -2px; }
.boutique[data-direction='rtl'] .bq-header :is(.header-mini-favourites__icon-count, .header-mini-cart__icon-count) { left: -2px; }

/* Desktop navigation + mega menu */
.boutique .bq-nav { position: relative; border-top: 1px solid var(--bt-line); }
.boutique .bq-nav__list { display: flex; justify-content: center; flex-wrap: wrap; gap: 0 44px; margin: 0; padding: 0 var(--bt-gutter); list-style: none; }
.boutique .bq-nav__link { display: block; padding: 15px 0 14px; border-bottom: 1px solid transparent; color: var(--bt-plum); font: 500 12px/1.4 var(--bt-sans); letter-spacing: .16em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: color .15s ease, border-color .15s ease; }
.boutique .bq-nav__item:hover > .bq-nav__link, .boutique .bq-nav__item:focus-within > .bq-nav__link { color: var(--bt-pink); border-bottom-color: currentColor; }

.boutique .bq-mega { position: absolute; inset-inline: 0; top: 100%; z-index: 5; background: var(--bt-paper); border-top: 1px solid var(--bt-line); border-bottom: 1px solid var(--bt-line); box-shadow: 0 30px 40px -34px rgba(43, 16, 41, .5); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s; }
.boutique .bq-nav__item.has-mega:hover > .bq-mega, .boutique .bq-nav__item.has-mega:focus-within > .bq-mega { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.boutique .bq-mega__inner { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px 56px; max-width: var(--bt-width); max-height: calc(100dvh - 140px); overflow-y: auto; margin-inline: auto; padding: 32px var(--bt-gutter) 40px; }
.boutique .bq-mega__col { display: grid; gap: 2px; min-width: 150px; margin: 0; padding: 0; list-style: none; }
.boutique .bq-mega__link { display: inline-flex; align-items: center; gap: 8px; padding-block: 5px; color: var(--bt-plum); font: 400 15px/1.45 var(--bt-sans); text-decoration: none; transition: color .15s ease; }
.boutique .bq-mega__link:hover { color: var(--bt-pink); }
.boutique .bq-mega__heading { margin-bottom: 6px; color: var(--bt-muted); font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.boutique .bq-mega__img { display: block; max-width: 160px; height: auto; }
.boutique .bq-mega__all { display: grid; align-content: end; gap: 14px; min-width: 240px; min-height: 180px; margin-inline-start: auto; padding: 26px; background: var(--bt-surface); color: var(--bt-plum); text-decoration: none; }
.boutique .bq-mega__all-title { font: 500 30px/1.1 var(--bt-serif); letter-spacing: -.02em; }
.boutique .bq-arrow-link { display: inline-flex; align-items: center; gap: 10px; color: var(--bt-plum); }
.boutique .bq-mega__all:hover .bq-arrow-link { color: var(--bt-pink); }
.boutique .bq-dot { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(43, 16, 41, .18); }

/* Search bar under the header */
.boutique .bq-search { position: absolute; inset-inline: 0; top: 100%; z-index: 6; background: var(--bt-paper); border-bottom: 1px solid var(--bt-line); box-shadow: 0 30px 40px -34px rgba(43, 16, 41, .5); opacity: 0; transform: translateY(-6px); transition: opacity .18s ease, transform .18s ease; }
.boutique .bq-search.is-open { opacity: 1; transform: none; }
.boutique .bq-search__form { display: flex; align-items: center; gap: 14px; max-width: 880px; margin-inline: auto; padding: 22px var(--bt-gutter); }
.boutique .bq-search__input { flex: 1; min-width: 0; height: 52px; padding: 0; border: 0; border-bottom: 1px solid var(--bt-plum); border-radius: 0; background: none; color: var(--bt-plum); font: 400 26px/1.2 var(--bt-serif); outline: none; }
.boutique .bq-search__input::placeholder { color: var(--bt-muted); opacity: .7; }
.boutique .bq-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 26px; border: 0; background: var(--bt-pink); color: #fff; font: 500 12px/1 var(--bt-sans); letter-spacing: .14em; text-transform: uppercase; cursor: pointer; transition: background .15s ease; }
.boutique .bq-btn:hover { background: #d34a84; }

/* Locale popover */
.boutique .bq-locale { position: relative; }
.boutique .bq-popover { position: absolute; top: calc(100% + 18px); inset-inline-end: -12px; z-index: 7; width: 280px; padding: 20px; display: grid; gap: 12px; background: var(--bt-paper); border: 1px solid var(--bt-line); box-shadow: 0 24px 50px -30px rgba(43, 16, 41, .55); opacity: 0; transform: translateY(-6px); transition: opacity .18s ease, transform .18s ease; }
.boutique .bq-popover.is-open { opacity: 1; transform: none; }
.boutique .bq-choice-list { display: grid; gap: 2px; margin: 0 0 6px; padding: 0; list-style: none; }
.boutique .bq-choice-list_row { display: flex; flex-wrap: wrap; gap: 8px; }
.boutique .bq-choice { display: flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--bt-plum); font: 400 15px/1.3 var(--bt-sans); text-decoration: none; transition: background .15s ease, color .15s ease; }
.boutique .bq-choice:hover { color: var(--bt-pink); }
.boutique .bq-choice.is-active { background: color-mix(in srgb, var(--bt-blush) 30%, #fff); font-weight: 500; }
.boutique .bq-choice-list_row .bq-choice { justify-content: center; min-width: 64px; border: 1px solid var(--bt-line); font-size: 13px; font-weight: 500; letter-spacing: .08em; }
.boutique .bq-choice-list_row .bq-choice.is-active { background: var(--bt-plum); border-color: var(--bt-plum); color: #fff; }

/* Drawers: menu (inline-start) and city (inline-end) */
.boutique .bq-scrim { position: fixed; inset: 0; z-index: 1000; background: rgba(43, 16, 41, .42); opacity: 0; transition: opacity .22s ease; }
.boutique .bq-scrim.is-open { opacity: 1; }
.boutique .bq-drawer { position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 1001; display: flex; flex-direction: column; width: min(460px, 100%); background: var(--bt-paper); color: var(--bt-plum); transform: translateX(-100%); transition: transform .22s ease; }
.boutique[data-direction='rtl'] .bq-drawer { transform: translateX(100%); }
.boutique .bq-drawer_end { inset-inline-start: auto; inset-inline-end: 0; transform: translateX(100%); }
.boutique[data-direction='rtl'] .bq-drawer_end { transform: translateX(-100%); }
.boutique .bq-drawer.is-open { transform: none; }
.boutique .bq-drawer__head { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 12px; min-height: 72px; padding: max(8px, env(safe-area-inset-top, 0px)) 20px 8px; border-bottom: 1px solid var(--bt-line); }
.boutique .bq-drawer__head .bq-header__logo img { height: 34px; max-width: 200px; margin-inline: auto; }
.boutique .bq-drawer_end .bq-drawer__head { grid-template-columns: minmax(0, 1fr) 44px; padding-inline: 28px 20px; }
.boutique .bq-drawer__title { margin: 0; font: 500 30px/1.15 var(--bt-serif); }
.boutique .bq-drawer__body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 28px 28px; }

.boutique .bq-acc { margin: 0; padding: 0; list-style: none; }
.boutique .bq-acc__item { border-bottom: 1px solid var(--bt-line); }
.boutique .bq-acc__trigger { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 72px; margin: 0; padding: 10px 0; border: 0; background: none; color: var(--bt-plum); font: 500 34px/1.1 var(--bt-serif); letter-spacing: -.02em; text-align: start; text-decoration: none; cursor: pointer; transition: color .15s ease; }
.boutique .bq-acc__trigger:hover { color: var(--bt-pink); }
.boutique .bq-acc__trigger .bq-icon { width: 22px; height: 22px; stroke-width: 1.25; }
.boutique .bq-acc__v { transition: opacity .15s ease; }
.boutique .bq-acc__trigger[aria-expanded='true'] .bq-acc__v { opacity: 0; }
.boutique .bq-acc__panel { display: grid; gap: 18px; padding: 0 0 24px; }
.boutique .bq-acc__all { color: var(--bt-pink); text-decoration: none; }
.boutique .bq-acc__col { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.boutique .bq-acc__link { display: flex; align-items: center; gap: 10px; min-height: 40px; color: var(--bt-plum); font: 400 16px/1.4 var(--bt-sans); text-decoration: none; }
.boutique .bq-acc__link:hover { color: var(--bt-pink); }
.boutique .bq-acc__heading { min-height: 32px; color: var(--bt-muted); font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.boutique .bq-drawer__links { display: grid; gap: 0; margin: 24px 0 0; padding: 0; list-style: none; }
.boutique .bq-drawer__links a { display: flex; align-items: center; min-height: 40px; color: var(--bt-muted); font: 400 15px/1.4 var(--bt-sans); text-decoration: none; }
.boutique .bq-drawer__links a:hover { color: var(--bt-pink); }

.boutique .bq-drawer__foot { display: grid; gap: 14px; padding: 16px 28px max(20px, env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--bt-line); background: var(--bt-paper); }
.boutique .bq-drawer__city { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; margin: 0; padding: 0; border: 0; background: none; color: var(--bt-plum); font: 400 17px/1.3 var(--bt-sans); text-align: start; cursor: pointer; }
.boutique .bq-drawer__city:hover { color: var(--bt-pink); }
.boutique .bq-drawer__city-text { display: grid; gap: 2px; flex: 1; min-width: 0; }
.boutique .bq-drawer__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.boutique .bq-chips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin: 0; padding: 0; list-style: none; }
.boutique .bq-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 10px; border: 1px solid var(--bt-line); color: var(--bt-plum); font: 500 12.5px/1 var(--bt-sans); letter-spacing: .08em; text-decoration: none; transition: border-color .15s ease, color .15s ease; }
.boutique a.bq-chip:hover { border-color: var(--bt-pink); color: var(--bt-pink); }
.boutique .bq-chip.is-active { background: var(--bt-plum); border-color: var(--bt-plum); color: #fff; }

.boutique .bq-field { display: flex; align-items: center; gap: 10px; margin: 18px 0 8px; padding-block: 8px; border-bottom: 1px solid var(--bt-plum); color: var(--bt-muted); }
.boutique .bq-field__input { flex: 1; min-width: 0; height: 32px; padding: 0; border: 0; background: none; color: var(--bt-plum); font: 400 17px/1.3 var(--bt-sans); outline: none; }
.boutique .bq-city-list { margin: 0; padding: 0; list-style: none; }
.boutique .bq-city { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 52px; margin: 0; padding: 0; border: 0; border-bottom: 1px solid var(--bt-line); background: none; color: var(--bt-plum); font: 400 17px/1.3 var(--bt-sans); text-align: start; cursor: pointer; }
.boutique .bq-city:hover, .boutique .bq-city.is-active { color: var(--bt-pink); }
.boutique .bq-city[aria-busy='true'] { opacity: .5; cursor: progress; }

/* Mini-cart as a full-height panel (existing markup and handlers). It lives inside the sticky header,
   so while it is open the header is lifted above the scrim and dimmed by its own overlay. */
.boutique .bq-header.is-cart-open { z-index: 1002; }
.boutique .bq-header.is-cart-open::after { content: ''; position: absolute; inset: 0; z-index: 1000; background: rgba(43, 16, 41, .42); cursor: pointer; }
.boutique .bq-header .header-mini-cart-wrapper,
.boutique .bq-header .header-mini-cart-wrapper.fixed { position: fixed; top: 0; bottom: 0; z-index: 1001; width: min(440px, 100%); height: auto; max-height: none; margin: 0; padding: 0 28px max(24px, env(safe-area-inset-bottom, 0px)); overflow-y: auto; border: 0; border-inline-start: 1px solid var(--bt-line); background: var(--bt-paper); box-shadow: -30px 0 60px -40px rgba(43, 16, 41, .6); visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s; }
.boutique[data-direction='ltr'] .bq-header .header-mini-cart-wrapper { right: 0; left: auto; transform: translateX(100%); }
.boutique[data-direction='rtl'] .bq-header .header-mini-cart-wrapper { left: 0; right: auto; transform: translateX(-100%); }
.boutique .bq-header .header-mini-cart-wrapper.show { visibility: visible; transform: none; transition-delay: 0s; }
.boutique .bq-header .header-mini-cart-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; min-height: 72px; margin: 0 0 8px; background: var(--bt-paper); border-bottom: 1px solid var(--bt-line); }
.boutique .bq-header .header-mini-cart__title { margin: 0; font: 500 30px/1.15 var(--bt-serif); }
.boutique .bq-header .header-mini-cart__icon-close { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; background: none; color: var(--bt-plum); cursor: pointer; }
.boutique .bq-header .header-mini-cart__icon-close:hover { color: var(--bt-pink); }

/* Tablet and phone: icons only, nav moves into the drawer */
@media (max-width: 1080px) {
  .boutique .bq-nav { display: none; }
  .boutique .bq-header__bar { min-height: 64px; gap: 8px; padding-inline: max(12px, env(safe-area-inset-left, 0px)) max(12px, env(safe-area-inset-right, 0px)); }
  .boutique .bq-header__start, .boutique .bq-header__end { gap: 2px; }
  .boutique .bq-header__start .bq-tool { min-width: 44px; justify-content: center; }
  .boutique .bq-header__start .bq-tool__label, .boutique .bq-header__end .bq-tool_wide, .boutique .bq-header__end .bq-locale { display: none; }
  .boutique .bq-header__logo img { height: 34px; max-width: 150px; }
  .boutique .bq-search__form { padding: 14px 16px; }
  .boutique .bq-search__input { font-size: 22px; }
  .boutique .bq-search .bq-btn { display: none; }
}
@media (max-width: 560px) {
  .boutique .bq-drawer, .boutique .bq-header .header-mini-cart-wrapper { width: 100%; }
  .boutique .bq-drawer__body { padding-inline: 20px; }
  .boutique .bq-drawer__foot { padding-inline: 20px; }
  .boutique .bq-acc__trigger { min-height: 66px; font-size: 32px; }
  .boutique .bq-header .header-mini-cart-wrapper { padding-inline: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .boutique .bq-drawer, .boutique .bq-scrim, .boutique .bq-mega, .boutique .bq-search, .boutique .bq-popover,
  .boutique .bq-header .header-mini-cart-wrapper { transition: none; }
}

/* Search-like inputs show focus through their underline, not the global outline. */
.boutique :is(.bq-search__input, .bq-field__input):focus-visible { outline: none; }
.boutique .bq-search__input:focus { border-bottom-color: var(--bt-pink); }
.boutique .bq-field:focus-within { border-bottom-color: var(--bt-pink); }
.boutique :is(.bq-search__input, .bq-field__input)::-webkit-search-cancel-button { filter: grayscale(1); opacity: .5; }
