/* ============================================================
   Ozone Phrae · Universal Navbar
   Used across: index.php, blog/, promo/, book/, order/
   Vanilla CSS — no framework dependency.
   ============================================================ */

:root {
  --nav-forest-50:  #f2f7f4;
  --nav-forest-100: #e1efe5;
  --nav-forest-200: #b7d8c0;
  --nav-forest-500: #3a7d44;
  --nav-forest-700: #2d5a27;
  --nav-forest-900: #1a3a18;
  --nav-earth-100:  #fdf8f5;
  --nav-text:       #374151;
  --nav-text-muted: #6b7280;
  --nav-h: 72px;
}

/* Push content below fixed nav. Applies always when this CSS is loaded
   (i.e. when navbar.php is included). JS adds .has-nav as a bonus for legacy. */
body { padding-top: var(--nav-h); }
body.has-nav { padding-top: var(--nav-h); }

.oz-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(253, 248, 245, 0.9);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--nav-forest-100);
  transition: box-shadow 0.25s ease;
}
.oz-nav.scrolled {
  background: rgba(253, 248, 245, 0.96);
  box-shadow: 0 4px 16px rgba(45,90,39,0.08);
}

.oz-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
@media (min-width: 768px) {
  .oz-nav-inner { padding: 0 32px; }
}

/* ── Brand ──────────────────────────────────────────── */
.oz-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
  color: var(--nav-forest-900);
  flex-shrink: 0;
  min-width: 0;
}
.oz-brand .oz-logo {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--nav-forest-500), var(--nav-forest-700));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(45,90,39,0.25);
}
.oz-brand .oz-name {
  font-family: 'Prompt', 'Kanit', 'Sarabun', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--nav-forest-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.oz-brand .oz-name .accent { color: var(--nav-forest-500); }
@media (max-width: 420px) {
  .oz-brand .oz-name { font-size: 1rem; }
}

/* ── Desktop menu ───────────────────────────────────── */
.oz-menu {
  display: none;
  align-items: center;
  gap: 6px;
}
@media (min-width: 1024px) {
  .oz-menu { display: flex; }
}

.oz-menu a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--nav-text);
  text-decoration: none;
  border-radius: 100px;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.oz-menu a:hover {
  color: var(--nav-forest-700);
  background: var(--nav-forest-50);
}
.oz-menu a.active {
  color: var(--nav-forest-700);
  background: var(--nav-forest-100);
  font-weight: 600;
}

/* Outline button variant */
.oz-menu a.btn-outline {
  border: 1.5px solid var(--nav-forest-200);
  color: var(--nav-forest-700);
  padding: 7px 14px;
  font-weight: 600;
}
.oz-menu a.btn-outline:hover {
  border-color: var(--nav-forest-500);
  background: var(--nav-forest-50);
  color: var(--nav-forest-900);
  transform: translateY(-1px);
}

/* Primary button (filled) */
.oz-menu a.btn-primary {
  background: var(--nav-forest-700);
  color: #fff;
  padding: 9px 20px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(45,90,39,0.18);
}
.oz-menu a.btn-primary:hover {
  background: var(--nav-forest-900);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(45,90,39,0.28);
}

/* ── Mobile toggle ──────────────────────────────────── */
.oz-burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 0;
  background: transparent;
  color: var(--nav-forest-700);
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.oz-burger:hover { background: var(--nav-forest-50); }
.oz-burger:active { transform: scale(0.94); }
@media (min-width: 1024px) {
  .oz-burger { display: none; }
}

/* ── Mobile panel ───────────────────────────────────── */
.oz-mobile {
  position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--nav-forest-100);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.25s ease;
  z-index: 99;
  pointer-events: none;
}
.oz-mobile.open {
  max-height: calc(100vh - var(--nav-h));
  opacity: 1;
  overflow-y: auto;
  pointer-events: auto;
}

.oz-mobile-inner {
  padding: 12px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.oz-mobile a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--nav-text);
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.15s ease;
}
.oz-mobile a:hover, .oz-mobile a:active {
  background: var(--nav-forest-50);
  color: var(--nav-forest-700);
}
.oz-mobile a.active {
  background: var(--nav-forest-100);
  color: var(--nav-forest-700);
  font-weight: 600;
}
/* Group buttons (primary actions) at the bottom in a 2-col grid */
.oz-mobile .oz-mobile-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--nav-forest-100);
}
.oz-mobile .oz-mobile-buttons a {
  justify-content: center;
  padding: 14px 12px;
  text-align: center;
  font-weight: 700;
}
.oz-mobile .oz-mobile-buttons a.btn-primary {
  background: var(--nav-forest-700);
  color: #fff;
  box-shadow: 0 4px 12px rgba(45,90,39,0.2);
}
.oz-mobile .oz-mobile-buttons a.btn-primary:active {
  background: var(--nav-forest-900);
}
.oz-mobile .oz-mobile-buttons a.btn-outline {
  border: 1.5px solid var(--nav-forest-200);
  color: var(--nav-forest-700);
  background: transparent;
}

/* If only 1 button in the bottom grid, full width */
.oz-mobile .oz-mobile-buttons.single { grid-template-columns: 1fr; }

/* Backdrop when mobile panel is open */
.oz-mobile-backdrop {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  background: rgba(0,0,0,0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 98;
}
.oz-mobile-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}
