* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
}



ul { 
    list-style: none; margin: 0; padding: 0; display: flex; 
}
li { 
    margin-right: 20px; position: relative; 
}
a { 
    color: rgb(255, 255, 255); text-decoration: none; font-size: 18px; padding: 8px 12px;
 }

.dropdown {
    display: none;
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px); /* Glass morphism effect */
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border-radius: 12px;
    min-width: 200px;
    top: 100%;
    left: 0;
    z-index: 1000;
    white-space: nowrap;
    border: 1px solid rgba(255,255,255,0.2);
}

.dropdown a {
    display: block;
    color: #333;
    padding: 12px 20px;
    border-radius: 8px;
    margin: 5px;
    transition: all 0.3s ease;
}

.dropdown a:hover {
    background: linear-gradient(45deg, #d51605, #b8140a); /* Gradient đỏ */
    color: rgb(227, 52, 52);
    transform: translateX(5px); /* Hiệu ứng trượt nhẹ */
}

li:hover .dropdown {
    display: block;
    animation: fadeInUp 0.3s ease; /* Animation mượt mà */
}

.sub-dropdown {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border-radius: 12px;
    min-width: 180px;
    border: 1px solid rgba(255,255,255,0.2);
}

.dropdown li:hover .sub-dropdown {
    display: block;
    animation: fadeInUp 0.3s ease;
}

header { 
    display: flex; justify-content: space-between; align-items: center;  width: 100%;
}
input { 
    padding: 5px;
 }
aside { 
    margin: 20px 0; 
}
main { 
    display: flex; flex-wrap: wrap; gap: 20px; 
}
.product { 
     border: 1px solid #ccc; 
     padding: 20px; 
     width: 250px;   /* tăng từ 200px lên 250px hoặc hơn nếu muốn */
     text-align: center; 
     box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
     background: white;
     border-radius: 10px;
     transition: transform 0.3s;
}   
.product:hover {
     transform: scale(1.05);
}
.product img { 
     width: 100%;        /* dùng 100% để ảnh vừa khít khung */
     height: auto; 
     max-height: 220px;  /* đặt giới hạn chiều cao để ảnh không bị vỡ */
     object-fit: cover;
     border-radius: 8px;
}
#product-list {
display: flex;
flex-wrap: wrap;
gap: 30px;
justify-content: center;
}

.cart-text { 
    display: none; position: absolute; top: 30px; left: 50%; transform: translateX(-50%); background: white; padding: 5px 10px; border: 1px solid #ccc; box-shadow: 0 0 5px #aaa; white-space: nowrap; }
.cart-icon:hover .cart-text { 
    display: block; 
}
.nav-right { 
    margin-left: auto; display: flex;
}
#product-section h2 {
font-size: 24px;
margin-top: 5px;
margin-bottom: 20px;
color: #333;
text-align: center;
}

.prev, .next {
position: absolute;
top: 50%;
transform: translateY(-50%);
background: rgba(0, 0, 0, 0.5);
color: white;
border: none;
padding: 10px;
cursor: pointer;
z-index: 20;
}

.prev { left: 10px; }
.next { right: 10px; }
 @media (max-width: 768px) {
    ul {
        flex-direction: column;
        align-items: center;
    }
    .dropdown, .sub-dropdown {
        position: static;
        box-shadow: none;
        display: none;
    }
    li:hover .dropdown, .dropdown li:hover .sub-dropdown {
        display: block;
    }
}
/* phần css cho các chức năng */
nav {
    position: sticky;
    top: 0;
    z-index: 999;
    background-color: rgba(213, 22, 5, 0.95); /* Giữ màu đỏ trang chủ với độ trong suốt */
    backdrop-filter: blur(10px); /* Hiệu ứng blur từ trang giới thiệu */
    padding: 16px 30px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1); /* Shadow đẹp hơn */
    transition: all 0.3s ease; /* Smooth transition */
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Menu trái */
.nav-left {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-right: 30px;
    margin-left: -10px;
    margin: 0;
    padding: 0;
}

.nav-left li {
    margin-right: 25px;
    position: relative;
}

.nav-left li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-left li a:hover {
    background: rgba(255, 255, 255, 0.1); /* Hiệu ứng hover nhẹ nhàng */
    transform: translateY(-2px); /* Hiệu ứng nâng lên từ trang giới thiệu */
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Tìm kiếm giữa */
.nav-center {
    flex-grow: 1;
    display: flex;
    justify-content: flex-start;
    margin-right: 20px;
}

.search-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
}

#search {
    width: 100%;
    padding: 8px 35px 8px 12px;
    font-size: 14px;
    border-radius: 25px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

#search:focus {
    outline: none;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

.search-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 16px;
    color: #666;
}


/* Bên phải */
.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: 20px;
}

.nav-right span,
.nav-right a {
    color: white;
    font-weight: 500;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-right a:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}


.slider {
    position: relative;
    width: 100vw;         /* 100% chiều rộng màn hình */
    height: 400px;        /* hoặc cao hơn nếu muốn */
    overflow: hidden;
    margin: 0 auto;
}
  
.slides {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}
  
.slides img {
    width: 100vw;         /* chiếm toàn bộ chiều rộng */
    height: 100%;         /* chiếm toàn bộ chiều cao */
    object-fit: cover;    /* ảnh phủ đầy khung, không méo */
    flex-shrink: 0;
}
  
.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.4);
    color: white;
    font-size: 28px;
    border: none;
    padding: 12px;
    cursor: pointer;
    z-index: 1;
    border-radius: 50%;
    transition: background-color 0.3s;
}
  
.prev:hover, .next:hover {
    background-color: rgba(0,0,0,0.6);
}
  
.prev {
    left: 20px;
}
  
.next {
    right: 20px;
}
 
  /* css cho phần chi tiết*/
.product a {
    display: inline-block;
}

.product a img {
    width: 100%;
    height: auto;
    border: none;
    outline: none;
    transition: transform 0.3s ease;
}

.product a:hover img {
    transform: scale(1.05); /* Hiệu ứng phóng to nhẹ khi hover */
}

/*css cho hotline*/
/* CSS chung cho cả 2 nút */
.hotline-btn {
    position: fixed;
    display: inline-flex;
    align-items: center;
    padding: 12px 20px;
    border-radius: 50px;
    color: white;
    font-weight: bold;
    text-decoration: none;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
    left: 20px; /* Đặt cả 2 nút bên trái */
}

.hotline-btn img {
    width: 24px;
    height: 24px;
    margin-right: 8px;
}

/* Nút điện thoại */
.hotline-btn.phone {
    bottom: 20px;
    background: #e53935;
    animation: phonePulse 1.5s infinite;
}

/* Nút Zalo */
.hotline-btn.zalo {
    bottom: 80px; /* Đặt cao hơn nút điện thoại */
    background: #06C;
    animation: zaloPulse 2s infinite;
}

/* Hiệu ứng riêng cho nút điện thoại */
@keyframes phonePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(229, 57, 53, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(229, 57, 53, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(229, 57, 53, 0);
    }
}

/* Hiệu ứng riêng cho nút Zalo */
@keyframes zaloPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 102, 204, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 102, 204, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 102, 204, 0);
    }
}

/* Hiệu ứng khi hover */
.hotline-btn:hover {
    transform: scale(1.05);
}

 /*phần footer*/
/* Footer Styling */
.footer {
    background-color: #2b3a41;
    color: #eee;
    padding: 50px 20px 20px;
    font-family: 'Segoe UI', sans-serif;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1200px;
    margin: auto;
}

.footer-section {
    flex: 1 1 220px;
    margin: 15px;
}

.footer-section h3,
.footer-section h4 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 18px;
}

.footer-section p {
    margin: 5px 0;
    font-size: 14px;
    line-height: 1.6;
}

.footer-section ul {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 0;
    list-style: none;
}

.footer-section ul li {
    margin: 0;
    white-space: nowrap;
}


.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #ffcc00;
    text-decoration: underline;
}

.social-links a {
    display: inline-block;
    margin-right: 10px;
    font-size: 14px;
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    border-top: 1px solid #333;
    padding-top: 15px;
    font-size: 14px;
    color: #aaa;
}
 /*Css cho chữ KingDom Sport*/
 .kingdom-logo {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 36px;
  font-weight: 800;
  color: #d71139; /* màu cam năng động */
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
  letter-spacing: 2px;
  margin: 20px 0;
  text-align: center;
}

.kingdom-logo span {
  color: #0077FF; /* màu xanh thể thao */
  font-weight: 900;
  text-transform: uppercase;
}

/*Css phần 3 banner*/
.banner-section {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 20px auto;
  max-width: 1200px;
  padding: 10px 20px;
}

.banner-item {
  background: #f8f8f8;
  border-radius: 10px;
  overflow: hidden;
  width: 100%;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.banner-item:hover {
  transform: translateY(-5px);
}

.banner-item img {
  width: 100%;
  height: auto;
}

.banner-caption {
  padding: 15px;
}

.banner-caption h3 {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
}

.banner-caption p {
  font-size: 14px;
  color: #555;
  margin-bottom: 10px;
}

.btn-banner {
  background-color: #e74c3c;
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
}

.btn-banner:hover {
  background-color: #c0392b;
}

/*css phần khung newarrival*/
.new-arrivals-section {
  background: linear-gradient(to right, #f72525, #d31c37);
  padding: 20px;
  border-radius: 10px;
  margin: 30px auto;
  max-width: 1200px;
  text-align: center;
  color: #fff;
}

.new-arrivals-title {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 20px;
}

.new-arrivals-container {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 10px 0;
}

.product-card {
  background: #fff;
  border-radius: 8px;
  padding: 15px;
  width: 220px;
  color: #333;
  text-align: center;
  flex-shrink: 0;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  position: relative;
}

.product-card img {
  width: 100%;
  height: auto;
  border-radius: 5px;
}

.product-card h3 {
  font-size: 16px;
  margin: 10px 0;
}

.product-card .price {
  font-size: 16px;
  color: red;
  margin: 5px 0;
}

.product-card .old-price {
  text-decoration: line-through;
  color: #999;
  font-size: 14px;
  margin-left: 5px;
}

.discount {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: red;
  color: #fff;
  font-size: 12px;
  padding: 2px 5px;
  border-radius: 3px;
}

.status {
  display: block;
  font-size: 13px;
  margin-top: 5px;
  color: green;
}

/* Hiệu ứng nhấp nháy nhiều màu cho tiêu đề */
@keyframes colorCycle {
  0% { color: #ff0000; }
  25% { color: #ff9900; }
  50% { color: #33cc33; }
  75% { color: #3399ff; }
  100% { color: #ff00ff; }
}

.new-arrivals-title {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 20px;
  animation: colorCycle 2s infinite;
}

/* Khi hover vào sản phẩm, ảnh phóng to */
.product-card img {
  width: 100%;
  height: auto;
  border-radius: 5px;
  transition: transform 0.3s ease;
}

.product-card:hover img {
  transform: scale(1.05);
}
#carousel {
  overflow-x: auto;
  scroll-behavior: smooth; /* hỗ trợ khi dùng scrollTo mà không cần JS */
}

/*PHẦN CSS HIỂN THỊ GIAO DIỆN TRÊN ĐTĐT*/

/* Tablet trở xuống */
@media (max-width: 768px) {
  /* Style cho màn hình nhỏ */
}

/* Điện thoại nhỏ */
@media (max-width: 480px) {
  /* Style cho điện thoại rất nhỏ */
}

/*css cho nút menu*/
.menu-toggle {
    display: none;
    font-size: 28px;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    nav {
        padding: 12px 20px;
    }

    .nav-container {
        flex-direction: column;
        gap: 15px;
    }

    .nav-left {
        flex-direction: column;
        display: none;
        width: 100%;
        background-color: rgba(213, 22, 5, 0.98);
        border-radius: 10px;
        padding: 15px 0;
        margin-top: 10px;
    }

    .nav-left.show {
        display: flex;
        animation: fadeInUp 0.3s ease;
    }

    .nav-left li {
        margin: 0;
        width: 100%;
        text-align: center;
    }

    .nav-left li a {
        display: block;
        width: 100%;
        margin: 5px 0;
    }

    .menu-toggle {
        display: block;
        order: -1;
        align-self: flex-start;
    }

    .nav-center {
        order: 1;
        width: 100%;
        margin: 0;
    }

    .search-wrapper {
        max-width: 100%;
    }

    .nav-right {
        order: 2;
        width: 100%;
        justify-content: center;
        margin: 0;
        flex-wrap: wrap;
    }

    .dropdown,
    .sub-dropdown {
        position: static;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: none;
        border-radius: 8px;
        margin-top: 10px;
    }

    .dropdown a {
        color: white;
        margin: 2px 10px;
    }

    .dropdown a:hover {
        background: rgba(255, 255, 255, 0.2);
        color: white;
        transform: none;
    }
}

/*Banner chính*/
@media (max-width: 768px) {
  .slider {
    height: 200px;
  }

  .slides img {
    height: 200px;
    object-fit: cover;
  }
}

/*Responsive Sản phẩm*/
@media (max-width: 768px) {
  .product, .product-card {
    width: 48%; /* 2 cột */
  }
}

@media (max-width: 480px) {
  .product, .product-card {
    width: 100%; /* 1 cột */
  }
}

/*Responsive Bộ lọc và tìm kiếm*/
@media (max-width: 768px) {
  .filter-price {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-right {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-right input#search {
    width: 100%;
  }
}

/*Banner khuyến mãi 3 cột*/
@media (max-width: 768px) {
  .banner-section {
    flex-direction: column;
    align-items: center;
  }

  .banner-item {
    width: 100%;
  }
}

/*Flash Sale, New Arrival – Cuộn ngang*/
@media (max-width: 768px) {
  .new-arrivals-container {
    padding-left: 10px;
  }
}

/*Nút hotline*/
@media (max-width: 480px) {
  .hotline-btn {
    padding: 8px 14px;
    font-size: 14px;
  }

  .hotline-btn img {
    width: 20px;
    height: 20px;
  }
}

/*Footer*/
@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    align-items: center;
  }

  .footer-section {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 768px) {
  #product-list {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(45%, 1fr));
    gap: 10px;
  }

  .product {
    float: none !important;
    width: 100% !important;
  }
}
/* css phần tìm kiếm, lọc giá, lọc thương hiệu*/  
.filter-bar {
  display: flex;
  justify-content: flex-end; /* đẩy nội dung về bên phải */
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  background-color: #f7f7f7;
  border-bottom: 1px solid #ddd;
}

.filter-bar input,
.filter-bar select {
  padding: 6px 10px;         /* giảm padding */
  font-size: 13px;           /* chữ nhỏ lại một chút */
  border-radius: 1010px;        /* bo góc nhẹ */
  border: 1px solid #ccc;
  min-width: 150px;          /* nhỏ lại */
  max-width: 180px;
}


@media (max-width: 768px) {
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-bar input,
  .filter-bar select {
    width: 100%;
  }
}

#login-link {
    font-weight: bold;
    color: white;
    padding: 0 8px;
}
