@font-face {
    font-family: 'Poppins-light';
    src: url('../fonts/poppins/Poppins-Light.ttf') format('woff2');
    font-weight: normal;
    font-style: normal;
}


/* ====== RESET BÁSICO ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ====== HEADER ====== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100vw;
    height: 23vh;
    background: rgba(17, 17, 17, 0.863);
    color: #fff;
    z-index: 9998;
    backdrop-filter: blur(1px);
    overflow: visible;
}

.barra_administrable {
    width: 100%;
    background-color: #F8B133;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins-light', sans-serif;
    height: 3vh;
    /* padding: 0.3em 0; */
}

.barra_administrable h3 {
    font-size: clamp(12px, 1vw, 14px);
    color: #000000;
}

/* --- Top bar: logo + búsqueda + iconos --- */
.top-bar {
    width: 100%;
    max-width: 100vw;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    padding: 15px 5%;
    height: 12vh;
    overflow: hidden;
}

/* Logo */
.logo {
    overflow-y: hidden;
}

.logo img {
    height: auto;
    width: 100%;
    display: block;
    margin-top: -30px;
}

/* Barra de búsqueda */
.search-bar {
    flex: 1;
    margin: 0 30px;
    font-family: 'Poppins-light', sans-serif;
}

/* Para inputs con autofill en Chrome, Edge y Safari */
.search-bar input:-webkit-autofill,
.search-bar input:-webkit-autofill:hover,
.search-bar input:-webkit-autofill:focus,
.search-bar input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0px 1000px rgba(255, 255, 255, 0) inset;
    /* Fondo personalizado */
    -webkit-text-fill-color: #ffffff;
    /* Color del texto */
    transition: background-color 5000s ease-in-out 0s;
    /* Evita parpadeo */
}

.search-bar form {
    display: flex;
    width: 100%;
    max-width: 50vw;
    margin: 0 auto;
}

.search-bar input {
    flex: 1;
    padding: 1vw 2vw;
    border: none;
    border-radius: 6px 0 0 6px;
    outline: none;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.search-bar input::placeholder {
    color: #ddd;
}

.search-bar button {
    padding: 0 15px;
    border: none;
    background: #ffffff;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-bar button img {
    width: 18px;
    height: 18px;
}

/* Acciones: carrito + usuario */
.acciones {
    display: flex;
    gap: 15px;
    background-color: white;
    padding: 5px 10px;
    border-radius: 22px;
}

.separator {
    width: 0.1vw;
    height: 38px;
    background-color: #ccc;
    align-self: center;
}

.icon-btn {
    background: #ffffff;
    border-radius: 12px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    position: relative;
    display: inline-block;
}

.contador-carrito {
    position: absolute;
    top: -0.1vw;
    right: -0.3vw;
    background-color: #F8B133;
    color: rgb(255, 255, 255);
    font-size: 0.50rem;
    font-weight: bold;
    border-radius: 50%;
    width: 0.938vw;
    height: 1.8vh;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
    font-family: 'Poppins-light', sans-serif;
}

.icon-btn img {
    width: 22px;
    height: 22px;
}

.btn_contacto {
    display: flex;
    align-items: center;
    margin: 0 30px;
}

.btn_contacto a {
    text-decoration: none;
    padding: 10px 20px;
    background-color: #F8B133;
    color: white;
    font-family: 'Poppins-Regular', sans-serif;
    border-radius: 20px;
}

/* --- Menú principal (barra amarilla) --- */
.menu-principal {
    width: 100%;
    max-width: 100%;
    height: 8vh;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    background: #202429;
    overflow: hidden;
}

.menu-principal ul {
    font-family: 'Poppins-light', sans-serif;
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6vw;
    width: 100%;
    padding: 0.3vw 0;
}

.menu-principal li {
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-principal a {
    text-decoration: none;
    color: #ffffff;
    font-weight: bold;
    font-size: clamp(12px, 1vw, 14px);
    transition: color 0.3s ease;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-principal a:hover {
    color: #F8B133;
    border-bottom: 1px solid #F8B133;
}

.menu-principal a img {
    width: 3vw;
    height: 50px;
}

.menu-principal a:hover img {
    filter: invert(36%) sepia(74%) saturate(708%) hue-rotate(351deg) brightness(97%) contrast(97%);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    padding: 4px 20px;
    background-color: #202429;
    color: rgb(255, 255, 255);
    text-decoration: none;
    border-radius: 22px;
    font-weight: 500;
    text-transform: uppercase;
    transition: background-color 0.3s;
}

.menu-principal a.btn-icon {
    color: #fff;
}

.menu-principal a.btn-icon:hover {
    color: #fff;
}

.btn-icon:hover {
    background-color: #181b1f;
    /* cambio al pasar mouse */
}

.btn-icon .icon {
    width: 15px;
    /* tamaño del icono */
    height: 15px;
    margin-right: 8px;
    /* espacio entre icono y texto */
}

/*Estilos para la pagina de contacto*/
.site-header.page_contacto {
    background-color: #202429;
}

/*Estilos para la pagina de productos*/
.site-header.page_productos {
    background-color: rgba(32, 36, 41, 0.6);/
}

/*Estilos para la pagina de detalle producto*/
.site-header.page_detalle_producto {
    background-color: #202429;
}


/*Estilos para los resultados de busqueda*/
.resultados-busqueda {
    position: absolute;
    top: 13vh;
    width: 50vw;
    max-width: 50vw;
    background: #fff;
    /* height: 30vh; */
    max-height: 30vh;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 10000;
}


/* Cada item del resultado */
.resultado-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

.resultado-item+.resultado-item {
    border-top: 1px solid #eee;
    /* opcional: separación visual */
}

/* Imagen del producto */
.resultado-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-right: 10px;
    z-index: auto;
}

/* Info de producto */
.resultado-item .info_busqueda {
    display: flex;
    flex-direction: column;
    color: #000;
    flex: 1;
}

.resultado-item .nombre {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin: 0;
}

.resultado-item .precio {
    font-size: 13px;
    color: #b4b4b4;
    margin: 0;
}

.precio-normal {
    text-decoration: line-through;
    color: #999;
    margin-right: 5px;
}


/* Mensaje cuando no hay resultados */
.resultados-busqueda p {
    padding: 10px;
    margin: 0;
    font-size: 14px;
    color: #666;
}

@media screen and (max-width:500px) {

    /* ====== RESET BÁSICO ====== */
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    body {
        overflow-x: hidden;
    }

    .search-bar {
        display: none;
    }


    .logo img {
        height: auto;
        width: 80%;
        display: block;
        margin-top: -20px;
    }

    .acciones {
        display: flex;
        gap: 15px;
        background-color: white;
        padding: 3px 8px;
        border-radius: 22px;
    }

    .icon-btn img {
        width: 20px;
        height: 20px;
    }

    .menu-principal ul {
        font-family: 'Poppins-light', sans-serif;
        list-style: none;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 4vw;
        width: 100%;
        padding: 0.3vw 0;
    }

    .menu-principal a img {
        width: 4vw;
        height: 50px;
    }
}

@media screen and (max-width:400px) {

    /* ====== RESET BÁSICO ====== */
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    body {
        overflow-x: hidden;
    }

    .search-bar {
        display: none;
    }


    .logo img {
        height: auto;
        width: 80%;
        display: block;
        margin-top: -20px;
    }

    .acciones {
        display: flex;
        gap: 15px;
        background-color: white;
        padding: 3px 8px;
        border-radius: 22px;
    }

    .icon-btn img {
        width: 20px;
        height: 20px;
    }

    .menu-principal ul {
        font-family: 'Poppins-light', sans-serif;
        list-style: none;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 4vw;
        width: 100%;
        padding: 0.3vw 0;
    }

    .menu-principal a img {
        width: 3vw;
        height: 50px;
    }
}