/* ================================================================
   MP MEGA MENU V2
   - Desktop: nav inline en header + mega panel hover bajo SHOP
   - Mobile: drawer lateral (acordeón por grupo)
   ================================================================ */

/* ============= OVERRIDES Flatsome (li margin-bottom: .6em) ============= */
.mpfk-topnav li,
.mpfk-topnav ul,
.mpfk-topnav ol,
.mpfk-megapanel li,
.mpfk-megapanel ul,
.mpfk-megapanel ol,
.mp-mega li,
.mp-mega ul,
.mp-mega ol {
    margin: 0 !important;
    padding-left: 0;
}

/* ============= DESKTOP NAV INLINE ============= */
.mpfk-topnav {
    display: flex;
    align-items: center;
    height: 100%;
}
.mpfk-topnav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: stretch;
    gap: 28px;
    height: 100%;
}
.mpfk-topnav__item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    margin: 0;
}
.mpfk-topnav__link {
    color: #fff;
    font-family: 'Roboto', -apple-system, sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 0;
    transition: opacity 0.18s ease;
    line-height: 1;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    height: 100%;
}
.mpfk-topnav__link:hover,
.mpfk-topnav__item--has-mega:hover > .mpfk-topnav__link {
    opacity: 0.65;
    color: #fff;
}

/* ============= MEGA PANEL (hover dropdown) =============
   Se posiciona BAJO el header. Si MM Conversion Stack agregó la sticky bar
   superior, --mmcs-sb-top-h tiene su altura; sumamos 80px del header.
   ============= */
.mpfk-megapanel {
    position: fixed;
    top: calc(80px + var(--mmcs-sb-top-h, 0px));
    left: 0;
    right: 0;
    background: #fff;
    color: #0a0a0a;
    padding: 36px 60px 44px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.08);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.22s ease, transform 0.22s ease;
    z-index: 9985;
    border-top: 1px solid rgba(0,0,0,0.06);
}
.mpfk-topnav__item--has-mega:hover > .mpfk-megapanel,
.mpfk-topnav__item--has-mega:focus-within > .mpfk-megapanel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.mpfk-megapanel__inner {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 56px;
    align-items: flex-start;
}

.mpfk-megapanel__col-title {
    margin: 0 0 22px;
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #0a0a0a;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.mpfk-megapanel__section {
    margin-bottom: 22px;
    display: flex;
    gap: 24px;
    align-items: flex-start;
}
.mpfk-megapanel__section:last-child { margin-bottom: 0; }

.mpfk-megapanel__section-title {
    flex: 0 0 110px;
    margin: 0;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 0.74rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #0a0a0a;
    text-decoration: none;
    line-height: 1.5;
    padding-top: 2px;
}
a.mpfk-megapanel__section-title:hover { opacity: 0.6; }

.mpfk-megapanel__items {
    flex: 1;
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.mpfk-megapanel__items li { margin: 0 !important; padding: 0; }
.mpfk-megapanel__items a {
    color: #0a0a0a;
    font-family: 'Roboto', sans-serif;
    font-size: 0.84rem;
    letter-spacing: 0.04em;
    text-decoration: none;
    line-height: 1.4;
    transition: opacity 0.18s ease;
    display: inline-block;
}
.mpfk-megapanel__items a:hover {
    opacity: 0.55;
    color: #0a0a0a;
}

/* Mobile / tablet: nav inline oculta */
@media (max-width: 1024px) {
    .mpfk-topnav { display: none !important; }
    .mpfk-megapanel { display: none !important; }
}

/* ================================================================
   MOBILE DRAWER (mp-mega) — usado <=1024px
   Estructura: header + top links + body con acordeón por grupo
   ================================================================ */
.mp-mega-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 99996;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.mp-mega-overlay.is-open { opacity: 1; pointer-events: auto; }

.mp-mega {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 420px;
    max-width: 100vw;
    background: #fff;
    z-index: 99997;
    transform: translateX(-100%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 24px rgba(0,0,0,0.1);
}
.mp-mega.is-open { transform: translateX(0); }

.mp-mega__header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    border-bottom: 1px solid #ececec;
    flex-shrink: 0;
}
.mp-mega__close {
    background: transparent;
    border: none;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0a0a0a;
}
.mp-mega__logo {
    display: flex;
    align-items: center;
    line-height: 0;
}
.mp-mega__logo img {
    height: 38px;
    width: auto;
    display: block;
    max-width: 200px;
    object-fit: contain;
}

.mp-mega__top {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #ececec;
    padding: 8px 0;
    flex-shrink: 0;
}
.mp-mega__top-link {
    padding: 14px 24px;
    color: #0a0a0a;
    font-family: 'Roboto', sans-serif;
    font-size: 0.86rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.15s ease;
}
.mp-mega__top-link:hover { background: #fafafa; color: #0a0a0a; }
.mp-mega__top-link--highlight {
    color: #b8323a;
}

.mp-mega__body {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0 32px;
}

.mp-mega__group {
    border-bottom: 1px solid #ececec;
}
.mp-mega__group > summary {
    list-style: none;
    cursor: pointer;
    padding: 18px 24px;
    font-family: 'Roboto', sans-serif;
    font-size: 0.84rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #0a0a0a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}
.mp-mega__group > summary::-webkit-details-marker { display: none; }
.mp-mega__group-chev {
    font-size: 1.1rem;
    font-weight: 300;
    line-height: 1;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.mp-mega__group[open] .mp-mega__group-chev { transform: rotate(45deg); }
.mp-mega__group-body {
    padding: 4px 24px 18px;
}
.mp-mega__section-title {
    margin: 14px 0 8px;
    font-family: 'Roboto', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #777;
}
.mp-mega__items {
    list-style: none;
    margin: 0 0 4px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.mp-mega__items li { margin: 0 !important; }
.mp-mega__item {
    display: block;
    padding: 9px 0;
    color: #0a0a0a;
    text-decoration: none;
    font-size: 0.88rem;
    letter-spacing: 0.04em;
    line-height: 1.4;
}
.mp-mega__item:hover { opacity: 0.6; color: #0a0a0a; }

body.mp-drawer-open { overflow: hidden; }

@media (max-width: 600px) {
    .mp-mega { width: 100vw; }
}

/* En desktop: drawer mobile siempre oculto */
@media (min-width: 1025px) {
    .mp-mega, .mp-mega-overlay { display: none !important; }
}
