:root {
    --primary-red: #A31D1D; 
    --header-bg: #FFFDF5; 
    --bg-cream-light: #FFF8EB;
    --text-color: #333;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { font-family: 'Montserrat', sans-serif; color: var(--text-color); line-height: 1.6; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

.section-padding { padding: 60px 0; }
.bg-cream-light { background-color: var(--bg-cream-light); }
.text-center { text-align: center; }

h2.section-title { color: var(--primary-red); font-size: 28px; margin-bottom: 30px; font-weight: 700; text-transform: uppercase; }

/* ================= HEADER ================= */
.site-header { background-color: var(--header-bg); padding: 10px 0; border-bottom: 2px solid #EAEAEA; position: sticky; top: 0; z-index: 1000; }
.header-container { display: flex; justify-content: space-between; align-items: center; }
.logo img { height: 50px; }
.main-nav ul { list-style: none; display: flex; gap: 30px; }
.main-nav a { text-decoration: none; color: var(--primary-red); font-weight: 700; font-size: 15px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-btn { background-color: var(--primary-red); color: white; border: none; padding: 8px 18px; border-radius: 20px; font-weight: 700; cursor: pointer; }

/* ================= SLIDER CHÍNH ================= */
.slider-section { width: 100%; position: relative; }
.slider-container { position: relative; width: 100%; max-height: 450px; margin: auto; overflow: hidden; }
.slide { display: none; width: 100%; }
.slide img { width: 100%; height: 450px; display: block; object-fit: cover; object-position: center; }
.active { display: block; }
.slider-btn { cursor: pointer; position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; background-color: rgba(255,255,255,0.7); color: var(--primary-red); border: none; border-radius: 50%; font-size: 18px; transition: 0.3s; z-index: 10; }
.slider-btn:hover { background-color: white; }
.prev-btn { left: 20px; }
.next-btn { right: 20px; }
.slider-dots { position: absolute; bottom: 15px; width: 100%; text-align: center; z-index: 10; }
.dot { cursor: pointer; height: 12px; width: 12px; margin: 0 5px; background-color: rgba(255,255,255,0.5); border-radius: 50%; display: inline-block; transition: 0.3s; }
.active, .dot:hover { background-color: white; }

/* ================= GIỚI THIỆU ================= */
.layout-2-cols { display: flex; align-items: center; gap: 40px; }
.col-text, .col-img { flex: 1; }
.col-img img { width: 100%; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.btn-dark-red { background-color: var(--primary-red); color: white; border: none; padding: 10px 25px; border-radius: 20px; font-weight: 600; cursor: pointer; margin-top: 15px; }

/* ================= SẢN PHẨM NỔI BẬT (ĐÃ CHUẨN HÓA 3 SẢN PHẨM) ================= */
.featured-products-container {
    position: relative; background-color: #ffffff; border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08); padding: 40px 60px;
    margin: 0 auto; max-width: 1200px;
}
/* ================= SẢN PHẨM NỔI BẬT (ĐÃ CHUẨN HÓA ĐÚNG 3 SẢN PHẨM) ================= */
.product-slider-wrapper { 
    width: 100%; 
    overflow: hidden; 
    position: relative; 
    padding: 15px 0; 
}

.product-slider-track {
    display: flex !important; 
    flex-wrap: nowrap !important;
    align-items: stretch !important; 
    /* SỬA LỖI Ở ĐÂY: Đổi max-content thành 100% để ép khung */
    width: 100% !important; 
    transition: transform 0.5s ease-in-out;
}

/* Thẻ sản phẩm */
.product-card {
    display: flex !important; flex-direction: column !important;
    align-items: center !important; text-align: center !important;
    /* Tính chính xác chia 3 khung màn hình */
    flex: 0 0 calc(33.333% - 20px) !important; 
    width: calc(33.333% - 20px) !important;
    margin: 0 10px !important; box-sizing: border-box !important;
    /* QUAN TRỌNG: Ép thẻ không được phép co rúm lại */
    flex-shrink: 0 !important; 
    
    background-color: #ffffff; border-radius: 12px;
    border: 1px solid #eee; box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    padding: 20px; cursor: pointer; transition: transform 0.3s, box-shadow 0.3s;
    white-space: normal !important;
}

.product-card:hover { transform: translateY(-8px); box-shadow: 0 12px 24px rgba(0,0,0,0.15); }

/* Ảnh sản phẩm - Đã sửa nền hòa với ảnh thật */
.product-card img {
    width: 100% !important; 
    height: 280px !important; /* Đặt lại độ cao vừa vặn dáng chai */
    object-fit: contain !important; /* Hiện nguyên chai không bị cắt nắp/đáy */
    background-color: #ffffff !important; /* Đổi sang nền trắng để tệp với nền ảnh bạn chụp */
    margin-bottom: 15px !important; 
    display: block !important;
}

/* Nhãn, Tiêu đề, Giá, Nút - Đã căn giữa */
.brand-badge {
    display: table !important; margin: 0 auto 10px auto !important; /* Căn giữa hoàn toàn */
    padding: 5px 15px; font-size: 12px; font-weight: bold; color: #fff; border-radius: 4px; letter-spacing: 1px;
}
.badge-tisolla { background-color: #d32f2f; }
.badge-vietcot { background-color: #f57c00; }

.product-card h3 { font-size: 16px; margin-bottom: 8px; color: #333; min-height: 2.4em; }
.product-card .price { color: var(--primary-red); font-weight: 700; font-size: 18px; margin-bottom: 15px; }

.btn-gold { background-color: #B48D3D; color: white; border: none; padding: 10px 20px; border-radius: 4px; font-weight: 600; cursor: pointer; transition: 0.3s; }
.btn-gold:hover { background-color: #9c7830; }
.product-card .btn-gold { margin-top: auto !important; width: 80% !important; max-width: 180px; }

/* Nút điều hướng Slider */
.slider-nav-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 45px; height: 45px; background-color: #fff; color: #B48D3D; border: 2px solid #B48D3D; border-radius: 50%; cursor: pointer; z-index: 20; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; box-shadow: 0 4px 10px rgba(0,0,0,0.1); transition: all 0.3s; }
.slider-nav-btn:hover { background-color: #B48D3D; color: #fff; }
.slider-nav-btn.prev { left: 15px; }
.slider-nav-btn.next { right: 15px; }
.slider-controls-bottom { display: flex; justify-content: center; margin-top: 25px; }
.control-btn { background-color: transparent; color: #555; border: 2px solid #ddd; padding: 8px 24px; border-radius: 25px; cursor: pointer; font-weight: 600; transition: all 0.3s; display: flex; align-items: center; gap: 8px; }
.control-btn:hover, .control-btn.active { background-color: #B48D3D; color: #ffffff; border-color: #B48D3D; }

/* ================= LỢI ÍCH & FOOTER ================= */
.benefit-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; text-align: center; }
.benefit-item { display: flex; flex-direction: column; align-items: center; }
.benefit-icon { width: 70px; height: 70px; border-radius: 50%; border: 2px solid var(--primary-red); display: flex; align-items: center; justify-content: center; font-size: 24px; color: var(--primary-red); margin-bottom: 20px; }
.benefit-item h3 { color: var(--primary-red); font-size: 18px; margin-bottom: 10px; }

.site-footer { background-color: var(--primary-red); color: white; padding: 60px 0 20px 0; position: relative; overflow: visible; }
.footer-content { display: flex; justify-content: space-between; gap: 30px; position: relative; z-index: 2; }
.footer-col { flex: 1; }
.col-brand { text-align: center; max-width: 300px; }
.footer-logo { height: 60px; margin-bottom: 15px; }
.follow-text { font-size: 14px; margin-bottom: 15px; font-weight: 600; text-transform: uppercase; }
.social-links a { color: white; font-size: 20px; margin: 0 10px; text-decoration: none; }
.footer-heading { font-size: 18px; margin-bottom: 20px; font-weight: 600; }
.mt-20 { margin-top: 30px; }
.col-links ul, .contact-info { list-style: none; }
.col-links li { margin-bottom: 12px; }
.col-links a { color: white; text-decoration: none; font-size: 14px; }
.contact-info li { margin-bottom: 15px; font-size: 14px; display: flex; gap: 10px; line-height: 1.5; }
.contact-info i { margin-top: 3px; }
.copyright { border-top: 1px solid rgba(255,255,255,0.2); margin-top: 40px; padding-top: 20px; font-size: 12px; color: rgba(255,255,255,0.7); text-align: center; }

/* ================= POPUP LIÊN HỆ ================= */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.6); backdrop-filter: blur(5px); display: none; align-items: center; justify-content: center; z-index: 9999; opacity: 0; transition: opacity 0.3s ease; }
.modal-overlay.show { display: flex; opacity: 1; }
.modal-content { background: #fff; padding: 40px; border-radius: 12px; width: 90%; max-width: 500px; position: relative; box-shadow: 0 20px 40px rgba(0,0,0,0.2); transform: translateY(-20px); transition: transform 0.3s ease; }
.modal-overlay.show .modal-content { transform: translateY(0); }
.close-btn { position: absolute; top: 15px; right: 20px; font-size: 28px; color: #999; cursor: pointer; }
.close-btn:hover { color: #8b0000; }
.modal-header { text-align: center; }
.form-group { margin-bottom: 15px; }
.form-group input, .form-group textarea { width: 100%; padding: 12px 15px; border: 1px solid #ddd; border-radius: 6px; font-family: inherit; font-size: 0.95rem; box-sizing: border-box; }
.form-group input:focus, .form-group textarea:focus { border-color: #d4af37; outline: none; box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1); }
.submit-btn { width: 100%; background-color: #8b0000; color: white; padding: 14px; border: none; border-radius: 6px; font-size: 1rem; font-weight: 600; cursor: pointer; text-transform: uppercase; letter-spacing: 1px; transition: background 0.3s; }
.submit-btn:hover { background-color: #660000; }

/* ================= MOBILE (DI ĐỘNG) ================= */
.menu-toggle { display: none; background: none; border: none; font-size: 28px; cursor: pointer; color: var(--text-color); }
.menu-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: rgba(0,0,0,0.6); z-index: 1000; }

@media (max-width: 768px) {
    .menu-toggle { display: block; order: -1; }
    .header-actions { transform: scale(0.8); }
    .main-nav { position: fixed; top: 0; left: -100%; width: 80%; max-width: 300px; height: 100vh; background-color: white; z-index: 1001; transition: left 0.3s ease-in-out; overflow-y: auto; box-shadow: 2px 0 10px rgba(0,0,0,0.1); padding-top: 50px; }
    .main-nav.active { left: 0; }
    .menu-overlay.active { display: block; }
    .main-nav ul { flex-direction: column; gap: 0; }
    .main-nav a { display: block; padding: 15px 20px; border-bottom: 1px solid #EAEAEA; color: #333; font-weight: 600; }
    
    .section-padding { padding: 40px 0; }
    h2.section-title { font-size: 24px; }
    .layout-2-cols { flex-direction: column; text-align: center; gap: 20px; }
    
    /* Thiết lập lại để di động hiện 1 sản phẩm trọn vẹn */
    .featured-products-container { padding: 20px 0; border-radius: 10px; overflow: hidden; box-shadow: none; }
    .product-slider-wrapper { padding: 10px 15px; }
    .product-card { 
        width: calc(100vw - 60px) !important; 
        flex: 0 0 calc(100vw - 60px) !important; 
        margin-right: 30px !important; margin-left: 0 !important;
    }
    
    .slider-nav-btn { width: 35px; height: 35px; font-size: 1rem; }
    .slider-nav-btn.prev { left: 5px; }
    .slider-nav-btn.next { right: 5px; }
    .benefit-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .benefit-item h3 { font-size: 16px; }
    .footer-content { flex-direction: column; text-align: center; gap: 30px; }
    .footer-heading { margin-bottom: 10px; }
    .col-brand { max-width: 100%; margin: 0 auto; }
    .contact-info li { justify-content: center; }
}
/* ================= MODAL SẢN PHẨM & ĐẶT HÀNG ================= */
.product-modal-content { max-width: 800px; padding: 30px; }
.product-detail-grid { display: flex; gap: 30px; align-items: flex-start; }
.product-detail-img { flex: 1; background: #fff; border-radius: 8px; border: 1px solid #eee; padding: 15px; }
.product-detail-img img { width: 100%; height: 350px; object-fit: contain; display: block; }
.product-detail-info { flex: 1; text-align: left; }
.product-detail-info .brand-badge { margin: 0 0 15px 0 !important; }
.product-detail-info h2 { font-size: 24px; color: #333; margin-bottom: 10px; }
.price-large { font-size: 28px; color: var(--primary-red); font-weight: bold; margin-bottom: 15px; }
.product-desc { color: #555; line-height: 1.6; margin-bottom: 25px; padding-bottom: 20px; border-bottom: 1px solid #eee; }

.quantity-selector { display: flex; align-items: center; gap: 15px; margin-bottom: 25px; }
.quantity-selector label { font-weight: 600; color: #333; }
.qty-control { display: flex; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { background: #f9f9f9; border: none; width: 40px; height: 40px; font-size: 18px; cursor: pointer; transition: 0.2s; }
.qty-control button:hover { background: #eee; }
.qty-control input { width: 50px; text-align: center; border: none; border-left: 1px solid #ddd; border-right: 1px solid #ddd; font-weight: bold; -moz-appearance: textfield; pointer-events: none; }
.qty-control input::-webkit-outer-spin-button, .qty-control input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.w-100 { width: 100%; text-align: center; display: block; }

@media (max-width: 768px) {
    .product-detail-grid { flex-direction: column; gap: 20px; }
    .product-detail-img img { height: 250px; }
    .product-detail-info { text-align: center; }
    .product-detail-info .brand-badge { margin: 0 auto 15px auto !important; }
    .quantity-selector { justify-content: center; }
}