/* ═══════════════════════════════════════════════════════════
   CUSTOM HEADER MENU — Front Styles
   ═══════════════════════════════════════════════════════════ */

.chm-header,
.chm-header *,
.chm-header *::before,
.chm-header *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.chm-header ul,
.chm-header ol,
.chm-header li {
    list-style: none !important;
    list-style-type: none !important;
    margin: 0;
    padding: 0;
}

.chm-header li::before,
.chm-header li::marker {
    content: none !important;
    display: none !important;
}

.chm-header a {
    text-decoration: none;
}

.chm-header {
    font-family: 'Noto Sans', Helvetica, Arial, Lucida, sans-serif;
    color: #333;
    font-size: 14px;
    font-weight: 300;
    line-height: 1.4;
    position: relative;
    z-index: 99999;
    width: 100%;
}

/* ═══ BARRA SUPERIOR ═══ */
.chm-top-bar {
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    height: 42px;
}

.chm-top-bar__inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.chm-top-bar__left,
.chm-top-bar__right {
    display: flex;
    align-items: center;
    gap: 0;
    height: 100%;
}

.chm-top-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px;
    color: #333;
    text-decoration: none !important;
    font-size: 12.5px;
    font-weight: 300;
    letter-spacing: .01em;
    transition: color .2s;
    position: relative;
    white-space: nowrap;
    height: 42px;
}

.chm-top-link:hover {
    color: #111;
}

.chm-top-bar__sep::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 18px;
    background: #e8e8e8;
}

.chm-top-bar__right .chm-top-link + .chm-flags {
    padding-left: 16px;
    position: relative;
}

.chm-top-bar__right .chm-top-link + .chm-flags::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 18px;
    background: #e8e8e8;
}

.chm-top-link .dashicons {
    font-size: 15px;
    width: 15px;
    height: 15px;
    line-height: 15px;
    color: #489641;
}

/* Banderas */
.chm-flags-list {
    list-style: none !important;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.chm-flags-list li {
    list-style: none !important;
}

.chm-flags-list li::before,
.chm-flags-list li::marker {
    content: none !important;
    display: none !important;
}

.chm-flag-item {
    list-style: none !important;
}

.chm-flag-item a {
    display: block;
    line-height: 0;
    opacity: .6;
    transition: opacity .2s, transform .2s;
    border-radius: 2px;
    overflow: hidden;
}

.chm-flag-item a:hover,
.chm-flag-item.chm-flag--active a {
    opacity: 1;
    transform: scale(1.1);
}

.chm-flag-item img {
    display: block;
    border-radius: 2px;
    object-fit: cover;
}

/* ═══ BARRA INFERIOR ═══ */
.chm-main-bar {
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    height: 92px;
    transition: height .3s ease, box-shadow .3s ease;
}

.chm-main-bar.chm-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.chm-main-bar.chm-sticky.chm-shrink {
    height: 60px;
}

.chm-main-bar__inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    align-items: center;
    height: 100%;
    gap: 40px;
}

.chm-main-bar__logo a {
    display: inline-flex;
    align-items: center;
    text-decoration: none !important;
}

/* Logo con !important para sobreescribir .woocommerce img */
.chm-header .chm-logo-img {
    height: 54px !important;
    width: auto !important;
    max-width: none !important;
    display: block;
    transition: height .3s ease;
}

.chm-header .chm-shrink .chm-logo-img {
    height: 38px !important;
}

.chm-logo-text {
    font-size: 20px;
    font-weight: 300;
    color: #333;
}

/* Nav desktop */
.chm-nav-desktop {
    flex: 1;
}

.chm-nav-list {
    list-style: none !important;
    display: flex;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
}

.chm-nav-list > li {
    list-style: none !important;
}

.chm-nav-list > li::before,
.chm-nav-list > li::marker {
    content: none !important;
    display: none !important;
}

.chm-nav-item > a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 18px;
    height: 92px;
    line-height: 92px;
    color: #333;
    text-decoration: none !important;
    font-size: 18px;
    font-weight: 300;
    transition: color .2s, height .3s, line-height .3s;
    white-space: nowrap;
}

.chm-shrink .chm-nav-item > a {
    height: 60px;
    line-height: 60px;
}

.chm-nav-item > a:hover {
    color: #489641;
}

.chm-chevron {
    transition: transform .2s;
    margin-top: 1px;
}

.chm-has-dropdown:hover .chm-chevron {
    transform: rotate(180deg);
}

.chm-has-dropdown {
    position: relative;
}

.chm-dropdown {
    list-style: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .2s, transform .2s, visibility .2s;
    margin: 0;
    z-index: 100000;
}

.chm-dropdown li {
    list-style: none !important;
}

.chm-dropdown li::before,
.chm-dropdown li::marker {
    content: none !important;
    display: none !important;
}

.chm-has-dropdown:hover .chm-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.chm-dropdown li a {
    display: block;
    padding: 10px 20px;
    color: #333;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 300;
    transition: background .15s, color .15s;
}

.chm-dropdown li a:hover {
    background: #f7f7f7;
    color: #111;
}

/* CTA */
.chm-main-bar__cta {
    flex-shrink: 0;
}

.chm-cta-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 28px;
    background: #489641;
    color: #fff !important;
    text-decoration: none !important;
    font-family: 'Noto Sans', Helvetica, Arial, Lucida, sans-serif;
    font-size: 14px;
    font-weight: 600;
    border-radius: 999px;
    letter-spacing: .01em;
    transition: background .2s, transform .15s, box-shadow .2s;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(72,150,65,.3);
}

.chm-cta-btn:hover {
    background: #3d8236;
    transform: translateY(-1px);
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(72,150,65,.4);
}

/* Hamburguesa */
.chm-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-shrink: 0;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}

.chm-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #333;
    border-radius: 2px;
    transition: transform .3s ease, opacity .3s ease;
    pointer-events: none;
}

.chm-hamburger.chm-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.chm-hamburger.chm-active span:nth-child(2) { opacity: 0; }
.chm-hamburger.chm-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Overlay móvil */
.chm-mobile-overlay {
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 99998;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform .35s ease;
    visibility: hidden;
}

.chm-mobile-overlay.chm-open {
    transform: translateX(0);
    visibility: visible;
}

.chm-mobile-overlay__content {
    padding: 140px 24px 40px;
}

.chm-mobile-nav {
    list-style: none !important;
    margin: 0;
    padding: 0;
}

.chm-mobile-nav li {
    list-style: none !important;
}

.chm-mobile-nav li::before,
.chm-mobile-nav li::marker {
    content: none !important;
    display: none !important;
}

.chm-mobile-nav__item {
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.chm-mobile-nav__item > a {
    display: block;
    padding: 18px 0;
    color: #333;
    text-decoration: none !important;
    font-size: 18px;
    font-weight: 300;
}

.chm-mobile-sub-toggle {
    position: absolute;
    right: 0;
    top: 14px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    cursor: pointer;
    transition: transform .2s;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}

.chm-mobile-sub-toggle.chm-sub-open svg {
    transform: rotate(180deg);
}

.chm-mobile-sub {
    list-style: none !important;
    margin: 0;
    padding: 0 0 12px 16px;
    display: none;
}

.chm-mobile-sub li {
    list-style: none !important;
}

.chm-mobile-sub li::before,
.chm-mobile-sub li::marker {
    content: none !important;
    display: none !important;
}

.chm-mobile-sub.chm-sub-visible {
    display: block;
}

.chm-mobile-sub li a {
    display: block;
    padding: 10px 0;
    color: #555;
    text-decoration: none !important;
    font-size: 15px;
    font-weight: 300;
}

/* Spacer */
.chm-header-spacer {
    height: 0;
    transition: height .3s ease;
}

.chm-header-spacer.chm-spacer-active {
    height: 92px;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 991px) {
    .chm-top-bar {
        height: auto;
        padding: 10px 0;
    }

    .chm-top-bar__inner {
        flex-direction: column;
        gap: 8px;
        padding: 0 16px;
    }

    .chm-top-bar__left {
        width: 100%;
        justify-content: center;
        flex-wrap: nowrap;
    }

    .chm-top-bar__right {
        width: 100%;
        justify-content: center;
        flex-wrap: nowrap;
        padding-top: 8px;
        border-top: 1px solid #f0f0f0;
    }

    .chm-top-link {
        flex-direction: column;
        gap: 2px;
        padding: 4px 12px;
        font-size: 10.5px;
        text-align: center;
        height: auto;
        line-height: 1.3;
    }

    .chm-top-link .dashicons {
        font-size: 18px;
        width: 18px;
        height: 18px;
        line-height: 18px;
    }

    .chm-top-bar__sep::before {
        height: 30px;
    }

    .chm-top-bar__right .chm-top-link + .chm-flags {
        padding-left: 12px;
    }

    .chm-top-bar__right .chm-top-link + .chm-flags::before {
        height: 30px;
    }

    .chm-flags-list {
        gap: 8px;
    }

    .chm-flag-item img {
        width: 20px;
        height: 14px;
    }

    .chm-main-bar {
        height: 70px;
    }

    .chm-main-bar.chm-sticky.chm-shrink {
        height: 56px;
    }

    .chm-main-bar__inner {
        padding: 0 16px;
        gap: 0;
        justify-content: space-between;
    }

    .chm-nav-desktop {
        display: none !important;
    }

    .chm-hamburger {
        display: flex !important;
        order: 3;
    }

    .chm-main-bar__cta {
        order: 2;
        margin-left: auto;
        margin-right: 8px;
    }

    .chm-cta-btn {
        padding: 8px 18px;
        font-size: 12.5px;
    }

    .chm-header .chm-logo-img {
        height: 40px !important;
    }

    .chm-header .chm-shrink .chm-logo-img {
        height: 30px !important;
    }

    .chm-header-spacer.chm-spacer-active {
        height: 70px;
    }
}

@media (min-width: 992px) {
    .chm-hamburger {
        display: none !important;
    }

    .chm-mobile-overlay {
        display: none !important;
    }
}
