/* MP HEADER v1 */

/* Kill Flatsome */
header#header, #header, #masthead, .header-main, .header-bottom, .header-top,
#top-bar, .header-wrapper, .header-bg-container, .header-bg-image, .header-bg-color {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
}

body { padding-top: 0 !important; }
body.has-mp-header { padding-top: 80px !important; }
/* Home: padding-top reducido (hero arranca pegado al header) */
body.home.has-mp-header { padding-top: 40px !important; }

@media (max-width: 849px) {
    body.has-mp-header { padding-top: 64px !important; }
    body.home.has-mp-header { padding-top: 40px !important; }
}

.mp-header {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 9990;
    background: #000; color: #fff;
    height: 80px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-family: 'Roboto', -apple-system, sans-serif;
    box-sizing: border-box;
}
.mp-header *, .mp-header *::before, .mp-header *::after { box-sizing: border-box; }

.mp-header__inner {
    height: 100%;
    width: 100%;
    padding: 0 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.mp-header__left,
.mp-header__right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
    height: 100%;
}

.mp-header__logo {
    display: flex;
    align-items: center;
    height: 100%;
    line-height: 0;
    text-decoration: none;
}

.mp-header__logo img {
    height: 63px;
    width: auto;
    display: block;
    object-fit: contain;
}

.mp-header__icon-btn {
    background: transparent;
    border: none;
    color: #fff;
    margin: 0;
    padding: 0;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: opacity 0.18s ease;
    text-decoration: none;
    flex-shrink: 0;
    line-height: 1;
}
.mp-header__icon-btn:hover { opacity: 0.65; }

.mp-header__icon-btn svg {
    width: 22px;
    height: 22px;
    stroke: #fff;
    display: block;
    flex-shrink: 0;
}

.mp-header__cart-btn { position: relative; }

.mp-header__cart-count {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #fff;
    color: #000;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.mp-header__cart-count[data-empty="1"] { display: none; }

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

/* Z-INDEX: drawers SIEMPRE encima del header */
.mp-mega-overlay,
.mp-side-search-overlay,
.mp-side-cart-overlay { z-index: 10000 !important; }

.mp-mega,
.mp-side-search,
.mp-side-cart { z-index: 10001 !important; }

.mp-mega__close,
.mp-side-search__close,
.mp-side-cart__close { pointer-events: auto !important; }

/* ===== OVERRIDES MEGA MENU LEGACY ===== */
.mp-mega__header { overflow: visible !important; }

.mp-mega .mp-mega__close,
.mp-mega .mp-mega__close:hover {
    border: none !important;
    background: transparent !important;
    color: #0a0a0a !important;
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    border-radius: 0 !important;
    opacity: 1 !important;
}
.mp-mega .mp-mega__close:hover { opacity: 0.6 !important; }

.mp-mega__logo {
    flex: 1 1 auto !important;
    overflow: visible !important;
    display: flex !important;
    align-items: center !important;
}
/* Logo del drawer mobile: fondo blanco → invertir a NEGRO */
.mp-mega__logo img {
    height: 38px !important;
    max-height: 38px !important;
    width: auto !important;
    max-width: 220px !important;
    display: block !important;
    object-fit: contain !important;
    filter: brightness(0) !important;
}

/* ===== OVERRIDES SIDE SEARCH: link "Ver todos" ===== */
.mp-side-search__view-all {
    display: block;
    text-align: center;
    margin-top: 24px;
    padding: 14px 20px;
    background: #0a0a0a;
    color: #fff !important;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.18s;
}
.mp-side-search__view-all:hover { background: #333; color: #fff !important; }
.mp-side-search__view-all-arrow { margin-left: 6px; }

/* Desktop ≥1025px: hamburger oculta (mega menu inline reemplaza) */
@media (min-width: 1025px) {
    .mp-header__hamburger { display: none !important; }
    .mp-header__inner { padding: 0 28px; gap: 18px; }
    .mp-header__left { gap: 32px; }
    .mp-header__right { gap: 18px; }
}

/* Mobile */
@media (max-width: 1024px) {
    .mp-header__inner { padding: 0 16px; gap: 12px; }
    .mp-header__left { gap: 10px; }
    .mp-header__right { gap: 8px; }
    .mp-header__icon-btn { width: 38px; height: 38px; }
    .mp-header__icon-btn svg { width: 22px; height: 22px; }
    .mp-header__icon-btn.is-desktop-only { display: none !important; }
}

@media (max-width: 849px) {
    .mp-header { height: 64px; }
    .mp-header__logo img { height: 48px; }
}
