/* Category Sections - Modern Design */

.category-section {
    padding: 60px 0;
    position: relative;
    background: white;
}

.category-section:nth-child(even) {
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

/* Section Header */
.category-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
}

.category-section-title {
    display: flex;
    align-items: center;
    gap: 18px;
}

.category-section-icon {
    width: 65px;
    height: 65px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    position: relative;
}

.category-section-icon::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 21px;
    background: inherit;
    opacity: 0.3;
    z-index: -1;
}

.category-section.electrical .category-section-icon {
    background: linear-gradient(135deg, #f43f5e, #e11d48);
}

.category-section.plumbing .category-section-icon {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
}

.category-section.agricultural .category-section-icon {
    background: linear-gradient(135deg, #10b981, #059669);
}

.category-section-title h2 {
    font-size: 1.8rem;
    color: var(--dark-color);
    margin: 0;
}

.category-section-title p {
    color: var(--gray-color);
    font-size: 0.95rem;
    margin: 5px 0 0 0;
}

/* View All Button */
.view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
}

.category-section.electrical .view-all-btn {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    color: #dc2626;
    border: 2px solid #fecaca;
}

.category-section.electrical .view-all-btn:hover {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border-color: #ef4444;
}

.category-section.plumbing .view-all-btn {
    background: linear-gradient(135deg, #ecfeff, #cffafe);
    color: #0284c7;
    border: 2px solid #a5f3fc;
}

.category-section.plumbing .view-all-btn:hover {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: white;
    border-color: #0ea5e9;
}

.category-section.agricultural .view-all-btn {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    color: #16a34a;
    border: 2px solid #bbf7d0;
}

.category-section.agricultural .view-all-btn:hover {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    border-color: #22c55e;
}

/* Products Grid */
.category-products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

/* Product Card - Modern Glass */
.category-product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
}

.category-product-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.12);
    border-color: transparent;
}

/* Color accent based on category */
.category-section.electrical .category-product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.category-section.plumbing .category-product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
}

.category-section.agricultural .category-product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.category-product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.category-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.category-product-card:hover .category-product-image img {
    transform: scale(1.1);
}

/* Quick Actions */
.category-product-actions {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 10px;
    opacity: 0;
    transition: all 0.3s ease;
}

.category-product-card:hover .category-product-actions {
    opacity: 1;
}

.category-product-actions button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.category-product-actions button:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

/* Product Info */
.category-product-info {
    padding: 15px;
}

.category-product-info h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--dark-color);
    line-height: 1.4;
    height: 2.8em;
    overflow: hidden;
}

.category-product-info h3 a:hover {
    color: var(--primary-color);
}

.category-product-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.category-product-price .price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.category-product-price .add-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--light-color);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-color);
}

.category-section.electrical .category-product-price .add-btn:hover {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.category-section.plumbing .category-product-price .add-btn:hover {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.category-section.agricultural .category-product-price .add-btn:hover {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
}

/* Responsive */
@media (max-width: 1200px) {
    .category-products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .category-products-grid .category-product-card:last-child {
        display: none;
    }
}

@media (max-width: 992px) {
    .category-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .category-section-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .category-section-title {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .category-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .category-product-image {
        height: 160px;
    }
    
    .category-section-title h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .category-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
