:root {
  --ink: #14110e;
  --ink-soft: #3c342c;
  --paper: #f6f1e8;
  --paper-2: #efe6d6;
  --gold: #c4a265;
  --gold-deep: #9a7a3d;
  --line: rgba(20, 17, 14, 0.12);
  --white: #fffdf8;
  --max: 1180px;
  --yh-header-h: 96px;
  --yh-nav-fs: 1.2rem;
  --yh-nav-lh: 1.6;
}

.container {
  width: min(var(--max), calc(100% - 40px));
  margin-left: auto;
  margin-right: auto;
}

/* ——— Header ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246, 241, 232, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}

.site-header .header-bar,
.header-bar,
.site-header .container.header-bar,
.site-header .header-bar.is-layout-flex,
.site-header .header-bar.is-content-justification-space-between {
  display: flex;
  align-items: center;
  justify-content: center !important;
  gap: 44px;
  min-height: 96px;
  padding-top: 14px;
  padding-bottom: 14px;
  padding-left: 8px;
  padding-right: 8px;
  position: relative;
  width: calc(100% - 48px);
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}

.site-header .logo,
.site-header .logo.wp-block-group,
.site-header a.logo {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: nowrap;
  text-decoration: none;
  color: inherit;
}

.site-header .logo-mark,
.logo-mark,
.logo-mark.wp-block-paragraph {
  width: 48px;
  height: 48px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--gold);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  overflow: visible;
  padding: 0;
  box-sizing: border-box;
  flex: 0 0 48px;
  box-shadow: none;
  outline: 0;
}

.site-header .logo-mark img,
.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.site-header .logo-mark {
  display: flex !important;
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
}

.site-header .logo-word,
.logo-word {
  display: none !important;
}

.logo-text,
.logo-text.wp-block-group {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  gap: 0;
}

.logo-text .wp-block-site-title,
.logo-text .wp-block-site-title a {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  text-decoration: none;
}

.logo-text .wp-block-site-tagline {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0;
}

.header-login {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: transparent;
  flex: 0 0 42px;
  cursor: default;
}

.header-login svg {
  display: block;
}

.site-header .wp-block-navigation,
.site-header .site-nav {
  display: flex;
}

.site-header .site-nav .menu,
.site-header .wp-block-navigation__container {
  display: flex;
  align-items: center;
  gap: 38px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-header .site-nav a,
.site-header .wp-block-navigation-item__content,
.site-header .wp-block-navigation a {
  font-family: Manrope, "Segoe UI", sans-serif;
  font-size: var(--yh-nav-fs);
  line-height: var(--yh-nav-lh);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.site-header .site-nav a:hover,
.site-header .site-nav .current-menu-item > a,
.site-header .wp-block-navigation a:hover,
.site-header .current-menu-item .wp-block-navigation-item__content,
.site-header .current-menu-item a {
  color: var(--gold-deep);
}

.site-header .site-nav .menu-item-16 > a,
.site-header .site-nav a[href*="/contact/"] {
  color: var(--gold-deep);
}

.site-header .site-nav .menu-item-has-children {
  position: relative;
}

.site-header .site-nav .menu-item-has-children > a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.site-header .site-nav .menu-item-has-children > a::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  opacity: 0.5;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.site-header .site-nav .menu-item-has-children:hover > a::after,
.site-header .site-nav .menu-item-has-children:focus-within > a::after {
  opacity: 0.95;
  transform: translateY(-1px) rotate(45deg);
}

.site-header .site-nav .sub-menu {
  display: none;
  position: absolute;
  top: calc(var(--yh-header-h) / 2 + 50%);
  left: 0;
  min-width: 224px;
  margin: 0;
  padding: 8px 0;
  list-style: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(20, 17, 14, 0.12);
  z-index: 22;
}

.site-header .site-nav .menu-item-has-children:hover > .sub-menu,
.site-header .site-nav .menu-item-has-children:focus-within > .sub-menu {
  display: block;
}

/* 透明悬停桥：补上「菜单项底边 → 面板顶边」这段空隙（= 页头高一半 − 半个导航行盒），
   高度只比空隙多 3px，不会盖住 Products / About Us 文字的可点区域 */
.site-header .site-nav .sub-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: calc(var(--yh-header-h) / 2 - var(--yh-nav-fs) * var(--yh-nav-lh) / 2 + 3px);
}

.site-header .site-nav .sub-menu a {
  display: block;
  padding: 9px 18px;
  font-size: 1rem;
  white-space: nowrap;
}

.site-header .site-nav .sub-menu a:hover,
.site-header .site-nav .sub-menu .current-menu-item > a {
  background: rgba(20, 17, 14, 0.045);
  color: var(--gold-deep);
}

.header-actions,
.header-actions.wp-block-group {
  display: flex;
  align-items: center;
  gap: 12px;
  position: static;
  right: auto;
  top: auto;
  margin-left: 0;
  transform: none;
}

.header-login,
.site-header .header-login,
.site-header .wp-block-buttons {
  display: none;
}

.header-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  text-decoration: none;
  flex: 0 0 44px;
}

.header-icon svg {
  display: block;
  width: 24px;
  height: 24px;
}

.header-icon:hover {
  color: var(--gold-deep);
}

.site-header .wp-block-buttons {
  margin: 0;
}

.site-header .wp-block-button .wp-block-button__link,
.btn-gold,
.is-style-yh-gold .wp-block-button__link {
  background: var(--gold);
  color: var(--ink);
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  padding: 0.85rem 1.35rem;
  text-decoration: none;
  border: 0;
}

.site-header .wp-block-button .wp-block-button__link:hover,
.is-style-yh-gold .wp-block-button__link:hover {
  background: #d4b57a;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 10px;
  padding: 10px 9px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
}

/* ——— Main ——— */
.site-main {
  min-height: 48vh;
  padding: 0;
}

.site-main > .entry-content,
.site-main .wp-block-post-content,
.site-main .entry-content {
  max-width: none;
  margin: 0;
  padding: 0;
}

.site-main .entry-content > .wp-block-html,
.site-main .wp-block-html {
  margin: 0;
  max-width: none;
}

.site-main .entry-content:empty {
  min-height: 48vh;
}

/* ——— Footer ——— */
.site-footer,
.site-footer.wp-block-group {
  background: #16130f;
  color: #efe4cf;
  padding: 72px 0 28px;
}

.site-footer .wp-block-html {
  margin: 0;
  max-width: none;
}

.site-footer .footer-grid,
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.78fr) minmax(0, 0.82fr) minmax(0, 1.22fr);
  gap: 36px 40px;
  margin-bottom: 48px;
}

.site-footer .footer-brand__lockup {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 18px;
  color: inherit;
  text-decoration: none;
}

.site-footer .footer-brand__lockup img {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  object-fit: contain;
  display: block;
}

.site-footer .footer-brand__name {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.site-footer .footer-brand__word {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2.05rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 0.95;
  color: #fffdf8;
}

.site-footer .footer-brand__meta {
  font-family: Manrope, "Segoe UI", sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}

.site-footer .footer-brand__lockup:hover .footer-brand__word {
  color: var(--gold);
}

.site-footer .footer-blurb {
  margin: 0;
  max-width: 32ch;
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(239, 228, 207, 0.74);
}

.site-footer a {
  display: inline;
  color: #efe4cf;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--gold);
}

.site-footer h4,
.site-footer .wp-block-heading {
  color: #fffdf8;
  font-size: 1.12rem;
  font-family: Manrope, "Segoe UI", sans-serif;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 22px;
}

.site-footer .footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.site-footer .footer-links a {
  display: block;
  padding: 7px 0;
  color: rgba(239, 228, 207, 0.78);
  font-size: 0.98rem;
  line-height: 1.35;
}

.site-footer .footer-links a:hover {
  color: var(--gold);
}

.site-footer .footer-contact p {
  margin: 0 0 16px;
  color: rgba(239, 228, 207, 0.82);
  font-size: 0.98rem;
  line-height: 1.55;
}

.site-footer .footer-contact p:last-child {
  margin-bottom: 0;
}

.site-footer .footer-k {
  color: rgba(239, 228, 207, 0.55);
}

.site-footer .footer-contact a {
  color: #fffdf8;
}

.site-footer .footer-contact a:hover {
  color: var(--gold);
}

.site-footer p {
  margin: 0 0 0.6em;
}

.site-footer .logo-mark {
  background: transparent;
  color: var(--gold);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.site-footer .logo-text .wp-block-site-title,
.site-footer .logo-text .wp-block-site-title a,
.site-footer .logo-text .wp-block-site-tagline {
  color: #efe4cf;
}

.footer-blurb {
  color: rgba(239, 228, 207, 0.75);
  max-width: 32ch;
}

.site-footer .wp-block-navigation,
.site-footer .footer-nav {
  display: block;
}

.site-footer .footer-nav .menu,
.site-footer .wp-block-navigation__container {
  display: flex;
  flex-direction: column;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer .footer-nav a,
.site-footer .wp-block-navigation-item__content,
.site-footer .wp-block-navigation a {
  display: block;
  margin: 6px 0;
  color: #efe4cf;
  font-size: 0.95rem;
}

.footer-badge,
.footer-badge.wp-block-group {
  min-height: 88px;
  border-radius: 14px;
  border: 1px solid rgba(196, 162, 101, 0.28);
  background: rgba(255, 253, 248, 0.03);
  color: #efe4cf;
  display: grid;
  place-items: center;
  text-align: center;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  padding: 16px;
}

.footer-badge p {
  margin: 0;
  letter-spacing: 0.12em;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 253, 248, 0.08);
  padding-top: 18px;
  font-size: 0.82rem;
  color: rgba(239, 228, 207, 0.6);
  display: flex;
  justify-content: space-between;
  gap: 10px 24px;
  flex-wrap: wrap;
  align-items: baseline;
}

.footer-bottom p {
  margin: 0;
}

.footer-certs {
  letter-spacing: 0.06em;
  font-size: 0.75rem;
}

@media (max-width: 1100px) {
  .site-header .header-bar,
  .header-bar {
    justify-content: space-between;
    gap: 16px;
  }

  .header-actions,
  .header-actions.wp-block-group {
    position: static;
    right: auto;
    top: auto;
    transform: none;
    margin-left: 0;
  }

  .site-header .wp-block-navigation,
  .site-header .site-nav {
    display: none;
  }

  .site-header .wp-block-navigation.is-open,
  .site-header .site-nav.is-open {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    padding: 16px 24px 24px;
    border-bottom: 1px solid var(--line);
    z-index: 21;
  }

  .site-header .site-nav.is-open .menu,
  .site-header .wp-block-navigation.is-open .wp-block-navigation__container {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .site-header .site-nav.is-open .sub-menu {
    position: static;
    display: block;
    box-shadow: none;
    border: 0;
    padding: 6px 0 0 12px;
  }

  /* 折叠菜单里不需要悬停桥（参照物不同，会跑到别处去） */
  .site-header .site-nav.is-open .sub-menu::before { content: none; }

  .nav-toggle { display: block; }

}

@media (max-width: 980px) {
  .site-footer .footer-grid,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer .footer-brand,
  .site-footer .footer-contact {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .site-footer .footer-grid,
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .site-footer .footer-brand,
  .site-footer .footer-contact {
    grid-column: auto;
  }

  .site-footer .footer-brand__lockup img {
    width: 60px;
    height: 60px;
    flex-basis: 60px;
  }

  .site-footer .footer-brand__word {
    font-size: 1.75rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-header .wp-block-button .wp-block-button__link {
    padding: 0.65rem 0.9rem;
    font-size: 0.78rem;
  }
}

/* 桌面端：菜单相对容器水平居中（左侧 logo 与右侧图标宽度不等） */
@media (min-width: 1101px) {
  .site-header .header-bar,
  .site-header .container.header-bar,
  .site-header .header-bar.is-layout-flex,
  .site-header .header-bar.is-content-justification-space-between {
    justify-content: center !important;
  }

}

/* 够宽时才让两侧等宽（菜单精确居中）；窄一点就让 flex 自然收缩，避免顶到容器边 */
@media (min-width: 1200px) {
  .site-header .logo,
  .site-header a.logo {
    min-width: 100px;
  }

  .site-header .header-actions,
  .site-header .header-actions.wp-block-group {
    justify-content: flex-end;
    min-width: 100px;
  }
}

/* ——— 原生导航区块（2026-09-18）：页头导航换成 wp:navigation，
       这样在「外观 → 编辑」里可以直接可视化增删 / 拖动菜单项 ——— */
.site-header .site-nav .wp-block-navigation-item {
  position: relative;
}

.site-header .site-nav .wp-block-navigation-item__content[aria-current="page"],
.site-header .site-nav .wp-block-navigation-item--current > .wp-block-navigation-item__content {
  color: var(--gold-deep);
}

/* 子菜单面板：沿用原来 .sub-menu 的视觉 */
.site-header .site-nav .wp-block-navigation__submenu-container {
  display: none;
  position: absolute;
  top: calc(var(--yh-header-h) / 2 + 50%);
  left: 0;
  min-width: 224px;
  margin: 0;
  padding: 8px 0;
  list-style: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(20, 17, 14, 0.12);
  z-index: 22;
  flex-direction: column;
  gap: 0;
}

.site-header .site-nav .wp-block-navigation-item.has-child:hover > .wp-block-navigation__submenu-container,
.site-header .site-nav .wp-block-navigation-item.has-child:focus-within > .wp-block-navigation__submenu-container {
  display: block;
}

/* 透明悬停桥：和原 .sub-menu 同一套算法，鼠标穿过空隙时面板不会消失 */
.site-header .site-nav .wp-block-navigation__submenu-container::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: calc(var(--yh-header-h) / 2 - var(--yh-nav-fs) * var(--yh-nav-lh) / 2 + 3px);
}

.site-header .site-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
  display: block;
  padding: 9px 18px;
  font-size: 1rem;
  white-space: nowrap;
}

.site-header .site-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
  background: rgba(20, 17, 14, 0.045);
  color: var(--gold-deep);
}

/* 原生子菜单箭头按钮：压成和原 ::after 一样的小箭头 */
.site-header .site-nav .wp-block-navigation__submenu-icon {
  width: auto;
  height: auto;
  margin: 0 0 0 6px;
  padding: 0;
  border: 0;
  background: none;
  line-height: 1;
  opacity: 0.55;
  transition: opacity 0.18s ease;
}

.site-header .site-nav .wp-block-navigation__submenu-icon svg {
  display: block;
  width: 10px;
  height: 10px;
}

.site-header .site-nav .wp-block-navigation-item.has-child:hover > .wp-block-navigation__submenu-icon,
.site-header .site-nav .wp-block-navigation-item.has-child:focus-within > .wp-block-navigation__submenu-icon {
  opacity: 1;
}

/* 折叠菜单（≤1100px）里的原生子菜单：改成竖排内嵌 */
@media (max-width: 1100px) {
  .site-header .wp-block-navigation.is-open .wp-block-navigation__submenu-container {
    position: static;
    display: block;
    min-width: 0;
    padding: 6px 0 0 12px;
    border: 0;
    box-shadow: none;
  }

  .site-header .wp-block-navigation.is-open .wp-block-navigation__submenu-container::before {
    content: none;
  }

  .site-header .wp-block-navigation.is-open .wp-block-navigation__submenu-icon {
    display: none;
  }
}

/* 核心样式表里也有一份同名子菜单规则（特异性持平、且后加载），
   这里把选择器加到 4~5 个 class，确保沿用本主题的尺寸与内边距 */
.site-header .header-bar .site-nav .wp-block-navigation__submenu-container {
  min-width: 224px;
  padding: 8px 0;
  border-radius: 12px;
  background: var(--paper);
}

.site-header .header-bar .site-nav .wp-block-navigation__submenu-container > .wp-block-navigation-item > .wp-block-navigation-item__content {
  display: block;
  padding: 9px 18px;
  font-size: 1rem;
  font-family: Manrope, "Segoe UI", sans-serif;
  font-weight: 600;
  white-space: nowrap;
}

.site-header .header-bar .site-nav .wp-block-navigation-item.has-child > .wp-block-navigation-item__content {
  display: inline-flex;
  align-items: center;
}

.site-header .header-bar .site-nav .wp-block-navigation__submenu-icon {
  margin-left: 7px;
}

/* 核心把子菜单写死在 :hover / [aria-expanded] 规则里（5 个 class，min-width:200px）。
   这里用 6 个 class 的选择器盖回来，保持本主题原来的 224px 面板与内边距。 */
.site-header .header-bar .site-nav .wp-block-navigation-item.has-child .wp-block-navigation__submenu-container {
  min-width: 224px;
  padding: 8px 0;
}

.site-header .header-bar .site-nav .wp-block-navigation-item.has-child .wp-block-navigation__submenu-container > .wp-block-navigation-item > .wp-block-navigation-item__content {
  padding: 9px 18px;
  font-size: 1rem;
  font-weight: 600;
  font-family: Manrope, "Segoe UI", sans-serif;
  white-space: nowrap;
}

/* 重要修复：核心导航区块会把区块的 className（site-nav）复制到内层 <ul> 上，
   所以 ≤1100px 的隐藏规则必须只命中外层 <nav>，否则会把菜单列表一起藏掉 ——
   表现就是折叠菜单点开后是一条空白。 */
@media (max-width: 1100px) {
  .site-header nav.wp-block-navigation,
  .site-header nav.site-nav {
    display: none;
  }

  .site-header nav.wp-block-navigation.is-open,
  .site-header nav.site-nav.is-open {
    display: block;
  }

  .site-header nav.wp-block-navigation.is-open > .wp-block-navigation__container,
  .site-header nav.site-nav.is-open > .wp-block-navigation__container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .site-header nav.wp-block-navigation.is-open .wp-block-navigation-item {
    visibility: visible;
  }
}

@media (max-width: 1100px) {
/* 核心把子菜单收起状态写死为 height:0 / visibility:hidden / opacity:0 / overflow:hidden
   （.wp-block-navigation .has-child .wp-block-navigation__submenu-container，3 个 class）。
   桌面端靠它自己的 :hover 规则复原，折叠菜单里没有这条，所以必须在这里显式放开。 */
.site-header nav.wp-block-navigation.is-open .wp-block-navigation__submenu-container,
.site-header nav.site-nav.is-open .wp-block-navigation__submenu-container {
  display: block;
  position: static;
  height: auto;
  max-height: none;
  overflow: visible;
  visibility: visible;
  opacity: 1;
  min-width: 0;
  padding: 6px 0 0 12px;
  border: 0;
  box-shadow: none;
  background: transparent;
}
}

/* 折叠菜单里带子菜单的那一项要竖排：li 本身是 flex 行，否则子菜单会跑到标题右边 */
@media (max-width: 1100px) {
  .site-header nav.wp-block-navigation.is-open .wp-block-navigation-item.has-child,
  .site-header nav.site-nav.is-open .wp-block-navigation-item.has-child {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
}
