/* Reset CSS cơ bản & Thiết lập biến Theme Sáng - Green */
:root {
    --primary-color: #198754;
    --secondary-color: #ffffff;
    --text-color: #212529;
    --heading-color: #212529;
    --accent-color: #157347;
    --white: #ffffff;
    --border-color: #dee2e6;
    --bg-color: #f8f9fa;
    --muted-color: #6c757d;
    --dark-green-footer-bg: #157347;
    --font-family: 'Montserrat', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-family); 
    color: var(--text-color);
    background-color: var(--bg-color); 
    line-height: 1.6; 
    font-size: 16px;
    overflow-x: hidden;
}
.container { 
    max-width: 1140px; 
    margin: 0 auto; 
    padding: 0 15px; 
}

/* --- Hero Section --- */
.hero-section.plant-theme-hero {
    background-color: var(--bg-color); 
    color: var(--text-color);
    text-align: left; 
    padding: 80px 0; 
    position: relative;
}
.hero-container { 
    display: flex; 
    align-items: center; 
    gap: 40px; 
}
.hero-text-content { 
    flex: 1; 
}
.hero-image-content { 
    flex-basis: 45%; 
    text-align: center; 
}
.hero-image-content img { 
    max-width: 100%; 
    height: auto; 
    max-height: 450px; 
}
.hero-text-content h1 {
    font-size: 3.5em; 
    margin-bottom: 20px; 
    font-weight: 700;
    color: var(--heading-color); 
    line-height: 1.2;
}
.hero-text-content h1 .highlight { 
    color: var(--primary-color); 
}
.hero-text-content p {
    font-size: 1em; 
    margin-bottom: 35px; 
    color: var(--muted-color); 
    max-width: 500px;
}
.hero-btn.btn-primary {
    background-color: var(--text-color); 
    color: var(--white); 
    padding: 12px 30px;
    font-size: 1em; 
    border-radius: 50px; 
    font-weight: 700; 
    border: none;
    text-decoration: none; 
    display: inline-block; 
    transition: background-color 0.3s ease;
}
.hero-btn.btn-primary:hover { 
    background-color: #000; 
}

/* --- Product Section --- */
.listings { 
    padding-top: 40px; 
}
.section-title-wrapper { 
    text-align: center; 
    margin-bottom: 40px; 
}
.listings h2 {
    color: var(--heading-color); 
    border-bottom: 2px solid var(--primary-color);
    display: inline-block; 
    padding-bottom: 8px; 
    font-size: 1.8em;
}

#item-grid-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding-top: 10px;
    padding-bottom: 20px;
}

@media (min-width: 576px) {
    #item-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 768px) {
    #item-grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (min-width: 992px) {
    #item-grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

#item-grid-container .grid-message {
    text-align: center;
    padding: 20px;
    margin: 0;
    color: var(--muted-color);
    font-size: 1.1em;
}

#item-grid-container .loading-message i {
    color: var(--primary-color);
}

/* Product Card Styling */
.product-card {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    overflow: hidden;
}
.product-card:hover {
    transform: translateY(-5px);
}
.product-card-link-wrapper {
    text-decoration: none;
    color: inherit;
}
.product-image-link {
    width: 100%;
    height: 200px;
    overflow: hidden;
}
.card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}
.card-body {
    padding: 1rem;
}
.card-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--heading-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.item-price-info {
    margin-top: 0.5rem;
}
.price {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
}
.time-remaining {
    color: var(--muted-color);
    font-size: 0.9rem;
}
.btn-view-details {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    transition: background-color 0.3s ease;
}
.btn-view-details:hover {
    background-color: var(--accent-color);
}

.view-all-items-btn {
    font-weight: 500;
    padding: 0.75rem 2rem;
    border-width: 2px;
    transition: all 0.3s ease;
}
.view-all-items-btn:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.3);
}
.view-all-items-btn i {
    transition: transform 0.3s ease;
}
.view-all-items-btn:hover i {
    transform: translateX(3px);
}

/* ========= MOBILE RESPONSIVE ========= */

/* Tablet và Mobile - Hero Section */
@media (max-width: 768px) {
    .hero-container {
        flex-direction: column-reverse; /* Image trên, text dưới */
        gap: 30px;
        text-align: center;
    }
    
    .hero-text-content h1 {
        font-size: 2.5em; /* Giảm từ 3.5em */
        margin-bottom: 15px;
    }
    
    .hero-text-content h1 .exclusive-text {
        font-size: 0.75em; /* Giảm kích thước xuống 75% so với h1 */
        color: var(--heading-color);
    }
    
    .hero-text-content p {
        max-width: 100%;
        margin-bottom: 25px;
    }
    
    .hero-image-content {
        flex-basis: auto;
    }
    
    .hero-image-content img {
        max-height: 250px; /* Giảm từ 450px */
    }
    
    .hero-section.plant-theme-hero {
        padding: 50px 0; /* Giảm từ 80px */
    }
}

/* Mobile phones */
@media (max-width: 576px) {
    .hero-text-content h1 {
        font-size: 2em; /* Giảm thêm cho mobile nhỏ */
        line-height: 1.3;
    }
    
    .hero-text-content h1 .exclusive-text {
        font-size: 0.7em; /* Giảm thêm chút cho mobile */
    }
    
    .hero-text-content p {
        font-size: 0.95em;
        margin-bottom: 20px;
    }
    
    .hero-btn.btn-primary {
        padding: 10px 25px;
        font-size: 0.9em;
    }
    
    .hero-image-content img {
        max-height: 200px;
    }
    
    .container {
        padding: 0 10px; /* Giảm padding cho màn hình rất nhỏ */
    }
    
    .section-title-wrapper {
        margin-bottom: 30px; /* Giảm từ 40px */
    }
    
    .listings h2 {
        font-size: 1.5em; /* Giảm từ 1.8em */
    }
}

/* Extra small devices (portrait phones, less than 480px) */
@media (max-width: 480px) {
    .hero-text-content h1 {
        font-size: 1.8em;
    }
    
    .hero-section.plant-theme-hero {
        padding: 40px 0;
    }
    
    #item-grid-container {
        gap: 1rem; /* Giảm gap cho màn hình rất nhỏ */
    }
    
    .view-all-items-btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9em;
    }
}