/* ==========================================================
   HỌC 247 MEGA MENU
   Cột trái: danh mục sản phẩm (có ›) & link Tất cả sản phẩm.
   Cột phải: sản phẩm theo danh mục (không có ›).
========================================================== */

.cflic-nav-menu .flic-mega { position: relative !important; }
.flic-mega > a[data-cflic-mega-toggle="1"] { cursor: pointer; }

/* Khóa ôn luyện không có mũi tên cạnh tiêu đề chính trên thanh menu */
.flic-mega > a[data-cflic-mega-toggle="1"]::after {
  content: none !important;
  display: none !important;
}

.flic-mega-panel { display: none; }

@media (min-width: 1081px) {
  .cflic-nav-menu .flic-mega:hover > .flic-mega-panel,
  .cflic-nav-menu .flic-mega:focus-within > .flic-mega-panel {
    display: block !important;
  }
}

.flic-mega-panel-v1110 {
  position: absolute;
  top: 100%;
  left: 0;
  width: 760px;
  max-width: calc(100vw - 40px);
  padding: 0;
  background: #fff;
  border: 1px solid #d7dce3;
  border-radius: 0 0 8px 8px !important;
  box-shadow: 0 16px 36px rgba(25, 36, 50, .14);
  z-index: 999999;
  overflow: hidden;
}

.flic-mega-columns {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 420px;
  max-height: min(580px, calc(100vh - 100px));
}

.flic-mega-root-column {
  min-width: 0;
  overflow-y: auto;
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
}

.flic-mega-heading,
.flic-mega-product-heading {
  min-height: 44px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  color: #64748b;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.flic-mega-root-list { padding: 4px 0; }

.flic-mega-all-products-link {
  min-height: 42px;
  display: flex !important;
  align-items: center;
  margin: 0 0 4px 0 !important;
  padding: 10px 16px !important;
  border: 0 !important;
  border-bottom: 1px solid #e2e8f0 !important;
  background: transparent !important;
  color: #1d4f91 !important;
  text-decoration: none !important;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 700;
  transition: background .15s ease, color .15s ease;
}

.flic-mega-all-products-link:hover,
.flic-mega-all-products-link:focus {
  background: #edf4fc !important;
  color: #153a6b !important;
}

.flic-mega-root-link {
  min-height: 42px;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 16px;
  align-items: center;
  gap: 8px;
  margin: 0 !important;
  padding: 9px 16px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #334155 !important;
  text-decoration: none !important;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 600;
  transform: none !important;
  transition: color .15s ease, background .15s ease;
}

.flic-mega-root-link:hover,
.flic-mega-root-link:focus,
.flic-mega-root-link.is-active {
  background: #edf4fc !important;
  color: #1d4f91 !important;
}

.flic-mega-root-link.is-active {
  box-shadow: inset 3px 0 0 #1d4f91;
}

.flic-mega-root-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flic-mega-arrow {
  justify-self: end;
  color: #94a3b8;
  font-size: 18px;
  line-height: 1;
  font-weight: 500;
}

.flic-mega-product-column {
  min-width: 0;
  overflow-y: auto;
  background: #fff;
}

.flic-mega-product-panel { display: none; min-height: 100%; padding: 4px 0 12px; }
.flic-mega-product-panel.is-active:not([hidden]) { display: block; }
.flic-mega-product-list { display: block; padding: 4px 8px; }

.flic-mega-product-link {
  min-height: 40px;
  display: block !important;
  margin: 2px 0 !important;
  padding: 9px 14px !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: #1e293b !important;
  text-decoration: none !important;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 13.5px;
  line-height: 1.45;
  font-weight: 500;
  transform: none !important;
  transition: color .13s ease, background .13s ease;
}

.flic-mega-product-link:hover,
.flic-mega-product-link:focus {
  background: #f1f5f9 !important;
  color: #1d4f91 !important;
}

.flic-mega-product-title {
  min-width: 0;
  overflow-wrap: anywhere;
}

.flic-mega-product-loading,
.flic-mega-product-empty,
.flic-mega-product-error {
  min-height: 120px;
  padding: 24px 18px;
  color: #64748b;
  font-size: 13.5px;
  line-height: 1.6;
}

.flic-mega-product-loading {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.flic-mega-product-loading::before {
  content: "";
  width: 14px;
  height: 14px;
  margin-top: 3px;
  border: 2px solid #d6dce4;
  border-top-color: #1d4f91;
  border-radius: 50%;
  animation: cflicMegaSpin .7s linear infinite;
}

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

.flic-mega-empty a {
  display: block;
  padding: 14px 18px;
  color: #1d4f91 !important;
  text-decoration: none !important;
  font-size: 14px;
  font-weight: 600;
}

/* Mobile panel fallback */
@media (max-width: 1080px) {
  .cflic-mobile-panel .flic-mega-all-products-link {
    min-height: 44px;
    display: flex !important;
    align-items: center;
    padding: 10px 24px !important;
    background: #f8fafc !important;
    color: #1d4f91 !important;
    font-size: 14.5px;
    font-weight: 700;
    border-bottom: 1px solid #e2e8f0 !important;
  }
}
