/*!
 * css/site-nav.css — ALLUKRAFT luxury navbar for WoodenMax (js/site-nav.js).
 * Replaces every legacy `.navbar` style.  Load order: AFTER `styles.css`.
 */

/* Hide the legacy navbar instantly so we never see a flash of two nav-bars during boot. */
nav.navbar:not(.wm-navbar),
header.site-header { display: none !important; }

/* Top-level container — dark glass luxury feel */
.wm-navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background: rgba(6,10,15,0.85);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  box-shadow: 0 2px 12px rgba(10,14,23,0.12);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
body.wm-nav-open { overflow: hidden; }

.wm-navbar-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 1rem;
  min-height: 64px;
}

/* ---------- Logo ---------- */
.wm-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: #f8f8f6;
  flex: 0 0 auto;
}
.wm-logo img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 6px;
  filter: brightness(0) invert(1);
}
.wm-logo-text {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.18em;
  color: #f8f8f6;
}

/* ---------- Category carousel ---------- */
.wm-cats-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0 0.5rem;
}
.wm-cat-arrow {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  color: #d3d4d8;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.wm-cat-arrow:hover    { background: rgba(184,137,61,0.15); color: #d4b170; }
.wm-cat-arrow:disabled { opacity: 0.35; cursor: default; }

.wm-cats {
  flex: 1 1 auto;
  display: flex;
  gap: 0.3rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0.2rem 0.4rem;
  margin: 0 0.3rem;
  scroll-snap-type: x proximity;
}
.wm-cats::-webkit-scrollbar { display: none; }

.cat-item {
  flex: 0 0 auto;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  color: #d3d4d8;
  background: transparent;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  scroll-snap-align: center;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.cat-item:hover {
  background: rgba(184,137,61,0.12);
  color: #d4b170;
}
.cat-item.active {
  background: linear-gradient(135deg, #b8893d, #8a6321);
  color: #f8f8f6 !important;
  box-shadow: 0 2px 8px rgba(184,137,61,0.35);
}

/* ---------- Right-side utility links ---------- */
.wm-utility {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
}
.wm-utility .nav-link,
.wm-utility .nav-link-secondary {
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  color: #d3d4d8;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.wm-utility a:hover {
  background: rgba(255,255,255,0.06);
  color: #f8f8f6;
}

/* ---------- CTA ---------- */
.wm-cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.95rem;
  background: linear-gradient(135deg, #b8893d, #8a6321);
  color: #f8f8f6 !important;
  font-weight: 700;
  font-size: 0.86rem;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(184,137,61,0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.wm-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(184,137,61,0.5);
}

/* ---------- Burger ---------- */
.wm-burger {
  display: none;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #f8f8f6;
  flex: 0 0 auto;
}

/* ---------- Mobile menu ---------- */
.wm-mobile-menu {
  position: fixed;
  inset: 64px 0 0 0;
  background: rgba(6,10,15,0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 999;
  overflow-y: auto;
  padding: 1rem 1.25rem 6rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.wm-mobile-section { margin-bottom: 1.5rem; }
.wm-mobile-heading {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #8a6321;
  font-weight: 700;
  padding: 0.5rem 0.25rem;
  border-bottom: 1px solid rgba(184,137,61,0.15);
  margin-bottom: 0.5rem;
}
.wm-mobile-link {
  display: block;
  padding: 0.85rem 0.75rem;
  border-radius: 10px;
  color: #f8f8f6;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.wm-mobile-link:hover     { background: rgba(184,137,61,0.08); }
.wm-mobile-link.is-active {
  background: linear-gradient(135deg, #b8893d, #8a6321);
  color: #f8f8f6;
}
.wm-mobile-cta {
  display: block;
  text-align: center;
  margin-top: 1.25rem;
  background: linear-gradient(135deg, #b8893d, #8a6321);
  color: #f8f8f6 !important;
  padding: 1rem;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(184,137,61,0.35);
}
.wm-mobile-call {
  display: block;
  text-align: center;
  margin-top: 0.75rem;
  padding: 0.85rem;
  color: #d4b170;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid #b8893d;
  border-radius: 12px;
}

/* ---------- Reserve space so sticky nav doesn't cover hero ---------- */
.has-wm-navbar { padding-top: 0 !important; }

/* ============================================================
   Responsive
============================================================ */
@media (max-width: 1180px) {
  .wm-utility .nav-link-secondary[href*="reviews"] { display: none; }
}
@media (max-width: 1024px) {
  .wm-utility .nav-link-secondary[href*="blog"]    { display: none; }
  .wm-navbar-inner { padding: 0.5rem 0.75rem; gap: 0.5rem; }
  .wm-cats-wrap { margin: 0 0.25rem; }
}
@media (max-width: 900px) {
  .wm-utility,
  .wm-cta { display: none; }
  .wm-burger { display: flex; }
  .wm-navbar-inner { gap: 0.5rem; }
  .wm-cats-wrap   { flex: 1 1 auto; }
}
@media (max-width: 640px) {
  .wm-logo-text { display: none; }
  .wm-cat-arrow { width: 28px; height: 28px; }
  .cat-item     { padding: 0.4rem 0.7rem; font-size: 0.8rem; }
  .wm-navbar-inner { min-height: 60px; }
  .wm-mobile-menu { top: 60px; }
}

/* ============================================================
   Make sure old hero / page-header rules don't push the navbar
   off-screen on legacy pages.
============================================================ */
body > nav.navbar:not(.wm-navbar) ~ section.product-detail-hero { padding-top: 0 !important; }
body.has-wm-navbar > section.product-detail-hero,
body.has-wm-navbar > header.page-header,
body.has-wm-navbar > section[class*="hero"]:first-of-type {
  padding-top: 2.5rem;
}
