/* Products Grid & Card Styles - Lamsat Hadya */
.products-section {
    padding: 40px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-title {
    font-size: 28px;
    color: var(--text-color);
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 15px;
    margin-top: 15px;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

/* Product Card */
.product-card {
    background: #FFFFFF;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-light);
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2;
}

.product-badge span {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 5px;
}

.badge-new {
    background: var(--success-color);
    color: #fff;
}

.badge-sale {
    background: var(--danger-color);
    color: #fff;
}

.badge-wholesale {
    background: var(--info-color);
    color: #fff;
}

.product-image {
    display: block;
    position: relative;
    padding-top: 100%;
    background: var(--cream-bg);
    overflow: hidden;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.08);
}

.product-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--cream-bg) 100%);
}

.product-image-placeholder i {
    font-size: 60px;
    color: var(--primary-color);
    opacity: 0.5;
}

.product-actions {
    position: absolute;
    bottom: 15px;
    left: 15px;
    right: 15px;
    display: flex;
    gap: 10px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateY(0);
}

.product-actions .btn {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
}

.product-info {
    padding: 20px;
    text-align: center;
}

.product-category {
    font-size: 12px;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 12px;
    line-height: 1.4;
    height: 45px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-name a {
    color: inherit;
    transition: color 0.2s;
}

.product-name a:hover {
    color: var(--primary-color);
}

.product-price {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.current-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.old-price {
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.product-stock {
    margin-top: 10px;
    font-size: 12px;
}

.in-stock {
    color: var(--success-color);
}

.out-of-stock {
    color: var(--danger-color);
}

/* Quick Add Button */
.quick-add-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.quick-add-btn:hover {
    background: var(--primary-dark);
}

.quick-add-btn:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
}

/* Product Filters */
.products-filters {
    background: #FFFFFF;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.filters-row {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
}

.filter-group select {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    min-width: 150px;
}

/* Responsive */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .product-info {
        padding: 15px;
    }
    
    .product-name {
        font-size: 14px;
        height: 40px;
    }
    
    .current-price {
        font-size: 16px;
    }
    
    .product-actions {
        opacity: 1;
        transform: translateY(0);
    }
    
    .filters-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-group select {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}
