/* ==================== PRODUCT CARD IMPROVEMENTS ==================== */

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid rgba(147, 51, 234, 0.1);
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.product-card.out-of-stock {
    opacity: 0.7;
    border-color: rgba(239, 68, 68, 0.3);
}

.product-card.out-of-stock::before {
    content: 'OUT OF STOCK';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    background: rgba(239, 68, 68, 0.95);
    color: white;
    padding: 0.75rem 2.5rem;
    font-weight: 900;
    font-size: 1.3rem;
    border-radius: 8px;
    z-index: 100;
    pointer-events: none;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
    letter-spacing: 2px;
}

.product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-new { background: var(--badge-new); color: white; }
.badge-hot { background: var(--badge-hot); color: white; }
.badge-sale { background: var(--badge-sale); color: white; }
.badge-oos { background: var(--sale-color); color: white; }

.product-image {
    width: 100%;
    aspect-ratio: 1;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.quick-action {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-1);
    border-radius: 50%;
    color: white;
    font-size: 1.3rem;
    transition: var(--transition);
    cursor: pointer;
}

.quick-action:hover {
    transform: scale(1.15);
    box-shadow: 0 5px 20px rgba(147, 51, 234, 0.5);
}

.product-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-category {
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.product-title {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-weight: 700;
    line-height: 1.3;
    min-height: 2.6rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.6;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 4.8rem;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    min-height: 1.5rem;
}

.stars {
    color: var(--accent-color);
    font-size: 0.9rem;
}

.rating-count {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(147, 51, 234, 0.1);
    margin-top: auto;
    min-height: 4.5rem;
}

.product-price {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
}

.price-current {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--price-color);
    line-height: 1;
}

.price-original {
    position: absolute;
    top: -0.6rem;
    left: calc(100% + 0.25rem);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.35);
    text-decoration: line-through;
    font-weight: 600;
    white-space: nowrap;
}

.add-to-cart-btn {
    padding: 0.75rem 1.5rem;
    background: var(--gradient-1);
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    white-space: nowrap;
    min-width: 120px;
    justify-content: center;
}

.add-to-cart-btn:hover:not(.disabled) {
    box-shadow: var(--shadow-glow);
    transform: scale(1.05);
}

.add-to-cart-btn.disabled {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    cursor: not-allowed;
    opacity: 0.6;
}

.add-to-cart-btn.disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Out of stock product overlay on image */
.product-card.out-of-stock .product-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 5;
}
