/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family:'Trebuchet MS', sans-serif;
    font-family: 'Nunito', 'Helvetica', sans-serif;
}

body {
    background: #fffaf3;
    color: #333;
    line-height: 1.5;
}

/* ===== HEADER (Giữ nguyên) ===== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 50px;
    background: #fffaf3;
    border-bottom: 1px solid #eee;
}

.header .logo img {
    height: 55px;
}

.header nav ul {
    display: flex;
    list-style: none;
}

.header nav ul li {
    margin: 0 15px;
}

.header nav ul li a {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    padding: 8px 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

/* Hover */
.header nav ul li a:hover {
    color: #8f2c24;
}

/* Icons */
.header .icons a {
    margin-left: 15px;
    color: #666;
    font-size: 1.2em;
    transition: 0.3s;
}
.header .icons a:hover {
    color: #8f2c24;
}

/* icon giỏ hàng */
.cart-icon {
    position: relative;
    font-size: 22px;
    text-decoration: none;
}

.cart-count {
    position: absolute;
    top: -6px;
    right: -10px;
    background: red;
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 50%;
    display: none; /* mặc định ẩn */
}


/* ===== HERO SLIDER (Giữ nguyên) ===== */
.hero {
    position: relative;
    height: 85vh;
    overflow: hidden;
}

.slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.slides {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

/* Nút điều hướng */
.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.7);
    border: none;
    font-size: 2em;
    padding: 5px 12px;
    cursor: pointer;
    border-radius: 50%;
    z-index: 3;
    transition: 0.3s;
}

.prev:hover, .next:hover {
    background: rgba(255,255,255,0.9);
}

.prev { left: 20px; }
.next { right: 20px; }

/* ===== FEATURED PRODUCTS (Giữ nguyên) ===== */
.featured {
    padding: 50px;
    text-align: center;
}

.featured h2 {
    margin-bottom: 20px;
    color: #8f2c24;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(220px,1fr));
    gap: 30px;
    margin-top: 30px;
}

.product-card {
    position: relative;
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-card img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover img {
    transform: scale(1.08);
}

.product-card h3 {
    margin: 10px 0;
    color: #8f2c24;
}
/* Khối chứa giá và nút */
.product-info {
    position: relative;
    min-height: 35px;
    margin-bottom: 10px;
}

/* Giá sản phẩm */
.price {
    font-size: 1em;
    font-weight: bold;
    color: #8f2c24;
    margin: 5px 0;
    transition: opacity 0.3s ease;
}

/* Nút thêm giỏ hàng */
.btn-add {
    display: none;
    background: #8f2c24;
    color: #fff;
    padding: 8px 18px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

/* Hover: ẩn giá, hiện nút ngay dưới tên */
.product-card:hover .price {
    display: none;
}

.product-card:hover .btn-add {
    display: inline-block;
}



/* Nút Xem Thêm */
.btn-more {
    display: inline-block;
    margin-top: 50px; /* Khoảng cách với lưới sản phẩm */
    padding: 12px 30px;
    background:#8f2c24; /* Màu nền chủ đạo */
    color: white;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-more:hover {
    background: #4d0702; /* Màu đậm hơn khi hover */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}



/* ===== WHY CHOOSE US (Đã sửa) ===== */
.why-choose {
    position: relative;
    width: 100%;
    height: 90vh; /* nhỏ gọn hơn */
    overflow: hidden;
}

.content-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Ảnh nền */
.text-box {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.7s ease;
    z-index: 1;
}

.text-box.active {
    opacity: 1;
    z-index: 2;
}

/* Overlay tối (Đã chỉnh để tối hơn, nổi bật chữ) */
.text-box .overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.523); /* Tăng độ đậm lên 0.8 */
}

/* Box chữ căn giữa */
.text-box .text {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    max-width: 600px;
    padding: 0;
    background: none;
    border-radius: 0;
    box-shadow: none;
    text-align: center;
    color: #fff;
    opacity: 0;
    transition: all 0.5s ease;
}

.text-box.active .text {
    opacity: 1;
}

/* Định dạng tiêu đề lớn (Đã sửa) */
.text-box .text .box-title {
    font-size: 3.0em; /* Cỡ chữ to hơn */
    font-weight: 700; /* In đậm hơn */
    margin-bottom: 20px; /* Tăng khoảng cách dưới tiêu đề */
    color: #fff; /* Chữ trắng để nổi bật trên nền tối */
    text-shadow: 0 0 10px rgba(0,0,0,0.8); /* Thêm đổ bóng nhẹ cho tiêu đề */
    letter-spacing: 1px;
    line-height: 1.2;
}

/* Định dạng cho đoạn mô tả (Đã sửa) */
.text-box .text p {
    font-size: 1.5em; /* Tăng kích thước chữ mô tả */
    font-weight: 300;
    color: #fff; /* Chữ trắng */
    margin-top: 0;
    line-height: 1.5;
}

/* ===== NUMBERS (Giữ nguyên) ===== */
.why-numbers {
    position: absolute;
    top: 50%;
    left: 60px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 30px;
    z-index: 2;
}

.why-numbers span {
    font-size: 2em;
    font-weight: bold;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

/* Gạch ngang nằm sau số */
.why-numbers span::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    width: 40px;
    height: 2px;
    background: rgba(255,255,255,0.4);
    margin-left: 15px;
    transition: all 0.3s ease;
}

/* Hover + Active */
.why-numbers span.active,
.why-numbers span:hover {
    font-size: 3em;
    color: #fff;
    transform: translateX(10px);
}

.why-numbers span.active::after,
.why-numbers span:hover::after {
    background: #fff;
    width: 80px;
}


/* ===== PROMO PRODUCTS (SẢN PHẨM KHUYẾN MÃI - Đã chỉnh sửa) ===== */

/* Đảm bảo phần khuyến mãi cách biệt với phần trước */
.promo-section {
    margin-top: 10px; /* Tăng khoảng cách để tách biệt với section trước */
    padding-bottom: 80px; /* Thêm padding ngang vì carousel không dùng grid toàn màn hình */
    padding-left: 0;
    padding-right: 0;
}

/* Container bọc slider và nút */
.product-slider-container {
    position: relative;
    max-width: 90%; /* Giới hạn chiều rộng để tạo khoảng trống 2 bên */
    margin: 0 auto;
}

/* Khung cuộn ngang */
.product-slider-wrapper { /* Cho phép cuộn ngang (scroll) */
    overflow-x: auto;
    /* Ẩn thanh cuộn */
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
    padding-bottom: 20px; /* Thêm padding cho thanh cuộn */
}
/* Ẩn thanh cuộn cho Webkit */
.product-slider-wrapper::-webkit-scrollbar {
    display: none;
}

/* Lưới sản phẩm cuộn ngang */
.product-slider {
    display: flex;
    flex-wrap: nowrap; /* Ngăn các mục bị ngắt dòng */
    gap: 30px;
    padding: 30px 50px 0 50px; /* Thêm padding ngang để items không dính sát viền */
    transition: transform 0.3s ease-in-out; /* Dành cho js cuộn bằng transform nếu cần */
}

/* Điều chỉnh kích thước thẻ sản phẩm trong slider */
.promo-card {
    min-width: 280px; /* Kích thước tối thiểu cho mỗi card để dễ xem */
    max-width: 280px; /* Kích thước tối đa cố định */
    flex-shrink: 0; /* Quan trọng: ngăn card bị co lại */
}

/* Nút điều hướng Carousel */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    background: rgba(143, 44, 36, 0.85); /* Màu đỏ đậm chủ đạo */
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2em;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.carousel-btn:hover {
    background: #8f2c24; /* Tăng độ đậm khi hover */
    transform: translateY(-50%) scale(1.05);
}

.prev-promo {
    left: 0;
}

.next-promo {
    right: 0;
}


/* Hiệu ứng giảm giá */
.discount-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #8f2c24; /* Màu đỏ đậm chủ đạo */
    color: #fff;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 5px;
    z-index: 10;
    font-size: 0.9em;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Giá gốc */
.old-price {
    font-size: 0.9em;
    color: #999;
    text-decoration: line-through; /* Gạch ngang giá gốc */
    margin-bottom: 0;
    line-height: 1;
    transition: opacity 0.3s ease;
}

/* Giá khuyến mãi */
.promo-price {
    color: #8f2c24; /* Màu đỏ đậm nổi bật giá mới */
    font-size: 1.1em;
    font-weight: 700;
}

/* Điều chỉnh phần info để chứa cả 2 giá */
.promo-card .product-info {
    min-height: 55px; /* Tăng chiều cao để chứa 2 dòng giá */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

/* Đảm bảo giá cũ biến mất khi hover (để nút hiện ra) */
.product-card:hover .old-price {
    display: none;
}
/* Đảm bảo giá khuyến mãi biến mất khi hover */
.product-card:hover .promo-price {
    display: none;
}


/* 2. INSPIRATION SECTION (PHẦN MỚI) */

.inspiration-section {
    padding: 0px 5%;
    background-color: #f8f8f8; /* Màu nền nhẹ nhàng */
    text-align: center;

}

.inspiration-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.2em;
    color: #8f2c24;
    margin-bottom: 50px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.inspiration-grid {
    display: flex;
    justify-content: center;
    gap: 40px; /* tăng khoảng cách giữa các ảnh (mặc định 30px) */
    margin-bottom: 40px;
}

.inspiration-card {
    display: block; /* Quan trọng để thẻ <a> hoạt động như block */
    max-width: 380px;
    text-align: left;
    text-decoration: none;
    color: #333;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.inspiration-card:hover {
    transform: translateY(-5px); /* Hiệu ứng nhấc lên nhẹ nhàng */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-image-wrapper {
    overflow: hidden;
    position: relative;
    border-radius: 8px;
    margin-bottom: 20px;
    aspect-ratio: 3/4; /* Tỉ lệ khung hình đẹp cho ảnh ngang */
    box-shadow: 0 6px 15px rgba(0,0,0,0.08); /* thêm bóng nhẹ cho khung ảnh */
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease; /* Hiệu ứng chuyển động mượt */

}

/* Hiệu ứng phóng to hình ảnh khi hover */
.inspiration-card:hover .card-image-wrapper img {
    transform: scale(1.05);
}

.step-number {
    position: absolute;
    top: 15px;
    left: 15px;
    font-family: 'Playfair Display', serif;
    font-size: 3em;
    font-weight: 600;
    color: #fff;
    opacity: 0.8;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
    line-height: 1;
}

.card-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5em;
    color: #8f2c24; /* Màu đậm cho tiêu đề */
    margin-bottom: 10px;
}

.card-content p {
    font-size: 1em;
    color: #666;
    line-height: 1.6;
    margin-bottom: 50px;
}


/* 3. HIỆU ỨNG CHUNG CHO SẢN PHẨM (Tối ưu) */


/* Thiết lập lại cấu trúc product-card để bọc toàn bộ nội dung trong .product-link (trừ nút thêm vào giỏ) */

.product-card .product-link {
    display: block; /* Cho phép áp dụng transform và overflow */
    text-decoration: none;
    color: inherit;
    overflow: hidden; /* Cắt phần ảnh bị phóng to ngoài khung */
    border-radius: 8px 8px 0 0; /* Bo góc trên */
}

/* Thay thế hiệu ứng hover ảnh */
.product-card .product-link img {
    transition: transform 0.6s ease;
}

.product-card:hover .product-link img {
    transform: scale(1.1); /* Phóng to ảnh khi hover card */
}

/* Giữ nguyên định dạng nút "Xem thêm" */
.btn-more {
    /* ... CSS hiện tại của nút xem thêm ... */
    display: inline-block;
    padding: 12px 30px;
    margin-top: 30px;
    background-color: #8f2c24; /* Màu vàng cam của button Xem thêm */
    color: white; /* Màu chữ */
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.btn-more:hover {
    background-color: #e96f6f;
}


/* Điều chỉnh responsive (nếu cần) */
@media (max-width: 992px) {
    .inspiration-grid {
        flex-direction: column;
        align-items: center;
    }
}

/* ==================================== */
/* 4. FOOTER SECTION */
/* ==================================== */

/* FOOTER CHUNG (Desktop/Màn hình lớn) */
.main-footer {
    background-color: #fffaf5;
    font-family: Arial, sans-serif;
    color: #4A4A4A;
    margin-top: 10px;
    padding: 50px 0px 0;
    border-top: 2px solid #d9d9d9;
}

.footer-content {
    display: flex;
    max-width: 1600px;
    margin: 0 auto;
    align-items: stretch;
    min-height: 400px;
    margin-top: -50px;
}

.footer-left {
    flex: 0 0 45%;
    padding-right: 10px;
    display: flex;
}

.footer-shop-image-new {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0 200px 0px 0;
    max-height: 700px;
}

/* ========================== */
/* CỘT BÊN PHẢI (Desktop) */
/* ========================== */
.footer-right {
    flex: 0 0 55%;
    padding: 30px 4%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* ========================== */
/* TAM GIÁC & HOVER ẢNH */
/* ========================== */
.triangle-container {
    display: flex;
    gap: 50px;
    position: relative;
    z-index: 1;
}

.triangle {
    width: 40px;
    height: 50px;
    background-color: transparent;
    border: 2px solid #8f2c24;
    transform: rotate(20deg) skew(20deg);
    border-radius: 0 50% 0 50%;
    position: relative;
    cursor: pointer;
    overflow: visible;
    transition: border 0.3s ease;
    margin-bottom: 20px;
}

.triangle img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    transform: translate(-50%, -50%) rotate(-20deg) skew(-20deg);
    opacity: 0;
    z-index: 5;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.triangle:hover {
    border: none;
}

.triangle:hover img {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(-20deg) skew(-20deg) scale(1.05);
}

/* ========================== */
/* PHẦN THÔNG TIN (Desktop) */
/* ========================== */

/* ĐÃ SỬA: Đảm bảo khối trước .footer-info-grid .info-block:nth-child(2) được đóng đúng */
.footer-info-grid {
    display: flex;
    margin-bottom: 0px;
    padding-left: 20px;
    gap: 35px;
}

.info-block h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4em;
    color: #8f2c24;
    margin-bottom: 5px;
    font-weight: bold;
}

.info-block p {
    font-size: 0.9em;
    line-height: 1.8;
    color: #666;
    margin-bottom: 5px;

}

.footer-info-grid .info-block:nth-child(2) {
    margin-left: 30px;
}


.footer-contact-info {
    display: flex;
    gap: 40px;
    margin-bottom: 30px;
    padding-left: 20px;
    margin-top: 30px;
    margin-left: 70px;
}

.email-item {
    margin-left: 80px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #8f2c24;
    border: 1px solid #8f2c24;
    border-radius: 25px;
    padding: 10px 20px;
    transition: all 0.3s ease;
    font-size: 1.2em;
}

.contact-item:hover {
    background-color: #8f2c24;
    color: #fff;
}

.footer-signature {
    margin-bottom: 20px;
    padding-left: 200px;
}

.footer-signature p {
    font-family: 'Playfair Display', serif;
    font-size: 1.2em;
    color: #8f2c24;
    margin-bottom: 30px;
    padding-left: 30px;
}
.company-details {
    font-family: 'Playfair Display', serif;
    font-size: 0.9em;
    line-height: 1.8;
    color: #666;
    margin-bottom: 50px;
    padding-left: 100px;
}

.company-details p:first-child strong {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    color:#8f2c24;
    font-size: 1.2em;
    padding-left: 120px;
    font-weight: bold;
}

.bct-logo {
    width: 150px;
    margin-top: -30px;
    margin-left: 150px;
}

.footer-bottom-text {
    text-align: center;
    font-size: 0.8em;
    color: #999;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    margin-top: -50px;
}

/* ==================================== */
/* 4.1 MEDIA QUERIES - RESPONSIVE DESIGN */
/* ==================================== */

/* Dành cho Máy tính bảng & Màn hình nhỏ (dưới 992px) */
@media (max-width: 992px) {
    /* Đảm bảo nội dung footer không bị tràn */
    .footer-content {
        max-width: 95%;
        margin-top: 0; /* Bỏ margin âm */
        min-height: auto; /* Bỏ min-height cứng */
    }

    /* Điều chỉnh tỷ lệ cột: Ảnh (40%), Thông tin (60%) */
    .footer-left {
        flex: 0 0 40%;
    }

    .footer-right {
        flex: 0 0 60%;
        padding: 20px 2%; /* Giảm padding ngang */
    }

    /* Cân bằng lưới thông tin */
    .footer-info-grid {
        gap: 15px; /* Giảm khoảng cách giữa 2 khối */
        padding-left: 0;
        flex-wrap: wrap; /* Cho phép các khối tự xuống dòng nếu cần */
    }

    /* Bỏ nhích trái/phải đặc biệt cho các khối con */
    .footer-info-grid .info-block:nth-child(2) {
        margin-left: 10px; /* Giảm khoảng cách nhích */
    }

    /* Điều chỉnh khối liên hệ */
    .footer-contact-info {
        gap: 15px;
        margin-left: 0;
        padding-left: 0;
        flex-direction: column; /* Đưa số điện thoại và email xuống dòng */
        align-items: flex-start; /* Căn lề trái lại */
    }

    .email-item {
        margin-left: 0; /* Bỏ nhích sang phải */
    }

    /* Ký hiệu */
    .footer-signature {
        padding-left: 50px; /* Giảm đẩy sang phải */
    }

    /* Chi tiết công ty */
    .company-details {
        padding-left: 20px;
    }
    .company-details p:first-child strong {
        padding-left: 40px;
    }
    .bct-logo {
        margin-left: 70px;
    }
}

/* Dành cho Điện thoại di động (dưới 600px) */
@media (max-width: 600px) {
    .main-footer {
        padding: 20px 0 0; /* Giảm padding trên dưới */
    }
    .footer-content {
        flex-direction: column; /* Chuyển từ ngang sang dọc */
    }

    /* Ảnh sẽ chiếm toàn bộ chiều rộng (100%) và nằm trên cùng */
    .footer-left {
        flex: 0 0 100%;
        padding-right: 0;
    }

    .footer-shop-image-new {
        /* Bỏ bo góc đặc biệt để ảnh hiển thị đẹp hơn khi chiếm hết chiều rộng */
        border-radius: 0;
        max-height: 300px; /* Giảm chiều cao ảnh */
    }

    /* Cột thông tin cũng chiếm toàn bộ chiều rộng (100%) */
    .footer-right {
        flex: 0 0 100%;
        padding: 30px 5%; /* Thêm padding đều hai bên */
    }

    /* Gỡ bỏ cột trong lưới thông tin */
    .footer-info-grid {
        flex-direction: column; /* Hai khối thông tin xếp chồng lên nhau */
        gap: 25px;
        padding-left: 0;
    }

    /* Bỏ nhích đặc biệt giữa hai khối */
    .footer-info-grid .info-block:nth-child(2) {
        margin-left: 0;
    }

    .info-block {
        text-align: center; /* Căn giữa thông tin địa chỉ */
    }

    /* Căn giữa các thông tin liên hệ */
    .footer-contact-info {
        flex-direction: column;
        align-items: center; /* Căn giữa các mục */
        gap: 15px;
        margin-top: 20px;
        margin-bottom: 20px;
        margin-left: 0;
    }

    /* Ký hiệu & Tam giác */
    .footer-signature {
        padding-left: 0;
        text-align: center;
    }
    .footer-signature p {
        padding-left: 0;
    }
    .triangle-container {
        justify-content: center; /* Căn giữa các hình tam giác */
        gap: 20px; /* Giảm khoảng cách giữa tam giác */
    }

    /* Chi tiết công ty */
    .company-details {
        padding-left: 0;
        text-align: center; /* Căn giữa văn bản */
    }
    .company-details p:first-child strong {
        padding-left: 0;
        font-size: 1.1em;
    }
    .bct-logo {
        margin-left: 0;
    }

    .footer-bottom-text {
        margin-top: 10px;
    }
}
/* Thêm vào cuối file home.css */

/* ===== BACK TO TOP BUTTON ===== */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #8f2c24;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.2em;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(143, 44, 36, 0.3);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

/* Hiển thị nút khi có class 'show' */
#back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Hiệu ứng hover */
#back-to-top:hover {
    background: #6b1f18;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(143, 44, 36, 0.4);
}

/* Hiệu ứng khi click */
#back-to-top:active {
    transform: translateY(-1px);
}

/* Responsive cho mobile */
@media (max-width: 600px) {
    #back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1em;
    }
}
.product-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-modal.show {
    display: flex;
    opacity: 1;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    margin: auto;
    background: white;
    border-radius: 20px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #8f2c24;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    background: #6d1f18;
    transform: rotate(90deg);
}

.modal-body {
    display: flex;
    gap: 30px;
    padding: 40px;
}

.modal-image {
    flex: 0 0 45%;
}

.modal-image img {
    width: 100%;
    height: auto;
    border-radius: 15px;
    object-fit: cover;
}

.modal-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-details h2 {
    color: #8f2c24;
    font-size: 28px;
    margin: 0;
}

.modal-category {
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-price-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.modal-price {
    font-size: 32px;
    font-weight: bold;
    color: #8f2c24;
}

.modal-old-price {
    font-size: 20px;
    color: #999;
    text-decoration: line-through;
    display: none;
}

.modal-description {
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.modal-description h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
}

.modal-description p {
    color: #666;
    line-height: 1.8;
}

.modal-stock {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 8px;
    font-weight: 500;
}

.modal-stock.in-stock {
    background: #e8f5e9;
    color: #2e7d32;
}

.modal-stock.out-of-stock {
    background: #ffebee;
    color: #c62828;
}

.modal-quantity {
    display: flex;
    align-items: center;
    gap: 15px;
}

.modal-quantity label {
    font-weight: 600;
    color: #333;
}

.quantity-control {
    display: flex;
    align-items: center;
    border: 2px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.qty-btn {
    background: #f5f5f5;
    border: none;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.qty-btn:hover {
    background: #8f2c24;
    color: white;
}

#product-quantity {
    width: 60px;
    height: 40px;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}

#product-quantity::-webkit-inner-spin-button,
#product-quantity::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.modal-add-to-cart {
    background: #8f2c24;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: auto;
}

.modal-add-to-cart:hover {
    background: #6d1f18;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(143, 44, 36, 0.3);
}

.modal-add-to-cart:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-content {
        max-width: 95%;
        max-height: 95vh;
    }

    .modal-body {
        flex-direction: column;
        padding: 20px;
    }

    .modal-image {
        flex: 0 0 auto;
    }

    .modal-details h2 {
        font-size: 22px;
    }

    .modal-price {
        font-size: 24px;
    }
}


/* No scroll when modal open */
body.no-scroll {
    overflow: hidden;
}
#overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(3px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
}

#overlay.show {
    opacity: 1;
    visibility: visible;
}

/* --- Mini cart: ẨN hoàn toàn khi chưa có .show --- */
#mini-cart {
    position: fixed;
    top: 0;
    right: -420px; /* Ẩn bên ngoài */
    width: 400px;
    height: 100vh;
    background: #fff;
    border-left: 1px solid #eee;
    box-shadow: -10px 0 30px rgba(0,0,0,0.2);
    z-index: 1001;
    display: none; /* ✅ ẨN hoàn toàn */
    flex-direction: column;
    transition: right .35s cubic-bezier(.2,.8,.2,1);
    border-radius: 0;
    visibility: hidden; /* ✅ Ẩn */
    opacity: 0; /* ✅ Opacity 0 */
}

/* Khi có class .show, mới hiển thị */
#mini-cart.show {
    display: flex; /* ✅ Hiện flex */
    visibility: visible; /* ✅ Hiện */
    opacity: 1; /* ✅ Opacity 1 */
    right: 0; /* ✅ Kéo vào */
}

/* Header */
.minicart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px;
    border-bottom: 1px solid #f0e4d7;
}

.minicart-header .title {
    color: #8f2c24;
    font-size: 1.2rem;
    font-weight: 700;
}

.minicart-header .close-btn {
    background: transparent;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: #333;
}

.minicart-header .close-btn:hover {
    color: #8f2c24;
}

/* Items list */
.minicart-items {
    padding: 12px 18px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    max-height: calc(100vh - 200px);
}

/* Một item */
.minicart-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed #eee;
}

.minicart-item:last-child {
    border-bottom: none;
}

.minicart-item-image {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
}

.minicart-item-details {
    flex: 1;
    min-width: 0;
}

.minicart-item-name {
    font-size: 0.98rem;
    font-weight: 600;
    color: #222;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.minicart-item-price {
    font-size: 0.9rem;
    color: #8f2c24;
    margin-top: 6px;
}

/* Icon thùng rác */
.minicart-item-remove {
    cursor: pointer;
    background: none;
    border: none;
    color: #888;
    font-size: 1.1rem;
    margin-left: 8px;
    flex-shrink: 0;
}

.minicart-item-remove:hover {
    color: #d23b2b;
}

/* Footer */
.minicart-footer {
    padding: 14px 18px;
    border-top: 1px solid #f0e4d7;
    background: #fff;
    margin-top: auto;
    flex-shrink: 0;
}

.minicart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-weight: 700;
}

.total-amount {
    color: #8f2c24;
}

.btn-view-cart {
    display: block;
    text-align: center;
    padding: 10px;
    background: #8f2c24;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
}

.btn-view-cart:hover {
    background: #6b1f18;
}

/* ===== RESPONSIVE MOBILE ===== */
@media (max-width: 576px) {
    #mini-cart {
        width: 85%; /* ✅ 85% màn hình */
        right: -100%; /* ✅ Ẩn hoàn toàn */
        display: none; /* ✅ QUAN TRỌNG */
        visibility: hidden; /* ✅ QUAN TRỌNG */
        opacity: 0; /* ✅ QUAN TRỌNG */
    }

    #mini-cart.show {
        display: flex; /* ✅ THÊM */
        visibility: visible; /* ✅ THÊM */
        opacity: 1; /* ✅ THÊM */
        right: 0;
    }
}
/* ===== DRAWER MENU (MOBILE) ===== */
.drawer {
    position: fixed;
    inset: 0 auto 0 0;
    width: 300px;
    max-width: 86vw;
    background: #fffaf3;
    border-right: 2px solid #f0e4d7;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 2000;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(143, 44, 36, 0.15);
}

.drawer.show {
    transform: translateX(0);
}

.drawer__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid #f0e4d7;
    background: linear-gradient(135deg, #8f2c24 0%, #6b1f18 100%);
}

.drawer__head span {
    color: #fff;
    font-weight: 900;
    font-size: 18px;
    letter-spacing: 1px;
}

.drawer__close {
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.drawer__close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.drawer__nav {
    display: flex;
    flex-direction: column;
    padding: 16px;
    gap: 8px;
}

.drawer__nav a {
    color: #333;
    text-decoration: none;
    font-weight: 700;
    padding: 14px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.3s ease;
}

.drawer__nav a i {
    color: #8f2c24;
    font-size: 20px;
    width: 24px;
}

.drawer__nav a:hover {
    background: #f0e4d7;
    color: #8f2c24;
    transform: translateX(8px);
}

.drawer__sep {
    border: none;
    border-top: 2px solid #f0e4d7;
    margin: 12px 20px;
}

.drawer__title {
    color: #8f2c24;
    font-weight: 900;
    font-size: 16px;
    margin: 16px 20px 12px;
    letter-spacing: 0.5px;
}

.drawer__cats {
    list-style: none;
    margin: 0 16px 20px;
    padding: 0;
}

.drawer__cats a {
    color: #555;
    text-decoration: none;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.drawer__cats a i {
    color: #8f2c24;
    font-size: 12px;
}

.drawer__cats a:hover {
    background: #f0e4d7;
    color: #8f2c24;
    padding-left: 24px;
}

.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1999;
}

.drawer-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}