html {
  font-size: 14px;
}

/* Đảm bảo nút Product có thể click được trên mobile */
#productsDropdown {
  pointer-events: auto !important;
  cursor: pointer !important;
  -webkit-tap-highlight-color: rgba(255, 107, 53, 0.3);
}

@media (max-width: 991px) {
  #productsDropdown {
    pointer-events: auto !important;
    cursor: pointer !important;
    touch-action: manipulation;
    position: relative;
    z-index: 10001;
  }
  
  #productsDropdown:active {
    opacity: 0.7;
  }
  
  /* Đảm bảo dropdown menu có thể hiển thị trên mobile */
  [aria-labelledby="productsDropdown"] {
    pointer-events: auto !important;
    z-index: 10002 !important;
  }
}

/* Style cho nút MENU ở bottom navbar - Chỉ hiển thị trên mobile */
.bottom-navbar .menu-btn {
  border: 1px solid #333;
  border-radius: 4px;
  padding: 8px 16px;
  min-width: 70px;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  transition: all 0.3s ease;
}

.bottom-navbar .menu-btn:hover {
  background-color: #f5f5f5;
  border-color: #555;
}

.bottom-navbar .menu-btn:focus {
  box-shadow: 0 0 0 0.2rem rgba(51, 51, 51, 0.25);
}

.menu-text {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 1.5px;
  color: #FF6B35;
  line-height: 1;
  text-transform: uppercase;
}

/* Ẩn nút MENU trên desktop (>= 992px) */
@media (min-width: 992px) {
  .bottom-navbar .menu-btn {
    display: none !important;
  }
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #8B4513;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #F5F5F0; /* Màu be nhạt, phù hợp với theme nội thất gỗ */
  color: #333;
  padding-top: 80px; /* Padding để không bị top-navbar fixed che khuất */
  opacity: 0;
  animation: fadeInBody 0.6s ease-in-out forwards;
}

@keyframes fadeInBody {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

main {
  background-color: #F5F5F0;
  min-height: calc(100vh - 200px);
  position: relative;
  z-index: 1; /* Đảm bảo nội dung trang có z-index thấp hơn dropdown */
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease-out 0.2s forwards;
}

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

/* Navbar fixed styling - z-index cao nhất để luôn hiển thị trên cùng */
.navbar.fixed-top {
  z-index: 9999 !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
}

/* Navbar trên - Logo và Search/User/Language - Luôn cố định */
.top-navbar {
  z-index: 10000 !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  background-color: #FFFFFF !important;
  opacity: 0;
  transform: translateY(-20px);
  animation: slideDownNavbar 0.6s ease-out forwards;
  overflow: visible !important; /* Đảm bảo dropdown menu không bị cắt */
}

/* Đảm bảo top-navbar luôn hiển thị trên tất cả các trang */
.top-navbar * {
  position: relative;
}

/* Đảm bảo các phần tử trong top-navbar (trừ dropdown) có z-index thấp */
.top-navbar .input-group,
.top-navbar .form-control,
.top-navbar .btn,
.top-navbar .navbar-nav > li:not(.dropdown) {
  z-index: 1 !important;
  position: relative;
}

/* Đảm bảo dropdown menu trong top-navbar có z-index cao nhất */
.top-navbar .dropdown,
.top-navbar .dropdown-menu {
  z-index: 10100 !important;
  position: relative;
}

@keyframes slideDownNavbar {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Navbar dưới - Menu items - Đặt phía dưới top-navbar - Không cố định */
.bottom-navbar {
  z-index: 9999 !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
  position: relative !important; /* Không cố định nữa */
  margin-top: 0 !important; /* Revert về 0, sẽ được override ở trang Details */
  padding: 12px 0 !important; /* Tăng padding để cân đối hơn */
  min-height: 50px !important; /* Đảm bảo chiều cao tối thiểu */
  display: flex !important;
  align-items: center !important;
  border-top: none !important; /* Loại bỏ border-top nếu có */
  background-color: #FFFFFF !important;
  opacity: 0;
  transform: translateY(-20px);
  animation: slideDownNavbar 0.6s ease-out 0.1s forwards;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
}

/* Căn giữa menu items */
.bottom-navbar .navbar-nav {
  width: 100% !important;
  justify-content: center !important;
}

/* Đảm bảo bottom-navbar luôn hiển thị trên tất cả các trang */
.bottom-navbar * {
  position: relative;
}

/* Bottom-navbar không còn fixed nữa, không cần tính toán top */

/* Đảm bảo header luôn hiển thị và không bị lệch */
header {
  position: relative !important;
  z-index: 10001 !important;
  width: 100% !important;
  left: 0 !important;
  right: 0 !important;
}

/* Đảm bảo navbar không bị ảnh hưởng bởi các style khác */
.top-navbar {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.bottom-navbar {
  position: relative !important; /* Không cố định nữa */
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Admin top navbar phải có z-index cao hơn bottom navbar */
.admin-navbar {
  z-index: 1031 !important; /* Cao hơn admin-bottom-navbar (1030) */
}

/* Admin bottom navbar vẫn phải fixed */
.admin-bottom-navbar {
  position: fixed !important; /* Admin navbar vẫn cố định */
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  z-index: 1030 !important; /* Thấp hơn admin-navbar (1031) */
}

/* Đảm bảo modal-backdrop và modal hiển thị trên navbar */
.modal-backdrop {
  z-index: 10149 !important; /* Cao hơn navbar (10001) và dropdown (10100) */
  pointer-events: auto !important;
}

/* Đảm bảo modal hiển thị trên navbar và dropdown */
.modal {
  z-index: 10150 !important; /* Cao hơn navbar (10001), dropdown (10100) và backdrop (10149) */
}

/* Đảm bảo modal-dialog và modal-content cũng có z-index cao */
.modal-dialog {
  z-index: 10151 !important;
  position: relative;
  pointer-events: auto !important;
}

.modal-content {
  z-index: 10152 !important;
  position: relative;
  pointer-events: auto !important;
  opacity: 1 !important;
  background-color: #ffffff !important;
}

/* Đảm bảo tất cả elements trong modal có thể click được */
.modal * {
  pointer-events: auto !important;
}

/* Đảm bảo loginModal luôn có thể tương tác */
#loginModal {
  z-index: 10150 !important;
}

#loginModal.show {
  z-index: 10150 !important;
  display: block !important;
  opacity: 1 !important;
}

#loginModal .modal-dialog {
  z-index: 10151 !important;
  pointer-events: auto !important;
}

#loginModal .modal-content {
  z-index: 10152 !important;
  pointer-events: auto !important;
  background-color: #ffffff !important;
  opacity: 1 !important;
  color: #000 !important;
}

#loginModal input,
#loginModal button,
#loginModal a,
#loginModal .form-control,
#loginModal .btn {
  pointer-events: auto !important;
  cursor: pointer !important;
  opacity: 1 !important;
}

/* Đảm bảo imageModal luôn có thể tương tác - giống loginModal */
#imageModal {
  z-index: 10160 !important;
}

#imageModal.show {
  z-index: 10160 !important;
  display: block !important;
  opacity: 1 !important;
}

#imageModal .modal-dialog {
  z-index: 10161 !important;
  pointer-events: auto !important;
}

#imageModal .modal-content {
  z-index: 10162 !important;
  pointer-events: auto !important;
  background-color: transparent !important;
  opacity: 1 !important;
}

#imageModal input,
#imageModal button,
#imageModal a,
#imageModal .btn,
#imageModal img {
  pointer-events: auto !important;
  cursor: pointer !important;
  opacity: 1 !important;
}

/* Đảm bảo backdrop không chặn imageModal */
body.modal-open #imageModal.show ~ .modal-backdrop,
body.modal-open .modal-backdrop.show:not(:last-of-type) {
  z-index: 10159 !important;
}

body.modal-open .modal-backdrop.show:last-of-type {
  z-index: 10159 !important;
}

/* QUAN TRỌNG: Đảm bảo productDetailModal luôn có thể tương tác */
#productDetailModal {
  z-index: 10060 !important;
}

#productDetailModal.show {
  z-index: 10060 !important;
  display: block !important;
}

#productDetailModal .modal-dialog {
  z-index: 10061 !important;
  pointer-events: auto !important;
}

#productDetailModal .modal-content {
  z-index: 10062 !important;
  pointer-events: auto !important;
  background-color: white !important;
  opacity: 1 !important;
  color: #000 !important;
}

/* Đảm bảo backdrop không chặn productDetailModal */
body.modal-open #productDetailModal.show ~ .modal-backdrop,
body.modal-open .modal-backdrop.show:not(:last-of-type) {
  z-index: 10059 !important;
}

body.modal-open .modal-backdrop.show:last-of-type {
  z-index: 10059 !important;
}

/* Đảm bảo tất cả navbar elements luôn hiển thị */
.navbar,
.navbar *,
header,
header * {
  pointer-events: auto !important;
}

/* Đảm bảo dropdown container có z-index cao và không ảnh hưởng layout */
.navbar-nav .dropdown,
.top-navbar .dropdown {
  position: relative !important; /* Cần relative để dropdown menu absolute căn chỉnh đúng */
  z-index: 10100 !important; /* Rất cao để luôn hiển thị trên top-navbar (10000) và bottom-navbar (9999) */
  isolation: isolate !important; /* Tạo stacking context mới */
}

/* Đảm bảo dropdown menu không chiếm không gian trong layout */
.navbar-nav .dropdown-menu,
.top-navbar .dropdown-menu {
  position: absolute !important; /* Dùng absolute vì bottom-navbar không còn fixed */
  z-index: 10100 !important; /* Rất cao để luôn hiển thị trên top-navbar (10000) và bottom-navbar (9999) */
  overflow: visible !important; /* QUAN TRỌNG: Cho phép submenu hiển thị bên ngoài */
  pointer-events: auto !important; /* Đảm bảo dropdown menu có thể click được */
  /* Không force left/right, để Bootstrap tự động căn chỉnh */
  margin-top: 0px !important; /* Giảm khoảng cách xuống 0 */
  isolation: isolate !important; /* Tạo stacking context mới */
}

/* Hover effect cho navbar dưới - không có background */
.bottom-navbar .nav-link,
.admin-bottom-navbar .nav-link {
  border-radius: 4px;
  transition: color 0.2s ease;
  position: relative;
  padding: 8px 16px !important; /* Điều chỉnh padding để cân đối */
  background-color: transparent !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Đảm bảo navbar-nav trong bottom-navbar được căn giữa tốt */
.bottom-navbar .navbar-nav {
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 0 !important; /* Không có gap, dùng padding của nav-link */
}

/* Đảm bảo nav-item có spacing đều */
.bottom-navbar .nav-item {
  margin: 0 !important;
}

.bottom-navbar .nav-link:hover,
.admin-bottom-navbar .nav-link:hover {
  background-color: transparent !important;
  color: #FF6B35 !important;
}

.bottom-navbar .nav-link:active,
.bottom-navbar .nav-link.active,
.admin-bottom-navbar .nav-link:active,
.admin-bottom-navbar .nav-link.active {
  background-color: transparent !important;
  color: #FF6B35 !important;
}

/* Gạch dưới màu cam cho active state */
.bottom-navbar .nav-link.active::after,
.admin-bottom-navbar .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 3px;
  background-color: #FF6B35;
  border-radius: 2px 2px 0 0;
}

/* Mặc định - sẽ được tính toán động bằng JavaScript */
body {
  padding-top: 140px; /* Sẽ được tính toán động */
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Giao diện nội thất gỗ */
.navbar-dark {
  background-color: #8B4513 !important;
}

.btn-primary {
  background-color: #8B4513;
  border-color: #8B4513;
}

.btn-primary:hover {
  background-color: #654321;
  border-color: #654321;
}

a {
  color: #8B4513;
}

a:hover {
  color: #654321;
}

/* Hero section */
.hero-section {
  background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('/images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  color: white;
  padding: 100px 0;
  text-align: center;
}

/* Product cards - Enhanced animations */
.product-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid #e0e0e0;
  transform: scale(1);
  will-change: transform, box-shadow;
}

.product-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 24px rgba(0,0,0,0.15) !important;
}

/* Animation khi product card được reveal */
.scroll-reveal.product-card {
  opacity: 0;
  transform: translateY(40px) scale(0.95);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.product-card.revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Product card image animation */
.product-card .product-image {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-image {
  transform: scale(1.08);
}

/* Product overlay animation */
.product-card .product-overlay {
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-overlay {
  opacity: 1;
  visibility: visible;
}

/* Product overlay button animation */
.product-card .product-overlay-btn {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(10px);
  opacity: 0;
}

.product-card:hover .product-overlay-btn {
  transform: translateY(0);
  opacity: 1;
}

/* Stagger animation cho các buttons */
.product-card:hover .product-overlay-btn:nth-child(1) {
  transition-delay: 0.1s;
}

.product-card:hover .product-overlay-btn:nth-child(2) {
  transition-delay: 0.2s;
}

/* Footer */
footer {
  background-color: #2c2c2c !important;
}

/* Modern Menu Styles */
.navbar-nav .nav-link {
  transition: all 0.3s ease;
  position: relative;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1 !important;
  vertical-align: middle !important;
}

.navbar-nav .nav-link:hover {
  color: #FF6B35 !important;
}

/* Làm đậm tất cả chữ trong navbar */
.navbar .navbar-brand,
.navbar .navbar-brand span,
.navbar .navbar-brand small {
  font-weight: 700 !important;
}

.navbar .nav-link,
.navbar .nav-link span {
  font-weight: 700 !important;
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: #FF6B35;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after {
  width: 80%;
}

/* Search Bar Styles */
.navbar .input-group .form-control:focus {
  box-shadow: none;
  border-color: #FF6B35;
}

.navbar .input-group .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
}

.navbar .input-group .btn svg {
  margin: 0;
  display: block;
}

.navbar .input-group .btn:hover {
  background-color: #FF6B35;
  border-color: #FF6B35;
  color: white;
}

/* Icon Hover Effects */
.navbar-nav .nav-link svg {
  transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover svg {
  fill: #FF6B35;
  transform: scale(1.1);
}

/* Dropdown Menu Styles */
.dropdown-menu {
  margin-top: 0px !important; /* Giảm khoảng cách xuống 0 */
  border: none !important;
  border-radius: 8px !important;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  display: block !important;
  padding: 6px !important;
  overflow: visible;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  background-color: #ffffff !important; /* Đảm bảo dropdown menu có nền trắng đầy đủ */
  /* Đảm bảo dropdown menu không ảnh hưởng đến layout */
  position: absolute;
  pointer-events: auto !important; /* Đảm bảo dropdown menu có thể click được */
  /* Không force left/right, để Bootstrap tự động căn chỉnh */
}

/* Chỉ áp dụng position absolute và z-index cao cho dropdown menu trong navbar */
.navbar-nav .dropdown-menu,
header .dropdown-menu,
.top-navbar .dropdown-menu {
  position: absolute !important; /* Dùng absolute vì bottom-navbar không còn fixed */
  z-index: 10100 !important; /* Rất cao để luôn hiển thị trên top-navbar (10000) */
  isolation: isolate !important; /* Tạo stacking context mới */
  margin-top: 0px !important; /* Không có khoảng cách */
}

/* Tắt caret mặc định của Bootstrap (dấu chấm) */
.navbar-nav .dropdown-toggle::after {
  display: none !important;
}

/* Style cho mũi tên dropdown tùy chỉnh */
.navbar-nav .dropdown-arrow {
  display: inline-block;
  vertical-align: middle;
  margin-left: 4px;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  line-height: 1;
}

.navbar-nav .dropdown-toggle {
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1 !important;
  vertical-align: middle !important;
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
}

.navbar-nav .dropdown-toggle:focus,
.navbar-nav .dropdown-toggle:active,
.navbar-nav .dropdown-toggle:hover {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
}

/* Animation mũi tên khi hover - Chỉ khi không có modal mở */
body:not(.modal-open) .navbar-nav .dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

/* Đảm bảo dropdown menu hiển thị mượt mà khi hover - Chỉ khi không có modal mở */
body:not(.modal-open) .navbar-nav .dropdown:hover .dropdown-menu {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0);
}

/* Multi-level Dropdown (Submenu) Styles - Click to toggle */
.dropdown-submenu {
  position: relative;
}

/* Tất cả submenu mặc định đều ẩn - Desktop: bên phải, Mobile: bên dưới */
.dropdown-submenu > .dropdown-menu,
.dropdown-submenu > .submenu {
  position: absolute;
  top: 0;
  left: 100%;
  margin-top: 0;
  margin-left: -10px; /* Overlap nhiều hơn để không có khoảng trống */
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  display: block !important;
  z-index: 1051 !important; /* Cao hơn dropdown menu chính */
  pointer-events: none;
  padding: 6px !important;
  border-radius: 8px !important;
  border: none !important;
  overflow: visible;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  background-color: #ffffff !important; /* Đảm bảo submenu có nền trắng đầy đủ */
  /* Tạo vùng buffer để dễ di chuột vào submenu */
  margin-top: 0;
  margin-bottom: 0;
}

/* Trên mobile: submenu hiển thị bên dưới toàn bộ dropdown menu */
@media (max-width: 991px) {
  .dropdown-submenu > .dropdown-menu,
  .dropdown-submenu > .submenu {
    position: absolute !important;
    top: 100% !important; /* Nằm dưới toàn bộ dropdown menu */
    left: 0 !important;
    right: 0 !important;
    margin-top: 0 !important;
    margin-left: 0 !important;
    min-width: 100% !important;
    width: 100% !important;
    transform: translateY(0) !important;
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    z-index: 1053 !important;
  }
  
  /* Đảm bảo dropdown menu container có position relative để submenu absolute căn chỉnh đúng */
  [aria-labelledby="productsDropdown"] {
    position: relative !important;
  }
}

/* Tạo một vùng buffer invisible lớn giữa dropdown item và submenu */
.dropdown-submenu::after {
  content: '';
  position: absolute;
  right: -15px; /* Mở rộng buffer zone */
  top: -5px;
  bottom: -5px;
  width: 20px; /* Tăng width để dễ hover hơn */
  z-index: 9999;
  pointer-events: auto;
  background: transparent;
}

/* Khi submenu đang show, mở rộng buffer zone */
.dropdown-submenu.active::after,
.dropdown-submenu > .submenu.show ~ ::after {
  width: 25px;
  right: -20px;
}

/* Trên mobile: buffer zone bên dưới */
@media (max-width: 991px) {
  .dropdown-submenu::after {
    left: 0;
    right: 0;
    top: 100%;
    bottom: auto;
    height: 10px;
    width: auto;
  }
  
  .dropdown-submenu.active::after,
  .dropdown-submenu > .submenu.show ~ ::after {
    height: 15px;
    width: auto;
    right: 0;
  }
}

/* Submenu mặc định ẩn - CHỈ áp dụng khi KHÔNG hover và KHÔNG có class show */
.dropdown-submenu:not(:hover) > .submenu:not(.show):not(.active) {
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateX(-10px) !important;
  pointer-events: none !important;
  display: none !important;
}

@media (max-width: 991px) {
  .dropdown-submenu:not(:hover) > .submenu:not(.show):not(.active) {
    position: absolute !important;
    top: 100% !important;
    transform: translateY(0) !important;
    display: none !important;
  }
}

/* HIỂN THỊ SUBMENU KHI HOVER - QUAN TRỌNG: Specificity cao nhất, đặt sau rule ẩn */
.dropdown-submenu:hover > .submenu,
.dropdown-submenu > .submenu.show,
.dropdown-submenu.active > .submenu,
.dropdown-submenu .submenu-toggle:hover ~ .submenu {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateX(0) !important;
  display: block !important;
  pointer-events: auto !important;
  z-index: 1052 !important;
  position: absolute !important;
  top: 0 !important;
  left: 100% !important;
  margin-left: -10px !important;
  min-width: 200px !important;
  background-color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  border-radius: 8px !important;
  padding: 6px !important;
  overflow: visible !important;
}

/* Trên mobile: submenu hiển thị bên dưới toàn bộ dropdown menu */
@media (max-width: 991px) {
  .dropdown-submenu:hover > .submenu,
  .dropdown-submenu > .submenu.show,
  .dropdown-submenu.active > .submenu,
  .dropdown-submenu .submenu-toggle:hover ~ .submenu {
    position: absolute !important;
    top: 100% !important; /* Nằm dưới toàn bộ dropdown menu */
    left: 0 !important;
    right: 0 !important;
    margin-top: 0 !important;
    margin-left: 0 !important;
    min-width: 100% !important;
    width: 100% !important;
    transform: translateY(0) !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 1053 !important;
  }
}

/* Đảm bảo submenu items có thể click được */
.dropdown-submenu > .submenu.show .dropdown-item {
  pointer-events: auto !important;
  cursor: pointer !important;
  z-index: 10001;
  position: relative;
}

/* Đảm bảo links trong submenu hoạt động */
.dropdown-submenu > .submenu.show .dropdown-item a {
  pointer-events: auto !important;
  cursor: pointer !important;
  display: block;
  width: 100%;
  text-decoration: none;
}

/* Khi submenu show, buffer zone cũng cần active */
.dropdown-submenu.active::after {
  pointer-events: auto;
}

/* Submenu arrow - rotate khi submenu được mở */
.dropdown-submenu > .submenu.show ~ a .submenu-arrow,
.dropdown-submenu.active .submenu-arrow {
  transform: translateX(3px) rotate(90deg);
}

/* Trên mobile: arrow rotate 180deg (chỉ xuống dưới) */
@media (max-width: 991px) {
  .dropdown-submenu > .submenu.show ~ a .submenu-arrow,
  .dropdown-submenu.active .submenu-arrow {
    transform: rotate(180deg);
  }
}

/* Arrow style mặc định */
.submenu-arrow {
  transition: transform 0.3s ease;
}

/* Dropdown item có submenu */
.dropdown-submenu > .dropdown-item {
  cursor: pointer;
  position: relative;
  user-select: none;
}

.submenu-toggle {
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Highlight khi submenu đang active */
.dropdown-submenu.active > .submenu-toggle {
  background-color: #fff3e0 !important;
  color: #FF6B35 !important;
  font-weight: 700 !important;
}

.dropdown-submenu.active > .submenu-toggle .submenu-arrow {
  fill: #FF6B35 !important;
  transform: translateX(3px) rotate(90deg) !important;
}

@media (max-width: 991px) {
  .dropdown-submenu.active > .submenu-toggle .submenu-arrow {
    transform: rotate(180deg) !important;
  }
}

/* Tắt submenu khi modal mở */
body.modal-open .dropdown-submenu > .dropdown-menu,
body.modal-open .dropdown-submenu > .submenu {
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateX(-10px) !important;
  display: none !important;
  pointer-events: none !important;
}

@media (max-width: 991px) {
  body.modal-open .dropdown-submenu > .dropdown-menu,
  body.modal-open .dropdown-submenu > .submenu {
    position: absolute !important;
    top: 100% !important;
    transform: translateY(0) !important;
    display: none !important;
  }
}


/* Đảm bảo submenu vẫn hiển thị khi hover vào bên trong (sau khi đã mở) */
body:not(.modal-open) .dropdown-submenu > .submenu.show,
body:not(.modal-open) .dropdown-submenu > .submenu.show:hover,
body:not(.modal-open) .dropdown-menu:hover ~ .dropdown-submenu > .submenu.show,
body:not(.modal-open) .dropdown-submenu:hover > .submenu.show,
body:not(.modal-open) .dropdown-submenu.active > .submenu {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateX(0) !important;
  pointer-events: auto !important;
  display: block !important;
}

@media (max-width: 991px) {
  body:not(.modal-open) .dropdown-submenu > .submenu.show,
  body:not(.modal-open) .dropdown-submenu > .submenu.show:hover,
  body:not(.modal-open) .dropdown-menu:hover ~ .dropdown-submenu > .submenu.show,
  body:not(.modal-open) .dropdown-submenu:hover > .submenu.show,
  body:not(.modal-open) .dropdown-submenu.active > .submenu {
    position: absolute !important;
    top: 100% !important;
    transform: translateY(0) !important;
    display: block !important;
  }
}

/* Highlight khi hover vào dropdown menu chính */
body:not(.modal-open) [aria-labelledby="productsDropdown"]:hover {
  background-color: transparent;
}

/* Highlight cho dropdown item khi submenu đang mở */
body:not(.modal-open) .dropdown-submenu.active .submenu-toggle,
body:not(.modal-open) .dropdown-submenu:hover .submenu-toggle {
  background-color: #fff3e0 !important;
  color: #FF6B35 !important;
}

/* Đảm bảo submenu không bị ẩn khi hover vào các item bên trong dropdown menu chính */
body:not(.modal-open) [aria-labelledby="productsDropdown"]:hover .dropdown-submenu > .submenu.show,
body:not(.modal-open) .dropdown-item:hover ~ .dropdown-submenu > .submenu.show,
body:not(.modal-open) .dropdown-submenu > .dropdown-item:hover ~ .submenu.show {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateX(0) !important;
  pointer-events: auto !important;
  display: block !important;
}

@media (max-width: 991px) {
  body:not(.modal-open) [aria-labelledby="productsDropdown"]:hover .dropdown-submenu > .submenu.show,
  body:not(.modal-open) .dropdown-item:hover ~ .dropdown-submenu > .submenu.show,
  body:not(.modal-open) .dropdown-submenu > .dropdown-item:hover ~ .submenu.show {
    transform: translateY(0) !important;
  }
}

/* Đảm bảo submenu không bị ẩn khi hover vào các item bên trong submenu */
body:not(.modal-open) .dropdown-submenu > .submenu.show .dropdown-item:hover {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Đảm bảo khi hover vào dropdown menu chính, tất cả submenu đang mở vẫn hiển thị */
body:not(.modal-open) [aria-labelledby="productsDropdown"]:hover .dropdown-submenu > .submenu.show {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateX(0) !important;
  pointer-events: auto !important;
  display: block !important;
}

@media (max-width: 991px) {
  body:not(.modal-open) [aria-labelledby="productsDropdown"]:hover .dropdown-submenu > .submenu.show {
    transform: translateY(0) !important;
  }
}

/* Animation cho dropdown khi show (Bootstrap) */
.navbar-nav .dropdown.show .dropdown-menu,
header .dropdown.show .dropdown-menu {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0);
  pointer-events: auto !important; /* Đảm bảo dropdown menu có thể click được khi show */
  display: block !important;
  z-index: 10100 !important; /* Đảm bảo z-index cao khi show */
}

/* Tắt hoàn toàn dropdown menu và hover effect khi modal mở */
body.modal-open .navbar-nav .dropdown-menu,
body.modal-open .navbar-nav .dropdown:hover .dropdown-menu,
body.modal-open .navbar-nav .dropdown.show .dropdown-menu,
body.modal-open .navbar-nav .dropdown.show:hover .dropdown-menu {
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(-10px) !important;
  display: none !important;
  pointer-events: none !important;
  z-index: -999 !important;
  height: 0 !important;
  overflow: hidden !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
}

/* Tắt hover effect hoàn toàn khi modal mở */
body.modal-open .navbar-nav .dropdown:hover .dropdown-menu,
body.modal-open .navbar-nav .dropdown:hover:hover .dropdown-menu {
  opacity: 0 !important;
  visibility: hidden !important;
  display: none !important;
}

/* Tắt animation mũi tên khi modal mở */
body.modal-open .navbar-nav .dropdown:hover .dropdown-arrow,
body.modal-open .navbar-nav .dropdown .dropdown-arrow {
  transform: rotate(0deg) !important;
}

/* Disable hover trên dropdown khi modal mở */
body.modal-open .navbar-nav .dropdown:hover .dropdown-menu {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

/* Đảm bảo dropdown container không trigger hover khi modal mở */
body.modal-open .navbar-nav .dropdown {
  pointer-events: auto;
}

body.modal-open .navbar-nav .dropdown-toggle {
  pointer-events: auto;
}

/* Chỉ áp dụng cho dropdown menu trong navbar */
.navbar .dropdown-menu .dropdown-item,
header .dropdown-menu .dropdown-item {
  color: #555 !important;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
  border-radius: 6px;
  margin: 1px 0;
  padding: 8px 12px !important;
}

.navbar .dropdown-menu .dropdown-item:hover,
header .dropdown-menu .dropdown-item:hover {
  background-color: #fff3e0 !important; /* Màu cam nhạt */
  color: #FF6B35 !important;
  font-weight: 600;
  transform: translateX(3px);
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.2);
}

.navbar .dropdown-menu .dropdown-item svg,
header .dropdown-menu .dropdown-item svg {
  transition: all 0.2s ease;
}

.navbar .dropdown-menu .dropdown-item:hover svg,
header .dropdown-menu .dropdown-item:hover svg {
  fill: #FF6B35;
  transform: scale(1.1);
}

/* Highlight cho submenu toggle (danh mục có submenu) - chỉ trong navbar */
.navbar .submenu-toggle,
header .submenu-toggle {
  border-radius: 6px;
  margin: 2px 0;
  padding: 8px 12px !important;
}

.navbar .submenu-toggle:hover,
header .submenu-toggle:hover {
  background-color: #fff3e0 !important;
  color: #FF6B35 !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.2);
}

.navbar .submenu-toggle:hover .submenu-arrow,
header .submenu-toggle:hover .submenu-arrow {
  fill: #FF6B35 !important;
  transform: translateX(3px) rotate(90deg) !important;
}

@media (max-width: 991px) {
  .navbar .submenu-toggle:hover .submenu-arrow,
  header .submenu-toggle:hover .submenu-arrow {
    transform: rotate(180deg) !important;
  }
}

/* Highlight cho submenu items (loại sản phẩm) - chỉ trong navbar */
.navbar .submenu .dropdown-item,
header .submenu .dropdown-item {
  padding: 8px 12px !important;
  position: relative;
  border-radius: 6px;
  margin: 1px 0;
}

.navbar .submenu .dropdown-item:hover,
header .submenu .dropdown-item:hover {
  background-color: #4a4a4a !important;
  color: #fff !important;
  font-weight: 600;
  transform: translateX(3px);
  box-shadow: 0 2px 8px rgba(74, 74, 74, 0.3);
  padding-left: 18px !important;
}

/* Header Logo và Text - Override cho company-info-text để cho phép xuống dòng */
/* Đảm bảo các phần tử trong company-info-text hiển thị block và xuống dòng đúng */
.company-info-text {
  display: flex !important;
  flex-direction: column !important;
  line-height: 1.4 !important;
}

.company-info-text .company-name-line,
.company-info-text .company-tagline-line,
.company-info-text .company-email-line,
.company-info-text > div {
  display: block !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
  width: 100% !important;
  line-height: 1.3 !important;
}

.company-name-line {
  margin-bottom: 2px !important;
}

.company-tagline-line {
  margin-top: 2px !important;
  margin-bottom: 2px !important;
}

.company-email-line {
  margin-top: 2px !important;
}

/* Override CSS rule cũ cho company-info-text - priority cao hơn */
.company-info-text .fw-bold,
.company-info-text .text-muted {
  display: block !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
  width: 100% !important;
}

/* Đảm bảo tagline và email cùng dòng trong navbar-brand */
.navbar-brand > div > div:last-child {
  display: block !important;
}

.navbar-brand > div > div:last-child > span,
.navbar-brand > div > div:last-child > a {
  display: inline !important;
}

/* Giữ nguyên CSS rule cũ cho các trường hợp khác (KHÔNG trong company-info-text) */
/* Comment lại để tránh xung đột với company-info-text - sẽ uncomment nếu cần */
/*
header .fw-bold:not(.company-name-line) {
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  max-width: 100%;
}

header .text-muted:not(.company-tagline-line):not(.company-email-line) {
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
}
*/

/* Đảm bảo container header không bị tràn */
header > div {
  overflow-x: hidden;
}

header > div > div {
  overflow: visible !important;
}

/* Dropdown menu không bị che */
header .dropdown {
  position: relative;
  z-index: 10100 !important; /* Rất cao để luôn hiển thị trên top-navbar (10000) và bottom-navbar (9999) */
  isolation: isolate; /* Tạo stacking context mới */
}

header .dropdown-menu {
  position: absolute !important;
  z-index: 10100 !important; /* Rất cao để luôn hiển thị trên top-navbar (10000) và bottom-navbar (9999) */
  margin-top: 0px !important; /* Không có khoảng cách */
  isolation: isolate; /* Tạo stacking context mới */
}

/* Đảm bảo dropdown menu hiển thị đầy đủ */
header .dropdown-menu.dropdown-menu-end {
  right: 0;
  left: auto;
}

/* Đảm bảo dropdown show */
header .dropdown.show .dropdown-menu {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* Đảm bảo dropdown menu items có thể click được */
.dropdown-menu .dropdown-item,
.dropdown-menu button {
  pointer-events: auto !important;
  cursor: pointer !important;
}

/* Login Modal Styles */
.modal-backdrop {
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

#loginModal .modal-header {
  position: relative;
}

#loginModal .btn-close {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  opacity: 1;
  padding: 10px;
}

#loginModal .btn-close:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

#loginModal .card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#loginModal .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
}

#loginModal .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

#loginModal .form-control:focus {
  border-color: #4a4a4a;
  box-shadow: 0 0 0 0.2rem rgba(74, 74, 74, 0.25);
}

#loginModal .btn-dark {
  background-color: #000;
  border-color: #000;
  transition: all 0.3s ease;
}

#loginModal .btn-dark:hover {
  background-color: #333;
  border-color: #333;
  transform: translateY(-1px);
}

/* Toast Notification Styles */
.toast-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  min-width: 300px;
  max-width: 500px;
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  padding: 0;
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  animation: slideInRight 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.toast-notification.show {
  opacity: 1;
  transform: translateX(0);
}

.toast-content {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  gap: 12px;
}

.toast-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  animation: scaleIn 0.3s ease-out 0.2s both;
}

.toast-icon svg {
  width: 20px;
  height: 20px;
  animation: checkmark 0.5s ease-in-out 0.3s both;
}

.toast-message {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.5;
}

.toast-close {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  transition: all 0.2s ease;
  border-radius: 4px;
  flex-shrink: 0;
}

.toast-close:hover {
  opacity: 1;
  background-color: rgba(255, 255, 255, 0.1);
  transform: rotate(90deg);
}

.toast-close svg {
  width: 18px;
  height: 18px;
}

/* Animations */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(400px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutRight {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(400px);
  }
}

@keyframes scaleIn {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes checkmark {
  0% {
    transform: scale(0) rotate(-45deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.2) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

/* Responsive */
@media (max-width: 576px) {
  .toast-notification {
    top: 10px;
    right: 10px;
    left: 10px;
    min-width: auto;
    max-width: none;
  }
  
  .toast-notification.show {
    transform: translateX(0);
  }
  
  @keyframes slideInRight {
    from {
      opacity: 0;
      transform: translateY(-100px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  @keyframes slideOutRight {
    from {
      opacity: 1;
      transform: translateY(0);
    }
    to {
      opacity: 0;
      transform: translateY(-100px);
    }
  }
}

/* Banner Carousel Styles */
#bannerCarousel {
  position: relative;
  margin-bottom: 0;
  max-height: 70vh;
}

#bannerCarousel .carousel-inner {
  overflow: hidden;
  max-height: 70vh;
}

#bannerCarousel .carousel-item {
  background-color: #000; /* Nền đen để không thấy khoảng trống khi ảnh không đủ rộng */
  min-height: 500px;
  max-height: 70vh;
  position: relative;
  overflow: hidden;
}

#bannerCarousel .banner-image,
#bannerCarousel .carousel-item img {
  width: 100%;
  height: 500px;
  max-height: 70vh;
  object-fit: cover; /* Phủ kín toàn bộ không gian, không có khoảng trắng */
  object-position: center;
  display: block;
  margin: 0;
  transition: transform 0.6s ease-in-out;
}

#bannerCarousel .carousel-item:hover .banner-image,
#bannerCarousel .carousel-item:hover img {
  transform: scale(1.01); /* Giảm scale để không vượt quá khung */
}

#bannerCarousel .carousel-indicators {
  bottom: 20px;
  margin-bottom: 0;
}

#bannerCarousel .carousel-indicators button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.8);
  margin: 0 5px;
  transition: all 0.3s ease;
}

#bannerCarousel .carousel-indicators button.active {
  background-color: #fff;
  border-color: #fff;
  transform: scale(1.2);
}

#bannerCarousel .carousel-control-prev,
#bannerCarousel .carousel-control-next {
  width: 50px;
  height: 50px;
  top: 50%;
  transform: translateY(-50%);
  background-color: #ffffff;
  border: none;
  border-radius: 50%;
  opacity: 0.9;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#bannerCarousel .carousel-control-prev:hover,
#bannerCarousel .carousel-control-next:hover {
  opacity: 1;
  background-color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transform: translateY(-50%) scale(1.1);
}

/* Icon màu đen */
#bannerCarousel .carousel-control-prev-icon,
#bannerCarousel .carousel-control-next-icon {
  filter: brightness(0) saturate(100%);
  width: 20px;
  height: 20px;
}

#bannerCarousel .carousel-control-prev {
  left: 20px;
}

#bannerCarousel .carousel-control-next {
  right: 20px;
}

#bannerCarousel .carousel-caption {
  bottom: 50px;
  text-align: center;
}

#bannerCarousel .carousel-caption button {
  background-color: rgba(0, 0, 0, 0.8);
  border: 2px solid #fff;
  color: #fff;
  border-radius: 50px !important;
  transition: all 0.3s ease;
}

#bannerCarousel .carousel-caption button:hover {
  background-color: #fff;
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Responsive Carousel */
@media (max-width: 1200px) {
  #bannerCarousel {
    max-height: 60vh;
  }
  
  #bannerCarousel .carousel-inner {
    max-height: 60vh;
  }
  
  #bannerCarousel .carousel-item {
    min-height: 450px;
    max-height: 60vh;
  }
  
  #bannerCarousel .banner-image,
  #bannerCarousel .carousel-item img {
    height: 450px;
    max-height: 60vh;
  }
}

@media (max-width: 992px) {
  #bannerCarousel {
    max-height: 50vh;
  }
  
  #bannerCarousel .carousel-inner {
    max-height: 50vh;
  }
  
  #bannerCarousel .carousel-item {
    min-height: 400px;
    max-height: 50vh;
  }
  
  #bannerCarousel .banner-image,
  #bannerCarousel .carousel-item img {
    height: 400px;
    max-height: 50vh;
  }
}

@media (max-width: 768px) {
  #bannerCarousel {
    max-height: 40vh;
  }
  
  #bannerCarousel .carousel-inner {
    max-height: 40vh;
  }
  
  #bannerCarousel .carousel-item {
    min-height: 300px;
    max-height: 40vh;
  }
  
  #bannerCarousel .banner-image,
  #bannerCarousel .carousel-item img {
    height: 300px;
    max-height: 40vh;
  }
  
  #bannerCarousel .carousel-control-prev,
  #bannerCarousel .carousel-control-next {
    width: 40px;
    height: 40px;
    background-color: #ffffff;
  }
  
  #bannerCarousel .carousel-control-prev-icon,
  #bannerCarousel .carousel-control-next-icon {
    width: 16px;
    height: 16px;
  }
  
  #bannerCarousel .carousel-control-prev {
    left: 10px;
  }
  
  #bannerCarousel .carousel-control-next {
    right: 10px;
  }
  
  #bannerCarousel .carousel-caption {
    bottom: 20px;
  }
  
  #bannerCarousel .carousel-caption button {
    padding: 8px 20px !important;
    font-size: 14px !important;
  }
}

@media (max-width: 576px) {
  #bannerCarousel {
    max-height: 35vh;
  }
  
  #bannerCarousel .carousel-inner {
    max-height: 35vh;
  }
  
  #bannerCarousel .carousel-item {
    min-height: 250px;
    max-height: 35vh;
  }
  
  #bannerCarousel .banner-image,
  #bannerCarousel .carousel-item img {
    height: 250px;
    max-height: 35vh;
  }
  
  #bannerCarousel .carousel-control-prev,
  #bannerCarousel .carousel-control-next {
    width: 35px;
    height: 35px;
    background-color: #ffffff;
  }
  
  #bannerCarousel .carousel-control-prev-icon,
  #bannerCarousel .carousel-control-next-icon {
    width: 14px;
    height: 14px;
  }
  
  #bannerCarousel .carousel-indicators {
    bottom: 10px;
  }
  
  #bannerCarousel .carousel-indicators button {
    width: 8px;
    height: 8px;
    margin: 0 3px;
  }
}

/* Team Members Section */
.team-member-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

.team-member-image {
  position: relative;
  width: 100%;
  padding-top: 100%; /* Tạo tỷ lệ 1:1 */
  overflow: hidden;
  background-color: #f8f8f8;
}

.team-member-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.team-member-card:hover .team-member-image img {
  transform: scale(1.1);
}

.team-member-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-member-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.team-member-card:hover .team-member-overlay {
  opacity: 1;
}

.team-member-social {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: center;
}

.social-icon {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background: #4a4a4a;
  color: #fff;
  transform: scale(1.1);
}

.social-icon svg {
  width: 18px;
  height: 18px;
}

.team-member-info {
  padding: 15px;
  text-align: center;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.team-member-name {
  font-size: 1rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 6px;
}

.team-member-position {
  font-size: 0.85rem;
  color: #4a4a4a;
  font-weight: 600;
  margin-bottom: 8px;
}

.team-member-description {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.6;
  margin-top: auto;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Responsive Team Members */
@media (max-width: 992px) {
  .team-member-name {
    font-size: 1.1rem;
  }
  
  .team-member-position {
    font-size: 0.9rem;
  }
  
  .team-member-description {
    font-size: 0.8rem;
  }
}

@media (max-width: 768px) {
  .team-member-info {
    padding: 15px;
  }
  
  .team-member-name {
    font-size: 1rem;
  }
  
  .team-member-position {
    font-size: 0.85rem;
  }
}

/* Categories Section Styles */
.categories-section {
  background-color: #F5F5F0;
  padding: 60px 0;
}

.category-card {
  background-color: #f5f5f5; /* Xám nhẹ thay vì trắng */
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.category-image-wrapper {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background-color: #f8f8f8;
}

.category-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.category-card:hover .category-image {
  transform: scale(1.05);
}


.category-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-name {
  padding: 20px 15px;
  text-align: center;
  background-color: #f5f5f5; /* Xám nhẹ thay vì trắng */
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-name h5 {
  font-size: 1rem;
  font-weight: 700;
  color: #000;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin: 0;
  line-height: 1.3;
}

/* Overlay khi hover category card */
.category-overlay {
  background-color: rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 1;
  border-radius: 8px 8px 0 0;
}

.category-card:hover .category-overlay {
  opacity: 1;
  visibility: visible;
}

.category-overlay .category-overlay-btn:hover {
  background-color: #FF6B35 !important;
  color: white !important;
  transform: scale(1.05);
}

.category-card a {
  text-decoration: none;
  color: inherit;
}

.category-card a:hover {
  text-decoration: none;
}

/* Categories Carousel Controls */
.category-carousel-control {
  width: 50px;
  height: 50px;
  background-color: #FFFFFF;
  border: none;
  border-radius: 50%;
  opacity: 1;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.category-carousel-control:hover {
  background-color: #FFFFFF;
  opacity: 1;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.category-carousel-control-prev {
  left: -25px;
}

.category-carousel-control-next {
  right: -25px;
}

.category-carousel-control-prev .carousel-control-prev-icon,
.category-carousel-control-next .carousel-control-next-icon {
  filter: brightness(0) saturate(100%);
  width: 20px;
  height: 20px;
}

/* Responsive Categories */
@media (max-width: 1199px) {
  .category-carousel-control-prev {
    left: -15px;
  }
  
  .category-carousel-control-next {
    right: -15px;
  }
}

@media (max-width: 991px) {
  .categories-section {
    padding: 40px 0;
  }
  
  .category-name h5 {
    font-size: 0.9rem;
  }
  
  .category-carousel-control {
    width: 40px;
    height: 40px;
  }
  
  .category-carousel-control-prev {
    left: -10px;
  }
  
  .category-carousel-control-next {
    right: -10px;
  }
}

@media (max-width: 767px) {
  .category-name {
    padding: 15px 10px;
    min-height: 50px;
  }
  
  .category-name h5 {
    font-size: 0.85rem;
  }
  
  .category-carousel-control {
    width: 35px;
    height: 35px;
  }
  
  .category-carousel-control-prev {
    left: -5px;
  }
  
  .category-carousel-control-next {
    right: -5px;
  }
}

/* ============================================
   PAGE TRANSITION & LOADING ANIMATIONS
   ============================================ */

/* Page Transition Overlay */
.page-transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #F5F5F0;
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out;
}

.page-transition-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* Loading Spinner */
.page-loading-spinner {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 100000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out;
}

.page-loading-spinner.active {
  opacity: 1;
  pointer-events: all;
}

.page-loading-spinner::after {
  content: '';
  display: block;
  width: 50px;
  height: 50px;
  border: 4px solid #e0e0e0;
  border-top-color: #FF6B35;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Smooth scroll behavior - chỉ thêm nếu chưa có */
html {
  scroll-behavior: smooth;
}

/* Navbar scroll animation */
.top-navbar.scrolled,
.bottom-navbar.scrolled {
  box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
  transition: box-shadow 0.3s ease-in-out;
}

/* Navigation link hover animation - cải thiện animation cho nav-link */
.bottom-navbar .nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 80%;
  height: 3px;
  background-color: #FF6B35;
  border-radius: 2px 2px 0 0;
  transition: transform 0.3s ease;
  z-index: 1;
}

.bottom-navbar .nav-link:hover::before {
  transform: translateX(-50%) scaleX(1);
}

/* Giữ nguyên active state với ::after như đã có */
.bottom-navbar .nav-link.active::after {
  z-index: 2;
}

/* Search Suggestions Styles */
.search-suggestions {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.search-suggestions .suggestion-item:not(.view-all):hover {
    background-color: #f5f5f5 !important;
}

.search-suggestions .suggestion-item:not(.view-all):last-of-type {
    border-bottom: none;
}

.search-suggestions .view-all:hover {
    background-color: #fff3e0 !important;
}

/* Fade in animation for page content */
.page-content {
  animation: fadeInContent 0.6s ease-out forwards;
}

@keyframes fadeInContent {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animation cho logo đối tác chuyển động liên tục */
@keyframes scrollPartners {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-100% / 4));
  }
}

.partners-scroll-container {
  overflow: hidden;
  position: relative;
  width: 100%;
  padding: 20px 0;
  mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.partners-scroll-wrapper {
  display: flex !important;
  animation: scrollPartners 15s linear infinite !important;
  will-change: transform;
  width: fit-content;
  gap: 0;
}

.partners-scroll-wrapper:hover {
  animation-play-state: paused;
}

.partner-logo-item {
  flex-shrink: 0;
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  margin: 0;
}