/* ================================================= */
/* 0. BASE & UTILITIES (Dựa trên thiết kế Lumière) */
/* ================================================= */
:root {
    --color-primary: #000;
    --color-secondary: #F9F5EA; /* Light beige/off-white background */
    --color-text: #333;
    --color-light-text: #999;
    --font-serif: "Times New Roman", Times, serif; 
    --font-sans: Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background-color: #F9F5EA;
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: normal;
    text-transform: uppercase;
}

a {
    text-decoration: none;
    color: var(--color-text);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Buttons/Links --- */
.btn {
    padding: 10px 25px;
    text-transform: uppercase;
    font-size: 14px;
    transition: background-color 0.3s;
    cursor: pointer;
    text-align: center;
    border: none;
}

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

.btn-border {
    background-color: transparent;
    border: 1px solid #fff;
    color: #fff;
    padding: 8px 20px;
}

/* ================================================= */
/* 1. HEADER & FOOTER (Cần thiết cho giao diện trang) */
/* ================================================= */

.header-top-bar {
    background-color: var(--color-primary);
    color: #fff;
    text-align: center;
    padding: 5px 0;
    font-size: 12px;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background-color: #fff;
    border-bottom: 1px solid #eee;
    position: relative;
}

.logo {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 2px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.logo a {
    color: var(--color-text);
}

.nav-left, .nav-right {
    display: flex;
    align-items: center;
}

.nav-link {
    margin-right: 25px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-link.active {
    font-weight: bold;
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 2px;
}

.navbar .nav-left .nav-link.active {
    font-weight: bold; /* Làm đậm chữ */
    border-bottom: 2px solid var(--color-primary); /* Tạo gạch chân màu đen */
    padding-bottom: 5px; /* Điều chỉnh khoảng cách gạch chân */

}

.nav-right a {
    margin-left: 20px;
}

.nav-right .btn {
    margin-left: 30px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

/* --- Footer --- */
.main-footer {
    background-color: var(--color-primary);
    color: #fff;
    padding: 40px 5% 10px 5%;
    font-size: 14px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    padding-bottom: 30px;
    border-bottom: 1px solid #444;
}

.footer-logo {
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.footer-left {
    display: flex;
    flex-direction: column;
}

.footer-links {
    display: flex;
    gap: 50px;
}

.link-group {
    display: flex;
    flex-direction: column;
}

.link-group a {
    color: #ccc;
    margin-bottom: 5px;
    text-transform: uppercase;
    font-size: 12px;
}

.footer-right p {
    margin-bottom: 15px;
    text-align: right;
}

.copyright {
    text-align: center;
    margin-top: 15px;
    font-size: 12px;
    color: #555;
}


/* 2. Hero Section */
.hero-section {
    display: flex;
    min-height: 70vh;
    background-color: var(--color-secondary);
}

.hero-section .hero-content h1 {
    text-transform: none; 
}

.hero-image-container {
    flex: 1;
}

.hero-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 5%;
    text-align: left;
}

.tagline {
    font-size: 14px;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.hero-content h1 {
    font-size: 4vw; /* Responsive font size */
    line-height: 1.2;
    margin-bottom: 30px;
}

.hero-content h1 strong {
    font-weight: bold;
}

/* 3. Bestseller Section (Carousel) */
.bestseller-section {
    padding: 60px 0; /* Bỏ padding ngang để carousel wrapper tự xử lý */
    text-align: center;
}

.section-title {
    color: var(--color-light-text);
    font-size: 14px;
    letter-spacing: 3px;
    margin-bottom: 5px;
}

.section-subtitle {
    font-size: 30px;
    margin-bottom: 40px;
    text-transform: none;
}

/* Carousel Structure */
.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 5%; /* Padding ngang để các nút nằm bên trong (hoặc bên ngoài) */
}

/* Container cuộn chính */
.product-carousel-container {
    overflow-x: scroll; 
    padding: 0; 
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth; /* Cho JavaScript cuộn mượt */
    flex-grow: 1; 
}

/* Ẩn thanh cuộn */
.product-carousel-container::-webkit-scrollbar {
    display: none;
}
.product-carousel-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Track chứa các sản phẩm */
.product-grid {
    display: flex; 
    gap: 30px;
    padding: 20px 0; /* Padding dọc cho track */
    width: fit-content;
}

/* Thẻ sản phẩm */
.product-card {
    flex-shrink: 0; 
    width: 280px; /* Chiều rộng cố định cho desktop */
    text-align: left;
}

.product-card h4 {
    margin-top: 10px;
    font-size: 16px;
    text-transform: none;
    font-weight: bold;
}

.product-card .price {
    font-weight: bold;
    margin: 5px 0;
}

.product-card .old-price {
    color: var(--color-light-text);
    font-weight: normal;
}

.product-card .description {
    color: var(--color-light-text);
    font-size: 14px;
    margin-bottom: 10px;
}

.product-image-container {
    position: relative;
    overflow: hidden;
}

.product-image-container img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.sale-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #e74c3c;
    color: #fff;
    padding: 5px 8px;
    font-size: 12px;
    border-radius: 50%;
}

.add-to-cart {
    display: inline-block;
    color: var(--color-light-text);
    font-size: 12px;
    margin-top: 5px;
    border-bottom: 1px solid var(--color-light-text);
    padding-bottom: 2px;
}

/* Kiểu cho Nút Điều hướng */
.carousel-btn {
    background-color: transparent;
    border: 1px solid var(--color-light-text);
    color: var(--color-text);
    padding: 10px 15px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    z-index: 5;
    transition: background-color 0.3s, color 0.3s;
    line-height: 1;
}

.carousel-btn:hover:not(:disabled) {
    background-color: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.prev-btn {
    margin-right: 20px;
}

.next-btn {
    margin-left: 20px;
}


/* 4. Banner/Promo Section */
.promo-banner {
    position: relative;
    margin: 40px 5%;
    min-height: 400px;
    background-color: #333; /* Fallback */
    overflow: hidden;
}

.promo-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.promo-content {
    position: absolute;
    top: 50%;
    left: 10%;
    transform: translateY(-50%);
    color: #fff;
    z-index: 2;
}

.promo-content h2 {
    font-size: 70px;
    margin-bottom: 10px;
}

.promo-content p {
    font-size: 18px;
    margin-bottom: 5px;
}

/* 5. Features Section */
.features-section {
    background-color: var(--color-secondary);
    padding: 0 0 60px 0;
}

.feature-header {
    text-align: center;
}

.feature-header-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
}

.feature-header p {
    max-width: 600px;
    margin: 30px auto;
    font-size: 18px;
    font-family: var(--font-serif);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 0 5%;
}

.feature-image-card img {
    width: 100%;
    aspect-ratio: 1 / 1.1; /* Adjust as needed */
    object-fit: cover;
}

.feature-content-card {
    background-color: #fff;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.feature-content-card img {
    width: 100%;
    max-height: 250px; /* Example size */
    object-fit: cover;
    margin-bottom: 15px;
}

.feature-content-card h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

/* 6. Bottom Banner */
.bottom-banner {
    background-color: #d1b8a5; /* Color taken from the image background */
    text-align: center;
    padding: 80px 5%;
    position: relative;
    overflow: hidden;
}

.bottom-banner h2 {
    color: #fff;
    font-size: 80px;
    position: relative;
    z-index: 2;
    margin-bottom: 20px;
}

.bottom-banner-image {
    width: 50%;
    max-width: 350px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    opacity: 0.9;
}

.bottom-banner .btn {
    position: relative;
    z-index: 2;
    margin-top: 20px;
}

/* 7. FAQ Section */
.faq-section {
    padding: 60px 5%;
}

.faq-tabs {
    display: flex;
    justify-content: center;
    border-bottom: 1px solid #ddd;
    margin-bottom: 30px;
}

.faq-tab {
    background: none;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    cursor: pointer;
    text-transform: uppercase;
    color: var(--color-light-text);
    transition: color 0.3s;
}

.faq-tab.active {
    color: var(--color-primary);
    border-bottom: 2px solid var(--color-primary);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-list details {
    border-bottom: 1px solid #eee;
}

.faq-list summary {
    font-weight: bold;
    padding: 15px 0;
    cursor: pointer;
    font-size: 16px;
    list-style: none; /* Hide default arrow */
    position: relative;
}

.faq-list summary::after {
    content: '+';
    position: absolute;
    right: 0;
    font-size: 20px;
}

.faq-list details[open] summary::after {
    content: '-';
}

.faq-content {
    padding: 10px 0 20px 0;
    color: var(--color-light-text);
}


/* 8. Footer */
.main-footer {
    background-color: var(--color-primary);
    color: #fff;
    padding: 40px 5% 10px 5%;
    font-size: 14px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    padding-bottom: 30px;
    border-bottom: 1px solid #444;
}

.footer-logo {
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.footer-left {
    display: flex;
    flex-direction: column;
}

.footer-links {
    display: flex;
    gap: 50px;
}

.link-group {
    display: flex;
    flex-direction: column;
}

.link-group a {
    color: #ccc;
    margin-bottom: 5px;
    text-transform: uppercase;
    font-size: 12px;
}

.footer-right p {
    margin-bottom: 15px;
    text-align: right;
}

.copyright {
    text-align: center;
    margin-top: 15px;
    font-size: 12px;
    color: #555;
}

/* ================================================= */
/* MEDIA QUERIES for Responsiveness */
/* ================================================= */

/* Tablet & Smaller Desktop */
@media (max-width: 1024px) {
    /* Điều chỉnh font chữ lớn hơn trên màn hình trung bình */
    .hero-content h1 {
        font-size: 5vw;
    }
}

/* Mobile Devices */
@media (max-width: 768px) {
    /* Header/Navigation Mobile */
    .navbar {
        padding: 10px 5%;
    }
    .nav-left, .nav-right {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 60px;
        left: 0;
        background-color: #fff;
        border-top: 1px solid #eee;
        z-index: 10;
        padding: 10px 0;
    }

    .nav-left.active, .nav-right.active {
        display: flex;
    }

    .nav-left a, .nav-right a {
        margin: 10px 0;
        text-align: center;
    }
    
    .logo {
        position: static;
        transform: none;
        order: 2;
        flex-grow: 1;
        text-align: center;
    }

    .menu-toggle {
        display: block;
        order: 1;
    }

    .nav-right {
        order: 3;
    }
    
    /* Hero Section Mobile */
    .hero-section {
        flex-direction: column;
    }

    .hero-content {
        padding: 40px 5%;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 7vw;
    }

    /* Carousel Mobile */
    .carousel-btn {
        display: none; /* Ẩn nút trên mobile, dùng thao tác vuốt */
    }
    .carousel-wrapper {
        padding: 0; /* Bỏ padding ngang của wrapper */
    }
    .product-card {
        width: 65vw; /* Chiếm 65% chiều rộng viewport trên mobile */
    }
    .product-grid {
        /* Thêm padding đầu và cuối để sản phẩm không dính sát lề */
        padding: 20px 20px 20px 20px; 
    }

    /* Promo Banner Mobile */
    .promo-content h2 {
        font-size: 40px;
    }

    /* Features Section Mobile */
    .feature-grid {
        grid-template-columns: 1fr;
    }

    .feature-image-card img {
        aspect-ratio: 16 / 9;
    }

    /* Bottom Banner Mobile */
    .bottom-banner h2 {
        font-size: 50px;
    }

    /* Footer Mobile */
    .footer-content {
        flex-direction: column;
    }

    .footer-left {
        margin-bottom: 30px;
    }

    .footer-links {
        gap: 20px;
    }

    .footer-right p {
        text-align: left;
    }
}

/* Thêm vào cuối file style.css */
.nav-right .user-info {
    display: flex;
    align-items: center;
    gap: 5px; /* Khoảng cách giữa icon và tên */
    font-size: 0.9em;
    color: var(--color-text);
}

.nav-right .user-greeting {
    margin-right: 5px;
    white-space: nowrap; /* Ngăn tên bị xuống dòng */
}

/* Điều chỉnh vị trí nút Đăng xuất */
.nav-right .btn-primary {
    /* Đảm bảo nút Đăng xuất nằm cùng hàng với các icon khác */
    height: fit-content;
}