@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');


*::after,
*::before,
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body, html{
    margin: 0 auto;
    max-width: 1200px;
    font-family: "Poppins", serif;  
    background-color: rgb(0, 0, 0);
}
.index{
    width: 75px;
    min-width: 75px;
    flex: 0 0 75px;
    display: flex;
    align-items: center; 
    justify-content: center;
}
.logo-index{
    width: 48px;
    height: 48px;
    object-fit: contain;
    display: block;
    margin: 0;
}
.icon-cart{
    margin: 0.3rem;
    width: 40px;
    height: 40px;
    stroke: #ffffff;
}
.icon-cart:hover{
    cursor: pointer;
}
img{
    max-width: 100%;
    margin: 0.3rem;
}
#loginBtn{
    margin-left: 1rem;
    font-family: "Poppins", serif; 
    background-color: #ffffff;
    color: #000000;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
}
/*Menu del usuario*/
.user-menu-wrapper { position: relative; }

.user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #0f0f0f;
  border: 1px solid #ffffff22;
  border-radius: 12px;
  min-width: 240px;
  max-width: 90vw;
  padding: 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,.45);
  z-index: 1000;
}

.hidden-menu { display: none; }

.user-menu-header { padding: 6px 8px 10px; }
.user-menu-header #userMenuName {
    font-weight: 600;
    color: beige; 
}
.user-menu-header .muted { color: #bbbbbb; font-size: .9rem; }

.user-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  color: #f5f5f5;
  border: 0;
  padding: 10px 8px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  font: 500 0.95rem/1.2 Poppins, system-ui, sans-serif;
}

.user-menu-item:hover { background: #ffffff12; }
.user-menu-item.danger:hover { background: #ff2d2d22; }


/*header*/
header{
    position: sticky;
    top: 0;
    z-index: 9999;
    background-color: #000000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 5px 0 5px 0;
}

.toolbar{
    flex: 1 1 560px;
    max-width: 560px;
    display: flex;
    justify-content: center;
}

/* Barra combinada: búsqueda + filtro */
.search-combo{
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    height: 50px;
    padding-left: 17px;
    border: 1px solid #ffffff;
    border-radius: 999px;
    background-color: #ffffff;
    color: #000000;
    box-shadow: 0 5px 18px rgba(255, 255, 255, 0.08);
    transition:
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.search-combo:focus-within{
    box-shadow:
        0 0 0 3px rgba(255, 255, 255, 0.18),
        0 8px 24px rgba(0, 0, 0, 0.30);
}

.search-icon{
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    stroke-width: 1.8;
    color: #555555;
}

#searchBox{
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    padding: 0 14px;
    border: 0;
    outline: 0;
    background-color: transparent;
    color: #000000;
    font-family: "Poppins", serif;
    font-size: 15px;
}

#searchBox::placeholder{
    color: #777777;
}

/* Quita la decoración adicional que algunos navegadores ponen */
#searchBox::-webkit-search-decoration{
    display: none;
}

.search-divider{
    flex: 0 0 auto;
    width: 1px;
    height: 25px;
    background-color: #dddddd;
}

/* Botón Marca dentro del buscador */
.brand-toggle{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex: 0 0 auto;
    height: 40px;
    max-width: 155px;
    margin: 0 5px;
    padding: 0 13px;
    border: 0;
    border-radius: 999px;
    outline: 0;
    background-color: transparent;
    color: #222222;
    cursor: pointer;
    font-family: "Poppins", serif;
    font-size: 13px;
    font-weight: 600;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.brand-toggle:hover{
    background-color: #eeeeee;
}

.brand-toggle:active{
    transform: scale(0.97);
}

.brand-toggle:disabled{
    color: #999999;
    cursor: wait;
}

.brand-toggle.has-brand{
    background-color: #111111;
    color: #ffffff;
}

.filter-icon{
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    stroke-width: 1.8;
}

.brand-chevron{
    flex: 0 0 auto;
    width: 15px;
    height: 15px;
    stroke-width: 2;
    transition: transform 0.2s ease;
}

.brand-toggle[aria-expanded="true"] .brand-chevron{
    transform: rotate(180deg);
}

.brand-toggle-text{
    display: block;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Menú desplegable de marcas */
.brand-menu{
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 10000;
    width: min(290px, calc(100vw - 24px));
    max-height: 340px;
    padding: 7px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 16px;
    background-color: #151515;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.55);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-7px) scale(0.98);
    transform-origin: top right;

    transition:
        opacity 0.18s ease,
        visibility 0.18s ease,
        transform 0.18s ease;
}

.brand-menu.is-open{
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

/* Cada marca dentro del menú */
.brand-option{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    padding: 11px 12px;
    border: 0;
    border-radius: 10px;
    background-color: transparent;
    color: #f4f4f4;
    cursor: pointer;
    font-family: "Poppins", serif;
    text-align: left;
    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}

.brand-option:hover{
    background-color: rgba(255, 255, 255, 0.10);
}

.brand-option[aria-selected="true"]{
    background-color: #ffffff;
    color: #000000;
}

.brand-option-name{
    overflow: hidden;
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-option-count{
    flex: 0 0 auto;
    min-width: 28px;
    padding: 3px 7px;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.12);
    color: #bbbbbb;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
}

.brand-option[aria-selected="true"] .brand-option-count{
    background-color: #e9e9e9;
    color: #333333;
}

/* Barra de desplazamiento del menú */
.brand-menu::-webkit-scrollbar{
    width: 7px;
}

.brand-menu::-webkit-scrollbar-thumb{
    border-radius: 999px;
    background-color: #555555;
}

.header-left{
    display: flex;
    align-items: center;
}
.container-icon{
    position: relative;
}
.count-products{
    position: absolute;
    top: 55%;
    right: 0;
    background-color: #ffffff;
    color: #000000;
    width: 25px;
    height: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}
#contador-productos{
    font-size: 12px;
}
.container-cart-products{
    position: absolute;
    top: 50px;
    right: 0;
    background-color: #ffffff;
    max-width: 400px;
    z-index: 1;
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    
}
.cart-product{             /* se ancla al borde derecho */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px;

    border-bottom: 1px solid rgba(0, 0, 0, 0.20);

}
.info-cart-product{
    display: flex;
    justify-content: space-between;
    flex: 0.8;
}
.titulo-producto-carrito{
    font-size: 20px;
}
.precio-producto-carrito{
    font-weight: 700;
    font-size: 20px;
    margin-left: 10px;
}
.cantidad-producto-carrito{
    font-weight: 400;
    font-size: 20px;
    padding-right: 10px;
}
.icon-close{
    width: 25px;
    height: 25px;
}
.icon-close:hover{
    stroke: red;
    cursor: pointer;
}
.cart-total{
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
    gap: 20px;
}
.cart-total h3{
    font-size: 20px;
    font-weight: 700;
}
h3{
    padding: 1rem;
}
.total-pagar{
    font-size: 20px;
    font-weight: 900;
}
.hidden-cart{
    display: none;
}
/* Main */
@media (max-width:600px){
    .container-items{
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        gap: 20px;
    }
}
@media (min-width:600px){
    .container-items{
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}
@media (min-width:1100px){
    .container-items{
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}
.item{
    border-radius: 10px;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
}
.item:hover{
    box-shadow: 0 10px 20px rgba(0,0,0,0.20);
}
.product-image-wrap{
    height: 300px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
}
.item img,
.product-img{
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: all .5s;
}
.product-img--placeholder{
    padding: 10px;
    background: #f6f7f8;
}
.item:hover img{
    transform: scale(1.15);
}
.item:hover .product-img--placeholder{
    transform: none;
}
.info-product{
    flex: 1;
    padding: 15px 30px;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.product-title {
    font-size: 1.3rem;
    min-height: 3em;
    line-height: 1.5em;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.price{
    font-size: 1.13rem;
    font-weight: 900;
    
}
.info-product button{
    border: none;
    background: none;
    font-family: 'Poppins', sans-serif;
    background-color: #000000;
    color: rgb(255, 255, 255);
    padding: 15px 10px;
    cursor: pointer;
    border-radius: 0.5rem;
}
.product-actions{
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.muted.small{
    height: 2.4em;
    line-height: 1.2em;
    overflow: hidden;
}
.product-actions .price{
    margin: 0;
}

.product-actions .btn-add-cart{
    width: 100%;
}
.cart-empty{
    padding: 20px;
    text-align: center;
}
.hidden{
    display: none;
}
a {
    text-decoration: none;
    color: #000;
}
a:hover{
    text-decoration: underline;
}
/* Estilos cuando el enlace está siendo presionado (activo) */
a:active {
  color: rgb(0, 0, 255);
}
/* --- Nuevo estilo para el botón "Comprar" --- */
.btn-buy {
    border: none;
    background: none;
    font-family: 'Poppins', sans-serif;
    background-color: #28a745; /* Un color verde para el botón de compra */
    color: rgb(255, 255, 255);
    padding: 15px 10px;
    cursor: pointer;
    width: calc(100% - 60px); /* Para que ocupe casi todo el ancho, restando el padding */
    margin: 10px 30px 20px 30px; /* Margen para centrarlo y separarlo */
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}
.pager {
    min-height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.load-more {
    opacity: 0;
    pointer-events: none;
}
.contenedor-redes {
    padding-top: 3rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}.logo-redes {
    width: 45px;
    height: auto; 
    margin-bottom: 10px; 
}
.redes a {
    text-decoration: none;
    list-style-type: none; 
}
ul{
    padding-left: 0;
}
li{
    display: inline-block;
    margin: none;
}
.footer {
    display: block;
    text-align: center;
	color: #fff;
}
.footer a {
	color: #fff;
}

@media (max-width: 760px){
    header{
        gap: 8px;
    }

    .toolbar{
        min-width: 0;
        max-width: none;
    }

    .search-combo{
        height: 46px;
        padding-left: 13px;
    }

    .search-icon{
        width: 18px;
        height: 18px;
    }

    #searchBox{
        padding: 0 9px;
        font-size: 14px;
    }

    .brand-toggle{
        height: 36px;
        max-width: 105px;
        margin: 0 4px;
        padding: 0 9px;
    }

    .brand-toggle-text{
        max-width: 55px;
    }

    .filter-icon{
        width: 16px;
        height: 16px;
    }

    .brand-menu{
        right: 0;
        width: min(280px, calc(100vw - 20px));
    }
}

/* Ajuste fino del encabezado para celulares */
@media (max-width: 760px){

    header{
        display: grid;
        grid-template-columns: 42px minmax(0, 1fr) auto;
        align-items: center;
        gap: 6px;
        padding: 6px 4px;
    }

    /* Logo más compacto */
    .index{
        width: 42px;
        min-width: 0;
        flex: none;
    }

    .logo-index{
        width: 36px;
        height: 36px;
        margin: 0;
    }

    /* La barra toma todo el espacio disponible */
    .toolbar{
        width: 100%;
        min-width: 0;
        max-width: none;
        flex: none;
    }

    .search-combo{
        width: 100%;
        min-width: 0;
        height: 44px;
        padding-left: 11px;
    }

    .search-icon{
        width: 17px;
        height: 17px;
    }

    #searchBox{
        min-width: 0;
        padding: 0 7px;
        font-size: 14px;
    }

    .search-divider{
        height: 22px;
    }

    /* Marca ocupa menos, pero muestra la palabra completa */
    .brand-toggle{
        flex: 0 0 auto;
        min-width: 72px;
        max-width: 92px;
        height: 36px;
        margin: 0 3px;
        padding: 0 7px;
        gap: 4px;
        font-size: 12px;
    }

    .brand-toggle-text{
        max-width: 52px;
    }

    /*
     * En celular quitamos el icono de filtro.
     * La flecha sigue indicando que es desplegable.
     */
    .filter-icon{
        display: none;
    }

    .brand-chevron{
        width: 13px;
        height: 13px;
    }

    /* Entrar y carrito más compactos */
    .header-left{
        display: flex;
        align-items: center;
        flex-shrink: 0;
        gap: 3px;
    }

    #loginBtn{
        height: 40px;
        min-width: 68px;
        margin-left: 0;
        padding: 8px 12px;
        border-radius: 999px;
        font-size: 14px;
        line-height: 1;
    }

    .container-icon{
        display: flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 42px;
    }

    .container-cart-icon{
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .icon-cart{
        width: 32px;
        height: 32px;
        margin: 0;
    }

    .count-products{
        top: 21px;
        right: -3px;
        width: 21px;
        height: 21px;
    }

    #contador-productos{
        font-size: 10px;
    }

    .brand-menu{
        right: 0;
        width: min(280px, calc(100vw - 16px));
    }
}