/*
 * Dharahara Traders — Header styles
 * Built by: Shiva Sharan Shrestha
 * License: MIT (see ../LICENSE)
 */
/* Header Styles for Consistency Across All Pages */
.site-header {
  position: fixed;
  top: 28px; /* match new .topbar height */
  left: 0;
  right: 0;
  z-index: 1000;
  background: #fefcf7;
  box-shadow: 0 2px 10px rgba(139, 115, 85, 0.08);
  width: 100%;
  border-bottom: 1px solid #f5f1e8;
  min-height: 44px; /* reduce header height */
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}
.site-header a, .site-header a:visited, .site-header a:active {
  color: #8b7355 !important;
  text-decoration: none !important;
}
/* --- Topbar: Contact Info Fixed at Top --- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  background: #ecd9b0;
  color: #4a3728;
  font-size: 1rem;
  width: 100%;
  text-align: center;
  border-bottom: 1px solid #f5f1e8;
  min-height: 28px; /* reduce height */
}
.topbar .container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 2px 12px; /* less vertical padding */
  min-height: 28px;  /* match .topbar */
}
.top-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1rem;
}
.topbar a {
  color: #4a3728 !important;
  font-weight: 600;
  text-decoration: none !important;
  border-radius: 6px;
  padding: 2px 8px;
  transition: color 0.3s;
}
.topbar a:hover {
  background: #faf7f0;
  color: #b8860b !important;
}
.navwrap {
  background: #fefcf7;
  padding: 0.2rem 0; /* less space above/below logo/hamburger */
  width: 100%;
  box-shadow: 0 1px 8px rgba(139,115,85,0.04);
}
.navcontainer {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  gap: 0;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: #8b7355;
  padding: 4px 0; /* less vertical space */
}
.logo { flex: 0 1 auto; min-width: 0; }
.logo-img { flex: 0 0 auto; }
.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #8b7355;
  letter-spacing: 1px;
  display: inline-block;
  max-width: 220px; /* soft cap on wide screens */
  min-width: 0; /* allow shrinking in flex layouts */
  white-space: normal; /* allow wrapping */
  overflow-wrap: anywhere;
}
.logo-img {
  max-width: 36px !important;
  max-height: 36px !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(139,115,85,0.07);
  background: #faf7f0;
}
.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #8b7355;
  letter-spacing: 1px;
}
.hamburger {
  display: none;
  margin-left: auto;
  margin-right: 0;
  background: #ecd9b0;
  box-shadow: 0 2px 8px rgba(139,115,85,0.10);
  border: none;
  font-size: 2.2rem;
  color: #8b7355;
  cursor: pointer;
  border-radius: 8px;
  padding: 6px 16px;
  transition: background 0.2s, box-shadow 0.2s;
  z-index: 1100;
}
.hamburger-box {
  width: 36px;
  height: 24px;
  display: inline-block;
  position: relative;
}
.hamburger-inner {
  display: block;
  top: 50%;
  margin-top: -2px;
  width: 24px;
  height: 3px;
  background-color: #8b7355;
  border-radius: 2px;
  position: absolute;
  left: 6px;
  transition: transform 0.3s ease, background-color 0.2s ease;
}
.hamburger-inner::before,
.hamburger-inner::after {
  content: '';
  display: block;
  width: 24px;
  height: 3px;
  background-color: #8b7355;
  border-radius: 2px;
  position: absolute;
  left: 0;
  transition: transform 0.3s ease, opacity 0.2s ease;
}
.hamburger-inner::before { transform: translateY(-8px); }
.hamburger-inner::after { transform: translateY(8px); }
.hamburger.is-active .hamburger-inner {
  transform: rotate(45deg);
}
.hamburger.is-active .hamburger-inner::before {
  transform: rotate(-90deg) translateX(-8px);
  opacity: 0;
}
.hamburger.is-active .hamburger-inner::after {
  transform: rotate(-90deg) translateX(8px);
  opacity: 0;
}
.hamburger:focus {
  outline: 2px solid #3661b7;
}
.hamburger:hover {
  background: #faf7f0;
  box-shadow: 0 4px 16px rgba(139,115,85,0.18);
}
.mainnav {
  display: flex;
  align-items: center;
  margin-left: auto;
}
.mainnav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.mainnav .nav-link {
  font-size: 1.1rem;
  font-weight: 600;
  color: #8b7355;
  padding: 0.7rem 1.3rem;
  border-radius: 12px;
  background: #faf7f0;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 4px rgba(139,115,85,0.04);
}
.mainnav .nav-link:hover {
  background: #ecd9b0;
  color: #4a3728;
  box-shadow: 0 2px 8px rgba(139,115,85,0.10);
}
@media (max-width: 1024px) {
  .hamburger {
    display: block;
  }
  .site-header .hamburger {
    display: block;
    cursor: pointer;
    position: static;
    margin-left: 0;
    margin-right: 0;
  }
  .site-header nav {
    display: none;
  }
  .site-header.menu-open nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100px;
    left: 0;
    width: 100%;
    background: #fefcf7;
    box-shadow: 0 8px 30px rgba(139,115,85,0.10);
    z-index: 1000;
  padding-bottom: 1.5rem;
  }
  .navcontainer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
  gap: 0.5rem;
  min-width: 0;
  }
  .mainnav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    width: 100vw;
    background: #fefcf7;
    box-shadow: 0 8px 30px rgba(139,115,85,0.10);
    z-index: 1001;
    padding: 2rem 0 2rem 0;
    animation: slideDown 0.4s;
  }
  .site-header.menu-open .mainnav {
    display: flex;
  }
  .mainnav ul {
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    padding-left: 0;
    width: 100%;
  }
  .mainnav .nav-link {
    width: 90vw;
    text-align: center;
    font-size: 1.2rem;
    padding: 1rem 0;
    margin: 0 auto;
    border-radius: 16px;
    background: #faf7f0;
    box-shadow: 0 1px 8px rgba(139,115,85,0.08);
  }
  .topbar {
    min-height: 28px;
    font-size: 1rem;
  }
  .topbar .container {
    padding: 2px 12px;
    min-height: 28px;
  }
  .site-header {
    top: 28px;
    min-height: 44px;
  }
  .navwrap {
    padding: 0.5rem 0;
  }
  .logo-img {
    max-width: 36px !important;
    max-height: 36px !important;
    width: 36px !important;
    height: 36px !important;
  }
  .logo-text {
    font-size: 1.2rem;
  }
  .navcontainer {
    padding: 0 10px;
  }
  body {
    padding-top: 72px;
  }
}
@media (min-width: 1025px) {
  .hamburger {
    display: none !important;
  }
  .site-header .hamburger {
    display: none !important;
  }
  .site-header nav {
    display: flex !important;
    position: static;
    flex-direction: row;
    background: none;
    box-shadow: none;
  }
  .mainnav {
    display: flex !important;
    position: static;
    flex-direction: row;
    background: none;
    box-shadow: none;
    padding: 0;
  }
  .topbar {
    min-height: 44px;
    font-size: 1.15rem;
  }
  .topbar .container {
    padding: 12px 32px;
    min-height: 44px;
  }
  .site-header {
    top: 44px;
    min-height: 72px;
  }
  .navwrap {
    padding: 1.2rem 0;
  }
  .logo-img {
    max-width: 56px !important;
    max-height: 56px !important;
    width: 56px !important;
    height: 56px !important;
  }
  .logo-text {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 2px;
  }
  .navcontainer {
    padding: 0 40px;
  }
  .mainnav .nav-link {
    font-size: 1.2rem;
    padding: 1rem 2rem;
  }
  body {
    padding-top: 116px; /* .topbar (44px) + .site-header (72px) */
  }
}
@media (max-width: 900px) {
  .navcontainer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0 10px;
  }
  .logo-img {
  max-width: 36px !important;
  max-height: 36px !important;
  width: 36px !important;
  height: 36px !important;
  margin-bottom: 8px;
  }
  .logo-text {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  max-width: calc(100vw - 140px);
  white-space: normal;
  }
  .mainnav {
    margin-left: 0;
    justify-content: center;
  }
  .mainnav ul {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
    padding-left: 0;
  }
  .navwrap {
    padding: 0.5rem 0;
  }
}
@media (max-width: 600px) {
  .site-header {
    position: static;
    padding-top: 0;
    min-height: 36px;
    top: 0;
  }
  .topbar {
    min-height: 24px;
    font-size: 0.95rem;
  }
  .topbar .container {
    padding: 2px 6px;
    min-height: 24px;
  }
  /* mobile: make logo compact and allow wrapping so it doesn't get cut off */
  .logo-img { width: 28px !important; height: 28px !important; max-width: 28px !important; }
  .logo-text { font-size: 0.95rem; max-width: calc(100vw - 110px); }
  /* ensure navcontainer allows content to wrap instead of overflowing */
  .navcontainer { gap: 0.5rem; }
  /* on very small viewports, slightly reduce logo text to fit */
  @media (max-width: 380px) {
    .logo-text { font-size: 0.9rem; }
    .logo-img { width: 24px !important; height: 24px !important; }
  }
  .logo-img {
    max-width: 36px !important;
    max-height: 36px !important;
    width: 36px !important;
    height: 36px !important;
  }
  .logo-text {
    font-size: 1.7rem;
  }
  .navcontainer {
    padding: 0 4px;
  }
  body {
    padding-top: 60px;
  }
}

/* --- Prevent Content Overlap --- */
body {
  padding-top: 72px; /* .topbar (28px) + .site-header (44px) */
}

/* --- Animation for Mobile Nav --- */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px);}
  to { opacity: 1; transform: translateY(0);}
}
