/* navbar.css — unified style for all pages
   Palette: clove (#A55E33), quicksilver (#9DA3A6),
            midnight sea (#2C3F4F), hidden meadow (#7A8061) */

html { overflow-y: scroll; }
html, body { margin: 0; }

:root{
  --clove:#A55E33;
  --quicksilver:#9DA3A6;
  --midnight:#2C3F4F;
  --meadow:#7A8061;
  --line: rgba(157,163,166,.30);
  --line-strong: rgba(157,163,166,.55);
}

.site-header {
  background: rgba(44,63,79,0.94);
  border-bottom: 3px solid var(--line);
  padding: 10px 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  backdrop-filter: blur(8px);

  /* ensure dropdowns always stay above hero sections */
  position: relative;
  z-index: 2000;
}

.nav-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.brand {
  font-size: 1.5rem;
  font-weight: bold;
  color: #fff;
  text-decoration: none;
}

#primary-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}
#primary-nav a {
  color: var(--quicksilver);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: color 0.25s ease;
}
#primary-nav a:hover { color: #ffffff; }

/* Dropdown menu */
.dropdown {
  position: relative;
  display: inline-block;
}
.dropbtn {
  background: transparent;
  color: var(--quicksilver);
  font: inherit;
  border: none;
  cursor: pointer;
  padding: 8px 14px;
  font-size: 1rem;
  font-weight: 500;
}
.dropbtn:hover {
  color: #ffffff;
}
.dropdown-content {
  display: none;
  position: absolute;
  background-color: #fff;
  min-width: 200px;
  box-shadow: 0px 4px 8px rgba(0,0,0,0.15);

  /* keep dropdown above page content */
  z-index: 2100;
}
.dropdown-content a {
  color: #333;
  padding: 10px 14px;
  display: block;
  text-decoration: none;
}
.dropdown-content a:hover {
  background-color: #f5f5f5;
}
.dropdown:hover .dropdown-content {
  display: block;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-primary {
  background: var(--clove);
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  border: 2px solid var(--meadow);
  font-weight: bold;
  transition: all 0.25s ease;
}
.btn-primary:hover {
  background: var(--meadow);
  border-color: var(--meadow);
  color: #fff;
}

.nav-actions .btn-login,
.nav-actions .btn-login:link,
.nav-actions .btn-login:visited {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 6px;
  border: 2px solid var(--line-strong);
  background: transparent;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  transition: all .2s ease;
}
.nav-actions .btn-login:hover,
.nav-actions .btn-login:focus {
  color: #fff;
  background: var(--clove);
  border-color: var(--clove);
  outline: none;
}

.cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 2px solid var(--line-strong);
  color: #fff; text-decoration: none;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
  background: transparent;
}
.cart-link:hover {
  border-color: var(--clove);
  background: rgba(165,94,51,0.15);
}
.cart-link .cart-icon { font-size: 18px; line-height: 1; }
.cart-link .cart-badge {
  position: absolute; top: -6px; right: -6px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 10px;
  background: var(--clove); color: #fff;
  font-size: 12px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.9);
}
.cart-badge.hidden { display: none; }
.cart-link.has-items {
  background: var(--clove);
  color: #fff;
  border-color: var(--clove);
}

.menu-toggle {
  display: none; width: 42px; height: 38px;
  border-radius: 10px; border: 2px solid var(--line-strong);
  background: transparent; cursor: pointer;
}
.menu-toggle .bar {
  display: block; width: 22px; height: 2px; background: #fff;
  margin: 5px auto; border-radius: 2px;
}

@media (max-width: 640px) {
  .menu-toggle { display: inline-block; }
  .nav-container { justify-content: space-between; }

  #primary-nav {
    position: absolute; left: 0; right: 0; top: calc(100% + 2px);
    background: rgba(44,63,79,0.98);
    border-bottom: 3px solid var(--line);
    display: none; flex-direction: column; padding: 10px 16px 12px; z-index: 1000; gap: 0;
  }
  #primary-nav.open { display: flex; }

  #primary-nav a, .dropbtn {
    margin: 6px 0; padding: 8px 2px; font-size: 1.05rem;
    color: var(--quicksilver);
  }
  .nav-actions { gap: 8px; }
}
