/* ============================================ */
/* ESTILOS DE INDEX PRODUCTOS.PHP                     */
/* Wiltronis Store - v2.0                       */
/* ============================================ */

/* ============================================ */
/* CONTENEDOR PRINCIPAL                         */
/* ============================================ */
.productos-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ============================================ */
/* ENCABEZADO DE PÁGINA                         */
/* ============================================ */
.productos-page-header {
    margin-bottom: 30px;
}

.productos-page-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.productos-page-header h1 i {
    color: #e94560;
}

.productos-page-header p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 16px;
}

.productos-page-header .resultados {
    color: rgba(255, 255, 255, 0.3);
    font-size: 14px;
    margin-top: 5px;
}

/* ============================================ */
/* FILTROS                                      */
/* ============================================ */
.filtros-container {
    background: #1a1a2e;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.filtros-container .filtro-grupo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 180px;
}

.filtros-container .filtro-grupo label {
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.filtros-container .filtro-grupo input,
.filtros-container .filtro-grupo select {
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    width: 100%;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s;
}

.filtros-container .filtro-grupo input:focus,
.filtros-container .filtro-grupo select:focus {
    outline: none;
    border-color: #e94560;
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.1);
}

.filtros-container .filtro-grupo input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.filtros-container .filtro-grupo select option {
    background: #1a1a2e;
    color: #fff;
}

.filtros-container .acciones-filtro {
    display: flex;
    gap: 10px;
}

.btn-filtrar {
    padding: 10px 24px;
    background: #e94560;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}

.btn-filtrar:hover {
    background: #c23152;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(233, 69, 96, 0.3);
}

.btn-limpiar {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.btn-limpiar:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* ============================================ */
/* CATEGORÍAS RÁPIDAS                           */
/* ============================================ */
.categorias-rapidas {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
    padding: 0;
}

.categorias-rapidas a {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.categorias-rapidas a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.categorias-rapidas a.active {
    background: #e94560;
    color: #fff;
    border-color: #e94560;
}

.categorias-rapidas a.todas {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.3);
}

.categorias-rapidas a.todas:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.categorias-rapidas a.todas.active {
    background: #e94560;
    color: #fff;
}

/* ============================================ */
/* GRID DE PRODUCTOS                            */
/* ============================================ */
.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

/* ============================================ */
/* TARJETA DE PRODUCTO - VERSIÓN CLICKABLE      */
/* ============================================ */
.producto-card {
    background: #1a1a2e;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
}

.producto-card:hover {
    transform: translateY(-5px);
    border-color: rgba(233, 69, 96, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.producto-card:active {
    transform: scale(0.98);
}

/* Contenedor de imagen */
.producto-card .imagen-container {
    position: relative;
    overflow: hidden;
    background: #0f0f1a;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.producto-card .imagen-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.producto-card:hover .imagen-container img {
    transform: scale(1.05);
}

/* Indicador visual de que es clickable */
.click-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(233, 69, 96, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
    z-index: 5;
    backdrop-filter: blur(4px);
}

.producto-card:hover .click-indicator {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* ============================================ */
/* BOTÓN FAVORITOS                              */
/* ============================================ */
.producto-card .btn-favorito {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(15, 15, 26, 0.8);
    border: none;
    color: rgba(255, 255, 255, 0.3);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.producto-card .btn-favorito:hover {
    transform: scale(1.15);
    background: rgba(15, 15, 26, 0.9);
}

.producto-card .btn-favorito.activo {
    color: #e94560;
    background: rgba(233, 69, 96, 0.15);
    border-color: rgba(233, 69, 96, 0.2);
}

.producto-card .btn-favorito.activo:hover {
    background: rgba(233, 69, 96, 0.25);
}

.producto-card .btn-favorito.loading {
    pointer-events: none;
    opacity: 0.5;
}

.producto-card .btn-favorito.animar {
    animation: likeAnimation 0.4s ease;
}

/* ============================================ */
/* BADGES                                       */
/* ============================================ */
.producto-card .badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    z-index: 5;
}

.producto-card .badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-oferta {
    background: #e94560;
    color: #fff;
}

.badge-nuevo {
    background: #2ecc71;
    color: #fff;
}

.badge-destacado {
    background: #f39c12;
    color: #fff;
}

.badge-agotado {
    background: #e74c3c;
    color: #fff;
}

/* ============================================ */
/* INFORMACIÓN DEL PRODUCTO                     */
/* ============================================ */
.producto-card .info {
    padding: 16px 20px 0px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.producto-card .categoria-nombre {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.producto-card h3 {
    font-size: 16px;
    margin-bottom: 8px;
    line-height: 1.4;
    min-height: 44px;
    color: #fff;
    font-weight: 600;
}

.producto-card .precios {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.producto-card .precio-actual {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

.producto-card .precio-oferta {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.3);
    text-decoration: line-through;
}

.producto-card .stock-info {
    font-size: 12px;
    margin-bottom: 10px;
}

.stock-info .agotado {
    color: #e74c3c;
}

.stock-info .disponible {
    color: #27ae60;
}

.stock-info .ultimas {
    color: #f39c12;
}

/* ============================================ */
/* ACCIONES - BOTÓN CARRITO                     */
/* ============================================ */
.producto-card .acciones {
    padding: 0 20px 18px 20px;
    margin-top: auto;
}

.producto-card .btn-agregar {
    width: 100%;
    background: #e94560;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 2;
    position: relative;
}

.producto-card .btn-agregar:hover {
    background: #c23152;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(233, 69, 96, 0.3);
}

.producto-card .btn-agregar:disabled {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.producto-card .btn-agregar:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* ============================================ */
/* ESTADO VACÍO                                 */
/* ============================================ */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: rgba(255, 255, 255, 0.3);
    grid-column: 1 / -1;
}

.empty-state i {
    font-size: 60px;
    display: block;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.05);
}

.empty-state h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.5);
}

.empty-state p {
    color: rgba(255, 255, 255, 0.2);
}

/* ============================================ */
/* NOTIFICACIONES FLOTANTES                     */
/* ============================================ */
.notificacion-flotante {
    position: fixed;
    top: 90px;
    right: 20px;
    background: #1a1a2e;
    color: #fff;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 99999;
    max-width: 350px;
    animation: slideIn 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

/* ============================================ */
/* ANIMACIONES                                  */
/* ============================================ */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes likeAnimation {
    0% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(0.9); }
    75% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes slideIn {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================================ */
/* RESPONSIVE                                   */
/* ============================================ */
@media (max-width: 992px) {
    .productos-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .productos-page-header h1 {
        font-size: 24px;
    }
    
    .filtros-container {
        flex-direction: column;
        padding: 15px;
    }
    
    .filtros-container .filtro-grupo {
        width: 100%;
        min-width: unset;
    }
    
    .filtros-container .acciones-filtro {
        width: 100%;
        display: flex;
        gap: 10px;
    }
    
    .filtros-container .acciones-filtro .btn-filtrar {
        flex: 1;
    }
    
    .filtros-container .acciones-filtro .btn-limpiar {
        flex: 0.5;
        justify-content: center;
    }
    
    .productos-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
    
    .producto-card .imagen-container {
        height: 160px;
    }
    
    .producto-card .info {
        padding: 12px 12px 0px 12px;
    }
    
    .producto-card h3 {
        font-size: 14px;
        min-height: 36px;
    }
    
    .producto-card .precio-actual {
        font-size: 16px;
    }
    
    .producto-card .acciones {
        padding: 0 12px 14px 12px;
    }
    
    .categorias-rapidas {
        gap: 6px;
    }
    
    .categorias-rapidas a {
        font-size: 12px;
        padding: 4px 12px;
    }
}

@media (max-width: 480px) {
    .productos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .producto-card .imagen-container {
        height: 130px;
    }
    
    .producto-card .info {
        padding: 10px 10px 0px 10px;
    }
    
    .producto-card h3 {
        font-size: 12px;
        min-height: 30px;
    }
    
    .producto-card .precio-actual {
        font-size: 14px;
    }
    
    .producto-card .btn-agregar {
        font-size: 12px;
        padding: 8px 12px;
    }
    
    .producto-card .acciones {
        padding: 0 10px 12px 10px;
    }
    
    .productos-page-header h1 {
        font-size: 20px;
    }
    
    .click-indicator {
        display: none;
    }
}
