/* =====================================================
   PÁGINA DE PRODUCTOS  (css/productos.css)
   Se carga DESPUÉS de estilos.css
===================================================== */

[hidden] {
    display: none !important;
}

.productos-pagina {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 25px 90px;
}


/* ---------- Encabezado ---------- */

.productos-encabezado {
    margin-bottom: 30px;
}

.productos-etiqueta {
    display: inline-block;
    margin-bottom: 10px;
    padding: 6px 15px;
    border-radius: 30px;
    background: rgba(0, 191, 255, .13);
    color: #0088cc;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
}

.productos-titulo {
    margin-bottom: 8px;
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -1.5px;
    color: #111;
}

.productos-subtitulo {
    font-size: 16px;
    color: #777;
}


/* ---------- Filtros ---------- */

.filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 26px;
}

.filtro-btn {
    padding: 10px 20px;
    border: 2px solid #e2e2e2;
    border-radius: 30px;
    background: #fff;
    color: #333;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: .25s;
}

.filtro-btn:hover {
    border-color: #111;
    transform: translateY(-2px);
}

.filtro-btn.activo {
    border-color: #111;
    background: #111;
    color: #fff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .22);
}

.filtro-btn:focus-visible,
.btn-ver-todos:focus-visible,
.productos-orden select:focus-visible,
.tarjeta:focus-visible {
    outline: 3px solid #00bfff;
    outline-offset: 3px;
}


/* ---------- Barra: cantidad + orden ---------- */

.productos-barra {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 26px;
}

.productos-cantidad {
    font-size: 14px;
    color: #888;
}

.productos-orden {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.productos-orden select {
    height: 42px;
    padding: 0 14px;
    border: 2px solid #e2e2e2;
    border-radius: 12px;
    background: #fff;
    color: #111;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    cursor: pointer;
}


/* ---------- Tarjetas ---------- */

.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 26px;
}

.tarjeta {
    --acento: #00bfff;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 22px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .07);
    transition: .3s;
    animation: tarjetaEntrada .5s ease both;
}

@keyframes tarjetaEntrada {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.tarjeta:hover {
    transform: translateY(-8px);
    box-shadow: 0 22px 45px rgba(0, 0, 0, .15);
}

.tarjeta-foto {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 240px;
    overflow: hidden;
    background: radial-gradient(circle at 50% 42%, #fff 0%, #eee 100%);
}

/* Color del tenis, muy suave, detrás de la foto */

.tarjeta-foto::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--acento);
    opacity: .10;
}

.tarjeta-foto img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    padding: 22px;
    object-fit: contain;
    mix-blend-mode: multiply;
    transition: transform .5s ease;
}

.tarjeta:hover .tarjeta-foto img {
    transform: scale(1.08) rotate(-2deg);
}

.tarjeta-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px 22px 22px;
    border-top: 4px solid var(--acento);
}

.tarjeta-marca {
    align-self: flex-start;
    padding: 4px 12px;
    border-radius: 20px;
    background: color-mix(in srgb, var(--acento) 14%, white);
    color: color-mix(in srgb, var(--acento) 70%, black);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
}

.tarjeta-nombre {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -.3px;
    color: #111;
}

.tarjeta-pie {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.tarjeta-precio {
    font-size: 20px;
    font-weight: 800;
    color: #111;
}

.tarjeta-precio small {
    font-size: 11px;
    font-weight: 600;
    color: #888;
}

.tarjeta-ver {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 12px;
    background: #111;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    transition: .3s;
}

.tarjeta:hover .tarjeta-ver {
    background: var(--acento);
}


/* ---------- Sin resultados ---------- */

.productos-vacio {
    padding: 70px 20px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .07);
    text-align: center;
}

.productos-vacio i {
    margin-bottom: 18px;
    font-size: 52px;
    color: #d5d5d5;
}

.productos-vacio h3 {
    margin-bottom: 8px;
    font-size: 24px;
}

.productos-vacio p {
    margin-bottom: 24px;
    color: #888;
}

.btn-ver-todos {
    padding: 14px 34px;
    border: none;
    border-radius: 14px;
    background: #111;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: .3s;
}

.btn-ver-todos:hover {
    background: #00bfff;
    transform: translateY(-2px);
}


/* ---------- Celular ---------- */

@media (max-width: 600px) {

    .productos-pagina {
        padding: 30px 16px 60px;
    }

    .productos-titulo {
        font-size: 32px;
    }

    /* Los filtros se deslizan de lado */

    .filtros {
        flex-wrap: nowrap;
        margin-right: -16px;
        padding-right: 16px;
        padding-bottom: 8px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .filtros::-webkit-scrollbar {
        display: none;
    }

    .filtro-btn {
        flex-shrink: 0;
    }

    .productos-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

}


/* ---------- Etiqueta de agotado ---------- */

.tarjeta-agotado {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #111;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 5px 10px;
    border-radius: 999px;
    z-index: 2;
}

.tarjeta.agotado .tarjeta-foto img {
    opacity: .5;
    filter: grayscale(.7);
}


/* ---------- Que los nombres siempre quepan en el recuadro blanco ---------- */

.productos-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
}

.tarjeta,
.tarjeta-info {
    min-width: 0;
}

.tarjeta-nombre {
    font-size: 19px;
    line-height: 1.25;
    min-height: 2.5em;            /* todas las tarjetas quedan parejas */
    overflow-wrap: anywhere;
    word-break: break-word;
}

.tarjeta-marca {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tarjeta-pie {
    flex-wrap: wrap;
    gap: 10px;
}


/* ---------- Botones de marcas ---------- */

.filtros-marca { margin-top: 10px; align-items: center; }

.filtro-etiqueta {
    font-size: 14px;
    font-weight: 700;
    color: #111;
    margin-right: 4px;
}
