/* Shopping navigation stays available without changing the header's layout. */
:root {
    --lb-toolbar-offset: 0px;
    --lb-sticky-header-height: 150px;
}

body.admin-bar { --lb-toolbar-offset: 32px; }

/* Storefront's horizontal clipping must not create a separate scroll container. */
#page.site { overflow-x: clip; overflow-y: visible; }

html { scroll-padding-top: calc(var(--lb-toolbar-offset) + var(--lb-sticky-header-height) + 16px); }

#masthead.lb-site-header {
    position: sticky;
    top: var(--lb-toolbar-offset);
    z-index: 60;
    width: 100%;
    transition: box-shadow 220ms ease;
}

#masthead.lb-site-header.lb-header-is-scrolled { box-shadow: 0 10px 28px #29232c14; }

.lb-back-to-top {
    --lb-scroll-progress: 0%;
    position: fixed;
    right: max(1.25rem, env(safe-area-inset-right));
    bottom: max(1.25rem, env(safe-area-inset-bottom));
    z-index: 70;
    display: grid;
    width: 60px;
    min-width: 60px;
    height: 60px;
    min-height: 60px;
    place-items: center;
    margin: 0;
    padding: 3px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: conic-gradient(var(--lb-rose, #b87991) var(--lb-scroll-progress), #eadde5 0);
    box-shadow: 0 6px 24px #29232c24;
    cursor: pointer;
    animation: lb-top-appear 240ms ease-out backwards;
    transition: transform 220ms ease, box-shadow 220ms ease;
}

.lb-back-to-top[hidden] { display: none !important; }

.lb-back-to-top__face {
    display: flex;
    width: 100%;
    height: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    border: 2px solid var(--lb-paper, #f7f6f3);
    border-radius: inherit;
    background: var(--lb-accent, #70445d);
    transition: background 220ms ease;
}

.lb-back-to-top svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.lb-back-to-top__label { font-size: .55rem; font-weight: 600; letter-spacing: .035em; line-height: 1.2; }
.lb-back-to-top:hover { color: #fff; background: conic-gradient(var(--lb-rose, #b87991) var(--lb-scroll-progress), #eadde5 0); transform: translateY(-3px); box-shadow: 0 10px 28px #29232c2b; }
.lb-back-to-top:hover .lb-back-to-top__face { background: var(--lb-accent-hover, #543247); }
.lb-back-to-top:focus-visible { outline: 3px solid var(--lb-accent, #70445d); outline-offset: 4px; }

@keyframes lb-top-appear {
    from { opacity: 0; transform: translateY(12px) scale(.92); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 782px) {
    body.admin-bar { --lb-toolbar-offset: 46px; }
}

@media (max-width: 767px) {
    :root { --lb-sticky-header-height: 188px; }
    #masthead .lb-header-nav__inner { position: relative; }
    /* The open collection list scrolls independently instead of filling the screen. */
    .lb-mobile-navigation[open] > nav {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        z-index: 65;
        max-height: max(8rem, calc(100vh - var(--lb-toolbar-offset) - var(--lb-sticky-header-height) - 1rem));
        max-height: max(8rem, calc(100svh - var(--lb-toolbar-offset) - var(--lb-sticky-header-height) - 1rem));
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: .6rem var(--lb-gutter, 1.125rem) 1rem;
        border-bottom: 1px solid var(--lb-line, #e8dfe4);
        background: #fff;
        box-shadow: 0 12px 24px #29232c16;
    }
    .lb-back-to-top { right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); width: 54px; min-width: 54px; height: 54px; min-height: 54px; }
}

@media (prefers-reduced-motion: reduce) {
    #masthead.lb-site-header,
    .lb-back-to-top,
    .lb-back-to-top__face { animation: none; transition: none; }
    .lb-back-to-top:hover { transform: none; }
}
