/* --- CẤU HÌNH MÀU SẮC --- */

/* Theme 1: Fresh & Modern */
:root[data-theme="v1"] {
    --bg-body: #ffffff;
    --bg-secondary: #f0f7f4; 
    --bg-footer: #1b4332;
    --primary: #1b4332;      
    --primary-light: #2d6a4f;
    --accent: #d4a373;       
    --text-main: #1d3557;
    --text-light: #64748b;
    --text-on-primary: #ffffff;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --shadow: rgba(27, 67, 50, 0.08);
}

/* Theme 2: Earthy & Warm */
:root[data-theme="v2"] {
    --bg-body: #f4f1ea;      
    --bg-secondary: #e6e2d6; 
    --bg-footer: #2b2d28;
    --primary: #3a4f41;      
    --primary-light: #566e5e;
    --accent: #bc6c25;       
    --text-main: #2b2d28;
    --text-light: #5e6358;
    --text-on-primary: #f4f1ea;
    --card-bg: #f9f7f2;
    --border-color: #dcd7c9;
    --shadow: rgba(58, 79, 65, 0.1);
}

/* --- CSS CHUNG --- */
* { margin: 0; padding: 0; box-sizing: border-box; transition: background-color 0.5s ease, color 0.3s ease, border-color 0.3s ease; }
body { font-family: 'Outfit', sans-serif; background-color: var(--bg-body); color: var(--text-main); line-height: 1.6; overflow-x: hidden; }
h1, h2, h3, h4 { font-family: 'Playfair Display', serif; font-weight: 600; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; border-radius: 8px; }
ul { list-style: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section-padding { padding: 5rem 0; }
.btn { display: inline-block; padding: 1rem 2.5rem; background-color: var(--primary); color: var(--text-on-primary); font-weight: 500; transition: 0.3s; cursor: pointer; border: none; }
.btn:hover { background-color: var(--accent); transform: translateY(-3px); box-shadow: 0 10px 20px var(--shadow); }

.section-title { margin-bottom: 3rem; text-align: center; }
.section-title h2 { font-size: 2.5rem; color: var(--primary); margin-bottom: 0.5rem; }
.section-title p { color: var(--text-light); }

/* --- THEME SWITCHER --- */
.theme-switch-container { position: fixed; top: 20px; right: 20px; z-index: 9999; background: rgba(255,255,255,0.9); padding: 8px; border-radius: 30px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); display: flex; gap: 8px; backdrop-filter: blur(5px); }
.theme-btn { border: none; padding: 6px 12px; border-radius: 20px; cursor: pointer; font-size: 0.8rem; font-weight: 600; transition: 0.3s; }
.theme-btn.v1 { background: #f0f7f4; color: #1b4332; }
.theme-btn.v2 { background: #f4f1ea; color: #3a4f41; }
.theme-btn.active { transform: scale(1.1); box-shadow: 0 2px 5px rgba(0,0,0,0.2); border: 1px solid currentColor; }

/* --- NAVIGATION --- */
nav { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 5%; position: absolute; width: 100%; top: 0; z-index: 100; }
.logo { font-size: 1.5rem; font-weight: 700; letter-spacing: 1px; color: var(--primary); }
.nav-links { display: flex; gap: 2.5rem; }
.nav-links a { font-weight: 500; color: var(--primary); position: relative; }
.nav-links a:hover { color: var(--accent); }

/* --- HERO SECTION --- */
.hero { display: flex; align-items: center; min-height: 100vh; padding: 0 5%; position: relative; }
.hero::before { content: ''; position: absolute; top: 0; right: 0; width: 45%; height: 100%; background-color: var(--bg-secondary); z-index: -1; border-bottom-left-radius: 50px; }
.hero-content { flex: 1; padding-right: 5rem; }
.hero h1 { font-size: 4rem; line-height: 1.1; margin-bottom: 1.5rem; color: var(--primary); }
.hero p { font-size: 1.1rem; color: var(--text-light); margin-bottom: 2rem; max-width: 90%; }
.hero-img-container { flex: 1; height: 80vh; display: flex; align-items: center; justify-content: center; }
.hero-img { width: 90%; height: 85%; object-fit: cover; border-radius: 200px 200px 0 0; box-shadow: -20px 20px 60px rgba(0,0,0,0.1); }

/* --- CATEGORIES --- */
.categories-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-top: 2rem; }
.cat-item { position: relative; overflow: hidden; border-radius: 15px; height: 350px; cursor: pointer; }
.cat-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s; }
.cat-overlay { position: absolute; bottom: 0; left: 0; width: 100%; padding: 2rem 1rem; background: linear-gradient(to top, rgba(0,0,0,0.7), transparent); color: #fff; text-align: center; }
.cat-overlay h3 { font-size: 1.4rem; margin-bottom: 5px; color: #fff; }
.cat-item:hover img { transform: scale(1.1); }

/* --- PRODUCTS (Đã cập nhật nút bấm) --- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.product-card { background-color: var(--card-bg); border-radius: 20px; padding: 1.5rem; transition: 0.4s; border: 1px solid var(--border-color); display: flex; flex-direction: column; }
.product-card:hover { transform: translateY(-10px); box-shadow: 0 15px 40px var(--shadow); }

.product-img-wrap { height: 280px; border-radius: 15px; overflow: hidden; margin-bottom: 1.5rem; position: relative; }
.product-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.product-card:hover .product-img-wrap img { transform: scale(1.05); }

.product-tag { position: absolute; top: 15px; left: 15px; background: var(--bg-body); padding: 5px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; color: var(--primary); z-index: 2; }
.product-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.2rem; }
.product-price { color: var(--accent); font-weight: 700; font-size: 1.2rem; }

/* Product Action Buttons */
.product-actions { display: flex; gap: 10px; margin-top: auto; }

.btn-action {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: 0.3s;
}

.btn-detail {
    border: 1px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-detail:hover {
    background: var(--bg-secondary);
}

.btn-shopee {
    background: #ee4d2d; /* Shopee Orange */
    color: white;
    border: 1px solid #ee4d2d;
    box-shadow: 0 4px 10px rgba(238, 77, 45, 0.2);
}

.btn-shopee:hover {
    background: #d73211;
    box-shadow: 0 4px 15px rgba(238, 77, 45, 0.4);
    transform: translateY(-2px);
}

/* --- PROJECTS & SERVICES --- */
.projects-section { background-color: var(--bg-secondary); }
.project-container { display: flex; gap: 4rem; align-items: center; }
.project-info { flex: 1; }
.project-image { flex: 1; position: relative; }
.project-image img { width: 100%; border-radius: 20px; box-shadow: 20px 20px 0 var(--accent); }

.process-steps { margin-top: 3rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.step-item { background: var(--bg-body); padding: 1.5rem; border-radius: 10px; text-align: center; }
.step-icon { font-size: 2rem; color: var(--accent); margin-bottom: 1rem; }
.step-title { font-weight: 700; color: var(--primary); margin-bottom: 0.5rem; }
.step-desc { font-size: 0.9rem; color: var(--text-light); }

/* --- FOOTER --- */
footer { background-color: var(--bg-footer); color: var(--text-on-primary); padding-top: 5rem; padding-bottom: 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.5fr; gap: 3rem; margin-bottom: 3rem; }
.footer-brand h2 { font-size: 2rem; margin-bottom: 1rem; }
.footer-desc { opacity: 0.8; margin-bottom: 2rem; line-height: 1.8; }
.footer-title { font-size: 1.1rem; margin-bottom: 1.5rem; font-weight: 700; color: var(--accent); }
.footer-links li { margin-bottom: 10px; }
.footer-links a { opacity: 0.8; transition: 0.3s; }
.footer-links a:hover { color: var(--accent); opacity: 1; padding-left: 5px; }
.newsletter-form { display: flex; margin-top: 1rem; }
.newsletter-input { padding: 12px; width: 100%; border: none; border-radius: 5px 0 0 5px; outline: none; }
.newsletter-btn { background: var(--accent); color: #fff; border: none; padding: 0 20px; border-radius: 0 5px 5px 0; cursor: pointer; }
.copyright { text-align: center; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.1); opacity: 0.6; font-size: 0.9rem; }

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .hero { flex-direction: column; padding-top: 100px; text-align: center; }
    .hero::before { width: 100%; height: 40%; top: auto; bottom: 0; border-radius: 50px 50px 0 0; }
    .hero-content { padding-right: 0; }
    .project-container { flex-direction: column; }
    .project-image { width: 100%; margin-top: 2rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .process-steps { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .newsletter-form { max-width: 300px; margin: 1rem auto; }
    .nav-links { display: none; }
    .product-actions { flex-direction: column; } /* Mobile thì nút xếp dọc cho dễ bấm */
}

