/* ================= CƠ BẢN & BIẾN MÀU ================= */
:root {
    --primary-color: #b88645;
    --text-dark: #111111;
    --text-light: #666666;
    --bg-light: #f9f8f6;
    --border-color: #eaeaea;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* Khóa chặt trục ngang chặn tràn viền */
html, body { 
    font-family: var(--font-body); 
    color: var(--text-dark); 
    line-height: 1.6; 
    background-color: #fff; 
    overflow-x: hidden; 
    max-width: 100%; 
    width: 100%;
}

a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ================= HIỆU ỨNG CHUYỂN ĐỘNG (ANIMATIONS) ================= */
@keyframes fadeSlideUp {
    0% { opacity: 0; transform: translateY(25px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
    0% { transform: translateX(-150%) skewX(-25deg); }
    50% { transform: translateX(200%) skewX(-25deg); }
    100% { transform: translateX(200%) skewX(-25deg); }
}

/* Thêm hiệu ứng lướt vàng cho chữ Logo */
@keyframes textShimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* ================= TRỤC GIỮA (CONTAINER TRICK) ================= */
.main-header, .categories-section, .product-section, 
.about-section, .process-section, .testimonial-section, .promo-newsletter, .main-footer {
    padding-left: max(5%, calc((100% - 1200px) / 2));
    padding-right: max(5%, calc((100% - 1200px) / 2));
    max-width: 100%;
}

/* ================= HEADER & MENU DROP-DOWN ================= */
.main-header { 
    display: flex; justify-content: space-between; align-items: center; 
    padding-top: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border-color); background: #fff;
    gap: 30px; 
    position: relative; z-index: 10;
}

/* THIẾT KẾ LOGO KẾT HỢP HÌNH VÀ CHỮ */
.logo .logo-link {
    display: flex; 
    align-items: center; /* Căn giữa theo trục dọc */
    gap: 10px; 
    text-decoration: none; 
}

.logo .brand-icon {
    height: 42px; /* Tăng nhẹ kích thước ảnh cho cân đối với chữ */
    width: auto;
    object-fit: contain;
}

.logo h1 { 
    font-family: var(--font-heading); 
    font-size: 34px; 
    letter-spacing: 1px; 
    margin: 0; 
    line-height: 1; /* Ép sát chiều cao chữ để không bị lệch với ảnh */
    padding-top: 4px; /* Vi chỉnh đẩy chữ xuống một chút xíu cho cân tâm hoàn hảo */
    
    /* HIỆU ỨNG ÁNH VÀNG LƯỚT QUA CHỮ */
    background: linear-gradient(
        to right, 
        var(--primary-color) 20%, 
        #faddaa 40%, 
        #faddaa 60%, 
        var(--primary-color) 80%
    );
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: textShimmer 4s linear infinite; /* Chạy hiệu ứng lướt vàng liên tục */
}

/* SỬA LỖI: Thêm dấu > để chỉ dàn hàng ngang cho menu chính ngoài cùng */
.main-nav > ul { 
    display: flex; 
    gap: 25px; 
    font-size: 13px; 
    font-weight: 600; 
    text-transform: uppercase; 
    white-space: nowrap; 
}
.main-nav a:hover, .main-nav a.active { color: var(--primary-color); }

/* Menu thả xuống (Dropdown) */
.dropdown {
    position: relative;
    display: flex; 
    align-items: center;
}
.dropdown-content {
    display: none; /* Ẩn đi khi bình thường */
    position: absolute;
    background-color: #fff;
    min-width: 180px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08); /* Bóng đổ cho rõ ràng hơn */
    border-radius: 8px;
    z-index: 100;
    top: 100%;
    left: 0;
    padding: 10px 0;
    flex-direction: column; /* Ép xếp dọc */
    animation: fadeSlideUp 0.3s ease-out;
}

/* SỬA LỖI: Đảm bảo khi di chuột (hover) nó hiện lên dưới dạng cột (flex) */
.dropdown:hover .dropdown-content {
    display: flex;
}

.dropdown-content li {
    width: 100%;
    list-style: none; /* Bỏ dấu chấm tròn nếu có */
}
.dropdown-content a {
    color: var(--text-dark);
    padding: 12px 20px;
    display: block;
    text-transform: none; /* Giữ chữ viết thường cho dễ đọc */
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s, color 0.3s;
}
.dropdown-content a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.header-actions { display: flex; align-items: center; gap: 20px; white-space: nowrap; }
.header-actions input { 
    padding: 10px 15px; border: 1px solid var(--border-color); border-radius: 25px; 
    font-family: var(--font-body); font-size: 13px; width: 200px;
    transition: all 0.3s ease;
}
.header-actions input:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 5px rgba(184, 134, 69, 0.3); }

/* ================= NÚT BẤM ================= */
.btn-primary { 
    background-color: var(--primary-color); color: white; border: none; 
    padding: 12px 25px; font-weight: 600; font-size: 13px; cursor: pointer; 
    border-radius: 8px; 
    text-transform: uppercase; letter-spacing: 1px; 
    transition: all 0.3s ease;
    position: relative; 
    overflow: hidden; 
    box-shadow: 0 4px 10px rgba(184, 134, 69, 0.2);
}
.btn-primary::after {
    content: ''; position: absolute; top: 0; left: 0; width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%);
    animation: shimmer 3.5s infinite; 
}
.btn-primary:hover { background-color: #9e733b; transform: translateY(-2px); box-shadow: 0 6px 15px rgba(184, 134, 69, 0.4); }

/* ================= DANH MỤC NỔI BẬT ================= */
.categories-section { display: flex; justify-content: space-between; gap: 15px; padding-top: 50px; padding-bottom: 50px; }
.category-card { 
    display: flex; align-items: center; background: var(--bg-light); padding: 15px 20px; 
    border-radius: 12px; 
    width: 19%; gap: 15px; cursor: pointer; 
    transition: all 0.4s ease; 
    border: 1px solid rgba(0,0,0,0.02);
    animation: fadeSlideUp 0.8s ease-out backwards;
}
.category-card:nth-child(1) { animation-delay: 0.1s; }
.category-card:nth-child(2) { animation-delay: 0.2s; }
.category-card:nth-child(3) { animation-delay: 0.3s; }
.category-card:nth-child(4) { animation-delay: 0.4s; }
.category-card:nth-child(5) { animation-delay: 0.5s; }

.category-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.06); background: #fff; }
.category-card .cat-img { width: 55px; height: 55px; background: #fff; border-radius: 50%; object-fit: cover; box-shadow: 0 2px 8px rgba(0,0,0,0.08); transition: transform 0.4s ease; }
.category-card:hover .cat-img { transform: scale(1.1) rotate(5deg); } 
.category-card .cat-text { font-weight: 600; font-size: 14px; text-transform: uppercase; }
.category-card small { font-weight: 400; color: var(--primary-color); font-size: 11px; text-transform: none; }

/* ================= SẢN PHẨM ================= */
.product-section { padding-top: 60px; padding-bottom: 60px; }
.section-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 30px; border-bottom: 2px solid var(--border-color); padding-bottom: 15px; }
.section-header h3 { font-family: var(--font-heading); font-size: 28px; color: var(--text-dark); text-transform: uppercase; letter-spacing: 1px; }
.section-header a { font-size: 14px; font-weight: 600; color: var(--text-light); transition: color 0.3s; }
.section-header a:hover { color: var(--primary-color); }

.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.product-card { cursor: pointer; animation: fadeSlideUp 1s ease-out backwards; }
.product-card:nth-child(2) { animation-delay: 0.15s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.45s; }

.product-image-wrapper {
    position: relative; width: 100%; aspect-ratio: 3 / 4; height: auto;
    margin-bottom: 15px; overflow: hidden; 
    border-radius: 12px; 
    background-color: #f5f5f5;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: box-shadow 0.4s ease;
}
.product-image-wrapper img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.product-card:hover .product-image-wrapper { box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.product-card:hover .product-image-wrapper img { transform: scale(1.08); } 

.badge { 
    position: absolute; top: 12px; left: 12px; background: var(--primary-color); color: white; 
    font-size: 10px; padding: 5px 12px; font-weight: bold; border-radius: 20px; z-index: 2; letter-spacing: 1px;
    overflow: hidden; 
    box-shadow: 0 4px 10px rgba(184, 134, 69, 0.2);
}
.badge::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.6) 50%, rgba(255,255,255,0) 100%);
    animation: shimmer 3s infinite; 
}

.product-card h4 { font-size: 15px; font-weight: 500; margin-bottom: 8px; color: var(--text-dark); line-height: 1.4; transition: color 0.3s; }
.product-card:hover h4 { color: var(--primary-color); }
.product-card .price { font-size: 16px; font-weight: 700; color: var(--primary-color); }
.product-card .rating { font-size: 12px; color: var(--text-light); margin-top: 5px; }

/* ================= VỀ FASXURY & QUY TRÌNH ================= */
.about-section { display: flex; padding-top: 80px; padding-bottom: 80px; background: var(--bg-light); gap: 60px; align-items: center; }
.about-content, .about-image { flex: 1; }
.about-content .subtitle { margin-bottom: 5px; }
.about-content h3 { font-family: var(--font-heading); font-size: 34px; line-height: 1.3; margin-bottom: 20px; }
.about-content p { color: var(--text-light); font-size: 15px; line-height: 1.8; }
.about-image img { box-shadow: 0 10px 30px rgba(0,0,0,0.08); border-radius: 12px; transition: transform 0.5s ease; }
.about-image img:hover { transform: scale(1.02); }

.process-section { padding-top: 80px; padding-bottom: 80px; }
.center-title { text-align: center; font-family: var(--font-heading); font-size: 30px; margin-bottom: 50px; text-transform: uppercase; }
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; text-align: center; }
.process-step img { border-radius: 12px !important; transition: transform 0.4s; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.process-step:hover img { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.process-step h4 { font-size: 15px; margin-bottom: 10px; font-weight: 700; margin-top: 15px; }
.process-step p { font-size: 14px; color: var(--text-light); line-height: 1.6; }

/* ================= ĐÁNH GIÁ & KHUYẾN MÃI ================= */
.testimonial-section { padding-top: 80px; padding-bottom: 80px; background: var(--bg-light); }
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.testimonial-card { 
    background: white; padding: 40px; border-radius: 16px; text-align: center; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.03); transition: all 0.4s ease; 
}
.testimonial-card:hover { transform: translateY(-8px); box-shadow: 0 15px 30px rgba(0,0,0,0.06); }
.testimonial-card .comment { font-style: italic; margin: 20px 0; font-size: 15px; line-height: 1.8; color: var(--text-dark); }
.customer-info { font-size: 14px; color: var(--text-light); }

.promo-newsletter { padding-top: 80px; padding-bottom: 80px; }
.promo-banner { 
    background: #f6efe9; text-align: center; padding: 80px 20px; position: relative; 
    border-radius: 16px; margin-bottom: 40px; transition: transform 0.4s;
}
.promo-banner:hover { transform: scale(1.01); }
.promo-banner h2 { font-size: 18px; letter-spacing: 3px; margin-bottom: 15px; color: var(--text-light); text-transform: uppercase;}
.promo-banner h3 { font-family: var(--font-heading); font-size: 42px; font-style: italic; margin-bottom: 30px; color: var(--primary-color); }
.discount-badge { 
    position: absolute; right: 80px; top: -30px; background: white; padding: 20px; 
    border-radius: 50%; font-weight: bold; width: 140px; height: 140px; display: flex; 
    align-items: center; justify-content: center; text-align: center; color: var(--primary-color); 
    border: 2px dashed var(--primary-color); font-size: 14px; line-height: 1.4; box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    animation: fadeSlideUp 1s ease-out backwards 0.5s; 
}

.newsletter-bar { 
    display: flex; align-items: center; justify-content: space-between; padding: 30px 40px; 
    border: 1px solid var(--border-color); border-radius: 12px; background: #fff; box-shadow: 0 5px 20px rgba(0,0,0,0.02);
}
.newsletter-bar strong { font-size: 16px; }
.newsletter-bar span { color: var(--text-light); font-size: 14px; }
.newsletter-form { display: flex; gap: 10px; }
.newsletter-form input { padding: 12px 20px; border: 1px solid var(--border-color); width: 350px; border-radius: 8px; font-family: var(--font-body); transition: border-color 0.3s; }
.newsletter-form input:focus { outline: none; border-color: var(--primary-color); }

/* ================= FOOTER ================= */
.main-footer { background: var(--text-dark); color: #fff; padding-top: 80px; padding-bottom: 60px; }
.footer-container { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr; gap: 40px; }
.footer-col h4 { font-size: 15px; margin-bottom: 25px; text-transform: uppercase; letter-spacing: 1px; color: var(--primary-color); }
.footer-col ul li { margin-bottom: 12px; font-size: 14px; color: #ccc; transition: transform 0.3s; }
.footer-col ul li:hover { transform: translateX(5px); color: #fff; } 
.brand-info h2 { font-family: var(--font-heading); color: #fff; margin-bottom: 15px; font-size: 32px; }
.brand-info p { font-size: 14px; color: #ccc; margin-bottom: 10px; line-height: 1.6; }
.footer-col p { font-size: 14px; color: #ccc; margin-bottom: 12px; line-height: 1.6; }

/* ================= TÍNH THÍCH ỨNG (RESPONSIVE PC & TABLET) ================= */
@media (max-width: 1200px) {
    .discount-badge { display: none; }
    .footer-container { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 992px) {
    .main-header { flex-direction: column; gap: 15px; } 
    .main-nav ul { overflow-x: auto; max-width: 100%; padding-bottom: 5px; } 
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .categories-section { flex-wrap: wrap; justify-content: center; }
    .category-card { width: 30%; }
    .about-section { flex-direction: column; text-align: center; }
    .process-grid, .testimonial-grid { grid-template-columns: repeat(2, 1fr); }
    .newsletter-bar { flex-direction: column; text-align: center; gap: 20px; }
}

/* ================= BẢN MOBILE HOÀN THIỆN ================= */
@media (max-width: 576px) {
    /* 1. Lề an toàn và ép khung 100% */
    .main-header, .categories-section, .product-section, 
    .about-section, .process-section, .testimonial-section, .promo-newsletter, .main-footer {
        padding-left: 15px; padding-right: 15px; width: 100%; max-width: 100%; box-sizing: border-box;
    }
    .product-section, .about-section, .process-section, .testimonial-section, .promo-newsletter { padding-top: 35px; padding-bottom: 35px; }

    /* 2. Header */
    .main-header { flex-direction: column; align-items: center; padding-top: 15px; padding-bottom: 15px; gap: 15px; }
    .main-nav { display: none; } 
    
    /* CHỈNH SỬA LẠI LOGO TRÊN MOBILE CHO TO HƠN */
    .logo .logo-link { display: flex; align-items: center; justify-content: center; gap: 10px; }
    .logo .brand-icon { height: 42px; /* Tăng kích thước ảnh trên điện thoại */ }
    .logo h1 { font-size: 34px; padding-top: 4px; /* Tăng kích thước chữ trên điện thoại */ }
    
    .header-actions { width: 100%; max-width: 100%; display: flex; gap: 10px; align-items: center; }
    .header-actions input { flex: 1; min-width: 0; margin: 0; width: 100%; }
    .header-actions .btn-primary { flex-shrink: 0; padding: 10px 15px; white-space: nowrap; }

    /* 3. Danh mục - Vuốt ngang */
    .categories-section { gap: 12px; overflow-x: auto; flex-wrap: nowrap; justify-content: flex-start; padding-bottom: 15px; -ms-overflow-style: none; scrollbar-width: none; }
    .categories-section::-webkit-scrollbar { display: none; } 
    .category-card { min-width: 110px; flex-shrink: 0; padding: 12px 10px; flex-direction: column; text-align: center; gap: 8px; width: auto; }
    .category-card .cat-img { width: 55px; height: 55px; }

    /* 4. Sản phẩm */
    .section-header { align-items: center; margin-bottom: 20px; }
    .section-header h3 { font-size: 18px; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; width: 100%; }
    .product-card h4 { font-size: 13px; margin-bottom: 5px; }
    .product-card .price { font-size: 14px; }

    /* 5. Các Section khác */
    .about-section { flex-direction: column; text-align: center; }
    .about-content h3 { font-size: 22px; margin-bottom: 15px; line-height: 1.4; }
    .center-title { font-size: 20px; margin-bottom: 25px; line-height: 1.4; }
    .process-grid, .testimonial-grid { grid-template-columns: 1fr; gap: 20px; width: 100%; }
    .process-step img { height: auto; aspect-ratio: 16/9; } 

    /* 6. Footer & Promo */
    .promo-banner { padding: 30px 15px; margin-bottom: 20px; width: 100%; box-sizing: border-box; }
    .promo-banner h3 { font-size: 24px; margin-bottom: 15px; }
    .newsletter-form { flex-direction: column; width: 100%; }
    .newsletter-form input { width: 100%; margin: 0 0 10px 0; box-sizing: border-box; }
    .newsletter-form .btn-primary { width: 100%; }
    .footer-container { grid-template-columns: 1fr; gap: 25px; width: 100%; }
    .brand-info h2 { font-size: 26px; }
}