/* =======================================
   TỔNG QUAN & PHẦN GIỚI THIỆU
======================================= */
body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #fff;
  font-family: Arial, sans-serif;
}

.intro-section {
  padding: 20px;
  text-align: center;
  background: #f9f9f9;
}

.intro-title {
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #0c7133;
}

.intro-text {
  font-size: 18px;
  max-width: 850px;
  margin: 0 auto;
  line-height: 1.6;
  color: #333;
}

/* =======================================
   VÒNG TRÒN THƯƠNG HIỆU
======================================= */
.circle-section {
  display: flex;
  justify-content: center;
  align-items: center;
}

.circle-container {
  position: relative;
  height: 500px;
}

.center-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: #fff;
  border: 5px solid #0c7133;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  z-index: 10;
}

.center-logo img {
  max-width: 80%;
}

.outer-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 380px;
  height: 380px;
  margin-left: -190px;
  margin-top: -190px;
  border: 4px solid #0c7133;
  border-radius: 50%;
}

.brands-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  animation: rotate 30s linear infinite;
}

.brand {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100px;
  height: 100px;
  margin: -50px;
  border-radius: 50%;
  border: 4px solid #0c7133;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.brand img {
  max-width: 70%;
}

.brand:hover {
  border-color: #0e8b3f;
  box-shadow: 0 0 20px rgba(12, 113, 51, 0.6);
}

@keyframes rotate {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* =======================================
   MENU ĐA CẤP RESPONSIVE
======================================= */
.navbar .navbar-nav {
  margin-left: 20px;
}

.navbar .dropdown > .dropdown-menu {
  display: block;
  visibility: hidden;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.25s ease-in-out;
  pointer-events: none;
}

/* Hover mở (desktop) */
@media (min-width: 992px) {
  .navbar .dropdown:hover > .dropdown-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
}

.dropdown-submenu {
  position: relative;
}

.dropdown-submenu > .dropdown-menu {
  top: 0;
  left: 100%;
  margin-top: -1px;
  min-width: 220px;
  visibility: hidden;
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.25s ease-in-out;
  pointer-events: none;
}

.dropdown-submenu:hover > .dropdown-menu {
  visibility: visible;
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

/* Mũi tên submenu */
.caret-right {
  font-size: 14px;
  margin-left: auto;
  color: #999;
  transition: transform 0.25s ease, color 0.2s ease;
}

.dropdown-item:hover .caret-right {
  color: #000;
}

.dropdown-submenu:hover > a > .caret-right {
  transform: rotate(90deg);
}

/* Dropdown item style */
.dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.dropdown-item img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  margin-right: 10px;
  transition: transform 0.25s ease;
}

.dropdown-item:hover img {
  transform: scale(1.1);
}

.dropdown-item:hover {
  background-color: #e9f5ff;
}

.dropdown-item:hover span {
  color: #0d6efd;
  font-weight: 600;
}

/* Mở submenu khi hover (desktop) */
@media (min-width: 992px) {
  .navbar .dropdown:hover > .dropdown-menu {
    display: block;
  }
}

/* MOBILE: click mở submenu */
@media (max-width: 991px) {
  .dropdown-menu {
    position: static;
    float: none;
    background-color: #f8f9fa;
    border: none;
  }
  
  .dropdown-submenu > .dropdown-menu {
    left: 0;
    margin-left: 1rem;
    display: none;
  }

  .dropdown-submenu.open > .dropdown-menu {
    display: block;
  }

  .dropdown-submenu > a::after {
    content: " ▸";
    float: right;
  }
}

/* =======================================
   CART, FORM, KHÁC
======================================= */
.cart-dropdown .dropdown-menu {
  width: 320px;
  max-height: 400px;
  overflow-y: auto;
}

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #dee2e6;
  padding: 8px 0;
}

.cart-item img {
  width: 45px;
  height: 45px;
  object-fit: cover;
  border-radius: 5px;
  margin-right: 10px;
}

.cart-item .product-name {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  white-space: normal;
  word-wrap: break-word;
  max-width: 400px;
}

.cart-item .remove-item {
  background: transparent;
  border: none;
  color: #dc3545;
  cursor: pointer;
}

.cart-item .remove-item:hover {
  color: #a71d2a;
}

/* Hiệu ứng input focus */
.form-control:hover, .form-select:hover, textarea.form-control:hover {
  border-color: #80b0b0 !important;
  background-color: #f8f9fa !important;
}

.form-control:focus, .form-select:focus, textarea.form-control:focus {
  border-color: #28a745 !important;
  box-shadow: 0 0 0 0.25rem rgba(40, 167, 69, 0.25) !important;
  background-color: #ffffff !important;
}

/* Chữ nhập nháy */
@keyframes my {
  0% { color: #FF0000; } 
  50% { color: #fff; } 
  100% { color: #FF0000; } 
}

.test {
  font-size:18px;
  font-style: italic;
  animation: my 700ms infinite;
}

/* Tin tức */
.news-time {
  color: #adadad;
  font-size: 12px;
  margin-top: 5px;
  padding-left: 10px;
}

.title2 {
  font-size: 27px;
  color: #ffa410;
}

.trichdan {
  font-size: 16px;
}

/* ==== SỬA LỖI KHOẢNG TRỐNG GIỮA MENU MOBILE ==== */
@media (max-width: 991px) {
  /* Ẩn hoàn toàn menu con khi chưa mở */
  .navbar-nav .dropdown-menu {
    display: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: #000 !important; /* giữ màu nền đồng nhất */
  }

  /* Khi người dùng bấm mở (Bootstrap thêm class .show) */
  .navbar-nav .dropdown-menu.show {
    display: block !important;
  }

  /* Xóa khoảng cách giữa các item */
  .navbar-nav .nav-item {
    margin: 0 !important;
    padding: 0 !important;
  }

  .navbar-nav .nav-link {
    padding: 10px 20px !important;
    border-bottom: 1px solid #333 !important;
  }
}

@media (min-width: 992px) {
  .navbar-nav .dropdown:hover > .dropdown-menu {
    display: block !important;
    opacity: 1;
    visibility: visible;
  }
}
