/* ==========================================================================
   1. RESET & GENERAL STYLES (Thiết lập cơ bản)
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #fcfcfc;
    color: #1a1a1a;
    overflow-x: hidden;
}

/* ==========================================================================
   2. HEADER & NAVBAR RESPONSIVE STYLES
   ========================================================================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 8%;
    background-color: #4e3b3b; /* Đồng bộ màu nâu đất cao cấp */
    color: #ffffff;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #c5a880; /* Màu Gold đặc trưng */
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Cấu trúc phần bên trái navbar */
.header-left {
    display: flex;
    align-items: center;
    position: relative;
    gap: 15px; /* Khoảng cách giữa nút 3 gạch và chữ logo khi hiện */
}

.logo {
    font-family: 'Playfair Display', Georgia, serif !important;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #c5a880;
    cursor: pointer;
    user-select: none;
}

/* Mặc định ẩn hoàn toàn nút Hamburger 3 gạch trên màn hình lớn Laptop */
.mobile-menu-trigger {
    display: none !important;
}

.navbar .nav-links {
    display: flex !important;
}

.nav-links a {
    color: #bbbbbb;
    text-decoration: none;
    margin: 0 20px;
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 400;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 1px;
    background-color: #c5a880;
    transition: width 0.3s ease;
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover, .nav-links a.active {
    color: #c5a880;
}

.nav-icons {
    display: flex;
    gap: 25px;
    font-size: 19px;
    cursor: pointer;
}

.nav-icons i {
    transition: color 0.3s, transform 0.3s;
}

.nav-icons i:hover {
    color: #c5a880;
    transform: scale(1.1);
}

.cart-icon-wrapper {
    position: relative;
}

#cart-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #c5a880;
    color: #111;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 50%;
}

/* Khung bọc menu chức năng sổ dọc ẩn dưới chữ Logo khi hiển thị mobile */
.logo-dropdown {
    display: none; /* Chỉ kích hoạt giao diện dạng khối trên Mobile */
}

/* ==========================================================================
   3. HERO SECTION (Banner lớn giữa trang)
   ========================================================================== */
.hero {
    height: 75vh;
    background: linear-gradient(rgba(147, 138, 138, 0.6), rgba(62, 57, 57, 0.7)), 
                url('https://i.pinimg.com/736x/0d/98/41/0d98416f843206eeb663ee322343a451.jpg') no-repeat center center/cover;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    width: 100%;
}

.hero-content {
    max-width: 900px;
    padding: 0 20px;
}

.hero-content h1 {
    font-family: 'Playfair Display', Georgia, serif !important;
    font-size: 42px !important;
    letter-spacing: 4px !important;
    text-transform: uppercase !important;
    margin-bottom: 20px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.8) !important;
}

.hero-content p {
    font-family: 'Montserrat', Arial, sans-serif !important;
    font-size: 15px !important;
    font-weight: 300 !important;
    margin-bottom: 35px !important;
    letter-spacing: 2px !important;
    color: #e0e0e0 !important;
}

.btn-shop {
    display: inline-block;
    padding: 13px 40px;
    border: 1px solid #c5a880;
    color: white;
    text-decoration: none;
    letter-spacing: 2px;
    font-size: 12px;
    background: transparent;
    transition: all 0.4s ease;
}

.btn-shop:hover {
    background-color: #c5a880;
    color: #111;
}

/* ==========================================================================
   4. PRODUCT SECTION & CATEGORY FILTER (Danh sách và bộ lọc)
   ========================================================================== */
.products-section {
    padding: 80px 8%;
}

.section-title {
    font-family: 'Playfair Display', Georgia, serif !important;
    text-align: center;
    font-size: 28px;
    letter-spacing: 4px;
    margin-bottom: 50px;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 1px;
    background-color: #c5a880;
    margin: 15px auto 0;
}

.category-filter {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 2px;
    color: #888;
    cursor: pointer;
    padding: 8px 16px;
    position: relative;
    transition: color 0.3s ease;
}

.filter-btn::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    width: 0; height: 1px;
    background-color: #c5a880;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.filter-btn:hover, .filter-btn.active {
    color: #c5a880;
}

.filter-btn.active::after {
    width: 40px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); 
    gap: 30px; 
}

.product-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.06);
}

.product-card.hide {
    display: none !important;
}

.product-img {
    position: relative !important;
    width: 100%;
    height: 380px !important;
    overflow: hidden !important;
    background-color: #f9f9f9;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    padding: 15px;
    transition: transform 0.6s ease;
}

.product-card:hover .product-img img {
    transform: scale(1.06);
}

/* ==========================================================================
   5. HIỆU ỨNG TRƯỢT 1 NÚT XEM CHI TIẾT TỐI GIẢN
   ========================================================================== */
.product-img .product-actions {
    position: absolute !important;
    bottom: -60px !important;
    left: 0 !important;
    width: 100% !important;
    display: block !important;
    z-index: 999 !important;
    margin: 0 !important;
    padding: 0 !important;
    transition: bottom 0.3s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

.product-card:hover .product-img .product-actions {
    bottom: 0 !important;
}

.product-actions .btn-view-detail {
    width: 100% !important;
    padding: 16px 0 !important;
    border: none !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 12px !important;
    letter-spacing: 2px !important;
    cursor: pointer !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    text-align: center !important;
    background-color: rgba(17, 17, 17, 0.95) !important;
    color: #c5a880 !important;
    transition: background-color 0.3s, color 0.3s !important;
}

.product-actions .btn-view-detail:hover {
    background-color: #c5a880 !important;
    color: #111 !important;
}

.product-info {
    padding: 20px 15px;
    text-align: center;
    background: #fff;
    border-top: 1px solid #f9f9f9;
}

.product-info h3 {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.product-info .price {
    color: #c5a880;
    font-weight: 600;
    font-size: 15px;
}

/* ==========================================================================
   6. MODAL & CÁC BẢNG QUẢN LÝ THÔNG TIN (Login, Cart, Detail)
   ========================================================================== */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.75);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fff;
    width: 400px;
    padding: 45px 40px;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 15px; right: 20px;
    font-size: 26px;
    cursor: pointer;
    color: #999;
}

.close-btn:hover { color: #111; }

/* Sửa lỗi phông chữ Đ hoàn hảo */
.auth-form h2 {
    font-family: 'Playfair Display', Georgia, serif !important;
    font-weight: 700 !important;
    letter-spacing: 2px;
    margin-bottom: 30px;
    text-align: center;
}

.input-group {
    margin-bottom: 22px;
}

.input-group label {
    display: block;
    font-size: 11px;
    margin-bottom: 6px;
    letter-spacing: 1px;
    color: #666;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    outline: none;
    font-family: 'Montserrat', sans-serif;
}

.input-group input:focus { border-color: #c5a880; }

.btn-auth {
    width: 100%;
    padding: 13px;
    background-color: #111;
    color: #fff;
    border: none;
    letter-spacing: 2px;
    cursor: pointer;
    margin-top: 10px;
    font-weight: 500;
}

.btn-auth:hover { background-color: #c5a880; color: #111; }
.switch-form { text-align: center; font-size: 12px; margin-top: 25px; }
.switch-form a { color: #c5a880; text-decoration: none; }
.hidden { display: none; }

/* Modal chi tiết */
.detail-modal-content {
    width: 850px !important; 
    max-width: 95%;
    padding: 50px 40px !important;
}

.detail-container { display: flex; gap: 40px; align-items: center; }
.detail-img-box { flex: 1; height: 400px; background-color: #f9f9f9; border: 1px solid #f0f0f0; overflow: hidden; }
.detail-img-box img { width: 100%; height: 100%; object-fit: contain; padding: 20px; }
.detail-info-box { flex: 1; text-align: left; }
.detail-info-box h2 { font-family: 'Playfair Display', Georgia, serif !important; font-size: 28px; margin-bottom: 15px; color: #111; font-weight: 700; }
.detail-price { font-size: 22px; color: #c5a880; font-weight: 600; margin-bottom: 20px; }
.detail-desc { font-size: 13px; color: #666; line-height: 1.8; margin-bottom: 25px; font-weight: 300; }
.size-selection { margin-bottom: 20px; }
.size-selection label { display: block; font-size: 11px; letter-spacing: 1px; color: #222; margin-bottom: 10px; text-transform: uppercase; }
.size-options { display: flex; gap: 10px; }
.size-btn { width: 40px; height: 40px; border: 1px solid #ddd; display: flex; justify-content: center; align-items: center; font-size: 12px; cursor: pointer; transition: all 0.3s; }
.size-btn:hover, .size-btn.active { border-color: #c5a880; color: #c5a880; background-color: #fff; }
.btn-detail-add-cart { width: 100%; padding: 15px; background-color: #111; color: #fff; border: none; letter-spacing: 2px; font-size: 13px; cursor: pointer; transition: background 0.3s; }
.btn-detail-add-cart:hover { background-color: #c5a880; color: #111; }

/* Giỏ hàng */
.cart-sidebar {
    position: fixed;
    top: 0; right: -400px;
    width: 400px; height: 100%;
    background-color: #fff;
    box-shadow: -5px 0 25px rgba(0,0,0,0.15);
    z-index: 1500;
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.cart-sidebar.open { right: 0; }
.cart-header { padding: 25px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.cart-header h3 { font-family: 'Playfair Display', Georgia, serif !important; letter-spacing: 1px; font-size: 16px; font-weight: 700; }
.cart-body { padding: 25px; flex-grow: 1; overflow-y: auto; }
.empty-msg { text-align: center; color: #999; margin-top: 50px; font-size: 14px; }
.cart-footer { padding: 25px; border-top: 1px solid #eee; }
.total-price-box { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 20px; font-size: 15px; }
#cart-total { color: #c5a880; }
.btn-checkout { width: 100%; padding: 15px; background-color: #111; color: #fff; border: none; letter-spacing: 2px; cursor: pointer; }
.btn-checkout:hover { background-color: #c5a880; color: #111; }
.cart-item { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid #f5f5f5; }
.cart-item-details h4 { font-size: 13px; font-weight: 500; margin-bottom: 5px; }
.cart-item-details p { font-size: 12px; color: #c5a880; }
.btn-remove-item { background: none; border: none; color: #bbb; cursor: pointer; }
.btn-remove-item:hover { color: #ff4d4d; }

/* Footer */
.footer { background-color: #473a3a; color: #ffffff; padding: 70px 8% 20px; border-top: 1px solid #c5a880; }
.footer-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 40px; margin-bottom: 50px; }
.footer-col h3 { font-family: 'Playfair Display', Georgia, serif !important; color: #c5a880; font-size: 22px; letter-spacing: 1px; margin-bottom: 20px; font-weight: 700; }
.footer-col h4 { font-family: 'Playfair Display', Georgia, serif !important; color: #ffffff; font-size: 14px; letter-spacing: 1px; margin-bottom: 25px; position: relative; font-weight: 700; }
.footer-col h4::after { content: ''; display: block; width: 30px; height: 1px; background-color: #c5a880; margin-top: 8px; }
.footer-col p { color: #999999; font-size: 13px; line-height: 1.6; font-weight: 300; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul li a { color: #999999; text-decoration: none; font-size: 13px; transition: color 0.3s, padding-left 0.3s; }
.footer-col ul li a:hover { color: #c5a880; padding-left: 5px; }
.social-links { display: flex; gap: 15px; margin-top: 20px; }
.social-links a { color: #ffffff; background-color: #222; width: 35px; height: 35px; display: flex; justify-content: center; align-items: center; border-radius: 50%; font-size: 14px; transition: all 0.3s; }
.social-links a:hover { background-color: #c5a880; color: #111; }
.newsletter-form { display: flex; margin-top: 15px; border-bottom: 1px solid #444; }
.newsletter-form input { background: transparent; border: none; padding: 10px 0; color: #fff; outline: none; font-family: 'Montserrat', sans-serif; font-size: 13px; flex-grow: 1; }
.newsletter-form button { background: transparent; border: none; color: #c5a880; cursor: pointer; font-weight: 600; padding: 0 10px; }
.newsletter-form button:hover { color: white; }
.footer-bottom { border-top: 1px solid #222; padding-top: 25px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; }
.footer-bottom p { color: #666666; font-size: 12px; }
.payment-methods { display: flex; gap: 15px; font-size: 22px; color: #444; }

/* ==========================================================================
   12. MEDIA QUERY RESPONSIVE (Xử lý ẩn hiện theo thiết bị)
   ========================================================================== */
@media (max-width: 1200px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    /* 1. Ẩn thanh menu ngang chữ trên điện thoại */
    .navbar .nav-links {
        display: none !important;
    }

    /* 2. Hiện nút 3 gạch ở TRƯỚC chữ THEGIOIGIAY */
    .mobile-menu-trigger {
        display: flex !important;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        color: #c5a880;
        cursor: pointer;
        width: 35px;
        height: 35px;
        transition: color 0.3s ease;
    }
    
    .mobile-menu-trigger:hover { color: #ffffff; }

    /* 3. Cấu hình lại menu con thả dọc khi bấm nút 3 gạch */
    .logo-dropdown {
        position: absolute !important;
        top: calc(100% + 20px) !important;
        left: -20px !important; /* Đẩy sát mép trái màn hình di động */
        background-color: #111111 !important;
        border: 1px solid #c5a880 !important;
        min-width: 260px !important;
        display: flex !important;
        flex-direction: column !important;
        padding: 10px 0 !important;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6) !important;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-15px);
        transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease !important;
        z-index: 99999 !important;
    }

    /* Hiển thị lớp mở menu */
    .logo-dropdown.open {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
    }

    .dropdown-item {
        color: #bbbbbb !important;
        text-decoration: none !important;
        padding: 14px 25px !important;
        font-size: 12px !important;
        font-family: 'Montserrat', sans-serif !important;
        letter-spacing: 2px !important;
        text-transform: uppercase !important;
        display: block !important;
        text-align: left !important;
        transition: all 0.3s ease !important;
    }

    .dropdown-item:hover, .dropdown-item.active {
        color: #c5a880 !important;
        background-color: #161616 !important;
        padding-left: 32px !important;
    }

    /* Các cấu trúc phụ trợ trên mobile */
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .product-img { height: 260px !important; }
    .detail-container { flex-direction: column; }
    .detail-img-box { height: 280px; width: 100%; }
    .detail-modal-content { padding: 40px 20px !important; }
    .cart-sidebar { width: 100%; right: -100%; }
    .hero-content h1 { font-size: 32px !important; }
}

@media (max-width: 480px) {
    .product-grid { grid-template-columns: repeat(1, 1fr); }
}