/*
 * The storefront page head.
 *
 * One band, shared by every page that is not the home carousel: catalogue,
 * category, blog, article listings, CMS pages, cart, checkout, order tracking
 * and the account. It replaced .client-page-head, which was a bare white
 * heading — with a sticky header above it and a grid below, a page opened on
 * two indistinct white strips and read as a gap rather than a beginning.
 *
 * Separate file because it is neither catalogue nor article furniture and the
 * main stylesheet is being edited in parallel; the tokens come from
 * storefront.css.
 */

/*
 * The picture is anchored to its right edge because that is where its subject
 * is — bottles and petals on the right, empty pale silk on the left — so the
 * heading sits on the quiet half at every width instead of over the products.
 *
 * Two layers, in paint order: a white-to-transparent wash that keeps the text
 * legible where it actually sits, then the photograph. The wash carries the
 * fallback colour too, so nothing reads as broken while the image loads.
 *
 * The image is a custom property rather than a literal, so a section can be
 * given its own without restating the wash, the positions or the sizes:
 *
 *     .client-masthead--blog { --client-masthead-image: url("…"); }
 */
.client-masthead {
    --client-masthead-image: url("../images/promo/iaso-featured-skin-ritual.png");
    position: relative;
    overflow: hidden;
    background-color: var(--client-soft);
    background-image:
        linear-gradient(100deg,
            rgba(255, 255, 255, .94) 0%,
            rgba(255, 255, 255, .86) 30%,
            rgba(255, 255, 255, .45) 52%,
            rgba(255, 255, 255, 0) 72%),
        var(--client-masthead-image);
    background-position: center center, right center;
    background-size: cover, cover;
    background-repeat: no-repeat, no-repeat;
}

/* padding-block only: the side gutter belongs to .client-shell, and a padding
   shorthand here would reset it and shift the whole head 20px left of the
   header. See StorefrontGutterTest. */
.client-masthead__inner { position: relative; padding-block: 14px 26px; }

/* The trail lives inside the head, which supplies the space above it. */
.client-masthead .client-breadcrumbs--bare { padding: 0 0 14px; }

/*
 * Text, stats and shelf stay on the picture's left half, where the silk is
 * plain. Let them run the full width and the last pills of a row land on the
 * serum bottle — legible through their own backdrop, but reading as clutter
 * over the one part of the photograph worth showing.
 */
@media (min-width: 1025px) {
    .client-masthead__body { max-width: 66%; }
}

.client-masthead__eyebrow {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--client-accent);
}

.client-masthead h1 { font-size: 32px; margin: 0 0 8px; letter-spacing: -.01em; }

/*
 * The lead is styled by position, not by a class the caller has to remember:
 * every page head is a heading and a sentence about it, and asking eleven
 * templates to name that sentence is eleven chances to forget. The eyebrow is
 * the one paragraph that is not the lead.
 */
.client-masthead__body > p:not(.client-masthead__eyebrow),
.client-masthead__body > .client-rte {
    margin: 0;
    max-width: 640px;
    color: var(--client-muted);
}

.client-masthead__body > .client-rte > p:last-child { margin-bottom: 0; }

.client-masthead__stats {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 0;
    padding: 0;
}

.client-masthead__stats li {
    font-size: 13px;
    color: var(--client-muted);
    background: rgba(255, 255, 255, .82);
    border: 1px solid var(--client-line);
    border-radius: 999px;
    padding: 5px 13px;
    /* Over a photograph a flat white pill looks pasted on; a blurred, slightly
       translucent one belongs to the surface behind it. */
    backdrop-filter: blur(6px);
}

.client-masthead__stats strong { color: var(--client-ink); }

/* Shelf ------------------------------------------------------------------ */

/*
 * A strip of shortcuts under the lead — the catalogue's stocked categories,
 * and whatever the next page wants there.
 *
 * Wrapped on a wide screen and scrolled sideways on a narrow one, because the
 * two read differently: a pill cut off mid-word inside a 1200px shell looks
 * like a rendering fault, while the same row cut off at the edge of a phone
 * screen is understood as something to swipe. The scrollbar stays hidden — a
 * permanent gutter under one row of pills reads as a defect of its own.
 */
.client-masthead__shelf {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
    padding-bottom: 2px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.client-masthead__shelf::-webkit-scrollbar { width: 0; height: 0; }

.client-masthead__shelf-item {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border: 1px solid var(--client-line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(6px);
    font-size: 14px;
    font-weight: 600;
    color: var(--client-ink);
    text-decoration: none;
    transition: border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.client-masthead__shelf-item:hover {
    border-color: var(--client-accent);
    background: var(--client-surface);
    color: var(--client-accent);
    box-shadow: var(--client-shadow-sm);
}

.client-masthead__shelf-count {
    font-size: 11px;
    font-weight: 700;
    color: var(--client-muted);
    background: var(--client-soft);
    border-radius: 999px;
    padding: 1px 7px;
}

/* Responsive ------------------------------------------------------------- */

@media (max-width: 1024px) {
    .client-masthead h1 { font-size: 26px; }
    .client-masthead__inner { padding-block: 12px 22px; }
    .client-masthead__shelf { flex-wrap: nowrap; }
}

@media (max-width: 560px) {
    .client-masthead h1 { font-size: 23px; }

    /* On a phone the shell is barely wider than the wash, so the photograph
       would sit under the text rather than beside it. Whitened harder, it stays
       a backdrop. */
    .client-masthead {
        background-image:
            linear-gradient(180deg,
                rgba(255, 255, 255, .95) 0%,
                rgba(255, 255, 255, .88) 60%,
                rgba(255, 255, 255, .78) 100%),
            var(--client-masthead-image);
    }

    /* Edge to edge, so the row reads as scrollable rather than as a list that
       happens to be clipped. */
    .client-masthead__shelf {
        margin-inline: -20px;
        padding-inline: 20px;
    }
}
