/* public/assets/css/shop.css */

:root {
    --primary-glow: #4f46e5;
    --accent-glow: #8b5cf6;
    --bg-dark: #0f172a;
    --card-bg: rgba(255, 255, 255, 0.03);
}

body {
    background-color: var(--bg-dark);
    color: white;
    font-family: 'Inter', sans-serif;
    /* Fondo sutil animado */
    background-image: 
        radial-gradient(at 0% 0%, hsla(253,16%,7%,1) 0, transparent 50%), 
        radial-gradient(at 50% 0%, hsla(225,39%,30%,1) 0, transparent 50%);
    background-size: cover;
    background-attachment: fixed;
    min-height: 100vh;
}

/* --- NAVBAR (Glassmorphism) --- */
.navbar-glass {
    background: rgba(15, 23, 42, 0.95); /* Fondo oscuro sólido con toque glass */
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dropdown-menu-dark {
    background-color: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-item { color: #cbd5e1; }
.dropdown-item:hover { 
    background-color: rgba(255, 255, 255, 0.05); 
    color: white; 
}

/* --- HERO SECTION --- */
.hero-section {
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
}

.hero-title {
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

/* --- TARJETAS DE PRODUCTO --- */
.product-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-glow);
    box-shadow: 0 20px 40px -15px rgba(79, 70, 229, 0.3);
}

/* Contenedor de Imagen */
.card-img-wrapper {
    position: relative;
    height: 200px; /* Altura estándar PC */
    overflow: hidden;
    background: #1e293b;
}

.card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .card-img-top {
    transform: scale(1.1);
}

/* Badge de Stock */
.stock-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    color: #4ade80;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid rgba(74, 222, 128, 0.2);
}

/* Cuerpo de la tarjeta */
.card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.card-desc {
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.5;
    flex-grow: 1;
}

/* Footer de tarjeta */
.card-footer-custom {
    margin-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
}

/* Botón Carrito */
.btn-cart {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    transition: 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-cart:hover {
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.5);
    transform: scale(1.05);
    color: white;
}

/* --- OPTIMIZACIÓN MÓVIL (Compacto tipo App) --- */
@media (max-width: 768px) {
    /* Header más pequeño */
    .hero-section {
        padding: 30px 0 20px;
    }
    .hero-title {
        font-size: 1.8rem;
    }
    
    /* Tarjetas más compactas */
    .card-img-wrapper {
        height: 140px; /* Imagen más bajita para ver más productos */
    }
    .card-body {
        padding: 1rem;
    }
    .card-title {
        font-size: 1rem;
    }
    .card-desc {
        font-size: 0.85rem;
        display: -webkit-box;
        -webkit-line-clamp: 2; /* Solo 2 líneas de texto */
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .price {
        font-size: 1.25rem;
    }
    .btn-cart {
        padding: 8px 15px; /* Botón más pequeño */
        font-size: 0.9rem;
    }
}

/* --- ESTADOS DE STOCK --- */

/* Badge Verde (Disponible) - Ya lo tenías, pero lo reforzamos */
.stock-badge.available {
    background: rgba(0, 0, 0, 0.6);
    color: #4ade80; /* Verde Neón */
    border: 1px solid rgba(74, 222, 128, 0.2);
}

/* Badge Rojo (Agotado) - NUEVO */
.stock-badge.out {
    background: rgba(0, 0, 0, 0.8);
    color: #f87171; /* Rojo Claro */
    border: 1px solid rgba(248, 113, 113, 0.3);
}

/* Desactivar tarjeta si no hay stock (Opacidad) */
.product-card.disabled {
    opacity: 0.7;
    filter: grayscale(0.8);
    cursor: not-allowed;
}

.product-card.disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: rgba(255, 255, 255, 0.08);
}

/* Botón Agotado */
.btn-cart:disabled {
    background: #334155;
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
}