/* Professional Product Cards for Category Pages */

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

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: #4d8532;
}

/* Product Image Container */
.product-image-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

/* Badges */
.discount-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #ff4757;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 2;
}

.product-category-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(77, 133, 50, 0.9);
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

/* Product Actions Overlay */
.product-actions-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.quick-view-btn,
.wishlist-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    color: #4d8532;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.quick-view-btn:hover,
.wishlist-btn:hover {
    background: #4d8532;
    color: white;
    transform: scale(1.1);
}

/* Product Info */
.product-info {
    padding: 1.5rem;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
}

.product-sku {
    color: #666;
    font-weight: 500;
}

.stock-status {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.stock-status.in-stock {
    color: #27ae60;
}

.stock-status.out-of-stock {
    color: #e74c3c;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 0.75rem 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6rem;
}

/* Rating */
.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.75rem;
}

.stars {
    color: #ffc107;
    font-size: 0.9rem;
}

.rating-text {
    color: #666;
    font-size: 0.8rem;
}

/* Description */
.product-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Product Details */
.product-details {
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.product-details > div {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    color: #555;
}

.product-details > div:last-child {
    margin-bottom: 0;
}

.product-details i {
    color: #4d8532;
    width: 12px;
}

/* Pricing */
.product-pricing {
    margin-bottom: 1.25rem;
}

.price-container {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 6px;
}

.price-current {
    font-size: 1.4rem;
    font-weight: bold;
    color: #4d8532;
}

.price-original {
    text-decoration: line-through;
    color: #999;
    font-size: 1rem;
}

.shipping-info {
    color: #27ae60;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.shipping-info i {
    font-size: 0.75rem;
}

/* Product Actions */
.product-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 2px solid #e1e8ed;
    border-radius: 25px;
    background: white;
    overflow: hidden;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #4d8532;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    font-size: 0.8rem;
}

.qty-btn:hover:not(:disabled) {
    background: #f0f8f2;
}

.qty-btn:disabled {
    color: #ccc;
    cursor: not-allowed;
}

.qty-input {
    width: 40px;
    height: 32px;
    text-align: center;
    border: none;
    outline: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.add-to-cart-btn {
    flex: 1;
    background: linear-gradient(135deg, #4d8532 0%, #5a9c3a 100%);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.9rem;
}

.add-to-cart-btn:hover:not(.disabled) {
    background: linear-gradient(135deg, #3a6326 0%, #4a7d2e 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(77, 133, 50, 0.3);
}

.add-to-cart-btn.disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.add-to-cart-btn i {
    font-size: 0.8rem;
}

/* Loading and No Results States */
.loading {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.loading i {
    font-size: 2rem;
    color: #4d8532;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.no-products {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

.no-products i {
    font-size: 4rem;
    color: #4d8532;
    margin-bottom: 1.5rem;
    opacity: 0.7;
}

.no-products h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.no-products a {
    color: #4d8532;
    text-decoration: none;
    font-weight: 500;
}

.no-products a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
        padding: 1rem 0;
    }
    
    .product-card {
        margin: 0 0.5rem;
    }
    
    .product-info {
        padding: 1rem;
    }
    
    .product-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .quantity-selector {
        order: 1;
        justify-self: center;
    }
    
    .add-to-cart-btn {
        order: 0;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
        padding: 0.5rem 0;
    }
    
    .product-details {
        font-size: 0.8rem;
    }
    
    .price-current {
        font-size: 1.2rem;
    }
}