.modal {
    display: none; /* Bắt buộc phải có để ẩn modal khi mới vào trang */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}
:root {
    --primary-color: #059669; /* Xanh ngọc lục bảo (Emerald Green) */
    --primary-dark: #047857;
    --primary-light: #10b981;
    --accent-color: #ecfdf5;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background-color: var(--card-bg);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.search-box {
    position: relative;
    width: 300px;
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.search-box input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.search-box input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #065f46 0%, #059669 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.9;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px 30px;
    border-radius: 12px;
    backdrop-filter: blur(5px);
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Main Container */
.main-container {
    padding: 50px 20px;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 10px;
}

.section-title p {
    color: var(--text-light);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.product-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-top: 4px solid var(--primary-color);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.card-id {
    background-color: var(--accent-color);
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 4px 10px;
    border-radius: 6px;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 5px;
}

.card-category {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

.card-desc {
    font-size: 0.95krem;
    color: var(--text-light);
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-btn {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.card-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.no-result {
    text-align: center;
    grid-column: 1 / -1;
    padding: 50px;
    color: var(--text-light);
}

.no-result i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #9ca3af;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background-color: var(--card-bg);
    width: 100%;
    max-width: 700px;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    position: relative;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: modalScale 0.3s ease;
}

@keyframes modalScale {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.close-btn {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 1.8rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}

.close-btn:hover {
    color: var(--text-color);
}

.modal-header {
    padding: 25px 25px 15px;
    border-bottom: 1px solid var(--border-color);
}

.modal-badge {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.modal-header h3 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 4px;
}

.modal-sub {
    font-size: 0.9rem;
    color: var(--primary-light);
    font-weight: 600;
}

.modal-body {
    padding: 20px 25px;
    overflow-y: auto;
    flex-grow: 1;
}

.modal-body h4 {
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-body h4:not(:first-child) {
    margin-top: 20px;
}

.modal-body p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.feature-list {
    list-style: none;
    padding-left: 0;
}

.feature-list li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 8px;
    color: var(--text-light);
    font-size: 0.95rem;
}

.feature-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
    line-height: 1;
}

.modal-footer {
    padding: 15px 25px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
}

.btn-close-modal {
    background-color: #e5e7eb;
    color: var(--text-color);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-close-modal:hover {
    background-color: #d1d5db;
}

/* Footer */
.footer {
    background-color: var(--text-color);
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 60px;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    .hero-stats {
        flex-direction: column;
        gap: 15px;
    }
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 15px 0;
        gap: 10px;
    }
    .search-box {
        width: 100%;
    }
}