/* products.css - Exclusivo para la grilla de productos y filtros */

/* GRID & CARDS */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    animation: fadeIn 0.4s ease-out;
    box-shadow: var(--shadow-sm);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-premium);
}

.card-img-container {
    height: auto;
    aspect-ratio: 1 / 1;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 15px;
    box-sizing: border-box;
}

.card-img-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.discount-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--grad-accent);
    color: white;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 800;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(211, 47, 47, 0.3);
}

.card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-category-tag {
    font-size: 0.7rem;
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--secondary);
}

.price-container {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.current-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--secondary);
}

.stock-info {
    margin-top: 15px;
    font-size: 0.85rem;
    color: var(--text-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f2f6;
    padding-top: 10px;
    margin-bottom: 10px;
}

/* ACCIONES DE USUARIO/ADMIN EN CARD */
.card-actions {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #e1e1e1;
}

.user-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.qty-input {
    width: 60px;
    padding: 8px;
    border: 1px solid #dfe6e9;
    border-radius: 8px;
    text-align: center;
}

.btn-add-cart {
    flex-grow: 1;
    background: var(--grad-primary);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(26, 115, 232, 0.2);
}

.btn-add-cart:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(26, 115, 232, 0.3);
}

.btn-add-cart:disabled {
    background: #b2bec3;
    cursor: not-allowed;
}

.admin-actions {
    display: flex;
    gap: 10px;
}

.btn-edit,
.btn-delete {
    flex-grow: 1;
    border: none;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    color: white;
}

.btn-edit {
    background: #f1c40f;
    color: #333;
}

.btn-delete {
    background: var(--danger);
}