/* =========================================================
   LIMPIAR DIVI
   ========================================================= */

.kaixer-header-section,
.kaixer-header-section.et_pb_section,
.kaixer-header-section > .et_pb_row,
.kaixer-header-section .et_pb_column,
.kaixer-header-section .et_pb_module,
.kaixer-header-section .et_pb_code,
.kaixer-header-section .et_pb_code_inner {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.kaixer-header-section::before,
.kaixer-header-section::after,
.kaixer-header-section > .et_pb_row::before,
.kaixer-header-section > .et_pb_row::after {
    display: none !important;
}

/* =========================================================
   GENERAL
   ========================================================= */

#kaixer-header,
#kaixer-header *,
#kaixer-header *::before,
#kaixer-header *::after,
#kaixer-category-layer,
#kaixer-category-layer *,
#kaixer-category-layer *::before,
#kaixer-category-layer *::after {
    box-sizing: border-box;
}

#kaixer-header {
    position: relative;
    z-index: 99999;
    width: 100%;
    margin: 0;
    padding: 0;
    background: #ff00ac;
    color: #fff;
    font-family: Roboto, Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.4;
}

#kaixer-header a,
#kaixer-category-layer a {
    text-decoration: none !important;
}

#kaixer-header button,
#kaixer-header input,
#kaixer-category-layer button {
    font-family: Roboto, Arial, sans-serif;
}

#kaixer-header button,
#kaixer-category-layer button {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    cursor: pointer;
}

#kaixer-header img {
    display: block;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
}

#kaixer-header .fa,
#kaixer-category-layer .fa {
    display: inline-block;
    font-family: FontAwesome !important;
    font-style: normal !important;
    font-weight: normal !important;
    line-height: 1;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
}

/* El icono de la cuenta va macizo.

   Con Font Awesome 4.7 solo existe esa versión, pero si el sitio carga la 5 o
   la 6 (por el tema u otro plugin), «fa-user» tiene también una variante hueca
   y es la que sale si no se pide el grosor 900. «font-synthesis: none» evita
   que ese grosor engorde el icono cuando sí es la 4.7. */
#kaixer-header .fa-user,
#kaixer-header .fa-user::before {
    font-family: FontAwesome, "Font Awesome 6 Free", "Font Awesome 5 Free" !important;
    font-weight: 900 !important;
    -webkit-font-synthesis: none;
    font-synthesis: none;
}

#kaixer-header .kaixer-screen-reader {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* =========================================================
   FORZAR BLANCO EN LOS ENLACES E ICONOS SUPERIORES
   ========================================================= */

#kaixer-header .kaixer-topbar,
#kaixer-header .kaixer-topbar-left,
#kaixer-header .kaixer-topbar-center,
#kaixer-header .kaixer-topbar-right,
#kaixer-header .kaixer-topbar span,
#kaixer-header .kaixer-topbar .fa,
#kaixer-header .kaixer-topbar .fa::before,
#kaixer-header .kaixer-topbar a,
#kaixer-header .kaixer-topbar a:link,
#kaixer-header .kaixer-topbar a:visited,
#kaixer-header .kaixer-topbar a:hover,
#kaixer-header .kaixer-topbar a:focus,
#kaixer-header .kaixer-topbar a:active {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    text-decoration: none !important;
    text-shadow: none !important;
    filter: none !important;
    mix-blend-mode: normal !important;
}

#kaixer-header .kaixer-topbar a:hover,
#kaixer-header .kaixer-topbar a:focus {
    opacity: 0.82;
}

/* Forzar también los cuatro controles móviles */
#kaixer-header .kaixer-mobile-button,
#kaixer-header .kaixer-mobile-button:link,
#kaixer-header .kaixer-mobile-button:visited,
#kaixer-header .kaixer-mobile-button:hover,
#kaixer-header .kaixer-mobile-button:focus,
#kaixer-header .kaixer-mobile-button:active,
#kaixer-header .kaixer-mobile-button .fa,
#kaixer-header .kaixer-mobile-button .fa::before {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    text-shadow: none !important;
    filter: none !important;
    opacity: 1 !important;
}

/* =========================================================
   ESCRITORIO
   ========================================================= */

#kaixer-header .kaixer-desktop-header {
    display: block;
    width: 100%;
    height: 116px;
    background: #ff00ac;
}

/* Franja superior */
#kaixer-header .kaixer-topbar {
    display: grid;
    grid-template-columns:
        minmax(220px, 1fr)
        auto
        minmax(440px, 1fr);
    align-items: center;
    width: calc(100% - 30px);
    height: 44px;
    margin: 0 15px;
    padding: 0;
    background: #ff00ac;
    font-size: 18px;
    line-height: 22px;
}

#kaixer-header .kaixer-topbar-left {
    justify-self: start;
}

#kaixer-header .kaixer-topbar-center {
    display: flex;
    align-items: center;
    justify-self: center;
    gap: 24px;
}

#kaixer-header .kaixer-topbar-right {
    display: inline-flex;
    align-items: center;
    justify-self: end;
    gap: 6px;
    white-space: nowrap;
}

#kaixer-header .kaixer-topbar a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-size: 18px;
    font-weight: 400;
}

/* Ancho natural: a 22px el camión ocupa 30px y la estrella 28px. */
#kaixer-header .kaixer-topbar .fa {
    flex: 0 0 auto;
    min-width: 26px;
    font-size: 22px;
    text-align: center;
}

/* Franja principal */
#kaixer-header .kaixer-mainbar {
    width: 100%;
    height: 72px;
    background: #ff00ac;
}

#kaixer-header .kaixer-mainbar-inner {
    display: grid;
    grid-template-columns: 64px 210px minmax(300px, 1fr) 124px;
    align-items: center;
    width: calc(100% - 30px);
    height: 72px;
    margin: 0 15px;
}

/* Hamburguesa */
#kaixer-header .kaixer-category-button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 64px;
    height: 50px;
    background: transparent !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

#kaixer-header .kaixer-category-button .fa,
#kaixer-header .kaixer-category-button .fa::before {
    width: 34px;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    font-size: 40px;
    line-height: 1;
    text-align: center;
}

/* Logo */
#kaixer-header .kaixer-logo {
    display: flex;
    align-items: center;
    width: 210px;
    height: 52px;
    padding: 0 15px;
}

#kaixer-header .kaixer-logo img {
    width: 180px;
    height: 46px;
    object-fit: contain;
    object-position: left center;
}

/* Buscador */
#kaixer-header .kaixer-search {
    position: relative;
    display: flex;
    align-items: center;
    width: calc(100% - 110px);
    height: 52px;
    margin: 0 55px;
}

#kaixer-header .kaixer-search input[type="search"] {
    display: block;
    width: 100%;
    height: 52px;
    margin: 0;
    padding: 12px 55px 12px 16px;
    border: 1px solid #e1e1e1;
    border-radius: 50px;
    outline: none;
    box-shadow: none;
    background: #fff;
    color: #000;
    -webkit-text-fill-color: #000;
    font-size: 16px;
    line-height: 24px;
    appearance: none;
    -webkit-appearance: none;
}

#kaixer-header .kaixer-search input[type="search"]::placeholder {
    color: #333;
    -webkit-text-fill-color: #333;
    opacity: 1;
}

#kaixer-header .kaixer-search input[type="search"]::-webkit-search-cancel-button {
    display: none;
}

#kaixer-header .kaixer-search button {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 47px;
    height: 52px;
    background: transparent !important;
    color: #000 !important;
}

#kaixer-header .kaixer-search button .fa,
#kaixer-header .kaixer-search button .fa::before {
    color: #000 !important;
    -webkit-text-fill-color: #000 !important;
    font-size: 16px;
}

/* Cuenta y carrito */
#kaixer-header .kaixer-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 124px;
    height: 52px;
    padding-right: 15px;
}

#kaixer-header .kaixer-action,
#kaixer-header .kaixer-action:link,
#kaixer-header .kaixer-action:visited,
#kaixer-header .kaixer-action:hover,
#kaixer-header .kaixer-action:focus,
#kaixer-header .kaixer-action:active {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 55px;
    height: 40px;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

/* Con fa-fw el icono mide 1,286em: 39px a 30px de fuente. */
#kaixer-header .kaixer-action .fa,
#kaixer-header .kaixer-action .fa::before {
    width: 39px;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    font-size: 30px;
    line-height: 1;
    text-align: center;
}

/* Elementos móviles ocultos */
#kaixer-header .kaixer-mobile-header,
#kaixer-header .kaixer-mobile-search {
    display: none;
}

/* =========================================================
   MEGA MENÚ FUERA DE DIVI
   ========================================================= */

body > #kaixer-category-layer {
    position: fixed !important;
    z-index: 2147483000 !important;
    inset: 0 !important;
    display: block !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    visibility: hidden;
    pointer-events: none;
    isolation: isolate;
    font-family: Roboto, Arial, sans-serif;
}

/* El contenedor ocupa toda la pantalla, así que nunca debe capturar el ratón:
   si lo hiciera, taparía la cabecera y el botón del menú. Solo reciben
   eventos el fondo y el panel. */
body > #kaixer-category-layer.is-open {
    visibility: visible;
    pointer-events: none;
}

body > #kaixer-category-layer.is-open .kaixer-category-overlay,
body > #kaixer-category-layer.is-open .kaixer-category-panel {
    pointer-events: auto;
}

#kaixer-category-layer .kaixer-category-overlay {
    position: fixed !important;
    z-index: 1 !important;
    top: 116px !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    border: 0 !important;
    background: rgba(0, 0, 0, 0.06) !important;
}

#kaixer-category-layer .kaixer-category-panel {
    position: fixed !important;
    z-index: 2 !important;
    top: 116px !important;
    right: 8px !important;
    left: 8px !important;
    display: block !important;
    width: auto !important;
    max-height: calc(100vh - 124px) !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    /* Al llegar al final de la lista, la rueda no arrastra la página
       (que cerraría el menú). */
    overscroll-behavior: contain;
    border-top: 1px solid #dedede !important;
    background: #fff !important;
    color: #111 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18) !important;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 150ms ease, transform 150ms ease;
}

#kaixer-category-layer.is-open .kaixer-category-panel {
    opacity: 1;
    transform: translateY(0);
}

#kaixer-category-layer .kaixer-category-heading {
    display: none;
}

/* Seis columnas */
#kaixer-category-layer .kaixer-category-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    width: 100%;
    margin: 0;
    padding: 0 0 8px;
    list-style: none;
    background: #fff;
}

#kaixer-category-layer .kaixer-category-grid li {
    display: block;
    min-width: 0;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #ededed;
    background: #fff;
    list-style: none;
}

#kaixer-category-layer .kaixer-category-grid li::before {
    display: none;
}

#kaixer-category-layer .kaixer-category-grid li a,
#kaixer-category-layer .kaixer-category-grid li a:link,
#kaixer-category-layer .kaixer-category-grid li a:visited {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 43px;
    padding: 9px 16px;
    background: #fff;
    color: #111 !important;
    -webkit-text-fill-color: #111 !important;
    font-size: 16px;
    font-weight: 700;
    line-height: 21px;
}

#kaixer-category-layer .kaixer-category-grid li a:hover,
#kaixer-category-layer .kaixer-category-grid li a:focus {
    background: #fff0fa;
    color: #ff00ac !important;
    -webkit-text-fill-color: #ff00ac !important;
}

#kaixer-category-layer .kaixer-mobile-category-tree {
    display: none;
}

#kaixer-category-layer .kaixer-category-loading,
#kaixer-category-layer .kaixer-category-error {
    display: flex;
    align-items: center;
    min-height: 60px;
    margin: 0;
    padding: 15px 18px;
    background: #fff;
    color: #666;
    font-size: 14px;
}

#kaixer-category-layer .kaixer-category-error {
    color: #a80000;
}

/* =========================================================
   PORTÁTIL
   ========================================================= */

@media (min-width: 992px) and (max-width: 1350px) {
    #kaixer-header .kaixer-topbar {
        grid-template-columns:
            minmax(180px, 1fr)
            auto
            minmax(350px, 1fr);
        font-size: 15px;
    }

    #kaixer-header .kaixer-topbar a {
        font-size: 15px;
    }

    /* Iconos algo menores para que no dominen al texto reducido. */
    #kaixer-header .kaixer-topbar .fa {
        flex: 0 0 22px;
        width: 22px;
        font-size: 19px;
    }

    #kaixer-header .kaixer-topbar-center {
        gap: 12px;
    }

    #kaixer-header .kaixer-search {
        width: calc(100% - 30px);
        margin-right: 15px;
        margin-left: 15px;
    }

    #kaixer-category-layer .kaixer-category-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* =========================================================
   MÓVIL
   ========================================================= */

@media (max-width: 991px) {
    #kaixer-header .kaixer-desktop-header {
        display: none;
    }

    #kaixer-header .kaixer-mobile-header {
        display: flex;
        align-items: center;
        width: 100%;
        height: 74px;
        padding: 0 6px 0 15px;
        background: #ff00ac;
    }

    #kaixer-header .kaixer-mobile-logo {
        display: flex;
        flex: 1 1 auto;
        align-items: center;
        min-width: 0;
        height: 38px;
    }

    #kaixer-header .kaixer-mobile-logo img {
        width: 150px;
        height: 38px;
        object-fit: contain;
        object-position: left center;
    }

    #kaixer-header .kaixer-mobile-actions {
        display: flex;
        flex: 0 0 auto;
        align-items: center;
        height: 34px;
    }

    #kaixer-header .kaixer-mobile-button {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 37px;
        height: 34px;
        background: transparent !important;
    }

    #kaixer-header .kaixer-mobile-button .fa {
        font-size: 21px;
    }

    /* Buscador móvil */
    #kaixer-header .kaixer-mobile-search {
        display: none;
        width: 100%;
        padding: 8px 15px 14px;
        background: #ff00ac;
    }

    #kaixer-header .kaixer-mobile-search.is-open {
        display: block;
    }

    #kaixer-header .kaixer-mobile-search form {
        position: relative;
        display: flex;
        width: 100%;
    }

    #kaixer-header .kaixer-mobile-search input[type="search"] {
        width: 100%;
        height: 44px;
        margin: 0;
        padding: 11px 50px 11px 14px;
        border: 1px solid #e1e1e1;
        border-radius: 50px;
        outline: none;
        background: #fff;
        color: #000;
        -webkit-text-fill-color: #000;
        font-size: 14px;
        appearance: none;
        -webkit-appearance: none;
    }

    #kaixer-header .kaixer-mobile-search button {
        position: absolute;
        top: 0;
        right: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 46px;
        height: 44px;
        background: transparent;
        color: #000;
    }

    #kaixer-header .kaixer-mobile-search button .fa,
    #kaixer-header .kaixer-mobile-search button .fa::before {
        color: #000 !important;
        -webkit-text-fill-color: #000 !important;
        font-size: 16px;
    }

    html.kaixer-menu-open,
    body.kaixer-menu-open {
        overflow: hidden !important;
        overscroll-behavior: none;
    }

    /* Overlay */
    #kaixer-category-layer .kaixer-category-overlay {
        top: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        background: rgba(0, 0, 0, 0.48) !important;
    }

    /* Panel lateral */
    #kaixer-category-layer .kaixer-category-panel {
        position: fixed !important;
        z-index: 3 !important;
        top: 0 !important;
        right: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        display: flex !important;
        flex-direction: column;
        width: min(88vw, 360px) !important;
        height: 100vh !important;
        height: 100dvh !important;
        min-height: 100vh !important;
        max-height: none !important;
        overflow: hidden !important;
        border: 0 !important;
        background: #fff !important;
        color: #111 !important;
        opacity: 1 !important;
        transform: translateX(-105%);
        transition: transform 220ms ease;
        isolation: isolate;
    }

    #kaixer-category-layer.is-open .kaixer-category-panel {
        transform: translateX(0);
    }

    /* Cabecera del panel */
    #kaixer-category-layer .kaixer-category-heading {
        display: flex;
        flex: 0 0 60px;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-height: 60px;
        padding: 0 12px 0 20px;
        border-bottom: 1px solid #e5e5e5;
        background: #ff00ac !important;
    }

    #kaixer-category-layer .kaixer-category-heading strong {
        color: #fff !important;
        -webkit-text-fill-color: #fff !important;
        font-size: 18px;
        font-weight: 500;
    }

    #kaixer-category-layer .kaixer-category-close,
    #kaixer-category-layer .kaixer-category-close .fa,
    #kaixer-category-layer .kaixer-category-close .fa::before {
        color: #fff !important;
        -webkit-text-fill-color: #fff !important;
    }

    #kaixer-category-layer .kaixer-category-close {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        background: transparent;
    }

    #kaixer-category-layer .kaixer-category-close .fa {
        font-size: 20px;
    }

    /* Área blanca desplazable */
    #kaixer-category-layer .kaixer-category-navigation {
        flex: 1 1 auto;
        width: 100%;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        background: #fff !important;
        -webkit-overflow-scrolling: touch;
    }

    #kaixer-category-layer .kaixer-category-grid {
        display: none;
    }

    /* Categorías móviles */
    #kaixer-category-layer .kaixer-mobile-category-tree,
    #kaixer-category-layer .kaixer-mobile-category-tree ul {
        display: block;
        width: 100%;
        margin: 0;
        padding: 0;
        list-style: none;
        background: #fff !important;
    }

    #kaixer-category-layer .kaixer-mobile-category-tree {
        min-height: 100%;
    }

    #kaixer-category-layer .kaixer-mobile-category-tree li {
        position: relative;
        width: 100%;
        margin: 0;
        padding: 0;
        border-bottom: 1px solid #ededed;
        background: #fff !important;
        list-style: none;
    }

    #kaixer-category-layer .kaixer-mobile-category-tree li::before {
        display: none;
    }

    #kaixer-category-layer .kaixer-mobile-category-tree li > a,
    #kaixer-category-layer .kaixer-mobile-category-tree li > a:link,
    #kaixer-category-layer .kaixer-mobile-category-tree li > a:visited {
        display: flex;
        align-items: center;
        width: 100%;
        min-height: 46px;
        padding: 10px 48px 10px 18px;
        background: #fff;
        color: #111 !important;
        -webkit-text-fill-color: #111 !important;
        font-size: 15px;
        font-weight: 500;
        line-height: 21px;
    }

    #kaixer-category-layer .kaixer-mobile-category-tree li > a:hover,
    #kaixer-category-layer .kaixer-mobile-category-tree li > a:focus {
        background: #fff0fa;
        color: #ff00ac !important;
        -webkit-text-fill-color: #ff00ac !important;
    }

    #kaixer-category-layer
    .kaixer-mobile-category-tree
    .kaixer-all-products > a {
        gap: 10px;
        font-weight: 700;
    }

    #kaixer-category-layer
    .kaixer-mobile-category-tree
    .kaixer-all-products .fa,
    #kaixer-category-layer
    .kaixer-mobile-category-tree
    .kaixer-all-products .fa::before {
        width: 20px;
        color: #ff00ac !important;
        -webkit-text-fill-color: #ff00ac !important;
        font-size: 18px;
    }

    #kaixer-category-layer .kaixer-subcategory-toggle {
        position: absolute;
        z-index: 2;
        top: 5px;
        right: 5px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 36px;
        background: transparent;
        color: #777;
    }

    #kaixer-category-layer .kaixer-subcategory-toggle .fa {
        color: #777 !important;
        -webkit-text-fill-color: #777 !important;
        font-size: 16px;
        transition: transform 150ms ease;
    }

    #kaixer-category-layer
    .kaixer-mobile-category-tree
    li.is-expanded > .kaixer-subcategory-toggle .fa {
        transform: rotate(90deg);
    }

    #kaixer-category-layer
    .kaixer-mobile-category-tree
    .children {
        display: none;
        padding-left: 14px;
        border-top: 1px solid #f0f0f0;
        background: #fafafa !important;
    }

    #kaixer-category-layer
    .kaixer-mobile-category-tree
    li.is-expanded > .children {
        display: block;
    }

    #kaixer-category-layer
    .kaixer-mobile-category-tree
    .children li,
    #kaixer-category-layer
    .kaixer-mobile-category-tree
    .children li > a {
        background: #fafafa !important;
    }
}

@media (max-width: 359px) {
    #kaixer-header .kaixer-mobile-logo img {
        width: 125px;
        height: auto;
    }

    #kaixer-header .kaixer-mobile-button {
        width: 34px;
    }
}
