/* ══════════════════════════════════════════
   HEADER & NAVIGATION
   ══════════════════════════════════════════ */

/* ─── Top Announcement Bar ──────────────── */
#announcement-bar {
  background: var(--em-dark);
  color: rgba(255,255,255,0.8);
  text-align: center;
  padding: 9px 20px;
  font-size: 12px;
  letter-spacing: 0.5px;
  position: relative;
}

#announcement-bar a {
  color: var(--gold);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

#announcement-bar .ann-close {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  line-height: 1;
}

/* ─── Main Header ───────────────────────── */
#site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

#site-header.scrolled {
  box-shadow: 0 2px 32px rgba(0,0,0,0.10);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0 24px;
  height: 72px;
  max-width: 1280px;
  margin: 0 auto;
}

/* ─── Logo ──────────────────────────────── */
.site-logo {
  flex-shrink: 0;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
}

.site-logo__main {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--em-dark);
  letter-spacing: -0.01em;
}

.site-logo__main em {
  color: var(--em);
  font-style: italic;
}

.site-logo__sub {
  font-size: 8px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--ink-ghost);
  font-weight: 500;
  margin-top: 2px;
}

/* ─── Main Nav ──────────────────────────── */
#main-nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-item { position: relative; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 14px;
  height: 40px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-mid);
  border-radius: var(--r-sm);
  transition: all var(--t);
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  background: var(--em-light);
  color: var(--em-dark);
}

.nav-link .caret {
  font-size: 10px;
  transition: transform var(--t);
}

.nav-item:hover .caret { transform: rotate(180deg); }

/* Dropdown */
.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--t);
  z-index: 200;
}

.nav-item:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown a {
  display: block;
  padding: 9px 14px;
  font-size: 13px;
  color: var(--ink-mid);
  border-radius: var(--r-sm);
  transition: all var(--t);
}

.dropdown a:hover {
  background: var(--em-light);
  color: var(--em-dark);
}

/* ─── Header Actions ────────────────────── */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header-actions > * {
  align-self: center;
}

.header-search input,
.header-search button {
  min-height: 40px;
}

.header-action-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-mid);
  position: relative;
  transition: all var(--t);
  text-decoration: none;
}

.header-action-btn:hover {
  background: var(--em-light);
  color: var(--em-dark);
}

.header-action-btn svg {
  width: 20px;
  height: 20px;
}

.cart-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-mid);
  position: relative;
  transition: all var(--t);
}

.cart-btn:hover {
  background: var(--em-light);
  color: var(--em-dark);
}

.cart-count {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 19px;
  height: 19px;
  background: var(--em);
  color: var(--white);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 2px solid var(--white);
  box-shadow: 0 2px 6px rgba(26,92,56,0.3);
}

.cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  background: var(--em);
  color: var(--white);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ─── Mobile Menu Toggle ─────────────────── */
#mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--r-sm);
  color: var(--ink);
  flex-direction: column;
  gap: 5px;
  padding: 9px;
}

#mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ─── Mobile Menu ───────────────────────── */
#mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 950;
  pointer-events: none;
}

#mobile-menu.open { pointer-events: all; }

#mobile-menu-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  opacity: 0;
  transition: opacity 0.3s ease;
}

#mobile-menu.open #mobile-menu-overlay { opacity: 1; }

#mobile-menu-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(380px, 92vw);
  height: 100vh;
  background: var(--white);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  display: flex;
  flex-direction: column;
}

#mobile-menu.open #mobile-menu-panel { transform: translateX(0); }

.mob-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.mob-menu-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  color: var(--ink-mid);
}

.mob-nav {
  padding: 16px;
  flex: 1;
}

.mob-nav > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  border-radius: var(--r-sm);
  transition: all var(--t);
  border-bottom: 1px solid var(--em-pale);
}

.mob-nav > a:hover {
  background: var(--em-light);
  color: var(--em-dark);
}

.mob-nav-shop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--em-pale);
}

.mob-nav-shop > a {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  border-radius: var(--r-sm);
  transition: all var(--t);
  flex: 1;
}

.mob-nav-shop > a:hover {
  background: var(--em-light);
  color: var(--em-dark);
}

.mob-dropdown-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-mid);
  margin-right: 4px;
  border-radius: var(--r-sm);
  transition: transform 0.3s ease;
}

.mob-dropdown-btn:hover {
  background: var(--em-light);
  color: var(--em-dark);
}

.mob-dropdown-btn.open {
  transform: rotate(180deg);
}

.mob-nav-cats {
  display: flex;
  flex-direction: column;
  padding: 0 0 0 16px;
  border-bottom: 1px solid var(--em-pale);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.3s ease;
}

.mob-nav-cats.open {
  max-height: 500px;
  opacity: 1;
  padding: 4px 0 8px 16px;
}

.mob-nav-cats a {
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-soft);
  border-radius: var(--r-sm);
  transition: all var(--t);
  display: block;
}

.mob-nav-cats a:hover {
  background: var(--em-light);
  color: var(--em-dark);
}

.mob-menu-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
}

.mob-social {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.mob-social a {
  width: 36px;
  height: 36px;
  background: var(--em-light);
  color: var(--em-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 15px;
  text-decoration: none;
  transition: all var(--t);
}

.mob-social a:hover {
  background: var(--em);
  color: var(--white);
}

/* ─── Responsive ────────────────────────── */
@media (max-width: 1024px) {
  #main-nav { display: none !important; }
  #mobile-menu-btn { display: flex !important; }
  #mobile-menu { display: block !important; }
  .header-inner form.header-search,
  .header-inner .header-search { display: none !important; }
  .header-actions { margin-left: auto !important; justify-content: flex-end !important; margin-right: 0 !important; }
  .header-inner { gap: 16px !important; }
}

@media (max-width: 768px) {
  #announcement-bar {
    font-size: 11px;
    padding: 8px 40px 8px 16px;
    text-align: left;
    line-height: 1.5;
  }
  #announcement-bar .ann-close { right: 8px; }
}

@media (max-width: 480px) {
  .header-inner { padding: 0 16px; height: 64px; }
  .site-logo__main { font-size: 1.7rem !important; }
  .site-logo__sub { font-size: 7px; letter-spacing: 3px; }
}
