/* Site-wide header & topbar — editorial chrome */

:root {
  --sc-paper: #FAF8F4;
  --sc-stone: #EDE8E0;
  --sc-ink: #121212;
  --sc-muted: #5E5C56;
  --sc-line: rgba(18, 18, 18, 0.09);
  --sc-line-strong: rgba(18, 18, 18, 0.14);
  --sc-red: #BC002D;
  --sc-red-d: #8B0020;
  --sc-red-soft: rgba(188, 0, 45, 0.08);
  --sc-gold: #C9982E;
  --sc-gold-light: #E8C56A;
  --sc-radius: 16px;
  --sc-font: 'Outfit', system-ui, sans-serif;
  --sc-serif: 'Fraunces', Georgia, serif;
  --sc-shadow: 0 12px 40px rgba(18, 18, 18, 0.08);
}

html {
  background: var(--sc-paper);
}

body {
  font-family: var(--sc-font);
  background: var(--sc-paper);
  color: var(--sc-ink);
  -webkit-font-smoothing: antialiased;
}

/* ── Utility topbar ─────────────────────────────────────────── */

.topbar {
  position: relative;
  margin: 0;
  background: var(--sc-ink);
  color: #9b9993;
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  padding: 0;
  border-bottom: none;
}

.topbar::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--sc-red) 0%, var(--sc-red-d) 45%, var(--sc-gold) 100%);
}

.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  min-height: 38px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.topbar-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.topbar-left > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #b8b6b0;
}

.topbar-left i {
  margin: 0;
  color: var(--sc-gold-light);
  font-size: 0.72rem;
  width: 14px;
  text-align: center;
}

.topbar-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e8e6e0;
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar-badge__flag {
  width: 18px;
  height: 12px;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.topbar-badge__flag::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 28% 38%, #BC002D 0 38%, transparent 39%);
}

.topbar a {
  color: #c8c6c0;
  transition: color 0.2s;
}

.topbar a:hover {
  color: var(--sc-gold-light);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-social {
  display: flex;
  align-items: center;
  gap: 4px;
}

.topbar-social a {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  color: #c8c6c0;
  transition: background 0.2s, color 0.2s;
}

.topbar-social a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.admin-panel-link {
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  padding: 5px 12px !important;
  border-radius: 999px !important;
  color: #e8e6e0 !important;
  font-size: 0.72rem !important;
  font-weight: 600;
}

.admin-panel-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff !important;
}

/* ── Main header ────────────────────────────────────────────── */

.header {
  background: rgba(250, 248, 244, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 var(--sc-line);
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: box-shadow 0.25s ease;
}

.header.header-scrolled {
  box-shadow: 0 8px 32px rgba(18, 18, 18, 0.08);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0;
  min-height: 84px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  min-width: 0;
}

.logo-img {
  height: 68px;
  width: auto;
  max-width: min(280px, 52vw);
  object-fit: contain;
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.logo-text strong {
  font-family: var(--sc-serif);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--sc-ink);
  line-height: 1.1;
  white-space: nowrap;
}

.logo-text span {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sc-muted);
}

.nav-center {
  display: flex;
  gap: 6px;
  align-items: center;
  flex: 1;
  justify-content: center;
  min-width: 0;
}

.nav-primary {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--sc-line);
}

.nav-primary > a {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #3a3a38;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

.nav-primary > a:hover,
.nav-primary > a.active {
  color: var(--sc-red);
  background: var(--sc-red-soft);
}

.nav-divider {
  width: 1px;
  height: 24px;
  background: var(--sc-line-strong);
  margin: 0 4px;
  flex-shrink: 0;
}

.nav-more-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #3a3a38;
  background: transparent;
  border: none;
  transition: color 0.2s, background 0.2s;
}

.nav-more-btn:hover,
.nav-more.open .nav-more-btn {
  color: var(--sc-red);
  background: var(--sc-red-soft);
}

.nav-more-btn i {
  font-size: 0.65rem;
  transition: transform 0.2s;
}

.nav-more.open .nav-more-btn i {
  transform: rotate(180deg);
}

.nav-more-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 240px;
  background: #fff;
  border: 1px solid var(--sc-line);
  border-radius: var(--sc-radius);
  box-shadow: var(--sc-shadow);
  padding: 10px;
  z-index: 1001;
}

.nav-more.open .nav-more-menu {
  display: block;
}

.nav-more-label {
  display: block;
  padding: 6px 12px 4px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sc-muted);
}

.nav-more-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--sc-ink);
}

.nav-more-menu a i {
  width: 16px;
  text-align: center;
  color: var(--sc-muted);
  font-size: 0.82rem;
}

.nav-more-menu a:hover,
.nav-more-menu a.active {
  color: var(--sc-red);
  background: var(--sc-red-soft);
}

.nav-more-menu a:hover i,
.nav-more-menu a.active i {
  color: var(--sc-red);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nav-search-bar {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--sc-line-strong);
  border-radius: 999px;
  padding: 7px 14px;
  gap: 8px;
  min-width: 0;
}

.nav-search-bar input {
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 0.82rem;
  width: 128px;
  color: var(--sc-ink);
  min-width: 0;
}

.nav-search-bar input::placeholder {
  color: #a8a6a0;
}

.nav-search-bar button {
  background: none;
  border: none;
  color: var(--sc-muted);
  font-size: 0.88rem;
  padding: 0;
  transition: color 0.2s;
}

.nav-search-bar button:hover {
  color: var(--sc-red);
}

.nav-account-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--sc-ink);
  border: 1px solid var(--sc-line-strong);
  background: #fff;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.nav-account-btn span {
  max-width: 88px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-account-btn:hover,
.nav-account-btn.active {
  color: var(--sc-red);
  border-color: rgba(188, 0, 45, 0.25);
  background: var(--sc-red-soft);
}

.nav-cta.btn-primary {
  background: var(--sc-red);
  border-radius: 999px;
  padding: 10px 20px !important;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.84rem !important;
  box-shadow: 0 8px 22px rgba(188, 0, 45, 0.22);
  white-space: nowrap;
}

.nav-cta.btn-primary:hover {
  background: var(--sc-red-d);
  transform: translateY(-1px);
}

@media (max-width: 1200px) {
  .logo-text { display: none; }
  .nav-search-bar input { width: 96px; }
}

@media (max-width: 1080px) {
  .topbar-hide-sm { display: none; }
  .nav-center,
  .nav-search-bar,
  .nav-account-btn,
  .nav-cta { display: none; }
  .navbar { min-height: 72px; padding: 8px 0; }
  .logo-img { height: 56px; max-width: min(220px, 58vw); }
}

@media (max-width: 768px) {
  .topbar { display: none; }
}
