::-webkit-scrollbar {
    width: 13px;
}

::-webkit-scrollbar-track {
    background: #121920;
}

::-webkit-scrollbar-thumb {
    background: #1f2b36;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #283746;
}

body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    --color-background-light: #c9c9c9;
    --color-text-dark: #000000;
    --color-text-light: #ffffff;
    --color-accent: #ff6f61;
    /* NAVBAR fijo en todo el sitio */
    padding-top: 80px;
}

.barraNav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

/* contenedor derecho automático */
.barraNav .material-symbols-outlined,
.barraNav .menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: #ffffff;
    font-size: 26px;
    cursor: pointer;
    text-decoration: none;
}

/* asegurar que vayan a la derecha del todo */
.barraNav .menu-icon {
    margin-left: 5px;
}

.barraNav .material-symbols-outlined.ec-cart-ms {
    margin-left: auto;
    /* empuja ambos al extremo derecho */
}

/* hover */
.barraNav .material-symbols-outlined:hover,
.barraNav .menu-icon:hover {
    color: #4bc0b1;
}

.logo {
    width: 10%;
}

/* ==========================================================
   NAVBAR (UNA SOLA FUENTE DE VERDAD)
   - fijo
   - no depende del header/banners
   - no se desacomoda por página
========================================================== */

.energia-nav {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 3000; /* NO 9999 para no tapar sidebar/backdrop */
    background: transparent !important;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 1rem 2rem;
    min-height: 64px;
    box-sizing: border-box;
}

/* centro: buscador centrado por flex (sin margin-left negativo) */
.energia-nav__center {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* derecha: carrito + menu */
.energia-nav__right {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* ==========================================================
   BUSCADOR (ESTABLE)
========================================================== */

.searchContainer {
    width: 500px;
    height: 50px;
    margin-left: 0 !important;  /* antes: -20% (eso te rompía todo) */
    position: relative;
    border-radius: 50px;
    background: #E4E4E4;
    box-sizing: border-box;
}

.searchInput {
    width: calc(100% - 60px);
    height: 100%;
    padding-left: 24px;
    border: none;
    border-radius: 50px;
    background: transparent;
    color: #232323;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    text-transform: capitalize;
    outline: none;
}

.searchIcon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #333333;
    font-size: 24px;
    line-height: 24px;
    cursor: pointer;
}

.separator {
    height: 20px;
    width: 1px;
    background-color: #c9c9c9;
    margin: 0 15px;
}

.listaNav1 {
    display: flex;
    align-items: center;
    margin-left: 0;
}

.listaNav1,
.listaNav2 {
    display: flex;
    list-style: none;
    align-items: center;
}

.listaNav1 li,
.listaNav2 li {
    font-family: "Poppins", sans-serif;
    margin-right: 20px;
}

.elementosNav {
    text-decoration: none;
    color: white;
    font-weight: bold;
    margin-right: 10px;
}

.elementosNav:hover {
    color: #ff0000;
    text-decoration: none;
}

.material-symbols-outlined {
    color: white;
    text-decoration: none;
    font-size: 30px;
    display: block;
    width: 30px;
    height: 30px;
    text-align: center;
    line-height: 30px;
}

.material-symbols-outlined:hover {
    color: #ff0000;
    -webkit-text-stroke: 1px #ff0000;
    text-decoration: none;
}

.barraLateral {
    width: 13%;
    background-color: #121920;
    padding: 20px;
    position: fixed;
    top: 92px;
    left: 0;
    height: 100%;
    z-index: 20;
    box-shadow: 5px 0 5px #121920;
}

.elementosBarraLateral {
    list-style: none;
    padding: 0;
    margin-top: 30%;
}

.sidebarItem {
    color: #ffffff;
    display: flex;
    align-items: center;
    padding: 10px 15px;
    font-size: 16px;
    font-family: "Poppins", sans-serif;
    font-weight: bold;
    margin-bottom: 20px;
    text-decoration: none;
    transition: background-color 0.3s ease, padding-left 0.3s ease;
}

.sidebarItem i {
    margin-right: 10px;
    font-size: 20px;
}

.sidebarItem:hover {
    background-color: #1d2833;
    padding-left: 25px;
    border-radius: 5px;
}

.btnAcceder {
    width: 160px;
    height: 60px;
    background: #121920;
    border: 2px solid white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2em;
    color: white;
    font-weight: bold;
    text-align: center;
    line-height: 56px;
    margin-left: 20px;
    margin-right: 50px;
    text-decoration: none;
    padding: 0 20px;
}

.btnAcceder:hover {
    background: #a20f0f;
    color: #fad5dd;
    border: 2px solid #a20f0f;
}

.userMenu {
    position: relative;
    display: inline-block;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
}

.language-dropdown {
    background-color: #121920;
    color: white;
    border: 1px solid white;
    border-radius: 4px;
    padding: 5px 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    cursor: pointer;
}

.language-dropdown:hover {
    background-color: #1d2833;
}

.userMenuContent {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #121920;
    border: 1px solid white;
    border-radius: 4px;
    z-index: 10;
    min-width: 150px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

.userMenuContent a {
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    display: block;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.userMenuContent a:hover {
    background-color: #1d2833;
}

.userMenu:hover .userMenuContent {
    display: block;
    opacity: 1;
    visibility: visible;
}

.userMenuContent a:last-child {
    border-bottom: none;
}

.nav-item {
    display: inline-block;
    padding: 10px 15px;
}

.resultados-busqueda {
    position: absolute;
    background-color: #ffffff;
    width: 90%;
    max-width: 360px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.result-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid #eee;
}

.result-item:last-child {
    border-bottom: none;
}

.result-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    width: 100%;
}

.result-image {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 10px;
}

.result-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.result-item:hover {
    background-color: #f9f9f9;
}

/* HOVER PARA LA X DE CERRAR EN EL SIDEBAR */
.menu-sidebar .close-btn {
    transition: color .25s ease;
}

.menu-sidebar .close-btn:hover,
.menu-sidebar .close-btn:focus {
    color: #1e90ff !important;
}

.menu-sidebar .close-btn:active {
    transform: scale(0.95);
}

.menu-sidebar .close-btn svg,
.menu-sidebar .close-btn .material-icons {
    color: inherit;
    fill: currentColor;
}

/* === Normalización vertical del botón MENÚ / íconos === */
.energia-nav__toggle,
.energia-nav__right {
    display: inline-flex;
    align-items: center;
}

.energia-nav__toggle .material-icons,
.energia-nav__toggle .material-symbols-outlined,
.energia-nav__toggle span {
    line-height: 1;
    vertical-align: middle;
    position: static !important;
    transform: none !important;
}

.energia-nav__toggle {
    height: 40px;
    padding: 8px 10px;
}

/* hover del toggle */
.energia-nav__toggle:hover {
    color: #4bc0b1 !important;
}

.energia-nav__toggle:hover .material-icons,
.energia-nav__toggle:hover span {
    color: #4bc0b1 !important;
    transition: color 0.25s ease;
}

/* ===== RESPONSIVE ===== */

/* ===== RESPONSIVE (MÓVIL ≤600px) ===== */
@media (max-width: 600px) {

    .barraNav .material-symbols-outlined,
    .barraNav .menu-icon {
        width: 40px;
        height: 40px;
        font-size: 22px;
    }

    .barraNav .material-symbols-outlined.ec-cart-ms,
    .barraNav .menu-icon {
        margin-right: 10px;
        position: relative;
        right: -8px;
    }

    .barraNav .menu-icon {
        margin-left: 8px;
    }

    .material-symbols-outlined {
        font-size: 20px;
        width: 20px;
        height: 20px;
        line-height: 20px;
    }

    /* Items ocultos en móvil */
    .nav-item-acerca-de,
    .nav-item-explora,
    .nav-item-noticias,
    .navbar-items .acerca-de,
    .navbar-items .explora,
    .navbar-items .noticias,
    .navbar-items .lista-deseos {
        display: none !important;
        width: -5%;
        height: auto;
    }

    .listaNav1 li,
    .listaNav2 li {
        font-size: 8px;
        margin-right: 10px;
    }

    .elementosNav {
        font-size: 10px;
        font-weight: bold;
        margin-right: 6px;
    }

    .energia-nav__logo {
        font-size: 0.68rem;
        line-height: 1.05;
        letter-spacing: 0.4px;
        display: inline-block;
        white-space: normal;
        text-align: left;
        margin-right: 2px;
        transform: scale(0.95);
        transform-origin: left top;
    }

    .searchContainer {
        width: 160px !important;
        height: 34px !important;
        margin: 0 !important;
        position: relative;
        border-radius: 50px;
        background: #E4E4E4;
        flex: 0 0 auto;
    }

    .searchInput {
        width: calc(100% - 44px);
        height: 100%;
        padding-left: 16px !important;
        border: none;
        border-radius: 50px;
        background: transparent;
        color: #232323;
        font-size: 12px !important;
        font-family: 'Poppins', sans-serif;
        font-weight: 400;
        text-transform: capitalize;
        outline: none;
    }

    .searchIcon {
        position: absolute;
        right: 10px !important;
        top: 50%;
        transform: translateY(-50%);
        color: #333333;
        font-size: 18px !important;
        line-height: 18px;
        cursor: pointer;
    }

    .btnAcceder,
    .menu-icon,
    .nav-item-menu,
    .menu {
        transform: scale(0.7);
        transform-origin: right center;
    }

    .btnAcceder {
        height: 42px;
        line-height: 38px;
        padding: 0 12px;
        font-size: 0.9em;
        margin: 0;
    }

    .energia-nav {
        padding-right: .25rem !important;
        padding-left: .75rem !important;
    }

    .energia-nav__toggle span:last-child {
        display: none !important;
    }

    .energia-nav__toggle .material-icons {
        font-size: 2rem;
        margin: 0;
        padding: 0;
    }
}

@media (min-width: 601px) and (max-width: 900px) {
    .searchContainer {
        width: 300px !important;
        height: 45px !important;
        margin-left: 0 !important;
    }

    .searchInput {
        font-size: 15px !important;
    }

    .searchIcon {
        right: 15px !important;
        font-size: 22px !important;
    }
}

@media (min-width: 901px) and (max-width: 1200px) {
    .searchContainer {
        width: 350px !important;
        height: 45px !important;
        margin-left: 0 !important;
    }

    .searchInput {
        font-size: 16px !important;
    }

    .searchIcon {
        right: 18px !important;
        font-size: 24px !important;
    }

    .barraNav .material-symbols-outlined.ec-cart-ms,
    .barraNav .menu-icon {
        margin-right: 12px;
        position: relative;
        right: -10px;
    }

    .barraNav .menu-icon {
        margin-left: 10px;
    }
}

@media (min-width: 1201px) {
    .sidebar {
        display: block;
        width: 200px;
    }

    .energia-nav__toggle {
        display: inline-flex;
        align-items: center;
    }

    .sidebarItem {
        font-size: 0.8rem;
        line-height: 1.2;
        padding: 8px 12px;
    }

    .sidebarItem i {
        font-size: 0.8rem;
        margin-right: 8px;
    }

    .sidebar {
        display: block;
        width: 200px !important;
        font-size: 0.8rem !important;
    }

    .sidebar li,
    .sidebar a,
    .sidebar span {
        font-size: 0.8rem !important;
        line-height: 1 !important;
        padding: 4px !important;
    }

    .sidebar .icon {
        font-size: 0.8rem !important;
    }

    .navbar-items {
        display: block;
    }

    .menu-icon {
        display: none;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        font-size: 90%;
    }

    p,
    li,
    a,
    span,
    .texto-banner,
    .nombreJuego,
    .precio {
        font-size: 90%;
    }

    .searchContainer {
        width: 320px;
        height: 40px;
        margin-left: 0 !important;
    }

    .searchInput {
        font-size: 16px;
    }

    .searchIcon {
        right: 18px;
        font-size: 24px;
    }
}
