/* Encabezado principal: barra rectangular, alineada y estable. */
.header {
    position: relative;
    z-index: 99995;
    width: 100%;
    min-height: 84px;
    padding: 0 28px;
    border-bottom: 3px solid #e8b900;
    background: linear-gradient(90deg, #00150e 0%, #00251a 52%, #00150e 100%) !important;
    box-shadow: 0 6px 22px rgba(0, 0, 0, .28) !important;
    box-sizing: border-box;
}

.header .header-contenido {
    width: min(1260px, 100%);
    min-height: 81px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 98px minmax(570px, 1fr) minmax(250px, 286px) 102px;
    align-items: center;
    gap: 16px;
}

.header .logo {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.header .logo img {
    display: block;
    width: 82px;
    max-height: 58px;
    object-fit: contain;
}

.header .menu {
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
    margin: 0;
    gap: 7px;
    overflow: visible;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none;
}

.header .menu a {
    min-width: 0;
    height: 40px;
    padding: 0 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border: 1px solid rgba(255, 255, 255, .15) !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, .035) !important;
    color: #fff;
    font-size: 13px;
    font-weight: 650;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    box-sizing: border-box;
    letter-spacing: -.1px;
    transition: background .2s ease, color .2s ease, border-color .2s ease !important;
}

/* Neutraliza los adornos heredados del tema navideño dentro del menú. */
.header .menu a::before,
.header .menu a::after {
    content: none !important;
    display: none !important;
}

.header .menu a:last-child { border-right: 1px solid rgba(255, 255, 255, .18) !important; }

.header .menu a:hover,
.header .menu a.menu-activo,
.header .menu a.activo {
    color: #122016 !important;
    background: linear-gradient(135deg, #ffd632 0%, #f4b900 100%) !important;
    border-color: #ffda3d !important;
    box-shadow: 0 5px 14px rgba(244, 185, 0, .18) !important;
    text-shadow: none !important;
    transform: none !important;
}

.header .buscador {
    width: 100%;
    height: 42px;
    display: grid;
    grid-template-columns: 1fr 42px;
    margin: 0;
    padding: 2px;
    overflow: hidden;
    border: 2px solid #e8b900;
    border-radius: 999px;
    background: #fff;
    box-sizing: border-box;
}

.header .buscador input {
    width: 100%;
    min-width: 0;
    height: 36px;
    padding: 0 12px;
    border: 0;
    outline: 0;
    border-radius: 999px 0 0 999px;
    background: #fff;
    color: #222;
    font-size: 14px;
    box-sizing: border-box;
}

.header .buscador button {
    width: 42px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #9f0b19;
    color: #fff;
    cursor: pointer;
}

.header .ingresar {
    width: auto;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 999px;
    background: rgba(255, 255, 255, .035);
    white-space: nowrap;
}

.header .ingresar span { color: #ffd000; font-size: 11px; }
.header .ingresar a { color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; }
.header .ingresar a:hover { color: #ffd000; }

/* Quita la fila de emojis fijada sobre el menú por el tema navideño. */
body.modo-navidad::after,
body::after {
    content: none !important;
    display: none !important;
}

body.modo-navidad .header .menu,
body.modo-navidad .header nav {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

body.modo-navidad .header .menu a {
    text-shadow: none !important;
    transform: none !important;
}

@media (max-width: 1100px) {
    .header { padding: 8px 18px; }
    .header .header-contenido {
        grid-template-columns: 92px minmax(0, 1fr) 250px;
        grid-template-areas: "logo menu search";
        gap: 10px;
    }
    .header .logo { grid-area: logo; }
    .header .menu { grid-area: menu; }
    .header .buscador { grid-area: search; }
    .header .ingresar { display: none; }
    .header .menu a { padding: 0 7px; font-size: 13px; }
}

@media (min-width: 1101px) and (max-width: 1250px) {
    .header { padding-left: 16px; padding-right: 16px; }
    .header .header-contenido {
        grid-template-columns: 82px minmax(540px, 1fr) 238px 92px;
        gap: 10px;
    }
    .header .logo img { width: 72px; }
    .header .menu { gap: 4px; }
    .header .menu a { padding: 0 11px; font-size: 12px; }
}

@media (max-width: 800px) {
    .header { padding: 8px 12px 10px; }
    .header .header-contenido {
        grid-template-columns: 78px minmax(0, 1fr);
        grid-template-areas: "logo search" "menu menu";
        gap: 8px 10px;
    }
    .header .logo img { width: 66px; max-height: 44px; }
    .header .menu {
        width: 100%;
        height: 42px;
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: thin;
    }
    .header .menu a { flex: 0 0 auto; height: 38px; padding: 0 16px; }
}

@media (max-width: 480px) {
    .header .header-contenido {
        grid-template-columns: 62px minmax(0, 1fr);
    }
    .header .logo img { width: 56px; }
    .header .buscador { height: 38px; }
    .header .menu a { padding: 0 13px; font-size: 12px; }
}
