/* Hải Sản - Menu fix v2 (desktop). Load AFTER css/style.css.
   Chỉ tác động đến menu trang chủ, không thay đổi giá / dữ liệu sản phẩm. */
@media screen and (min-width: 769px) {
  /* Giữ thanh menu đỏ và danh mục khi cuộn trang */
  body > #menu,
  #menu {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1800 !important;
    background: #ed1c24;
    box-shadow: 0 5px 16px rgba(18, 28, 44, .12);
  }
  #menu .center { position: relative; }
  #menu .menu-l { z-index: 5; }
  #menu .menu-l-btn {
    min-height: 54px;
    padding: 0 12px 0 15px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    color: #2d3541;
  }
  #menu .menu-l-btn__title {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
  #menu .menu-r > ul > li > a {
    line-height: 54px;
  }
  /* Menu dài được cuộn riêng, không đè hết chiều cao màn hình */
  #menu .menu-l > ul.menu-l-list {
    max-height: calc(100vh - 62px) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    padding: 8px 8px 10px !important;
    scrollbar-width: thin;
    scrollbar-color: #e3a4a6 #f8f8f8;
    border-radius: 0 0 14px 14px;
    box-shadow: 0 16px 34px rgba(18, 28, 44, .14);
  }
  #menu .menu-l > ul.menu-l-list::-webkit-scrollbar { width: 5px; }
  #menu .menu-l > ul.menu-l-list::-webkit-scrollbar-thumb { background: #e3a4a6; border-radius: 5px; }
  #menu .menu-l > ul.menu-l-list::-webkit-scrollbar-track { background: #f8f8f8; }
  body.index #menu .menu-l > ul.menu-l-list {
    display: block;
    min-height: 0 !important;
  }
  #menu .menu-l-list > li.menu-l-item {
    margin: 0 0 5px;
    padding: 0;
    background: none;
    border: 0;
    list-style: none;
  }
  #menu .menu-l-list > li.menu-l-item:last-child { margin-bottom: 0; }
  #menu .menu-l-list > li.menu-l-item > a.menu-l-link {
    display: flex !important;
    width: 100%;
    min-height: 44px;
    gap: 8px;
    align-items: center;
    padding: 7px 8px;
    border-radius: 9px;
    border: 1px solid #eeeef0;
    background: #fff;
    color: #323742 !important;
    box-shadow: none;
    text-decoration: none;
    transform: none;
  }
  #menu .menu-l-list > li.menu-l-item > a.menu-l-link:hover,
  #menu .menu-l-list > li.menu-l-item > a.menu-l-link:focus-visible {
    color: #d71824 !important;
    background: #fff4f4;
    border-color: #f7c5c8;
  }
  #menu .menu-l-icon {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 7px;
  }
  #menu .menu-l-icon img { max-width: 19px; max-height: 19px; }
  #menu .menu-l-text {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-break: normal;
    overflow-wrap: break-word;
    line-height: 1.36;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13.2px;
    font-weight: 500;
  }
  #menu .menu-l-arrow {
    flex: 0 0 10px;
    font-size: 17px;
    color: #9da1a7;
    text-align: right;
  }
  /* Danh mục con mở bên trong khung cuộn: không bị scrollbar cắt mất */
  #menu .menu-l-list > li.menu-l-item > ul.menu-l-submenu {
    position: static !important;
    inset: auto !important;
    top: auto !important;
    left: auto !important;
    display: none;
    width: auto !important;
    margin: 5px 0 8px 30px !important;
    padding: 4px 0 3px 10px !important;
    border: none !important;
    border-left: 2px solid #eec7cb !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
  }
  #menu .menu-l-list > li.menu-l-item:hover > ul.menu-l-submenu,
  #menu .menu-l-list > li.menu-l-item:focus-within > ul.menu-l-submenu {
    display: block;
  }
  #menu .menu-l-submenu > li { margin: 0 0 4px !important; }
  #menu .menu-l-submenu > li > a {
    padding: 6px 8px !important;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12.8px;
    line-height: 1.4;
    white-space: normal;
    overflow-wrap: anywhere;
    background: #fbfbfc;
    border: 1px solid #f1f1f1;
  }
  /* Tránh che ô gợi ý tìm kiếm khi đang ở đầu trang */
  #banner { z-index: 1900; }
}
