﻿/* ==========================================================================
   Grid-struktur för raden med hamburgare / logga / nav / actions
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow-anchor: none;
}

.header-main {
    background: var(--header-bg);
}

.header-main__inner {
    max-width: var(--header-max-width);
    margin: 0 auto;
    padding: 0 var(--header-side-padding);
    min-height: var(--header-height);
    transition: min-height 220ms ease;
    display: grid;
    align-items: stretch;
    gap: 24px;
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas: "logo nav actions";
}

.site-header.is-scrolled .header-main__inner {
    min-height: 64px;
}

@media (max-width: 768px) {
    .site-header.is-scrolled .header-main__inner {
        min-height: 56px;
    }
}

.header-icon-btn.menu-toggle {
    display: none;
}

.menu-toggle {
    grid-area: hamburger;
    align-self: center;
}

.site-logo {
    grid-area: logo;
    justify-self: start;
    align-self: center;
}

.site-nav {
    grid-area: nav;
    justify-self: center;
}

.header-actions {
    grid-area: actions;
    justify-self: end;
    align-self: center;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Mobilanpassning: logga vänster, sök/konto/varukorg i mitten-höger,
   hamburgare längst ut i högra hörnet */
@media (max-width: 768px) {
    .header-main__inner {
        min-height: var(--header-height-mobile);
        grid-template-columns: 1fr auto auto;
        grid-template-areas: "logo actions hamburger";
    }

    .header-icon-btn.menu-toggle {
        display: inline-flex;
    }

    .site-logo {
        justify-self: start;
    }
}
