/* Nav dropdown — hover menu (không gap, dễ rà chuột xuống) */
.nav-drop-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-drop-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 8px 0;
  font-size: 14px;
  font-weight: 500;
  color: #475569;
}
.nav-drop-trigger:hover,
.nav-drop-trigger.active {
  color: #2563eb;
}

.nav-chevron {
  font-size: 10px;
  opacity: .7;
  transition: transform .2s;
}
.nav-drop-wrap:hover .nav-chevron,
.nav-drop-wrap.open .nav-chevron,
.nav-drop-wrap:focus-within .nav-chevron {
  transform: rotate(180deg);
}

/* Vùng nối vô hình — chuột không rơi khỏi hover khi rà xuống */
.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  padding-top: 6px;
  z-index: 300;
  background: transparent;
  border: none;
  box-shadow: none;
}

.nav-drop-wrap:hover .nav-dropdown,
.nav-drop-wrap.open .nav-dropdown,
.nav-drop-wrap:focus-within .nav-dropdown {
  display: block;
}

.nav-dropdown-panel {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14);
  border: 1px solid #e2e8f0;
  padding: 6px 0;
  position: relative;
}

.nav-dropdown-panel::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: #fff;
  border-left: 1px solid #e2e8f0;
  border-top: 1px solid #e2e8f0;
}

.nav-drop-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 500;
  color: #334155 !important;
  transition: background .15s;
}
.nav-drop-item:hover {
  background: #f0f6ff;
  color: #2563eb !important;
}
.nav-drop-item.active {
  background: #eff6ff;
  color: #2563eb !important;
  font-weight: 700;
}
.nav-drop-icon {
  width: 28px;
  text-align: center;
  font-size: 16px;
}

/* Header không cắt dropdown */
.top-header,
.top-header .inner,
.top-nav {
  overflow: visible;
}

/* FNB sub-page — theo khu vực */
.fnb-type-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.fnb-type-tab {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}
.fnb-type-tab:hover, .fnb-type-tab.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.region-section {
  margin-bottom: 36px;
  scroll-margin-top: 88px;
}
.region-section .cat-grid {
  margin-top: 8px;
}
.region-title {
  font-size: 18px;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #2563eb;
  display: flex;
  align-items: center;
  gap: 8px;
}
.region-count { font-size: 13px; font-weight: 500; color: #64748b; }

.merchant-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  transition: box-shadow .2s;
  position: relative;
  z-index: 1;
}
.merchant-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}
.merchant-card-img {
  display: block;
  height: 160px;
  position: relative;
  overflow: hidden;
  background: #f1f5f9;
}
.merchant-card-img > img:first-child {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.merchant-logo-badge {
  position: absolute;
  bottom: 8px;
  left: 16px;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  border: 3px solid #fff;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  z-index: 2;
}
.merchant-card-body { padding: 16px; }
.merchant-card-body h3 { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.merchant-card-body h3:hover { color: #2563eb; }
.merchant-type-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  background: #fef3c7;
  color: #92400e;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}
.merchant-meta { font-size: 13px; color: #64748b; margin: 6px 0; }
.merchant-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}
.merchant-foot .price { font-weight: 800; color: #2563eb; font-size: 15px; }

.region-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.region-tab {
  padding: 8px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: #475569;
}
.region-tab.active { background: #0f172a; color: #fff; border-color: #0f172a; }

@media (max-width: 900px) {
  .nav-dropdown {
    left: 0;
    transform: none;
  }
}
