/* ==========================================================================
   OMONYMA — Header & Footer
   Header markup/classes below are 1:1 the original mockup's own
   .nav / .nav-logo / .nav-links / .nav-right — there is no parent theme
   to avoid colliding with any more, so there is no reason to keep the
   omh-/wd- prefix gymnastics the Woodmart version needed.
   ========================================================================== */

/* ================= NAV — fixed everywhere, hides on scroll down / reveals on scroll up =================
   position:fixed + a JS-driven .is-hidden/.is-scrolled class pair (see
   assets/js/header-scroll.js) is the single source of truth for the
   header's position and appearance — nothing else touches it. */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 2.2rem 3rem;
  background: transparent;
  transition: transform 0.4s var(--ease), background-color 0.35s var(--ease), color 0.35s var(--ease);
  color: var(--color-bg);
}
.nav.is-hidden { transform: translateY(-100%); }

/* Homepage: transparent over the hero, solid ink once scrolled past it */
body.home .nav.is-scrolled { background: var(--color-ink); }

/* Every other page: solid light header from the very start */
body:not(.home) .nav {
  position: fixed;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-line);
  color: var(--color-ink);
}

.nav-logo a { display: block; line-height: 0; }
.nav-logo svg { height: 15px; width: auto; display: block; color: inherit; }
/* Real uploaded logo (Customizer → Site Identity → Logo) renders as an
   <img>, not our fallback <svg> — same visual sizing either way, and it
   inherits the header's own scroll-based color logic automatically
   since it's just a raster image, not something we recolor. */
.nav-logo img {
  height: 32px;
  width: auto;
  max-width: 160px;
  display: block;
  object-fit: contain;
}
/* The bundled wordmark auto-swaps: ink by default (solid light header,
   or interior pages), white while transparent over the hero. A logo
   set manually via Customizer does NOT get this — it's a single fixed
   file, by design of WordPress's own Site Identity feature. */
/* The homepage header sits on a dark backdrop the whole time — a dark
   photo while transparent, solid ink once scrolled — so it always
   needs the white mark. Only pages OFF the homepage (permanently solid,
   light background) use the default ink version from header.php. */
body.home .nav-logo-mark {
  content: url("../img/omonyma-mark-white.svg");
}
@media (max-width: 900px) {
  .nav-logo img { height: 26px; }
}

.nav-links, .nav-right { display: flex; list-style: none; align-items: center; }
.nav-links { gap: 2.4rem; }
.nav-right { gap: 2rem; }
.nav-links a, .nav-right a {
  font-family: var(--font-ui);
  font-size: 0.72rem; letter-spacing: var(--tracking-label);
  text-transform: uppercase; text-decoration: none; font-weight: 500;
  position: relative; padding-bottom: 2px; color: inherit;
}
/* Animated underline — main menu links only, exactly as the original */
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 0%; height: 1px; background: currentColor;
  transition: width 0.35s var(--ease);
}
.nav-links a:hover::after { width: 100%; }

/* Shop dropdown (product categories) — WordPress's own default
   sub-menu markup from wp_nav_menu(), no custom Walker needed */
.nav-links li { position: relative; }
.nav-links .sub-menu {
  display: none; position: absolute; top: 100%; left: 0; margin-top: 1rem;
  background: var(--color-bg); color: var(--color-ink);
  padding: 1rem 1.4rem; min-width: 180px;
  box-shadow: 0 16px 40px rgba(20,19,17,0.12);
  list-style: none;
}
.nav-links .menu-item-has-children:hover .sub-menu { display: block; }
.nav-links .sub-menu li { padding: 0.4rem 0; }
.nav-links .sub-menu a { font-size: 0.8rem; letter-spacing: 0.02em; text-transform: none; font-weight: 400; }
.nav-links .sub-menu a::after { display: none; }

.nav-cart-count {
  display: inline-block; margin-left: 0.3em;
}

/* Search overlay — real get_search_form(), just a visibility toggle */
.omh-search-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(20,19,17,0.92);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
.omh-search-overlay.is-open { opacity: 1; pointer-events: auto; }
.omh-search-overlay .search-form { width: min(600px, 86vw); }
.omh-search-overlay input[type="search"] {
  width: 100%; background: transparent; border: none;
  border-bottom: 1px solid rgba(247,245,241,0.4);
  color: var(--color-bg); font-family: var(--font-display); font-size: 2rem;
  padding: 0.6rem 0;
}
.omh-search-overlay input[type="search"]:focus { outline: none; border-color: var(--color-bg); }
.omh-search-overlay input[type="submit"] { display: none; }
.omh-search-close {
  position: absolute; top: 2.2rem; right: 3rem;
  color: var(--color-bg); background: none; border: none;
  font-family: var(--font-ui); font-size: 0.72rem; letter-spacing: var(--tracking-label);
  text-transform: uppercase; cursor: pointer;
}
@media (max-width: 900px) {
  .omh-search-close { top: 1.4rem; right: 1.4rem; }
}

@media (max-width: 900px) {
  .nav { padding: 1.4rem 1.4rem; }
  .nav-links { display: none; }
}

/* ================= FOOTER ================= */
.omh-real-footer {
  background: var(--color-footer-bg);
  color: var(--color-bg);
  padding: 6rem 3rem 2rem;
}
.omh-real-footer .footer-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  padding-bottom: 5rem;
  border-bottom: 1px solid rgba(247, 245, 241, 0.12);
  max-width: 1600px;
  margin-inline: auto;
}
.omh-real-footer .footer-col h4 {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: rgba(247, 245, 241, 0.5);
  margin: 0 0 1.2rem;
  font-weight: 500;
}
.omh-real-footer .footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
}
.omh-real-footer .footer-col a {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  text-decoration: none;
  color: rgba(247, 245, 241, 0.9);
  transition: color 0.25s var(--ease);
}
.omh-real-footer .footer-col a:hover {
  color: var(--color-bg);
}
.omh-real-footer .footer-wordmark {
  padding: 3rem 0 1rem;
  max-width: 1600px;
  margin-inline: auto;
}
.omh-real-footer .footer-wordmark svg {
  width: 100%;
  height: auto;
  display: block;
  color: var(--color-bg);
}
.omh-real-footer .footer-bottom {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(247, 245, 241, 0.45);
  padding-top: 1.5rem;
  max-width: 1600px;
  margin-inline: auto;
}

@media (max-width: 768px) {
  .omh-real-footer { padding: 4rem 1.4rem 1.5rem; }
  .omh-real-footer .footer-cols { grid-template-columns: repeat(2, 1fr); gap: 2.5rem 1.5rem; }
  .omh-real-footer .footer-bottom { flex-direction: column; gap: 0.5rem; }
}
