/*
Theme Name: Âu Lạc Corp - B2B Industrial
Theme URI: https://aulac.vn
Author: True Brand
Author URI: https://truebrand.com.vn
Description: Theme WordPress chuẩn B2B dành cho Công ty Cổ phần Âu Lạc - Chuyên sản xuất thiết bị trường học, bàn ghế chống gù thông minh và cơ khí tiền chế. Tối ưu UX/UI chuyển đổi cao, tốc độ tải nhanh, tương thích di động hoàn hảo.
Version: 1.0.0
Tested up to: 6.7
Requires at least: 5.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: aulac-theme
*/

@layer base {
  html, body {
    margin: 0;
    padding: 0;
  }
  body {
    overscroll-behavior: none;
  }
  main > :first-child {
    margin-top: 0 !important;
  }
  main > :last-child {
    margin-bottom: 0 !important;
  }
}

/* Material Symbols Outlined font display */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar customization */
::-webkit-scrollbar {
  display: none;
}

/* ==========================================================================
   LOGO STYLES
   ========================================================================== */
.custom-logo-link {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  max-height: 48px;
}

.custom-logo {
  height: 40px;
  max-height: 44px;
  width: auto;
  max-width: 260px;
  object-fit: contain;
  display: block;
}

@media (max-width: 640px) {
  .custom-logo {
    height: 32px;
    max-height: 36px;
    max-width: 200px;
  }
}

/* ==========================================================================
   NAVIGATION & SUBMENU STYLES
   ========================================================================== */
.menu-item-has-children {
  position: relative;
}

@media (min-width: 1280px) {
  /* Submenu Container */
  .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 270px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(23, 54, 93, 0.14), 0 2px 6px rgba(23, 54, 93, 0.06);
    border: 1px solid rgba(226, 232, 240, 0.85);
    padding: 8px;
    margin: 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    z-index: 100;
  }

  /* Hover Bridge: Prevents dropdown closing when hovering gap */
  .sub-menu::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
    background: transparent;
  }

  /* Reveal on Hover or Focus */
  .menu-item-has-children:hover > .sub-menu,
  .menu-item-has-children:focus-within > .sub-menu,
  .group:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  .sub-menu li {
    list-style: none;
    margin: 2px 0;
  }

  .sub-menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    font-size: 13.5px;
    font-weight: 500;
    color: #334155;
    border-radius: 8px;
    transition: all 0.15s ease;
    text-decoration: none;
  }

  .sub-menu a:hover {
    background-color: #f8fafc;
    color: #17365d;
    font-weight: 600;
  }
}
