/* Products Sections */
.new-arrivals-section,
.discounted-products-section,
.bestsellers-section {
    padding: 4rem 0;
}

.new-arrivals-section {
    background: #f8fafc;
}

.discounted-products-section {
    background: white;
}

.bestsellers-section {
    background: #f8fafc;
}

/* Products Grid Enhancements */
.products-grid {
    position: relative;
}

.product-card {
    position: relative;
    z-index: 1;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102,126,234,0.1), rgba(118,75,162,0.1));
    border-radius: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.product-card:hover::before {
    opacity: 1;
}

.product-category {
    font-size: 0.875rem;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.product-category a:hover {
    text-decoration: underline;
}

.product-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #666;
}

.product-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.product-meta i {
    font-size: 1rem;
    opacity: 0.7;
}

.product-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 1rem;
}

.product-buttons .btn {
    width: 100%;
    padding: 0.75rem;
    font-size: 0.875rem;
}

/* Quick View Modal */
.quick-view-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.quick-view-content {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.quick-view-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

/* Badges */
.badge-discount {
    background: #e53e3e;
    color: white;
}

.badge-outofstock {
    background: #2d3748;
    color: white;
}

.badge-new {
    background: #38a169;
    color: white;
}

.badge-bestseller {
    background: #d69e2e;
    color: white;
}

/* Category Cards */
.category-image {
    position: relative;
    width: 100%;
    height: 180px; /* Chiều cao cố định cho ảnh */
    overflow: hidden;
    border-radius: 15px 15px 0 0;
    background: #f8f9fa; /* Màu nền nhẹ */
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Giữ tỷ lệ và không bị méo */
    padding: 1rem; /* Thêm padding để ảnh không sát viền */
    transition: transform 0.5s ease;
}

.category-card:hover .category-image img {
    transform: scale(1.1);
}

.category-info {
    padding: 1.5rem;
    position: relative;
}

.products-count {
    font-size: 0.875rem;
    color: #667eea;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.products-count i {
    font-size: 1rem;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-buttons {
        grid-template-columns: 1fr;
    }

    .section-header h2 {
        font-size: 1.75rem;
    }

    .section-header p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card h3 {
        font-size: 1.5rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .category-image {
        height: 150px;
    }
}