:root {
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-2: #f7f7f7;
    --text: #111111;
    --text-soft: #666666;
    --line: #e8e8e8;
    --primary: #111111;
    --primary-contrast: #ffffff;
    --accent: #111111;
    --accent-soft: #f3f3f3;
    --success: #198754;
    --danger: #dc3545;
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 12px;
}

/* =========================
   BASE
========================= */

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: var(--bg);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

main {
    position: relative;
    z-index: 1;
    min-height: 400px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* =========================
   HEADER Z-INDEX ORDER
   Modal yokken:
   Language > Account > Header Top > Header Main > Mega
========================= */

header.hdr,
header.hdr.hdr-manamo,
.hdr,
.hdr-manamo {
    position: relative;
    z-index: 300000;
    overflow: visible;
    isolation: isolate;
}

.hdr-top {
    position: relative;
    z-index: 330000;
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
    overflow: visible;
}

.hdr-main {
    position: relative;
    z-index: 320000;
    min-height: 82px;
    display: flex;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    overflow: visible;
}

.mega-nav {
    position: relative;
    z-index: 310000;
    background: #fff;
    border-bottom: 1px solid #ececec;
    overflow: visible;
}

    .hdr .container,
    .hdr .container-fluid,
    .hdr-top .container,
    .hdr-top .container-fluid,
    .hdr-main .container,
    .hdr-main .container-fluid,
    .mega-nav .container,
    .mega-nav .container-fluid {
        position: relative;
        width: 100%;
        max-width: 100%;
        padding-left: 24px;
        padding-right: 24px;
        overflow: visible;
    }

/* =========================
   HEADER TOP
========================= */

.hdr-top-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 42px;
    width: 100%;
    flex-wrap: wrap;
    overflow: visible;
}

.hdr-top-left,
.hdr-top-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    overflow: visible;
}

.hdr-top-left {
    flex: 1 1 auto;
    min-width: 220px;
}

.hdr-top-right {
    position: relative;
    z-index: 331000;
    justify-content: flex-end;
    flex: 0 1 auto;
    gap: 12px;
}

.hdr-promo {
    font-weight: 700;
    letter-spacing: .01em;
    line-height: 1.35;
}

.hdr-links {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

    .hdr-links a {
        opacity: .92;
        white-space: nowrap;
    }

        .hdr-links a:hover {
            opacity: 1;
        }

/* =========================
   HEADER MAIN
========================= */

.hdr-main-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 82px;
    width: 100%;
    flex-wrap: nowrap;
    overflow: visible;
}

.hdr-main-left,
.hdr-main-center,
.hdr-main-right {
    display: flex;
    align-items: center;
    min-width: 0;
    overflow: visible;
}

.hdr-main-left {
    flex: 0 0 auto;
    gap: 14px;
}

.hdr-main-center {
    flex: 1 1 auto;
    min-width: 280px;
}

.hdr-main-right {
    position: relative;
    z-index: 321000;
    flex: 0 0 auto;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: nowrap;
}

.hdr-logo {
    display: inline-flex;
    align-items: center;
    color: inherit;
    flex: 0 0 auto;
}

    .hdr-logo img {
        height: 42px;
        width: auto;
        object-fit: contain;
    }

.hdr-logo-text {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.hdr-search {
    display: flex;
    gap: 10px;
    width: 100%;
    min-width: 0;
}

    .hdr-search input {
        flex: 1 1 auto;
        min-width: 0;
        height: 44px;
        padding: 0 14px;
        border: 1px solid #dcdcdc;
        border-radius: 12px;
        outline: none;
    }

    .hdr-search button {
        flex: 0 0 auto;
        height: 44px;
        padding: 0 18px;
        border: 0;
        border-radius: 12px;
        cursor: pointer;
        white-space: nowrap;
    }

.hdr-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    flex-wrap: wrap;
}

/* =========================
   SOCIAL
========================= */

.hdr-socials {
    display: flex;
    align-items: center;
    gap: 10px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: #fff;
    font-size: 16px;
    opacity: .9;
    transition: all .2s ease;
}

    .social-btn i {
        font-size: 16px;
        line-height: 1;
    }

    .social-btn:hover {
        opacity: 1;
        transform: translateY(-1px);
    }

/* =========================
   CART
========================= */

.hdr-cart {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--text);
    white-space: nowrap;
    transition: all .2s ease;
}

    .hdr-cart:hover {
        border-color: var(--accent);
        background: var(--accent-soft);
    }

.hdr-cart-icon {
    font-size: 16px;
    line-height: 1;
}

.hdr-cart-text {
    font-weight: 500;
    line-height: 1;
}

.hdr-cart-count {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* =========================
   LANGUAGE DROPDOWN
========================= */

.lang-dd {
    position: relative;
    display: inline-block;
    z-index: 340000;
    overflow: visible;
}

    .lang-dd.open {
        z-index: 349900;
    }

.lang-dd-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    max-width: min(220px, calc(100vw - 24px));
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--text);
    cursor: pointer;
    white-space: nowrap;
}

.lang-dd-name,
.lang-dd-item-name {
    display: inline-block;
    min-width: 0;
    color: var(--text);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lang-dd-caret {
    flex: 0 0 auto;
    font-size: 12px;
    line-height: 1;
}

.lang-dd-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    z-index: 349999;
    display: none;
    min-width: 190px;
    max-width: min(280px, calc(100vw - 24px));
    padding: 6px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 14px 30px rgba(0,0,0,.12);
    box-sizing: border-box;
    overflow: visible;
}

.lang-dd.open .lang-dd-menu {
    display: block;
}

.lang-dd-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text);
    white-space: nowrap;
}

    .lang-dd-item:hover {
        background: var(--accent-soft);
    }

.lang-flag-img {
    width: 18px;
    height: 18px;
    object-fit: cover;
    border-radius: 50%;
    flex: 0 0 18px;
}

.current-flag {
    width: 16px;
    height: 16px;
}

.item-flag {
    width: 18px;
    height: 18px;
}

/* =========================
   ACCOUNT DROPDOWN
========================= */

.acc-dd {
    position: relative;
    display: inline-block;
    z-index: 335000;
    overflow: visible;
}

    .acc-dd.open {
        z-index: 339900;
    }

.acc-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    max-width: min(220px, calc(100vw - 24px));
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--text);
    cursor: pointer;
    white-space: nowrap;
}

    .acc-btn > span:first-child {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.acc-caret {
    flex: 0 0 auto;
    font-size: 12px;
    line-height: 1;
}

.acc-dd-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    z-index: 339999;
    display: none;
    min-width: 240px;
    max-width: min(320px, calc(100vw - 24px));
    padding: 8px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 14px 30px rgba(0,0,0,.12);
    box-sizing: border-box;
    overflow: visible;
}

.acc-dd.open .acc-dd-menu {
    display: block;
}

.acc-dd-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text);
    white-space: nowrap;
}

    .acc-dd-item:hover {
        background: var(--accent-soft);
    }

    .acc-dd-item > span:first-child,
    .acc-dd-item strong,
    .acc-dd-item div {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.acc-badge {
    flex: 0 0 auto;
    color: #8dbfbb;
    font-size: 13px;
    font-weight: 700;
}

/* =========================
   MEGA MENU
========================= */

.mega-nav .container,
.mega-nav .container-fluid {
    display: block;
}

.mega-nav-list {
    position: relative;
    z-index: 310001;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(6px, 0.7vw, 12px);
    min-height: 58px;
    margin: 0;
    padding: 10px 0;
    list-style: none;
    white-space: nowrap;
    flex-wrap: nowrap;
    overflow: visible;
}

.mega-nav-item {
    position: relative;
    z-index: 310002;
    flex: 0 1 auto;
    min-width: 0;
    max-width: 170px;
    overflow: visible;
}

.mega-nav-item-more {
    flex: 0 0 auto;
    min-width: fit-content;
    max-width: none;
    margin-left: 0;
}

.mega-nav-link,
.is-current-category {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    color: var(--text);
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
    transition: background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

    .mega-nav-link:hover,
    .mega-nav-item.is-open > .mega-nav-link {
        background: var(--accent-soft);
        color: var(--text);
    }

.mega-nav-item.is-featured > .mega-nav-link {
    color: var(--primary);
    font-weight: 700;
}

.is-current-category {
    background: var(--primary);
    color: #fff;
    font-weight: 700;
}

.mega-nav-item:not(.mega-nav-item-more) > .mega-nav-link,
.mega-nav-item:not(.mega-nav-item-more) > .is-current-category {
    max-width: 170px;
}

.mega-nav-item-more > .mega-nav-link,
.mega-nav-item-more > .is-current-category {
    width: auto;
    min-width: 74px;
    max-width: 110px;
    padding-left: 14px;
    padding-right: 14px;
}

/* =========================
   MEGA FLYOUT
========================= */

.mega-flyout,
.mega-flyout-more {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: auto;
    z-index: 311000;
    min-width: 760px;
    max-width: min(1080px, calc(100vw - 32px));
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 18px 40px rgba(0,0,0,.10);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity .18s ease, visibility .18s ease, transform .18s ease;
    overflow: visible;
    box-sizing: border-box;
}

.mega-nav-item.is-open > .mega-flyout,
.mega-nav-item.is-open > .mega-flyout-more {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.mega-nav-item:last-child > .mega-flyout,
.mega-nav-item:nth-last-child(2) > .mega-flyout,
.mega-nav-item:nth-last-child(3) > .mega-flyout,
.mega-nav-item-more > .mega-flyout,
.mega-nav-item-more > .mega-flyout-more {
    left: auto;
    right: 0;
}

.mega-flyout-inner {
    display: grid;
    grid-template-columns: 300px minmax(320px, 1fr);
    min-height: 360px;
    width: 100%;
    align-items: stretch;
    overflow: visible;
}

.mega-lvl2-list,
.mega-lvl3-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mega-lvl2-list {
    max-height: 520px;
    padding: 12px;
    border-right: 1px solid var(--line);
    background: #fff;
    overflow-y: auto;
    overflow-x: hidden;
}

.mega-lvl2-item {
    position: relative;
}

.mega-lvl2-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 44px;
    min-width: 0;
    padding: 11px 14px;
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    transition: background-color .18s ease, color .18s ease;
}

    .mega-lvl2-link span:first-child {
        display: block;
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.mega-lvl2-item:hover > .mega-lvl2-link,
.mega-lvl2-item.is-active > .mega-lvl2-link {
    background: var(--accent-soft);
}

.mega-arrow {
    flex: 0 0 auto;
    font-size: 16px;
    opacity: .65;
}

/* =========================
   MEGA LVL3
========================= */

.mega-lvl3-host {
    position: relative;
    min-height: 100%;
    background: #fff;
    overflow: visible;
}

.mega-lvl3-panel {
    display: none;
    height: 100%;
    max-height: 520px;
    padding: 12px;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
}

    .mega-lvl3-panel.is-active {
        display: block;
    }

.mega-lvl3-head {
    margin-bottom: 10px;
    padding: 4px 6px 12px;
    border-bottom: 1px solid var(--line);
}

.mega-lvl3-title {
    display: inline-block;
    max-width: 100%;
    color: var(--primary);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mega-lvl3-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 6px 12px;
}

.mega-lvl3-link {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background-color .18s ease, color .18s ease;
}

    .mega-lvl3-link:hover {
        background: var(--accent-soft);
    }

    .mega-lvl3-link.is-highlighted {
        font-weight: 700;
    }

/* =========================
   MODAL FIX
========================= */

body.modal-open header.hdr,
body.modal-open header.hdr.hdr-manamo,
body.modal-open .hdr,
body.modal-open .hdr-manamo,
body.modal-open .hdr-top,
body.modal-open .hdr-main,
body.modal-open .mega-nav,
body.modal-open .mega-flyout,
body.modal-open .mega-flyout-more,
body.modal-open .lang-dd,
body.modal-open .acc-dd {
    z-index: 1;
}

body.modal-open .modal-backdrop {
    z-index: 999998;
}

body.modal-open .modal {
    z-index: 999999;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1399.98px) {
    .mega-nav .container,
    .mega-nav .container-fluid {
        padding-left: 18px;
        padding-right: 18px;
    }

    .mega-nav-list {
        gap: clamp(6px, 0.55vw, 10px);
    }

    .mega-nav-item {
        max-width: 150px;
    }

        .mega-nav-item:not(.mega-nav-item-more) > .mega-nav-link,
        .mega-nav-item:not(.mega-nav-item-more) > .is-current-category {
            max-width: 150px;
            padding: 0 12px;
            font-size: 14px;
        }

    .mega-flyout,
    .mega-flyout-more {
        min-width: 700px;
        max-width: min(980px, calc(100vw - 28px));
    }

    .mega-flyout-inner {
        grid-template-columns: 280px minmax(300px, 1fr);
    }
}

@media (max-width: 1199.98px) {
    .hdr-top .container,
    .hdr-top .container-fluid,
    .hdr-main .container,
    .hdr-main .container-fluid,
    .mega-nav .container,
    .mega-nav .container-fluid {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hdr-main-inner {
        gap: 16px;
    }

    .hdr-main-center {
        min-width: 220px;
    }

    .mega-nav-list {
        gap: 6px;
    }

    .mega-nav-item {
        max-width: 132px;
    }

        .mega-nav-item:not(.mega-nav-item-more) > .mega-nav-link,
        .mega-nav-item:not(.mega-nav-item-more) > .is-current-category {
            max-width: 132px;
            min-height: 38px;
            padding: 0 11px;
            font-size: 13px;
        }

    .mega-nav-item-more > .mega-nav-link,
    .mega-nav-item-more > .is-current-category {
        min-width: 70px;
        max-width: 96px;
        min-height: 38px;
        padding: 0 11px;
        font-size: 13px;
    }

    .mega-flyout,
    .mega-flyout-more {
        min-width: 640px;
        max-width: min(900px, calc(100vw - 24px));
    }

    .mega-flyout-inner {
        grid-template-columns: 250px minmax(260px, 1fr);
        min-height: 320px;
    }

    .mega-lvl3-list {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 991.98px) {
    .hdr-top-inner {
        align-items: flex-start;
    }

    .hdr-top-left,
    .hdr-top-right {
        width: 100%;
    }

    .hdr-top-right {
        justify-content: space-between;
    }

    .hdr-main {
        padding: 14px 0;
    }

    .hdr-main-inner {
        flex-wrap: wrap;
        gap: 14px;
        min-height: auto;
    }

    .hdr-main-left {
        flex: 0 0 auto;
    }

    .hdr-main-right {
        flex: 0 0 auto;
        margin-left: auto;
    }

    .hdr-main-center {
        flex: 1 1 100%;
        order: 3;
        min-width: 0;
    }

    .mega-nav,
    .mega-flyout,
    .mega-flyout-more {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .hdr-top {
        padding: 6px 0;
        font-size: 12px;
    }

        .hdr-top .container,
        .hdr-top .container-fluid,
        .hdr-main .container,
        .hdr-main .container-fluid {
            padding-left: 12px;
            padding-right: 12px;
        }

    .hdr-top-inner {
        gap: 10px;
    }

    .hdr-top-left,
    .hdr-top-right {
        width: 100%;
        justify-content: center;
    }

    .hdr-promo {
        width: 100%;
        text-align: center;
    }

    .hdr-links {
        justify-content: center;
        gap: 10px 14px;
        width: 100%;
    }

    .hdr-socials {
        justify-content: center;
        width: 100%;
    }

    .hdr-main {
        padding: 12px 0;
    }

    .hdr-main-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        min-height: auto;
    }

    .hdr-main-left {
        justify-content: center;
    }

    .hdr-main-center {
        order: 2;
        width: 100%;
        min-width: 0;
    }

    .hdr-main-right {
        order: 3;
        width: 100%;
        justify-content: space-between;
        margin-left: 0;
        flex-wrap: nowrap;
    }

    .hdr-search {
        width: 100%;
        gap: 8px;
    }

        .hdr-search input {
            height: 42px;
            font-size: 14px;
        }

        .hdr-search button {
            height: 42px;
            padding: 0 14px;
        }

    .hdr-cart,
    .acc-dd {
        flex: 1 1 auto;
        min-width: 0;
    }

    .hdr-cart,
    .acc-btn {
        justify-content: center;
    }

    .acc-btn {
        width: 100%;
    }

    .lang-dd-menu {
        right: 0;
        left: auto;
        min-width: 160px;
        max-width: calc(100vw - 16px);
    }

    .acc-dd-menu {
        right: 0;
        left: auto;
        min-width: 220px;
        max-width: calc(100vw - 16px);
    }

    .acc-btn,
    .lang-dd-btn {
        max-width: 100%;
    }
}

@media (max-width: 575.98px) {
    .hdr-logo img {
        height: 38px;
    }

    .hdr-cart {
        padding: 0 12px;
    }

    .hdr-cart-text {
        font-size: 14px;
    }

    .acc-btn {
        padding: 0 12px;
    }
}
