/* Ecosystem header, on every page: the brand strip with photo pills, "Our Brands", and the bar that
   pinches into a floating capsule on scroll (.header-motion, added by header-motion.js). */

/* Strip: every brand opens a pill window onto its own photograph (--peek, from nav.php). On hover it grows
   up from the baseline while the photo settles; the current brand keeps its pill open. No underline.
   Each link carries its own side padding and the pill fills the link box exactly, so two pills can never
   touch or overlap: there is always the row's gap between them. */
/* --strip-edge is the header bar's own side padding. The row starts one pill-padding earlier, so the first
   word (not the pill's edge) lines up with the logo below it. */
.store-strip .store-strip__inner {
    --pill-pad: 12px;
    --pill-gap: 4px;
    --strip-edge: var(--gutter);
    gap: var(--pill-gap);
    padding-inline: calc(var(--strip-edge) - var(--pill-pad)) var(--strip-edge);
}
.store-strip .store-strip__link { padding-inline: var(--pill-pad); }
@media (min-width: 1025px) { .store-strip .store-strip__inner { --strip-edge: clamp(24px, 5vw, 80px); } }
/* One row at every width, never wrapped. From 1280 up it fits (smaller type until 1440); below that it
   swipes sideways, with a fade on the right edge to show there is more. */
html:has(.store-strip) { --strip-h: 52px; }
@media (min-width: 1440px) { html:has(.store-strip) { --strip-h: 56px; } }
.store-strip .store-strip__inner {
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-content: normal;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    scroll-padding-inline: 24px;
}
.store-strip .store-strip__inner::-webkit-scrollbar { display: none; }
.store-strip .store-strip__link { height: 100%; flex: none; font-size: 15px; }
@media (min-width: 1100px) and (max-width: 1439px) { .store-strip .store-strip__inner { --pill-pad: 10px; --pill-gap: 2px; } }
@media (min-width: 1440px) { .store-strip .store-strip__link { font-size: 17px; } }
@media (max-width: 1279px) {
    .store-strip .store-strip__inner {
        -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent);
                mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent);
        padding-right: 64px;
    }
}
.store-strip__link.has-peek { isolation: isolate; }
.store-strip__link.has-peek::after { display: none !important; }
.store-strip__link.has-peek::before {
    content: '';
    position: absolute;
    z-index: -1;
    top: 50%;
    left: 0;
    right: 0;
    height: 32px;
    margin-top: -16px;
    border-radius: 999px;
    background-image: linear-gradient(rgba(12, 12, 12, 0.68), rgba(12, 12, 12, 0.68)), var(--peek); /* dark enough that white-background photos (Bags, Luggage) keep the word readable */
    background-position: center, center;
    background-repeat: no-repeat;
    background-size: 100% 100%, 135% auto;
    clip-path: inset(100% 0 0 0 round 999px);
    transition: clip-path 180ms cubic-bezier(0.4, 0, 1, 1), background-size 180ms cubic-bezier(0.4, 0, 1, 1);
}
.store-strip__link.has-peek[aria-current="page"]::before {
    clip-path: inset(0 0 0 0 round 999px);
    background-size: 100% 100%, 110% auto;
    box-shadow: inset 0 0 0 1px rgba(231, 203, 143, 0.55);
}
.store-strip__link[aria-current="page"] { color: #FFFFFF; }
@media (hover: hover) and (pointer: fine) {
    .store-strip__link.has-peek:hover::before {
        clip-path: inset(0 0 0 0 round 999px);
        background-size: 100% 100%, 110% auto;
        transition: clip-path 300ms cubic-bezier(0.22, 1, 0.36, 1), background-size 600ms cubic-bezier(0.22, 1, 0.36, 1);
    }
    .store-strip__link.has-peek:hover { color: #FFFFFF; }
}
.store-strip__link:active::before { background-size: 100% 100%, 104% auto; }
/* Keyboard focus: the pill opens with a gold ring in its own shape (no square outline round the word). */
.store-strip__link.has-peek:focus-visible { outline: none; color: #FFFFFF; }
.store-strip__link.has-peek:focus-visible::before { clip-path: inset(0 0 0 0 round 999px); box-shadow: inset 0 0 0 2px var(--gold); }
@media (max-width: 1099px) {
    .store-strip .store-strip__inner { --pill-pad: 10px; --pill-gap: 2px; }
    .store-strip__link.has-peek::before { height: 28px; margin-top: -14px; }
}
@media (prefers-reduced-motion: reduce) {
    .store-strip__link.has-peek::before { transition: none; }
}

/* "Our Brands" in the bar. */
.brands-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background-color: transparent;
    font: inherit;
    font-size: 16px;
    color: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 160ms ease-out, transform 120ms ease-out;
}
.brands-toggle .ti { font-size: 16px; transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1); }
@media (hover: hover) and (pointer: fine) {
    .brands-toggle:hover { background-color: rgba(20, 20, 20, 0.06); }
    .brands-toggle:hover .ti { transform: translateY(2px); }
}
.brands-toggle[aria-expanded="true"] { background-color: rgba(20, 20, 20, 0.08); }
.brands-toggle[aria-expanded="true"] .ti { transform: rotate(180deg); }
.brands-toggle:active { transform: scale(0.97); }
.brands-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.header__inner { position: relative; }
.brands-panel {
    position: absolute;
    z-index: 3;
    top: calc(100% + 4px);
    left: 50%;
    width: min(960px, calc(100% - 32px));
    translate: -50% 0;
    padding: 24px;
    background: rgb(252, 252, 249);
    color: #1A1A18;
    border-radius: 24px;
    box-shadow: 0 24px 48px rgba(20, 16, 12, 0.12);
    max-height: calc(100dvh - var(--nav-h) - 32px);
    overflow: auto;
    overscroll-behavior: contain;
}
.brands-panel[hidden] { display: none; }
.brands-panel__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 16px; margin: 0; padding: 0; list-style: none; }
.brands-panel__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 12px;
    color: inherit;
    text-decoration: none;
    transition: background-color 160ms ease-out;
}
.brands-panel__thumb { flex: none; width: 48px; height: 60px; overflow: hidden; border-radius: 8px; background: #ECEBE6; }
.brands-panel__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1); }
.brands-panel__name { font-family: var(--font-title); font-size: 18px; line-height: 1.2; }
.brands-panel__item[aria-current="page"] { background-color: #F1F0EC; }
@media (hover: hover) and (pointer: fine) {
    .brands-panel__item:hover { background-color: #F1F0EC; }
    .brands-panel__item:hover .brands-panel__thumb img { transform: scale(1.03); }
}
.brands-panel__item:active { background-color: #E9E8E3; }
.brands-panel__item:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
@media (max-width: 1023px) { .brands-panel__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* The capsule: a plate replaces the header's own background, so the header box lets clicks through. */
.header-motion .header,
.header-motion .header--scrolled { background: transparent; border-bottom: 0; pointer-events: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.header-motion .store-strip,
.header-motion .header__brand,
.header-motion .header__nav a,
.header-motion .brands-toggle,
.header-motion .brands-panel,
.header-motion .header__tools { pointer-events: auto; }
.header-motion .store-strip { position: relative; z-index: 2; overflow: hidden; }
.header-motion .header__inner { z-index: 1; }
.header-plate {
    position: absolute;
    top: var(--strip-h);
    left: 0;
    right: 0;
    height: var(--nav-h);
    pointer-events: none;
    /* A hairline edge plus a deeper shadow: the capsule is nearly the page's own colour, so on light pages
       (bag, checkout, search) it needs both to read as a separate layer. */
    filter: drop-shadow(0 0 1px rgba(20, 16, 12, 0.5)) drop-shadow(0 10px 28px rgba(20, 16, 12, 0.2));
}
.header-plate__fill { display: block; height: 100%; background: rgb(252, 252, 249); }

/* Links in the bar (Shop, a brand's categories): the same soft pill as "Our Brands" on hover, no underline. */
.header__nav .header__link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    text-decoration: none !important;
    transition: background-color 160ms ease-out, transform 120ms ease-out;
}
.header__nav .header__link::after { display: none; }
@media (hover: hover) and (pointer: fine) {
    .header__nav .header__link:hover { background-color: rgba(20, 20, 20, 0.06); }
}
.header__nav .header__link--active,
.header__nav .header__link[aria-current="page"] { background-color: rgba(20, 20, 20, 0.08); }
.header__nav .header__link:active { transform: scale(0.97); }
.header__nav .header__link:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* In the shop (shop.<root>) every page's content starts on the header's own edge, so the logo, the page
   title and the product grid share one left line and one right line at every width. */
.on-shop main .container { max-width: none; padding-inline: var(--gutter); }
@media (min-width: 1025px) { .on-shop main .container { padding-inline: clamp(24px, 5vw, 80px); } }

/* Bag and empty states in the shop: sentence case, no tracked capitals. */
.on-shop .cart-header .muted { font-size: 16px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--text-secondary, #5C5A55); }
.on-shop .empty-state__actions .link,
.on-shop .cart-summary .link { font-size: 16px; letter-spacing: 0; text-transform: none; }

/* The main site's footer uses the header's edge too, so logo above and logo below share one left line. */
.footer--seraph.footer--hub { --f-gutter: var(--gutter); }
@media (min-width: 1025px) { .footer--seraph.footer--hub { --f-gutter: clamp(24px, 5vw, 80px); } }
@media (max-width: 560px) {
    .footer--seraph .footer__bottom { flex-direction: column; align-items: flex-start; text-align: left; }
}
/* Brand sites' footers: the same edge as their header. */
.footer--seraph:not(.footer--hub) { padding-inline: var(--gutter); }
@media (min-width: 1025px) { .footer--seraph:not(.footer--hub) { padding-inline: clamp(24px, 5vw, 80px); } }
