/* ============================================================
   Megatex Blanket — 导航（PSD方案二：无图片下拉）
   浅色导航 #f9f9f9 / 文字 #3c3426 / Get a Quote 深色胶囊
   ============================================================ */
.site-header { position: sticky; top: 0; z-index: 1000; }

.nav {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s, background .25s;
}
.nav.nav--scrolled { background: #fff; box-shadow: 0 2px 18px rgba(44,42,37,.08); }

.nav .inner {
  max-width: var(--container); margin: 0 auto; padding: 0 24px;
  height: 76px; display: flex; align-items: center; gap: 32px;
}

.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand img { height: 46px; width: auto; }

/* ---- 主菜单 ---- */
.menu { display: flex; align-items: center; gap: 4px; height: 100%; margin: 0 auto; }
.menu > li { position: relative; height: 100%; display: flex; align-items: center; }
.menu > li > a {
  padding: 8px 16px; font-size: 15px; font-weight: 500; color: var(--text);
  position: relative;
}
.menu > li > a::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 2px;
  height: 1px; background: var(--ink);
  transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.menu > li > a:hover::after,
.menu > li.active > a::after { transform: scaleX(1); }
.menu > li.active > a { color: var(--ink); font-weight: 600; }

/* ---- 下拉（方案二：纯文字） ---- */
.dropdown {
  position: absolute; top: 100%; left: 0; min-width: 220px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 8px 0; opacity: 0; visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
.menu > li:hover > .dropdown,
.menu > li:focus-within > .dropdown { opacity: 1; visibility: visible; transform: translateY(4px); }
.dropdown li a {
  display: block; padding: 10px 20px; font-size: 14px; color: var(--text);
  transition: background .15s, padding-left .2s;
}
.dropdown li a:hover { background: var(--bg); color: var(--ink); padding-left: 24px; }

/* ---- 右侧操作 ---- */
.nav-right { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.nav-search {
  width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--text); border-radius: 50%; transition: background .2s;
}
.nav-search:hover { background: var(--line); }
.nav-search svg { width: 20px; height: 20px; }
.nav-quote {
  padding: 10px 24px; border-radius: 999px; background: var(--ink); color: #fff;
  font-size: 14px; font-weight: 600; transition: background .2s;
}
.nav-quote:hover { background: var(--ink-2); color: #fff; }

/* ---- 汉堡按钮（移动端） ---- */
.nav-toggle { display: none; width: 40px; height: 40px; position: relative; }
.nav-toggle span {
  position: absolute; left: 9px; width: 22px; height: 2px; background: var(--ink);
  transition: transform .3s, opacity .3s, top .3s;
}
.nav-toggle span:nth-child(1) { top: 13px; }
.nav-toggle span:nth-child(2) { top: 19px; }
.nav-toggle span:nth-child(3) { top: 25px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

/* ============================================================
   搜索弹窗
   ============================================================ */
.search-modal, .quote-modal {
  position: fixed; inset: 0; z-index: 2000; display: none;
  align-items: center; justify-content: center;
}
.search-modal.open, .quote-modal.open { display: flex; }
.search-modal-overlay, .quote-modal-overlay {
  position: absolute; inset: 0; background: rgba(31, 29, 25, .55);
  backdrop-filter: blur(2px);
}
.search-modal-box {
  position: relative; width: min(620px, 92vw); background: var(--surface);
  border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow);
  animation: modalIn .25s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.search-close, .quote-close {
  position: absolute; top: 10px; right: 14px; font-size: 28px; line-height: 1;
  color: var(--muted);
}
.search-close:hover, .quote-close:hover { color: var(--ink); }
.search-form { display: flex; gap: 10px; }
.search-form input {
  flex: 1; padding: 14px 18px; border: 1.5px solid var(--line); border-radius: var(--radius);
  font: inherit; outline: none; transition: border-color .2s;
}
.search-form input:focus { border-color: var(--ink); }
.search-form button {
  padding: 0 28px; border-radius: var(--radius); background: var(--ink);
  color: #fff; font-weight: 600;
}

/* ============================================================
   询盘弹窗
   ============================================================ */
.quote-modal-box {
  position: relative; width: min(520px, 92vw); max-height: 88vh; overflow: auto;
  background: var(--surface); border-radius: var(--radius); padding: 40px;
  box-shadow: var(--shadow); animation: modalIn .25s ease;
}
.quote-modal-box h2 { font-size: 24px; margin-bottom: 8px; }
.quote-desc { font-size: 14px; color: var(--muted); margin-bottom: 24px; }
.quote-form { display: grid; gap: 14px; }
.quote-form input, .quote-form textarea {
  width: 100%; padding: 13px 16px; border: 1.5px solid var(--line);
  border-radius: var(--radius); font: inherit; outline: none; transition: border-color .2s;
}
.quote-form input:focus, .quote-form textarea:focus { border-color: var(--ink); }
.quote-form textarea { min-height: 96px; resize: vertical; }
.captcha-wrap { display: flex; gap: 10px; align-items: center; }
.captcha-wrap input { flex: 1; }
.captcha-wrap img { border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.captcha-wrap button { color: var(--muted); font-size: 20px; }
.quote-form > button[type="submit"] {
  padding: 14px; border-radius: var(--radius); background: var(--ink);
  color: #fff; font-weight: 600; font-size: 15px; transition: background .2s;
}
.quote-form > button[type="submit"]:hover { background: var(--ink-2); }

/* ============================================================
   移动端抽屉菜单
   ============================================================ */
.mobile-overlay {
  position: fixed; inset: 0; z-index: 1500; background: rgba(31, 29, 25, .5);
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.mobile-overlay.open { opacity: 1; visibility: visible; }
.mobile-menu {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 1600;
  width: min(340px, 86vw); background: var(--surface);
  transform: translateX(-100%); transition: transform .3s ease;
  display: flex; flex-direction: column; overflow-y: auto;
}
.mobile-menu.open { transform: none; }
.mobile-menu-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.mobile-menu-header img { height: 40px; }
.mobile-menu-close { font-size: 28px; line-height: 1; color: var(--muted); }
.mobile-nav { flex: 1; padding: 12px 0; }
.mobile-nav > li { border-bottom: 1px solid var(--line); }
.mobile-nav > li > a {
  display: block; padding: 15px 20px; font-size: 16px; font-weight: 500; color: var(--text);
}
.mobile-nav > li.active > a { color: var(--ink); font-weight: 700; }
.has-mobile-dropdown { position: relative; }
.mobile-dropdown-toggle {
  position: absolute; right: 8px; top: 8px; width: 40px; height: 40px;
  font-size: 22px; color: var(--muted); transition: transform .3s;
}
.mobile-dropdown-toggle[aria-expanded="true"] { transform: rotate(45deg); }
.mobile-dropdown { display: none; background: var(--bg); }
.mobile-dropdown.open { display: block; }
.mobile-dropdown li a {
  display: block; padding: 12px 20px 12px 34px; font-size: 14px; color: var(--muted);
}
.mobile-dropdown li a.active, .mobile-dropdown li a:hover { color: var(--ink); }
.mobile-menu-footer { padding: 20px; }
.mobile-menu-footer .nav-quote { display: block; text-align: center; }

/* ============================================================
   响应式断点
   ============================================================ */
@media (max-width: 992px) {
  .menu, .nav-right .nav-search { display: none; }
  .nav .inner { justify-content: space-between; }
  .nav-toggle { display: block; }
}
@media (min-width: 993px) {
  .mobile-menu, .mobile-overlay { display: none; }
}
