/* Homepage Styles */

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #96a629 0%, #2eb435 100%);
    color: white;
    padding: 4rem 0;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="white" opacity="0.1"><polygon points="0,0 1000,0 1000,100"/></svg>');
    background-size: cover;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Category Filter Section */
.filter-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 3rem;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.filter-title {
    color: #2d3748;
    font-weight: 600;
    margin-bottom: 0;
    font-size: 1.1rem;
}

.filter-select {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    background: white;
}

.filter-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.filter-select:hover {
    border-color: #a0aec0;
}

/* Product Sections */
.product-section {
    margin-bottom: 4rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #e9ecef;
    position: relative;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #789c46, #31a43c);
    border-radius: 2px;
}

.section-title {
    color: #2d3748;
    font-weight: 700;
    font-size: 1.8rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-icon {
    font-size: 1.5rem;
    color: #667eea;
}

.view-all-btn {
    background: linear-gradient(90deg, #789c46, #31a43c);
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.view-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

/* Enhanced Product Cards */
.product-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.product-card-link:hover {
    text-decoration: none;
    color: inherit;
}

.product-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    animation: fadeInUp 0.6s ease;
    animation-fill-mode: both;
    position: relative;
    background: white;
    height: 100%;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.product-image {
    position: relative;
    overflow: hidden;
    height: 220px;
}

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

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

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

.product-info {
    padding: 1.25rem;
}

.product-title {
    color: #2d3748;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    display: block;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.product-card-link:hover .product-title {
    color: #667eea;
}

.product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #e53e3e;
    margin-bottom: 0.5rem;
}

.product-price::after {
    content: ' VND';
    font-size: 0.9rem;
    font-weight: 500;
    color: #718096;
}

.price-old {
    font-size: 1rem;
    color: #a0aec0;
    text-decoration: line-through;
    font-weight: 400;
    margin-left: 0.5rem;
}

/* Staggered animations */
.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
.product-card:nth-child(5) { animation-delay: 0.5s; }
.product-card:nth-child(6) { animation-delay: 0.6s; }

/* Loading skeletons */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.skeleton-card {
    height: 350px;
    border-radius: 15px;
    margin-bottom: 1rem;
}


/* Categories showcase */
.categories-showcase {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    padding: 2rem;
    margin: 3rem 0;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.category-item {
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 15px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #2d3748;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transform: translateY(0);
    animation: fadeInUp 0.6s ease forwards;
}

.category-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    color: #667eea;
    text-decoration: none;
}

.category-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #667eea;
    transition: all 0.3s ease;
}

.category-item:hover .category-icon {
    transform: scale(1.1);
    color: #5a67d8;
}

.category-name {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Keyframe animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Responsive design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .product-card {
        margin-bottom: 1rem;
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        max-width: 400px;
    }
    
    .filter-section {
        text-align: center;
    }
    
    .filter-select {
        width: 100%;
        margin-top: 0.5rem;
    }
    
    /* Carousel responsive adjustments */
    .categories-carousel .carousel-control-prev,
    .categories-carousel .carousel-control-next {
        width: 40px;
        height: 40px;
    }
    
    .categories-carousel .carousel-control-prev {
        left: -20px;
    }
    
    .categories-carousel .carousel-control-next {
        right: -20px;
    }
    
    .categories-carousel .carousel-control-prev-icon,
    .categories-carousel .carousel-control-next-icon {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 300px;
    }
    
    .categories-carousel .carousel-control-prev,
    .categories-carousel .carousel-control-next {
        display: none; /* Hide controls on very small screens */
    }
    
    .categories-showcase {
        padding: 1.5rem 1rem;
    }
}