/**
 * Lumiaris Mega Menu v1.6.0
 * Desktop: full-width dropdown panels
 * Mobile (<=1024px): slide-in drawer with accordion navigation
 */

/* ===== Variables ===== */
:root {
    --lmm-blue: #2B4678;
    --lmm-blue-light: #5A7FA6;
    --lmm-black: #242526;
    --lmm-bg: #F8F8F8;
    --lmm-grey: #F1F1F1;
    --lmm-body: #515151;
    --lmm-radius: 42px;
    --lmm-sep-light: rgba(43, 70, 120, 0.14);
    --lmm-sep-dark: rgba(43, 70, 120, 0.60);
    --lmm-yellow: #F7CA39;
}

/* ===== Reset & Container ===== */
.lmm-megamenu {
    position: static;
    font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.3;
}

.lmm-megamenu *,
.lmm-megamenu *::before,
.lmm-megamenu *::after {
    box-sizing: border-box;
}

/* ===== Tabs (inline in header) ===== */
.lmm-tabs {
    display: inline-flex;
    align-items: center;
    gap: 20px;
}

/* Tab button & link — shared styles */
.lmm-tab {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px !important;
    cursor: pointer !important;
    user-select: none;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    border-style: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: var(--lmm-blue) !important;
    text-decoration: none !important;
    transition: opacity 0.2s;
    box-shadow: none !important;
    outline: none !important;
    line-height: 18px !important;
}

.lmm-tab:hover {
    opacity: 1;
}

.lmm-tab__label {
    font-size: 14px;
    font-weight: 700;
    line-height: 18px;
    color: var(--lmm-blue);
    white-space: nowrap;
}

/* Active state: lighter blue */
.lmm-tab--active .lmm-tab__label {
    color: var(--lmm-blue-light) !important;
}

/* Override Elementor active/hover on button */
.lmm-tab:hover,
.lmm-tab:focus,
.lmm-tab:active {
    background: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}
.lmm-tab--active {
    color: var(--lmm-blue-light) !important;
}

/* Toggle icon container */
.lmm-tab__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

/* Icon visibility: show + when closed, - when open */
.lmm-icon--open {
    display: none;
}
.lmm-icon--closed {
    display: block;
}

.lmm-tab--active .lmm-icon--open {
    display: block;
}
.lmm-tab--active .lmm-icon--closed {
    display: none;
}

/* ===== Panel (centered dropdown, width adapts to content) ===== */
.lmm-panel {
    position: fixed;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    width: 1386px;
    max-width: 1440px;
    z-index: 99;
    background: var(--lmm-bg);
    border-radius: 0 0 var(--lmm-radius) var(--lmm-radius);
    padding: 40px 48px 48px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.10);
    /* Hidden by default */
    display: none;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.lmm-panel--active {
    display: block;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.lmm-panel__inner {
    margin: 0;
}

/* ===== Columns ===== */
.lmm-columns {
    display: flex;
    gap: 48px;
}

.lmm-column {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.lmm-column__title {
    margin: 0;
    padding: 0 0 8px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.lmm-column__title a {
    color: var(--lmm-black);
    font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 130%;
    text-decoration: none !important;
    transition: color 0.2s;
}

.lmm-column__title a:hover {
    color: var(--lmm-blue);
}

/* ===== Items list ===== */
.lmm-items {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ===== Single item card ===== */
.lmm-item {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none !important;
    padding: 6px;
    border-radius: 12px;
    transition: background 0.2s;
}

.lmm-item:hover {
    background: none;
}

/* Thumbnail */
.lmm-item__thumb {
    width: 78px;
    height: 65px;
    min-width: 78px;
    background: var(--lmm-grey);
    border-radius: 10px;
    border: 1px solid rgba(80, 80, 80, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lmm-item__thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Content */
.lmm-item__content {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.lmm-item__title {
    color: var(--lmm-blue);
    font-size: 15px;
    font-weight: 600;
    line-height: 20px;
}

.lmm-item__discover {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lmm-item__discover svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.lmm-item__discover > span {
    color: var(--lmm-body);
    font-size: 13px;
    font-weight: 600;
    text-decoration: underline;
    line-height: 18px;
}

/* ===== Overlay (behind panel, starts BELOW header) ===== */
.lmm-overlay {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 98;
    background: rgba(0, 0, 0, 0.55);
    transition: opacity 0.25s;
    opacity: 0;
}

.lmm-overlay--active {
    display: block;
    opacity: 1;
}

/* ===========================================================================
 * MOBILE MENU STYLES
 * =========================================================================== */

/* ===== Body scroll lock ===== */
body.lmm-menu-open,
html.lmm-menu-open {
    overflow: hidden !important;
}

body.lmm-menu-open {
    position: fixed !important;
    width: 100% !important;
}

/* ===== Mobile Toggle Button ===== */
.lmm-mobile-toggle,
.lmm-mobile-toggle.elementor-button,
button.lmm-mobile-toggle {
    display: none; /* hidden on desktop, shown via media query */
    width: 40px !important;
    height: 40px !important;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer;
    border-radius: 60px !important;
    box-shadow: none !important;
    outline: none !important;
    overflow: hidden;
    flex-shrink: 0;
}

.lmm-mobile-toggle svg {
    width: 40px;
    height: 40px;
    border-radius: 60px;
    display: block;
}

.lmm-mobile-toggle__close {
    display: none;
}

.lmm-mobile-toggle--active .lmm-mobile-toggle__open {
    display: none;
}

.lmm-mobile-toggle--active .lmm-mobile-toggle__close {
    display: block;
}

/* ===== Mobile Drawer Container ===== */
.lmm-mobile-menu {
    display: none; /* hidden on desktop */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    z-index: 9999;
    pointer-events: none;
}

.lmm-mobile-menu *,
.lmm-mobile-menu *::before,
.lmm-mobile-menu *::after {
    box-sizing: border-box !important;
}

.lmm-mobile-menu--open {
    pointer-events: auto;
}

/* ===== Drawer ===== */
.lmm-mobile-menu__drawer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #FFFFFF;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow: hidden;
}

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

/* ===== Drawer Content (scrollable) ===== */
.lmm-mobile-menu__content {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 100px 24px 40px;
    width: 100%;
}

/* ===== CTA Buttons ===== */
.lmm-mobile-cta {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}

.lmm-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: auto;
    min-height: 44px;
    padding: 8px 4px 8px 12px;
    border-radius: 30px;
    text-decoration: none !important;
    font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    color: #F8F8F8 !important;
    white-space: normal;
    transition: opacity 0.2s ease;
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
    justify-content: space-between;
}

.lmm-cta-btn:hover {
    opacity: 0.9;
    color: #F8F8F8 !important;
    text-decoration: none !important;
}

.lmm-cta-btn--blue {
    background: var(--lmm-blue);
}

.lmm-cta-btn--black {
    background: var(--lmm-black);
}

.lmm-cta-btn__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lmm-cta-btn__icon svg {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

/* ===== Separators ===== */
.lmm-mobile-sep {
    height: 1px;
    margin: 20px 0;
}

.lmm-mobile-sep--light {
    background: var(--lmm-sep-light);
}

.lmm-mobile-sep--dark {
    background: var(--lmm-sep-dark);
}

/* ===== Section Title ===== */
.lmm-mobile-section-title {
    font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 140%;
    color: var(--lmm-blue);
    margin-bottom: 12px;
}

/* ===== Accordion ===== */
.lmm-accordion {
    margin-bottom: 4px;
}

.lmm-accordion__trigger,
button.lmm-accordion__trigger {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer;
    font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: var(--lmm-blue) !important;
    line-height: 140% !important;
    box-shadow: none !important;
    outline: none !important;
}

.lmm-accordion__trigger:hover {
    opacity: 0.8;
}

.lmm-accordion__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.lmm-accordion--open .lmm-accordion__icon {
    transform: rotate(90deg);
}

/* Accordion body: collapsed by default */
.lmm-accordion__body {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding-top: 0;
}

.lmm-accordion--open .lmm-accordion__body {
    max-height: 2000px;
    padding-top: 12px;
}

/* ===== Category Items (direct in drawer or inside accordion) ===== */
.lmm-category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 18px 0;
    border-bottom: 1px solid var(--lmm-sep-dark);
    transition: opacity 0.2s ease;
}

/* First category item after separator gets top border */
.lmm-mobile-sep + .lmm-category-item {
    border-top: 1px solid var(--lmm-sep-dark);
}

/* Links following category items: no double border */
.lmm-category-item + .lmm-mobile-link {
    border-top: none;
}

.lmm-category-item:hover {
    opacity: 0.8;
}

.lmm-category-item__label {
    font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--lmm-black);
    word-wrap: break-word;
    overflow-wrap: break-word;
    flex: 1;
    min-width: 0;
}

.lmm-category-item__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lmm-category-item__arrow svg {
    width: 30px;
    height: 30px;
}

/* ===== Profil Items ===== */
.lmm-profil-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    text-decoration: none !important;
    transition: opacity 0.2s ease;
}

.lmm-profil-item:hover {
    opacity: 0.8;
    text-decoration: none !important;
}

.lmm-profil-item__icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    object-fit: contain;
}

.lmm-profil-item__label {
    flex: 1;
    min-width: 0;
    font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--lmm-black);
    line-height: 1.4;
}

.lmm-profil-item__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lmm-profil-item__arrow svg {
    width: 30px;
    height: 30px;
}

/* ===== Simple Links ===== */
.lmm-mobile-link {
    display: block;
    color: var(--lmm-blue) !important;
    font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 140%;
    text-decoration: none !important;
    padding: 22px 0;
    border-bottom: 1px solid var(--lmm-sep-dark);
    transition: opacity 0.2s ease;
}

.lmm-mobile-link:hover {
    opacity: 0.8;
    color: var(--lmm-blue) !important;
    text-decoration: none !important;
}

.lmm-mobile-link--catalogue {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: underline !important;
}

.lmm-mobile-link--catalogue:hover {
    text-decoration: underline !important;
}

.lmm-mobile-link__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lmm-mobile-link__icon svg {
    width: 18px;
    height: 18px;
}

/* ===== Subcategory Drill-Down View ===== */
.lmm-subcategory-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #FFFFFF;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    z-index: 2;
}

.lmm-subcategory-view--active {
    transform: translateX(0);
}

.lmm-subcategory-view__inner {
    padding: 100px 24px 40px;
    width: 100%;
}

.lmm-subcategory-view__breadcrumb {
    font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 140%;
    color: var(--lmm-blue);
    margin-bottom: 12px;
}

.lmm-subcategory-view__back,
button.lmm-subcategory-view__back {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 0 20px 0 !important;
    cursor: pointer;
    font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: var(--lmm-blue) !important;
    line-height: 140% !important;
    box-shadow: none !important;
    outline: none !important;
    transition: opacity 0.2s ease;
}

.lmm-subcategory-view__back:hover {
    opacity: 0.8;
}

.lmm-subcategory-view__back-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lmm-subcategory-view__back-arrow svg path {
    fill: var(--lmm-blue) !important;
}

/* ===== Subcategory Product Items ===== */
.lmm-sub-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--lmm-sep-light);
    text-decoration: none !important;
    transition: opacity 0.2s ease;
}

.lmm-sub-item:first-child {
    border-top: 1px solid var(--lmm-sep-light);
}

.lmm-sub-item:hover {
    opacity: 0.8;
    text-decoration: none !important;
}

/* Drillable items (have children, not links) */
.lmm-sub-item--drillable {
    cursor: pointer;
}

.lmm-sub-item__left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.lmm-sub-item__thumb {
    width: 70px;
    height: 70px;
    min-width: 70px;
    background: var(--lmm-grey);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lmm-sub-item__thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.lmm-sub-item__title {
    font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 140%;
    color: var(--lmm-black);
}

.lmm-sub-item__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lmm-sub-item__arrow svg {
    width: 30px;
    height: 30px;
}

/* ===========================================================================
 * RESPONSIVE BREAKPOINTS
 * =========================================================================== */

/* ===== Header-mobile above drawer when menu is open ===== */
body.lmm-menu-open .header-mobile {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
}

/* ===== Mobile: <=1024px — Show mobile menu, hide desktop ===== */
@media screen and (max-width: 1024px) {
    /* Hide desktop mega menu */
    .lmm-tabs,
    .lmm-panel,
    .lmm-overlay {
        display: none !important;
    }

    /* Show mobile toggle */
    .lmm-mobile-toggle,
    button.lmm-mobile-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    /* Show mobile menu container */
    .lmm-mobile-menu {
        display: block;
    }
}

/* ===== Desktop: >=1025px — Hide mobile elements ===== */
@media screen and (min-width: 1025px) {
    .lmm-mobile-toggle,
    .lmm-mobile-menu {
        display: none !important;
    }
}

/* ===== Very small screens ===== */
@media screen and (max-width: 374px) {
    .lmm-mobile-cta {
        flex-direction: column;
    }

    .lmm-cta-btn {
        flex: 1 1 100%;
    }

    .lmm-mobile-menu__content,
    .lmm-subcategory-view__inner {
        padding-left: 16px;
        padding-right: 16px;
    }
}
