/* ==========================================================================
   InSono — header + mobile menu
   Ported from assets/custom.css (sticky-header.header-wrapper block)
   Shopify selectors were rewritten onto semantic .site-header classes.
   ========================================================================== */

.site-header {
    position: sticky;
    z-index: 1000;
    top: 0;
    padding: 20px 0;
    border-bottom: 1px solid rgba(30, 33, 29, 0.06);
    background: rgba(247, 244, 239, 0.82);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    transition: box-shadow 0.3s ease, background 0.3s ease;
}

.site-header.is-hidden {
    /* Shopify sticky header stays visible — do not hide on scroll */
    transform: none;
}

.site-header__inner {
    /* Width comes from .page-width (shared rail with PDP / collections) */
    display: grid;
    grid-template-areas: "burger logo actions";
    grid-template-columns: auto 1fr auto;
    align-items: center;
    column-gap: 0.4rem;
}

@media screen and (min-width: 990px) {
    .site-header__inner {
        grid-template-areas: "logo navigation actions";
        grid-template-columns: auto 1fr auto;
        column-gap: 3.2rem; /* Shopify custom.css */
    }
}

/* ---- Logo --------------------------------------------------------------- */

.site-header__logo {
    display: flex;
    grid-area: logo;
    align-items: center;
    justify-content: center;
    /* Hit-area = logo only; middle grid column stays 1fr for layout */
    justify-self: center;
    width: fit-content;
    max-width: 100%;
    color: var(--accent);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.site-header__logo img {
    width: 100px; /* Shopify settings.logo_width */
    height: auto;
    max-width: 100px;
    max-height: 48px;
    object-fit: contain;
    pointer-events: none;
}

@media screen and (min-width: 990px) {
    .site-header__logo {
        justify-content: flex-start;
        justify-self: start;
    }
}

/* ---- Burger (mobile/tablet only) ---------------------------------------- */

.site-header__burger {
    display: grid;
    grid-area: burger;
    width: 44px;
    height: 44px;
    margin-left: -0.4rem;
    place-items: center;
    color: var(--text);
}

.site-header__burger svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

@media screen and (min-width: 990px) {
    .site-header__burger {
        display: none;
    }
}

/* ---- Desktop-Navigation ------------------------------------------------- */

.site-header__navigation {
    display: none;
    grid-area: navigation;
    align-self: stretch;
    margin: -20px 0 -20px 2.4rem; /* Shopify: 2.4rem */
}

@media screen and (min-width: 990px) {
    .site-header__navigation {
        display: flex;
        align-items: stretch;
    }
}

.site-header__menu {
    display: flex;
    align-items: stretch;
    gap: 0;
    height: 100%;
}

.site-header__menu > li {
    position: relative;
    display: flex;
    align-items: stretch;
}

.site-header__menu-item {
    position: relative;
    display: inline-flex;
    height: 100%;
    align-items: center;
    gap: 0.3rem;
    padding: 0 0.95rem;
    color: rgba(30, 33, 29, 0.88);
    font-size: 14.25px;
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: color 0.25s ease;
}

/* The underline stays text width, the hover area is the whole menu item */
.site-header__menu-item > span {
    position: relative;
    display: inline-block;
}

.site-header__menu-item > span::after {
    content: "";
    position: absolute;
    bottom: -0.4rem;
    left: 0;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--header-accent) 0%, var(--header-warm) 100%);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.4s var(--ease-out);
}

.site-header__menu-item:hover,
.site-header__menu-item[aria-expanded="true"],
.site-header__menu-item.is-active {
    color: var(--text);
}

.site-header__menu-item:hover > span::after,
.site-header__menu-item[aria-expanded="true"] > span::after,
.site-header__menu-item.is-active > span::after {
    transform: scaleX(1);
}

.site-header__caret {
    width: 1rem; /* Shopify icon-caret */
    height: 1rem;
    flex-shrink: 0;
    margin-left: 0.1rem;
    opacity: 0.6;
    color: rgba(30, 33, 29, 0.88);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.site-header__menu-item:hover .site-header__caret,
.site-header__menu-item[aria-expanded="true"] .site-header__caret {
    opacity: 0.85;
}

.site-header__menu-item[aria-expanded="true"] .site-header__caret {
    transform: rotate(180deg);
}

/* ---- Dropdown ----------------------------------------------------------- */

.site-header__submenu {
    position: absolute;
    z-index: 20;
    top: calc(50% + 1.75rem);
    left: 0;
    display: none;
    min-width: 240px;
    padding: 0.6rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.site-header__menu-item[aria-expanded="true"] + .site-header__submenu,
.site-header__submenu:hover {
    display: block;
}

.site-header__submenu a {
    display: block;
    padding: 0.65rem 0.9rem 0.65rem 1rem;
    border-left: 2px solid transparent;
    border-radius: 0.4rem;
    font-size: 13px;
    font-weight: 600;
    color: rgb(30, 33, 29);
    transition: color 0.2s ease, border-color 0.25s ease, background-color 0.2s ease, padding-left 0.25s ease;
}

/* Hover is a neutral cue — never the same green as the current page. */
.site-header__submenu a:hover {
    background: rgba(30, 33, 29, 0.05);
    color: rgb(30, 33, 29);
}

/* Only the current collection gets the accent bar + color. */
.site-header__submenu a.is-active,
.site-header__submenu a.is-active:hover {
    padding-left: 1.2rem;
    border-left-color: var(--header-accent);
    background: var(--header-accent-soft);
    color: var(--header-accent);
}

/* ---- Right hand side: trust badges + icons ------------------------------ */

.site-header__actions {
    display: flex;
    grid-area: actions;
    align-items: center;
    justify-self: end;
    margin-left: 6px;
}

.site-header__trust {
    display: none;
    align-items: center;
}

@media screen and (min-width: 1025px) {
    .site-header__trust {
        display: flex;
    }
}

@media screen and (max-width: 1024px) {
    .site-header__trust {
        display: none; /* Shopify custom.css */
    }
}

@media screen and (max-width: 1093px) and (min-width: 1025px) {
    .site-header__inner {
        column-gap: 0;
    }

    .site-header__navigation {
        margin-left: 2rem;
    }
}

@media screen and (max-width: 1024px) and (min-width: 990px) {
    .site-header__navigation {
        margin-left: 3rem;
    }
}

.trust-badge {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 18px;
    color: var(--text);
    white-space: nowrap;
}

.site-header__trust .trust-badge:first-child {
    padding-left: 0;
}

.trust-badge + .trust-badge::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 1px;
    height: 30px;
    background: var(--line);
    transform: translateY(-50%);
}

.trust-badge__icon {
    display: inline-flex;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    color: var(--header-accent);
}

.trust-badge__icon svg {
    width: 24px;
    height: 24px;
    /* Stroke comes from SVG attributes (Shopify header.liquid) */
    display: block;
}

.trust-badge__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.2;
}

.trust-badge__text strong {
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.trust-badge__text span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
}

/* The divider hangs off the trust block so .site-header__icons does not become a
   positioning context for the search modal. */
.site-header__trust:has(+ .site-header__icons) {
    position: relative;
}

.site-header__trust:has(+ .site-header__icons)::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 0;
    width: 1px;
    height: 30px;
    background: var(--line);
    transform: translateY(-50%);
}

/* ---- Icon-Leiste -------------------------------------------------------- */

.site-header__icons {
    display: flex;
    align-items: center;
    gap: 2px;
    padding-left: 8px;
}

.site-header__icon {
    position: relative;
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    color: var(--text);
    opacity: 0.88;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.site-header__icon:hover {
    color: var(--header-accent);
    opacity: 1;
}

.site-header__icon svg {
    width: 2.4rem; /* Shopify .header__icon .icon */
    height: 2.4rem;
    /* Stroke from SVG attrs (icon-search/account/cart.svg) */
    display: block;
}

.site-header__icon--cart {
    margin-right: -1.2rem;
}

@media screen and (max-width: 989px) {
    .site-header__icon--cart {
        margin-right: -0.8rem;
    }
}

.cart-count-bubble {
    position: absolute;
    top: 2px;
    right: 2px;
    display: grid;
    min-width: 18px;
    height: 18px;
    place-items: center;
    padding: 0 4px;
    border-radius: var(--radius-pill);
    background: var(--header-warm);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}

/* ---- Search in the header ----------------------------------------------- */

.site-header__search {
    position: relative;
}

.header-search {
    position: fixed;
    z-index: 1100;
    inset: 0;
    display: none;
    padding-top: 15vh;
    background: rgba(30, 33, 29, 0.4);
}

.header-search.is-open {
    display: block;
}

.header-search__panel {
    width: min(680px, calc(100% - 32px));
    margin-inline: auto;
    padding: 20px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.header-search__form {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-pill);
}

.header-search__input {
    flex: 1;
    height: 52px;
    border: 0;
    background: transparent;
    font-size: 16px;
}

.header-search__input:focus {
    outline: none;
}

.header-search__results {
    display: grid;
    gap: 4px;
    margin-top: 14px;
    max-height: 50vh;
    overflow-y: auto;
}

.header-search__result {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.header-search__result:hover {
    background: rgba(30, 33, 29, 0.04);
}

.header-search__result img {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-xs);
    object-fit: cover;
}

.header-search__result-title {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.header-search__result-price {
    color: var(--muted);
    font-size: 13px;
}

/* ---- Tablet / Mobil ----------------------------------------------------- */

@media screen and (max-width: 989px) {
    .site-header {
        padding: 10px 0;
        background: rgba(247, 244, 239, 0.9);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
    }

    .site-header__actions {
        margin-left: 0;
    }

    .site-header__icons {
        padding-left: 0;
    }
}

/* ==========================================================================
   Mobile/Tablet Drawer (< 990px)
   1:1 Shopify menu-drawer (custom.css + component-menu-drawer.css)
   ========================================================================== */

.mobile-menu {
    position: fixed;
    z-index: 999;
    top: var(--header-height);
    left: 0;
    width: min(100%, 22rem);
    height: calc(100vh - var(--header-height));
    max-height: none;
    border: none;
    border-right: 1px solid rgba(30, 33, 29, 0.08);
    border-radius: 0;
    background: var(--surface);
    filter: drop-shadow(8px 0 28px rgba(45, 39, 31, 0.1));
    overflow-x: hidden;
    overflow-y: hidden;
    transform: translateX(-100%);
    transition: transform 300ms var(--ease-out);
}

.mobile-menu.is-open {
    transform: translateX(0);
}

@media screen and (min-width: 990px) {
    .mobile-menu,
    .mobile-menu__overlay {
        display: none !important;
    }
}

.mobile-menu__overlay {
    position: fixed;
    z-index: 998;
    inset: 0;
    background: rgba(30, 33, 29, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 300ms var(--ease-out);
}

.mobile-menu__overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu__inner {
    position: relative;
    height: 100%;
}

.mobile-menu__navigation-container {
    display: grid;
    grid-template-rows: 1fr auto;
    align-content: space-between;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

.mobile-menu__navigation {
    padding: 2.4rem 0 1.2rem;
}

.mobile-menu__group {
    position: static;
}

.mobile-menu__item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-inline: 0;
    padding: 1.1rem 3rem;
    border-radius: 0;
    background: none;
    color: var(--text);
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    list-style: none;
}

.mobile-menu__item::-webkit-details-marker {
    display: none;
}

.mobile-menu__group > summary.mobile-menu__item {
    padding-right: 5.2rem;
}

.mobile-menu__item:hover,
.mobile-menu__item:focus {
    background: rgba(30, 33, 29, 0.04);
    color: rgb(30, 33, 29);
}

.mobile-menu__item.is-active,
.mobile-menu__item.is-active:hover,
.mobile-menu__item.is-active:focus {
    box-shadow: inset 3px 0 0 var(--header-accent);
    background: rgba(111, 143, 114, 0.1);
    color: var(--header-accent);
}

.mobile-menu__item > .svg-wrapper {
    position: absolute;
    top: 50%;
    right: 3rem;
    display: inline-flex;
    width: 15px;
    height: 15px;
    align-items: center;
    justify-content: center;
    color: inherit;
    transform: translateY(-50%);
}

.mobile-menu__item > .svg-wrapper > svg {
    width: 100%;
    height: 100%;
}

/* Slide-over submenu (Dawn) */
.mobile-menu__submenu {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    background: var(--surface);
    visibility: hidden;
    transform: translateX(100%);
    transition: transform 300ms var(--ease-out), visibility 300ms var(--ease-out);
}

.mobile-menu__group[open] > .mobile-menu__submenu {
    visibility: visible;
    transform: translateX(0);
}

.mobile-menu__inner-submenu {
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    padding-bottom: 2rem;
}

.mobile-menu__close-button {
    display: flex;
    align-items: center;
    width: 100%;
    margin-top: 1.5rem;
    padding: 1.2rem 2.6rem 1.2rem 3rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--text);
    font-family: inherit;
    font-size: 1.4rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.mobile-menu__close-button:hover {
    background: rgba(30, 33, 29, 0.04);
    color: var(--header-accent);
}

.mobile-menu__close-button .svg-wrapper {
    display: inline-flex;
    width: 15px;
    height: 15px;
    margin-right: 1rem;
    transform: rotate(180deg);
}

.mobile-menu__close-button .svg-wrapper > svg {
    width: 100%;
    height: 100%;
}

/* Utility: trust + account — pinned to bottom on mobile & tablet */
.mobile-menu__utility {
    margin: 0;
    padding: 2rem 3rem;
    border: none;
    border-top: 1px solid rgba(30, 33, 29, 0.06);
    border-radius: 0;
    background: rgba(30, 33, 29, 0.03);
}

.mobile-menu__trust {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-bottom: 1.2rem;
}

.mobile-menu__trust-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0;
    border-radius: 0;
    background: none;
}

.mobile-menu__trust-icon {
    display: inline-flex;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    color: var(--header-accent);
}

.mobile-menu__trust-icon svg {
    width: 22px;
    height: 22px;
}

.mobile-menu__trust-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.2;
}

.mobile-menu__trust-text strong {
    color: var(--text);
    font-size: 1.4rem;
    font-weight: 700;
}

.mobile-menu__trust-text span {
    color: var(--muted);
    font-size: 1.2rem;
    font-weight: 500;
}

.mobile-menu__account {
    display: inline-flex;
    align-items: center;
    margin: 0.2rem 0 0;
    padding: 0.6rem 0;
    border-top: none;
    color: var(--text);
    font-size: 1.4rem;
    font-weight: 600;
    text-decoration: none;
}

.mobile-menu__account .svg-wrapper {
    display: inline-flex;
    width: 2rem;
    height: 2rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.mobile-menu__account .svg-wrapper > svg {
    width: 100%;
    height: 100%;
}
