/* --- BIẾN MÀU SẮC (Dễ đổi theme) --- */
:root {
    --primary: #ff6b6b; /* Màu đỏ cam chủ đạo */
    --text: #333333;
    --bg: #ffffff;
    --card-bg: #f8f9fa;
    --nav-bg: rgba(255, 255, 255, 0.95);
    --shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Dark Mode (Yêu cầu 5) */
body.dark-mode {
    --text: #f0f0f0;
    --bg: #121212;
    --card-bg: #1e1e1e;
    --nav-bg: rgba(18, 18, 18, 0.95);
    --shadow: 0 5px 15px rgba(0,0,0,0.5);
}

/* Reset cơ bản */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; }
html { scroll-behavior: smooth; }
body { background-color: var(--bg); color: var(--text); transition: 0.3s ease; }

/* 1. NAVIGATION BAR (Yêu cầu 1) */
.navbar {
    position: fixed; top: 0; width: 100%; z-index: 1000;
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 5%;
    background: var(--nav-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    backdrop-filter: blur(5px);
}

.logo { font-size: 24px; font-weight: 800; color: var(--text); }
.logo span { color: var(--primary); }

.nav-links { list-style: none; display: flex; gap: 30px; align-items: center; }

.nav-item {
    text-decoration: none; color: var(--text); font-weight: 600; font-size: 16px;
    position: relative; padding: 5px 0;
}

/* Hiệu ứng Gạch chân chạy (Lab 1) */
.nav-item::after {
    content: ''; position: absolute; bottom: 0; left: 0;
    width: 0; height: 3px; background: var(--primary); transition: 0.3s;
}
.nav-item:hover::after, .nav-item.active::after { width: 100%; }

.mode-btn { background: none; border: 1px solid var(--text); padding: 5px 12px; border-radius: 20px; cursor: pointer; font-size: 18px; }

/* 2. HERO BANNER (Yêu cầu 2) */
.hero {
    height: 100vh;
    display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('https://images.unsplash.com/photo-1556906781-9a412961d28c?w=1600');
    background-size: cover; background-position: center; color: white; position: relative;
}

/* Fade In Animation */
.fade-in-text { font-size: 4rem; margin-bottom: 10px; opacity: 0; animation: fadeIn 1.5s forwards; }
.fade-in-sub { font-size: 1.5rem; margin-bottom: 30px; opacity: 0; animation: fadeIn 1.5s 0.5s forwards; }

@keyframes fadeIn { to { opacity: 1; transform: translateY(0); } from { opacity: 0; transform: translateY(30px); } }

/* Marquee Text */
.marquee-container {
    position: absolute; bottom: 0; width: 100%; background: var(--primary); padding: 12px 0; overflow: hidden;
}
.marquee-text { white-space: nowrap; display: inline-block; color: white; font-weight: bold; animation: scrollLeft 15s linear infinite; }
@keyframes scrollLeft { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }

/* 3. PRODUCT CARDS (Yêu cầu 3) */
.container { padding: 80px 10%; }
.section-title { text-align: center; margin-bottom: 50px; font-size: 2.5rem; color: var(--text); }

.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 30px; }

.card {
    background: var(--card-bg); border-radius: 12px; overflow: hidden;
    box-shadow: var(--shadow); transition: 0.4s;
    opacity: 0; transform: translateY(50px); /* Ẩn để chờ JS hiện */
}

/* Hover Card & Zoom Ảnh (Lab 1 & 3) */
.card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.15); }
.card-img { overflow: hidden; height: 280px; }
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.card:hover img { transform: scale(1.1); } /* Zoom ảnh */

.card-info { padding: 20px; text-align: center; }
.card-info h3 { font-size: 1.2rem; margin-bottom: 10px; color: var(--text); }
.price { color: var(--primary); font-weight: bold; font-size: 1.2rem; margin-bottom: 15px; }
.add-btn {
    padding: 10px 20px; border: 1px solid var(--text); background: transparent; 
    color: var(--text); cursor: pointer; transition: 0.3s; font-weight: bold;
}
.add-btn:hover { background: var(--text); color: var(--bg); }

/* Class để JS kích hoạt hiện card */
.reveal.active { animation: slideUp 0.8s forwards; }
@keyframes slideUp { to { opacity: 1; transform: translateY(0); } }

/* 4. BUTTON & PROMO (Yêu cầu 4) */
.cta-btn {
    padding: 15px 40px; background: var(--primary); color: white; border: none; font-size: 1.1rem; 
    font-weight: bold; cursor: pointer; border-radius: 50px; transition: 0.3s;
    animation: pulse 2s infinite; /* Rung lắc */
}
.cta-btn:hover { transform: scale(1.1); background: #ff4757; }

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(255, 107, 107, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0,0,0,0); }
}

.promo { padding: 100px 5%; background: #eee; text-align: center; color: #333; margin-top: 50px; }
.promo-content { max-width: 600px; margin: 0 auto; }

/* 5. CUSTOM CURSOR (Điểm cộng) */
.cursor {
    width: 30px; height: 30px; border: 2px solid var(--primary); border-radius: 50%;
    position: fixed; pointer-events: none; z-index: 9999;
    transform: translate(-50%, -50%); transition: 0.1s;
    display: none;
}
@media (min-width: 1024px) { .cursor { display: block; } }