/* Reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f4;
    color: #333;
}

/* Header */
header {
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 10px 20px;
}

/* Top Header */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

/* Logo */
.logo img {
    max-width: 70px;
    height: auto;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
}

/* User Actions */
.user-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-actions a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 5px;
    transition: all 0.3s ease;
    background-color: #0c08e2;
    border: 1px solid #f1f1f1;
}

.user-actions a:hover {
    background-color: #772d73;
    color: #fff;
    border-color: #007bff;
}

.cart-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
    background-color: #f8f9fa;
    padding: 8px 12px;
    border-radius: 5px;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

.cart-btn:hover {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

.cart-count {
    background-color: #ff4757;
    color: #fff;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 50%;
    position: absolute;
    top: -10px;
    right: -10px;
}


/* Main Navigation and Search Bar Container */
.main-nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: sticky; /* Keep it sticky */
    top: 0;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 15px 30px;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 4px 12px rgba(177, 9, 154, 0.1);
    z-index: 1000;
    transition: all 0.3s ease-in-out;
}

/* Adjust the header to remove the margin-top since main-nav-container is no longer inside it */
header {
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 10px 20px;
    position: relative;
}

/* Ensure the content below the main-nav-container isn't overlapped */
body {
    padding-top: 0; /* Remove padding-top since we're not using position: fixed */
}

/* Search Bar */
.search-bar {
    display: flex;
    align-items: center;
    flex-grow: 1;
    max-width: 500px;
}

.search-bar input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px 0 0 5px;
    outline: none;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.search-bar input:focus {
    border-color: #007bff;
}

.search-bar button {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-left: none;
    background-color: #007bff;
    color: #fff;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-bar button:hover {
    background-color: #0056b3;
}

/* Main Navigation Container */
.main-nav-container {
    position: sticky;
    top: 0; /* Đặt lên trên cùng */
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95); /* Màu nền với độ trong suốt */
    padding: 15px 30px;
    border-radius: 0 0 15px 15px; /* Làm bo góc phía dưới */
    box-shadow: 0 4px 12px rgba(177, 9, 154, 0.1);
    z-index: 1000; /* Đảm bảo luôn nằm trên */
    transition: all 0.3s ease-in-out;
}

/* Khi cuộn xuống, giảm kích thước menu */
.scrolled .main-nav-container {
    padding: 10px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Main Navigation */
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 15px;
    margin: 0;
    padding: 0;
}

.main-nav ul li {
    position: relative;
}

.main-nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    padding: 10px 15px;
    display: block;
    transition: all 0.3s ease;
    border-radius: 5px;
}

.main-nav ul li a:hover {
    background-color: #007bff;
    color: #fff;
}

/* Dropdown Menu */
.dropdown-menu {
    display: none; /* Ẩn mặc định */
    position: absolute;
    top: 100%; /* Hiển thị bên dưới mục cha */
    left: 0;
    background-color: #fff;
    border: 1px solid #ddd;
    list-style: none;
    padding: 10px;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Hiển thị dropdown menu khi hover vào phần tử cha */
.dropdown:hover > .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
}

/* Style cho các mục con */
.dropdown-menu li {
    margin: 5px 0;
}

.dropdown-menu li a {
    color: #555;
    padding: 8px 12px;
    display: block;
    transition: background-color 0.3s ease;
    text-decoration: none;
    border-radius: 5px;
}

.dropdown-menu li a:hover {
    background-color: #f8f9fa;
}

/* Dropdown Menu Level 2 (Các mục con của "Vợt Cầu Lông") */
.dropdown-menu-2 {
    display: none; /* Ẩn mặc định */
    position: absolute;
    top: 0; /* Hiển thị ngang hàng với mục cha */
    left: 100%; /* Hiển thị bên phải của mục cha */
    margin-left: 6px; /* Khoảng cách giữa mục cha và mục con */
    background-color: #fff;
    border: 1px solid #ddd;
    list-style: none;
    padding: 10px;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Hiển thị dropdown menu level 2 khi hover vào phần tử cha */
.dropdown:hover > .dropdown-menu-2 {
    display: block;
    opacity: 1;
    visibility: visible;
}
/* Dropdown Menu */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    border: 1px solid #ddd;
    list-style: none;
    padding: 10px;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.dropdown-menu li {
    margin: 5px 0;
}

.dropdown-menu li a {
    color: #555;
    padding: 8px 12px;
    display: block;
    transition: background-color 0.3s ease;
    text-decoration: none;
    border-radius: 5px;
}

.dropdown-menu li a:hover {
    background-color: #f8f9fa;
}

.dropdown:hover .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
}
.slideshow {
    position: relative;
    width: 100%;
    height: 700px; /* Adjust height as needed */
    overflow: hidden;
}

.slideshow img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures images cover the area without distortion */
    opacity: 0;
    transition: opacity 1s ease-in-out; /* Smooth fade transition */
}

/* Show the first image initially */
.slideshow img:nth-child(1) {
    opacity: 1;
    animation: slide1 9s infinite; /* 3 seconds per image x 3 images */
}

.slideshow img:nth-child(2) {
    animation: slide2 9s infinite;
}

.slideshow img:nth-child(3) {
    animation: slide3 9s infinite;
}

/* Animations for each image */
@keyframes slide1 {
    0%, 33.33% { opacity: 1; }
    33.34%, 100% { opacity: 0; }
}

@keyframes slide2 {
    0%, 33.33% { opacity: 0; }
    33.34%, 66.66% { opacity: 1; }
    66.67%, 100% { opacity: 0; }
}

@keyframes slide3 {
    0%, 66.66% { opacity: 0; }
    66.67%, 99.99% { opacity: 1; }
    100% { opacity: 0; }
}
/* Tiêu đề lớn: "Thương Hiệu Vợt" */
#thuong-hieu-vot {
    text-align: center;
    font-size: 32px;
    font-weight: bold;
    color: #333;
    text-transform: uppercase;
    margin-bottom: 20px;
    padding: 10px;
    border-bottom: 3px solid #ff5722;
}

/* Tiêu đề nhóm sản phẩm: "Vợt Cầu Lông Yonex", "Vợt Cầu Lông Li-Ning" */
.product-category-title {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    color: #555;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 2px solid #ddd;
    width: 100%;
}

/* Danh sách sản phẩm hiển thị theo hàng ngang */
.product-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

/* Hộp sản phẩm */
.product {
    width: 20%;
    min-width: 100px;
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease-in-out;
}

.product:hover {
    transform: translateY(-5px);
}

/* Ảnh sản phẩm */
.product img {
    width: 150px;
    height: auto;
    object-fit: cover;
    border-radius: 5px;
}

/* Tên sản phẩm */
.product p {
    margin: 10px 0;
    font-size: 16px;
    font-weight: bold;
}

/* Nút thêm vào giỏ hàng */
.product button {
    background: #ff5722;
    color: #fff;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s;
}

.product button:hover {
    background: #e64a19;
}

