/* Shared navigation, footer and WordPress/WooCommerce shell.
 * Load after the original presentation and ux-content.css. */
:root {
  --khbio-green: #324b3d;
  --khbio-brown: #30251f;
  --khbio-paper: #f8f6f1;
  --khbio-ink: #302c26;
  --khbio-muted: #615f56;
  --khbio-line: #d9d5cb;
  --khbio-soft: #e9ede5;
  --khbio-container-width: 1320px;
  --khbio-gutter: clamp(20px, 4vw, 56px);
  --khbio-space: clamp(16px, 3vw, 32px);
}

.site-page :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--khbio-green);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--khbio-paper);
}

.khbio-skip-link {
  position: fixed;
  z-index: 100000;
  top: 10px;
  left: 12px;
  max-width: calc(100% - 24px);
  padding: 12px 18px;
  background: var(--khbio-green);
  color: #fff;
  font-weight: 600;
  transform: translateY(calc(-100% - 20px));
}

.khbio-skip-link:focus { transform: none; }

.khbio-container {
  width: 100%;
  max-width: var(--khbio-container-width);
  margin-inline: auto;
  padding-inline: var(--khbio-gutter);
  min-width: 0;
}

.khbio-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.khbio-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  max-width: 100%;
  padding: 11px 20px;
  border: 1px solid var(--khbio-green);
  border-radius: 2px;
  background: var(--khbio-green);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}

.khbio-button:hover {
  border-color: #253b2e;
  background: #253b2e;
  color: #fff;
}

.khbio-button--secondary {
  border-color: var(--khbio-green);
  background: transparent;
  color: var(--khbio-green);
}

.khbio-button--secondary:hover {
  border-color: var(--khbio-green);
  background: var(--khbio-soft);
  color: var(--khbio-green);
}

/* These selectors intentionally replace the original unscoped header/nav rules. */
header.khbio-site-header {
  position: relative;
  z-index: 50;
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  padding: 0;
  border-bottom: 1px solid var(--khbio-line);
  background: var(--khbio-paper);
  color: var(--khbio-ink);
}

.khbio-header-inner {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.5vw, 40px);
  width: 100%;
  max-width: 1520px;
  min-height: 88px;
  margin-inline: auto;
  padding: 14px var(--khbio-gutter);
}

.khbio-brand,
.khbio-footer-brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 12px;
  color: var(--khbio-brown);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -.035em;
  white-space: nowrap;
  text-decoration: none;
}

.khbio-brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 44px;
}

.khbio-brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.5);
}

.khbio-navigation {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-width: 0;
}

.khbio-site-header [hidden] { display: none !important; }

.khbio-site-header .khbio-primary-nav {
  display: block;
  min-width: 0;
  margin: 0;
  padding: 0;
  font-size: 14px;
}

.khbio-nav-list {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: clamp(6px, 1vw, 16px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.khbio-nav-list > li { min-width: 0; margin: 0; padding: 0; }

.khbio-site-header .khbio-nav-link,
.khbio-site-header .khbio-nav-disclosure {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  margin: 0;
  padding: 8px 4px;
  border: 0;
  background: transparent;
  color: var(--khbio-ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.6;
  white-space: nowrap;
  list-style: none;
  cursor: pointer;
}

.khbio-site-header .khbio-nav-link:hover,
.khbio-site-header .khbio-nav-disclosure:hover { color: var(--khbio-green); }

.khbio-nav-disclosure::-webkit-details-marker { display: none; }
.khbio-nav-disclosure::after { display: none; content: none; }
.khbio-nav-disclosure svg { width: 12px; height: 12px; flex: 0 0 auto; }
.khbio-nav-group[open] > .khbio-nav-disclosure svg { transform: rotate(180deg); }

.khbio-nav-group {
  position: relative;
  margin: 0;
  padding: 0;
  border: 0;
}

.khbio-nav-group.is-current > .khbio-nav-disclosure,
.khbio-site-header .khbio-nav-link[aria-current="page"] {
  color: var(--khbio-green);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.khbio-submenu {
  position: absolute;
  z-index: 2;
  top: calc(100% + 10px);
  left: -12px;
  width: 214px;
  max-width: calc(100vw - 40px);
  margin: 0;
  padding: 8px;
  border: 1px solid var(--khbio-line);
  background: var(--khbio-paper);
  box-shadow: 0 12px 28px #30251f17;
  list-style: none;
}

.khbio-submenu > li { margin: 0; padding: 0; }

.khbio-site-header .khbio-submenu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  color: var(--khbio-ink);
  font-size: 14px;
  line-height: 1.6;
  white-space: normal;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.khbio-site-header .khbio-submenu a:hover,
.khbio-site-header .khbio-submenu a:focus-visible,
.khbio-site-header .khbio-submenu a[aria-current="page"] {
  background: var(--khbio-soft);
  color: var(--khbio-green);
}

.khbio-site-header .khbio-submenu a[aria-current="page"] { font-weight: 700; }

/* Keep the complete golf-edition product name readable in narrow menus. */
.khbio-site-header .khbio-submenu a[href="/power-your-shot"] {
  word-break: keep-all;
  overflow-wrap: normal;
  text-wrap: balance;
}
.khbio-submenu .khbio-submenu-overview { border-bottom: 1px solid var(--khbio-line); }

.khbio-header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.khbio-header-cta { padding: 9px 16px; white-space: nowrap; }

.khbio-cart-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px;
  color: var(--khbio-ink);
  font-size: 13px;
  white-space: nowrap;
}

.khbio-cart-link:hover { color: var(--khbio-green); }
.khbio-cart-link[aria-current="page"] { font-weight: 700; text-decoration: underline; }
.khbio-cart-link svg { width: 20px; height: 20px; flex: 0 0 auto; }
.khbio-menu-toggle { display: none; }

/* A disclosure panel in document flow: no modal overlay or keyboard trap. */
@media (max-width: 1080px) {
  .khbio-header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0 12px;
    min-height: 76px;
    padding-block: 12px;
  }

  .khbio-brand { width: fit-content; max-width: 100%; font-size: 17px; gap: 10px; }
  .khbio-brand-mark { width: 36px; height: 40px; }

  .khbio-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 72px;
    min-height: 44px;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid #b9beb3;
    border-radius: 2px;
    background: transparent;
    color: var(--khbio-green);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    cursor: pointer;
  }

  .khbio-menu-toggle svg { width: 18px; height: 18px; }
  .khbio-menu-toggle .khbio-menu-close { display: none; }
  .khbio-menu-toggle[aria-expanded="true"] .khbio-menu-open { display: none; }
  .khbio-menu-toggle[aria-expanded="true"] .khbio-menu-close { display: block; }

  .khbio-navigation {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    width: 100%;
    margin-top: 14px;
    padding: 8px 0 14px;
    border-top: 1px solid var(--khbio-line);
  }

  .khbio-nav-list { display: block; }
  .khbio-nav-list > li + li { border-top: 1px solid #e5e1d8; }
  .khbio-site-header .khbio-nav-link,
  .khbio-site-header .khbio-nav-disclosure {
    justify-content: space-between;
    width: 100%;
    min-height: 48px;
    padding: 11px 4px;
    font-size: 15px;
  }

  .khbio-submenu {
    position: static;
    width: 100%;
    max-width: none;
    margin: 0 0 12px;
    padding: 4px;
    border: 0;
    border-left: 2px solid #b1bdab;
    background: #eeefe8;
    box-shadow: none;
  }

  .khbio-site-header .khbio-submenu a { padding: 10px 14px; }
  .khbio-header-actions { justify-content: flex-start; gap: 16px; }
  .khbio-header-cta { min-width: 140px; }
}

@media (max-width: 360px) {
  .khbio-header-inner { padding-inline: 16px; gap: 0 8px; }
  .khbio-brand { font-size: 15px; gap: 7px; }
  .khbio-brand-mark { width: 32px; height: 36px; }
  .khbio-menu-toggle { min-width: 68px; padding-inline: 8px; }
}

footer.khbio-site-footer {
  display: block;
  width: 100%;
  margin: 0;
  padding: 40px 0 36px;
  border-top: 1px solid var(--khbio-line);
  background: #fff;
  color: var(--khbio-brown);
  text-align: left;
}

.khbio-footer-inner { max-width: 1440px; margin-inline: auto; padding-inline: var(--khbio-gutter); }
.khbio-footer-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.khbio-footer-brand { font-size: 16px; }
.khbio-footer-brand .khbio-brand-mark { width: 36px; height: 40px; }

.khbio-site-footer .khbio-footer-nav { display: block; padding: 0; margin: 0; font-size: 14px; }
.khbio-footer-nav ul { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 0; padding: 0; list-style: none; }
.khbio-footer-nav li { margin: 0; padding: 0; }
.khbio-site-footer .khbio-footer-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 0; color: var(--khbio-green); font-size: 14px; white-space: normal; }
.khbio-footer-nav a:hover,
.khbio-footer-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; }
.khbio-footer-nav a[aria-current="page"] { font-weight: 700; }

.khbio-footer-business {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 28px;
  margin: 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--khbio-line);
  color: var(--khbio-muted);
  font-size: 13px;
  line-height: 1.8;
}

.khbio-footer-business > div { display: flex; flex-wrap: wrap; gap: 0 8px; min-width: 0; }
.khbio-footer-business dt { flex: 0 0 auto; font-weight: 500; color: var(--khbio-ink); }
.khbio-footer-business dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.khbio-footer-business .khbio-business-address { flex-basis: 100%; }
.khbio-footer-phone a { display: inline-block; padding-block: 9px; margin-block: -9px; color: var(--khbio-green); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 760px) {
  footer.khbio-site-footer { padding-block: 28px; }
  .khbio-footer-top { align-items: flex-start; flex-direction: column; gap: 14px; margin-bottom: 16px; }
  .khbio-footer-nav ul { gap: 0 18px; }
  .khbio-footer-business { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; padding-top: 20px; }
  .khbio-footer-business > div { display: block; }
  .khbio-footer-business dt,
  .khbio-footer-business dd { display: inline; }
  .khbio-footer-business dt { margin-right: 8px; }
}

/* Scope ordinary WordPress and Woo pages without replacing plugin layouts. */
main.khbio-standard-main {
  width: 100%;
  max-width: var(--khbio-container-width);
  min-width: 0;
  margin-inline: auto;
  padding: clamp(32px, 5vw, 64px) var(--khbio-gutter);
  color: var(--khbio-ink);
  overflow-wrap: break-word;
}

.khbio-standard-main :where(h1, .entry-title) { font-size: clamp(28px, 3.5vw, 42px); line-height: 1.5; }
.khbio-standard-main :where(img, video, iframe) { max-width: 100%; }
.khbio-standard-main :where(.woocommerce, .wc-block-cart, .wc-block-checkout, .wp-block-woocommerce-cart, .wp-block-woocommerce-checkout) { min-width: 0; max-width: 100%; }
.khbio-standard-main :where(.wp-block-table) { max-width: 100%; overflow-x: auto; }
.khbio-standard-main :where(.woocommerce-MyAccount-navigation) { display: block; font-size: inherit; }
.khbio-standard-main :where(.woocommerce-MyAccount-navigation a) { display: block; min-height: 44px; padding-block: 10px; white-space: normal; }
.khbio-standard-main :where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]), select) { min-height: 44px; max-width: 100%; font-size: 16px; }
.khbio-standard-main :where(textarea) { max-width: 100%; font-size: 16px; }
.khbio-standard-main :where(.woocommerce-error, .woocommerce-message, .woocommerce-info) { overflow-wrap: anywhere; }
.khbio-standard-main :where(.khbio-actions) { margin-top: 24px; }
.khbio-standard-main .page-location {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px 10px;
  margin: 0 0 24px;
  padding: 0;
  color: var(--khbio-muted);
  font-size: 13px;
}

.khbio-commerce-notice {
  margin: 24px 0 32px;
  padding: 20px 24px;
  border-left: 3px solid var(--khbio-green);
  background: #edf0e8;
  color: var(--khbio-ink);
  font-size: 15px;
  line-height: 1.8;
}

.khbio-commerce-notice p { margin: 0; }
.khbio-commerce-notice p + p { margin-top: 8px; }
.khbio-commerce-notice a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-block: 4px;
  color: var(--khbio-green);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 400px) {
  .khbio-commerce-notice { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .khbio-button { transition: none; }
}

@media (forced-colors: active) {
  .site-page :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 2px solid CanvasText; box-shadow: none; }
  .khbio-button,
  .khbio-menu-toggle { border: 1px solid ButtonText; }
}

/* Keep mobile copy legible across the full opening photograph. */
@media (max-width:760px) {
  .home-page .hero.hero-split:not(.is-product-slide)::before {
    background-image:linear-gradient(90deg,rgba(248,246,241,.97) 0%,rgba(248,246,241,.93) 75%,rgba(248,246,241,.60) 100%),url('optimized/hero-ingredients-1600.webp');
  }
  .home-page .hero.hero-split:not(.is-product-slide) .hero-info .hero-description {color:#332318;transform:none}
}
.home-page .hero.hero-split .khbio-hero-cta:focus-visible {outline:3px solid #254432;outline-offset:4px}

/* Shared full-width supplementary frames avoid a half-empty row on phones. */
@media (max-width:650px) {
  .khbio-product-detail :is(.agarwood-visual-stack,.golf-visual-stack,.cheongmyeong-visuals) {grid-template-columns:minmax(0,1fr);grid-template-rows:auto;}
  .khbio-product-detail :is(.agarwood-banner,.golf-detail-photo,.cheongmyeong-morning-photo) {grid-column:1 / -1;width:100%;height:auto;aspect-ratio:16/9;}
}
