/*
 * Header and mobile menu (2026-11), loaded after css/main.min.css (inc/jm-menu.php).
 * main.min.css is built from css/main.less, but css/menu.less no longer matches it, so these rules live here.
 *
 * 1. Hamburger as a button with a 44px tap target, visible focus.
 * 2. Desktop row only from 1200px; 945-1199px keep the hamburger (7 items + SHOP did not fit and wrapped).
 * 3. Mobile menu: light, wordmark, Open Sans like the desktop row, left-aligned rows of 52px.
 */

/* ---------------------------------------------------------------------------
 * 1. Hamburger
 * ------------------------------------------------------------------------ */

header.main-menu .jm-menu-toggler {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    margin: 0 0 0 -8px; /* icon stays where the old link had it */
    padding: 0 8px;
    background: none;
    border: 0;
    border-radius: 6px;
    color: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

header.main-menu .jm-menu-toggler img {
    display: block;
    width: 27px;
    height: 18px;
}

header.main-menu a:focus-visible,
header.main-menu button:focus-visible,
.jm-mnav a:focus-visible,
.jm-mnav button:focus-visible {
    outline: 2px solid #191919;
    outline-offset: 2px;
}

/* ---------------------------------------------------------------------------
 * 2. Header layout
 * ------------------------------------------------------------------------ */

/* 945-1199px: hamburger | wordmark | SHOP + icons, as on phones */
@media only screen and (min-width: 945px) and (max-width: 1199.98px) {
    header.main-menu .inner {
        grid-template-columns: minmax(0, 1fr) max-content minmax(0, 1fr);
        grid-template-areas: none;
        grid-column-gap: 24px;
        padding: 0 36px;
    }

    header.main-menu .inner .left,
    header.main-menu .inner .right {
        grid-area: auto;
    }

    header.main-menu .inner .right {
        justify-content: end;
        align-items: center;
    }

    header.main-menu .inner .left .desktop {
        display: none;
    }

    header.main-menu .inner .left .mobile {
        display: block;
    }

    .menu-flight-in.jm-mnav {
        display: flex;
    }
}

/* from 1200px: wordmark | 7 items in one row | SHOP + icons. Measured: the items need 572px at 15px,
 * 610px at 16px; the gaps shrink with the window so the row fits from 1200px on */
@media only screen and (min-width: 1200px) {
    header.main-menu .inner {
        grid-template-columns: max-content minmax(0, 1fr) max-content;
        grid-column-gap: clamp(24px, 5vw - 36px, 64px);
        padding: 0 clamp(24px, 4vw - 24px, 57px);
    }

    header.main-menu .inner .left .menu {
        flex-wrap: nowrap;
        column-gap: clamp(18px, 4.5vw - 32px, 56px);
    }

    header.main-menu .inner .menu li a {
        font-size: 15px;
    }

    header.main-menu .inner .center img {
        height: 18px;
    }

    header.main-menu .inner .right .header-shop-button {
        margin-right: 20px;
    }

    header.main-menu .inner .right .header-shop-button a {
        padding: 12px 24px;
        font-size: 15px;
    }

    header.main-menu .inner .right .mobile-icons a {
        margin-left: 12px;
    }

    header.main-menu .inner .right .mobile-icons a:first-of-type {
        margin-left: 0;
    }
}

/* from 1440px: sizes as before (16px items, 21px wordmark, wide SHOP button) */
@media only screen and (min-width: 1440px) {
    header.main-menu .inner .menu li a {
        font-size: 16px;
    }

    header.main-menu .inner .center img {
        height: 21px;
    }

    header.main-menu .inner .right .header-shop-button {
        margin-right: 36px;
    }

    header.main-menu .inner .right .header-shop-button a {
        padding: 14px 51px;
        font-size: 16px;
    }

    header.main-menu .inner .right .mobile-icons a {
        margin-left: 15px;
    }
}

/* ---------------------------------------------------------------------------
 * 3. Mobile menu
 * position, slide-in and z-index come from .menu-flight-in in main.min.css
 * ------------------------------------------------------------------------ */

.jm-mnav {
    display: flex;
    flex-direction: column;
    visibility: hidden; /* off-screen links are not reachable with Tab */
    color: #191919;
    font-family: "Open Sans", sans-serif;
    overscroll-behavior: contain;
    transition: left 200ms ease-in-out, visibility 0s linear 200ms;
}

.jm-mnav.active {
    visibility: visible;
    transition: left 200ms ease-in-out, visibility 0s;
}

@media only screen and (min-width: 1200px) {
    .menu-flight-in.jm-mnav,
    .jm-mnav-backdrop {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .jm-mnav,
    .jm-mnav.active,
    .jm-mnav-backdrop {
        transition: none;
    }
}

/* from 600px a panel next to a dimmed page instead of full screen */
.jm-mnav-backdrop {
    display: none;
}

@media only screen and (min-width: 600px) and (max-width: 1199.98px) {
    .jm-mnav {
        width: 420px;
        max-width: 100%;
    }

    .jm-mnav.active {
        box-shadow: 0 0 32px rgba(25, 25, 25, .2);
    }

    .jm-mnav-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 149; /* menu: 150, header: 100 */
        background: rgba(25, 25, 25, .45);
        opacity: 0;
        visibility: hidden;
        transition: opacity 200ms ease-in-out, visibility 0s linear 200ms;
    }

    .jm-mnav.active + .jm-mnav-backdrop {
        opacity: 1;
        visibility: visible;
        transition: opacity 200ms ease-in-out, visibility 0s;
    }
}

/* bar: same height, close button where the hamburger was, wordmark as in the header */
.jm-mnav__bar {
    position: sticky;
    top: 0;
    z-index: 1;
    flex: none;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    height: 60px;
    padding: 0 28px;
    background: #edebe8;
    border-bottom: 1px solid #191919;
}

@media only screen and (min-width: 834px) {
    .jm-mnav__bar {
        height: 90px;
    }
}

.jm-mnav__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.jm-mnav__close img {
    display: block;
    width: 18px;
    height: 18px;
}

.jm-mnav__logo {
    display: block;
    justify-self: center;
    padding: 8px 0;
}

.jm-mnav__logo img {
    display: block;
    width: auto;
    height: 15px;
}

@media only screen and (min-width: 945px) {
    .jm-mnav__logo img {
        height: 21px;
    }
}

.jm-mnav__body {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    padding: 24px 0 16px;
}

/* shop button: the desktop SHOP button, full width */
.jm-mnav__shop {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    margin: 0 36px 12px;
    padding: 12px 24px;
    background: #b3aba1;
    border-radius: 6px;
    color: #191919;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    transition: background-color 150ms ease-in-out;
}

.jm-mnav__shop:hover {
    background: #a59c91;
}

/* items: typeface and caps of the desktop row, left-aligned */
.jm-mnav__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.jm-mnav__list li {
    margin: 0 36px;
    padding: 0;
    list-style: none;
    border-bottom: 1px solid #d2cdc6;
}

.jm-mnav__list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 52px;
    margin: 0 -36px; /* tap area across the whole width, lines stay indented */
    padding: 6px 40px 6px 36px;
    color: #191919;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.3;
    letter-spacing: .02em;
    text-decoration: none;
    text-transform: uppercase;
    -webkit-tap-highlight-color: transparent;
}

.jm-mnav__list a::after {
    content: "";
    flex: none;
    width: 7px;
    height: 7px;
    border-top: 2px solid #8a837a;
    border-right: 2px solid #8a837a;
    transform: rotate(45deg);
}

.jm-mnav__list .menu-item-external > a::after { /* arrow up-right: leaves the site */
    width: 12px;
    height: 12px;
    border: 0;
    transform: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%238a837a' stroke-width='2'%3E%3Cpath d='M2.5 9.5l7-7M4 2.5h5.5V8'/%3E%3C/svg%3E") no-repeat center / contain;
}

.jm-mnav__list a:hover,
.jm-mnav__list a:active {
    background: rgba(25, 25, 25, .05);
}

.jm-mnav__list .current-menu-item > a,
.jm-mnav__list .current-menu-ancestor > a,
.jm-mnav__list .current-page-ancestor > a {
    box-shadow: inset 4px 0 0 #191919;
}

.jm-mnav__list .sub-menu {
    margin: 0 0 8px;
    padding: 0 0 0 16px;
}

.jm-mnav__list .sub-menu li {
    border-bottom: 0;
}

.jm-mnav__list .sub-menu a {
    min-height: 44px;
    font-weight: 500;
}

/* Hot in den Socials: two small tiles */
.jm-mnav__hot {
    margin: 28px 36px 0;
}

.jm-mnav__heading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    color: #191919;
    font-family: "Open Sans", sans-serif;
    font-weight: 700;
    font-size: 13px;
    line-height: 1.3;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.jm-mnav__fire {
    width: 11px;
    height: auto;
    filter: brightness(0); /* the white flame, dark */
}

.jm-mnav__hot-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.jm-mnav__hot-item {
    min-width: 0;
}

.jm-mnav__hot-link {
    display: block;
    color: #191919;
    text-decoration: none;
}

.jm-mnav__hot-img {
    position: relative;
    display: block;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border-radius: 8px;
    background: #d2cdc6;
}

.jm-mnav__hot-img picture,
.jm-mnav__hot-img img.woo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.jm-mnav__likes {
    position: absolute;
    top: 6px;
    right: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 20px;
    background: rgba(25, 25, 25, .6);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 16px;
}

.jm-mnav__likes img {
    width: 11px;
    height: auto;
}

.jm-mnav__hot-title {
    display: -webkit-box;
    margin-top: 8px;
    overflow: hidden;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.3;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.jm-mnav__hot-link:hover .jm-mnav__hot-title {
    text-decoration: underline;
}

.jm-mnav__hot-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    color: #5f5a54;
    font-size: 11px;
    line-height: 14px;
}

.jm-mnav__hot-rating .global-star-ratings {
    justify-content: flex-start;
    cursor: default;
}

.jm-mnav__hot-rating .global-star-ratings .back-stars .small-star {
    width: 11px;
    margin: 0 1px 0 0;
}

/* socials and legal links, small at the bottom */
.jm-mnav__foot {
    margin: auto 36px 0;
    padding-top: 28px;
}

.jm-mnav__social,
.jm-mnav__legal {
    display: flex;
    flex-wrap: wrap;
    column-gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.jm-mnav__social {
    padding-top: 4px;
    border-top: 1px solid #d2cdc6;
}

.jm-mnav__social li,
.jm-mnav__legal li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.jm-mnav__social a,
.jm-mnav__legal a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    text-decoration: none;
    text-transform: uppercase;
}

.jm-mnav__social a {
    color: #191919;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: .08em;
}

.jm-mnav__legal a {
    color: #5f5a54;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: .06em;
}

.jm-mnav__social a:hover,
.jm-mnav__legal a:hover {
    text-decoration: underline;
}
