﻿/* ========================================
   🌈 RESET - Thiết lập lại CSS mặc định
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    letter-spacing: 0.3px;
    color: #222;
    background-color: #fff;
}

/* ========================================
   📦 CONTAINER - Khung chứa chính
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
}

/* ========================================
   ♿ VISUALLY-HIDDEN - Ẩn nội dung cho screen reader
   ======================================== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========================================
   🧭 HEADER - Phần đầu trang
   ======================================== */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Thanh trên cùng */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ========================================
   🏷️ BRAND NAME - Tên thương hiệu
   ======================================== */
.brand-name h1 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 3px;
    color: #000;
    margin: 0;
    font-family: 'Montserrat', sans-serif;
}

.brand-name a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

    .brand-name a:hover {
        color: #e74c3c;
    }

/* ========================================
   🖼️ LOGO - Logo hình ảnh
   ======================================== */
.logo img {
    height: 50px;
    width: auto;
}

/* ========================================
   🧭 NAVIGATION - Menu điều hướng
   ======================================== */
nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

    nav a,
    nav .menu-link {
        text-decoration: none;
        color: #333;
        font-weight: 600;
        transition: color 0.3s ease;
        padding: 8px 0;
        font-size: 15px;
        letter-spacing: 0.5px;
        border: none;
        font-family: 'Montserrat', sans-serif;
    }

        nav a:hover,
        nav a.active,
        nav .menu-link:hover {
            color: #000;
        }

/* ========================================
   📱 DROPDOWN MENU - Menu thả xuống
   ======================================== */
.dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.menu-link.dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    position: relative;
    padding: 8px 0;
    color: #333;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
    user-select: none;
    font-family: 'Montserrat', sans-serif;
}

    .menu-link.dropdown-toggle:hover {
        color: #000;
    }

    .menu-link.dropdown-toggle i {
        font-size: 12px;
        transition: transform 0.3s ease;
    }

    .menu-link.dropdown-toggle.active {
        color: #000;
    }

        .menu-link.dropdown-toggle.active i {
            transform: rotate(180deg);
        }

/* Dropdown menu - ẨN mặc định */
.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    background-color: #fff;
    min-width: 180px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    padding: 8px 0;
    margin: 0;
    z-index: 9999;
    list-style: none;
    opacity: 0;
    pointer-events: none;
}

    /* Hiển thị khi có class .show */
    .dropdown-menu.show {
        display: block;
        opacity: 1;
        pointer-events: auto;
        animation: dropdownFadeIn 0.25s ease-out forwards;
    }

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Mũi tên nhỏ phía trên */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #fff;
    filter: drop-shadow(0 -1px 2px rgba(0, 0, 0, 0.05));
}

.dropdown-menu li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: #555;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    border-bottom: none !important;
    position: relative;
    letter-spacing: 0.3px;
}

    .dropdown-menu a::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 3px;
        height: 0;
        background: linear-gradient(180deg, #e91e63, #f06292);
        transition: height 0.2s ease;
        border-radius: 0 2px 2px 0;
    }

    .dropdown-menu a:hover {
        background-color: #fafafa;
        color: #e91e63;
        padding-left: 24px;
    }

        .dropdown-menu a:hover::before {
            height: 60%;
        }

/* ========================================
   👤 ACCOUNT ICON - Biểu tượng tài khoản
   ======================================== */
.account-icon {
    display: inline-flex;
    align-items: center;
    margin-left: 12px;
}

    .account-icon a {
        display: flex;
        align-items: center;
        gap: 6px;
        color: #333;
        text-decoration: none;
        font-weight: 600;
        font-size: 15px;
        transition: color 0.3s ease;
        font-family: 'Montserrat', sans-serif;
    }

        .account-icon a:hover {
            color: #000;
        }

    .account-icon i {
        font-size: 18px;
    }

    .account-icon span {
        font-size: 15px;
    }

/* ========================================
   🛒 CART ICON - Biểu tượng giỏ hàng
   ======================================== */
.cart-icon {
    position: relative;
    font-size: 22px;
    cursor: pointer;
    color: #000;
    transition: transform 0.3s ease;
    margin-left: 12px;
}

    .cart-icon a {
        display: flex;
        align-items: center;
        color: #333;
        text-decoration: none;
    }

    .cart-icon svg {
        width: 24px;
        height: 24px;
        transition: transform 0.3s ease;
    }

    .cart-icon:hover {
        transform: scale(1.1);
    }

        .cart-icon:hover svg {
            transform: scale(1.1);
        }

/* Badge số lượng sản phẩm */
#cartCount {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* ========================================
   💡 INTRO SECTION - Phần giới thiệu
   ======================================== */
.intro {
    width: 100%;
    background-color: #fafafa;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 80px 0;
}

.intro-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    max-width: 1200px;
    width: 90%;
}

.intro video {
    width: 50%;
    border-radius: 20px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.15);
}

.intro-text {
    width: 45%;
    color: #333;
}

    .intro-text h2 {
        font-size: 2.6rem;
        font-weight: 700;
        color: #111;
        margin-bottom: 20px;
    }

    .intro-text p {
        font-size: 1.15rem;
        line-height: 1.8;
        color: #555;
        margin-bottom: 30px;
    }

.btn-outline {
    display: inline-block;
    padding: 12px 28px;
    border: 2px solid #111;
    border-radius: 50px;
    color: #111;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

    .btn-outline:hover {
        background-color: #111;
        color: #fff;
        transform: translateY(-3px);
    }

/* ========================================
   🎬 ANIMATIONS - Hiệu ứng chuyển động
   ======================================== */
.slide-up {
    animation: slideUp 1s ease-in-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   📄 MAIN CONTENT - Nội dung chính
   ======================================== */
main {
    padding: 40px 20px;
    min-height: calc(100vh - 200px);
}

.title {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    color: #222;
    letter-spacing: 1px;
}

/* ========================================
   🎨 PRODUCT GRID - Lưới sản phẩm
   ======================================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* ========================================
   🃏 PRODUCT CARD - Thẻ sản phẩm
   ======================================== */
.card {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

    .card:hover {
        transform: translateY(-8px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    }

.thumb {
    width: 100%;
    height: 350px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.5s ease;
}

.card:hover .thumb {
    transform: scale(1.05);
}

.card-body {
    padding: 20px;
}

    .card-body .title {
        font-size: 13px;
        font-weight: 500;
        color: #191616;
        text-align: center;
        line-height: 1.4;
        min-height: 36px;
        margin-bottom: 5px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

.price {
    font: 600 16px 'Poppins', 'Segoe UI', sans-serif;
    color: #000;
    text-align: center;
    margin-top: 0;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
    transition: color 0.3s ease;
}

/* ========================================
   🎯 ACTION BUTTONS - Nút hành động
   ======================================== */
.actions {
    display: flex;
    gap: 10px;
}

    .actions button {
        flex: 1;
        padding: 12px 16px;
        border: none;
        border-radius: 6px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

/* ========================================
   💬 CART POPUP - Popup giỏ hàng
   ======================================== */
.cart-popup {
    position: fixed;
    top: 80px;
    right: 20px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    padding: 25px;
    width: 350px;
    max-height: 500px;
    overflow-y: auto;
    z-index: 2000;
    display: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    animation: fadeIn 0.3s ease;
}

    .cart-popup.show {
        display: block;
    }

    .cart-popup.hidden {
        opacity: 0;
        transform: translateY(-20px);
        pointer-events: none;
    }

    .cart-popup h3 {
        font-size: 22px;
        font-weight: 700;
        margin-bottom: 20px;
        color: #222;
        border-bottom: 2px solid #f0f0f0;
        padding-bottom: 10px;
    }

    .cart-popup p {
        color: #444;
        margin-bottom: 10px;
        text-align: center;
    }

#cartItems {
    list-style: none;
    margin-bottom: 20px;
}

    #cartItems li {
        padding: 12px 0;
        border-bottom: 1px solid #f0f0f0;
        font-size: 14px;
        color: #555;
    }

#cartTotal {
    font-size: 18px;
    font-weight: 700;
    color: #222;
    margin-bottom: 15px;
    text-align: right;
}

#closeCart {
    width: 100%;
    padding: 12px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

    #closeCart:hover {
        background-color: #000;
    }

/* ========================================
   🌐 SOCIAL MEDIA - Mạng xã hội
   ======================================== */
.social-media {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0;
    z-index: 50;
}

.social-btn {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-size: 18px;
    transition: all 0.3s ease;
    border: none;
}

    .social-btn:hover {
        width: 55px;
        box-shadow: -3px 0 10px rgba(0,0,0,0.2);
    }

.facebook {
    background: #3b5998;
}

.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

/* ========================================
   ⬆️ BACK TO TOP - Nút lên đầu trang
   ======================================== */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #000, #444);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 9999;
}

    #backToTop:hover {
        background: linear-gradient(135deg, #222, #666);
        transform: translateY(-5px);
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
    }

/* ========================================
   📄 PAGINATION - Phân trang
   ======================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 60px 0;
    font-family: 'Montserrat', sans-serif;
    user-select: none;
    animation: fadeInUp 0.6s ease-out;
}

    .pagination button {
        background: transparent;
        border: none;
        color: #666;
        font-weight: 600;
        font-size: 15px;
        cursor: pointer;
        padding: 10px 16px;
        position: relative;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border-radius: 8px;
        overflow: hidden;
    }

        .pagination button::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
            opacity: 0;
            transition: opacity 0.3s ease;
            z-index: -1;
        }

        .pagination button:hover::before {
            opacity: 1;
        }

        .pagination button:hover {
            color: #000;
            transform: translateY(-2px);
        }

        .pagination button.active {
            color: #fff;
            font-weight: 700;
            background: linear-gradient(135deg, #000 0%, #333 100%);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.1);
            transform: translateY(-1px);
        }

            .pagination button.active::before {
                display: none;
            }

    .pagination .dots {
        color: #ccc;
        cursor: default;
        padding: 10px 8px;
        font-weight: 700;
        letter-spacing: 2px;
    }

    .pagination .arrow {
        color: #999;
        font-size: 18px;
        cursor: pointer;
        padding: 10px 12px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border-radius: 8px;
        background: transparent;
        border: 1px solid transparent;
    }

        .pagination .arrow:hover {
            color: #000;
            background: #f5f5f5;
            border-color: #e0e0e0;
            transform: scale(1.1);
        }

        .pagination .arrow.prev:hover {
            transform: translateX(-3px) scale(1.05);
        }

        .pagination .arrow.next:hover {
            transform: translateX(3px) scale(1.05);
        }

    .pagination button:active {
        transform: scale(0.95);
    }

    .pagination button:focus-visible {
        outline: 2px solid #000;
        outline-offset: 3px;
        border-radius: 8px;
    }

    .pagination button:disabled {
        opacity: 0.3;
        cursor: not-allowed;
        pointer-events: none;
    }

@media (hover: hover) {
    .pagination button:not(.active):not(.arrow):not(.dots)::after {
        content: '';
        position: absolute;
        left: 50%;
        bottom: 6px;
        width: 0;
        height: 2px;
        background: linear-gradient(90deg, transparent, #000, transparent);
        transform: translateX(-50%);
        transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .pagination button:not(.active):not(.arrow):not(.dots):hover::after {
        width: 60%;
    }
}

/* ========================================
   🧾 FOOTER - Chân trang
   ======================================== */
footer {
    background-color: #222;
    color: #fff;
    text-align: center;
    padding: 25px 20px;
    font-size: 14px;
    margin-top: 40px;
}

    footer strong {
        color: #fff;
        font-weight: 700;
    }

/* ========================================
   📱 RESPONSIVE DESIGN - Tương thích mobile
   ======================================== */
@media (max-width: 768px) {
    /* Header & Navigation */
    .topbar {
        flex-direction: column;
        gap: 15px;
        padding: 14px 20px;
    }

    nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }

        nav a {
            font-size: 14px;
        }

    /* Account Icon */
    .account-icon {
        margin-left: 0;
    }

        .account-icon span {
            font-size: 13px;
        }

    /* Dropdown Menu */
    .dropdown-menu {
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
    }

        .dropdown-menu.show {
            transform: translateX(-50%) translateY(0);
        }

    /* Hero Section */
    .hero {
        height: 60vh;
    }

        .hero h1 {
            font-size: 2rem;
        }

        .hero p {
            font-size: 1rem;
        }

    /* Intro Section */
    .intro {
        padding: 60px 0;
    }

    .intro-container {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .intro video,
    .intro-text {
        width: 100%;
    }

        .intro-text h2 {
            font-size: 2rem;
        }

        .intro-text p {
            font-size: 1rem;
        }

    /* Product Grid */
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }

    .title {
        font-size: 26px;
    }

    /* Cart Popup */
    .cart-popup {
        width: calc(100% - 40px);
        right: 20px;
    }

    /* Pagination */
    .pagination {
        margin: 40px 0;
        gap: 6px;
    }

        .pagination button {
            padding: 8px 12px;
            font-size: 14px;
        }

        .pagination .arrow {
            padding: 8px 10px;
            font-size: 16px;
        }

    /* Social Media & Back to Top */
    .social-media {
        bottom: 100px;
        top: auto;
        transform: none;
        flex-direction: row;
        right: auto;
        left: 20px;
    }

    #backToTop {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .card-body .title {
        font-size: 14px;
        min-height: auto;
    }

    .actions {
        flex-direction: column;
        gap: 8px;
    }

    nav a {
        font-size: 12px;
    }

    /* Pagination mobile */
    .pagination {
        margin: 30px 0;
        gap: 4px;
    }

        .pagination button {
            padding: 6px 10px;
            font-size: 13px;
        }

        .pagination .arrow {
            padding: 6px 8px;
            font-size: 15px;
        }

        .pagination button.hide-mobile {
            display: none;
        }

    /* Hero */
    .hero {
        height: 50vh;
    }

        .hero h1 {
            font-size: 1.5rem;
        }

    /* Intro */
    .intro {
        padding: 40px 0;
    }

    .intro-text h2 {
        font-size: 1.5rem;
    }
}
/* ================================
   HERO SLIDER 3 ẢNH HAVENIX
   ================================ */
.hero-slider {
    position: relative;
    width: 100%;
    height: 90vh;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    opacity: 0;
    z-index: 1;
    transition: opacity 1.4s ease-in-out;
}

    .hero-slide.active {
        opacity: 1;
        z-index: 2;
    }

/* Lớp tối */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 3;
}

/* Chữ */
.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 5;
}

    .hero-content h1 {
        font-size: 48px;
        font-weight: 800;
    }

    .hero-content p {
        font-size: 20px;
        opacity: 0.9;
    }
