/* Zari header — ivory bar, nav left, script logo center, text utilities right. */

.zr-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--transition-base);
}
.zr-header.is-stuck { box-shadow: var(--shadow-md); }

.zr-header__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 24px 80px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  position: relative;
}

/* ── Nav (left) ──────────────────────────────────────────────────────── */
.zr-header__nav {
  display: flex;
  align-items: center;
  gap: 32px;
  justify-self: start;
}
.zr-header__nav-item { position: relative; }
.zr-header__nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: inherit;
  white-space: nowrap;
  padding: 4px 0;
}
.zr-header__nav-link:hover,
.zr-header__nav-link.is-current { color: var(--color-accent); }
.zr-header__nav-caret { opacity: 0.6; }

.zr-header__dropdown {
  position: absolute;
  top: 100%;
  left: -16px;
  min-width: 200px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xs);
  box-shadow: var(--shadow-lg);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
  z-index: 50;
}
.zr-header__nav-item.has-dropdown:hover .zr-header__dropdown,
.zr-header__nav-item.has-dropdown:focus-within .zr-header__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.zr-header__dropdown-link {
  display: block;
  padding: 9px 18px;
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--color-text-muted);
}
.zr-header__dropdown-link:hover { color: var(--color-accent); background: var(--color-bg); }

/* ── Logo (center) ───────────────────────────────────────────────────── */
.zr-header__logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-self: center;
  text-align: center;
  line-height: 1;
}
.zr-header__wordmark {
  font-family: var(--font-script);
  font-size: 32px;
  letter-spacing: -1px;
  color: var(--color-text);
}
.zr-header__tagline {
  margin-top: 2px;
  font-family: var(--font-body);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-accent);
}

/* ── Utilities (right) ───────────────────────────────────────────────── */
.zr-header__actions {
  display: flex;
  align-items: center;
  gap: 24px;
  justify-self: end;
}
.zr-header__util {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: inherit;
  white-space: nowrap;
}
.zr-header__util:hover { color: var(--color-accent); }

.zr-header__cart {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.zr-header__cart-label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text);
}
.zr-header__cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  padding: 2px 6px;
  background: var(--color-primary);
  color: var(--color-primary-text);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

/* Mobile-only search icon hidden on desktop */
.zr-header__icon { display: none; color: var(--color-text); }

/* ── Burger (mobile only) ────────────────────────────────────────────── */
.zr-header__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  padding: 6px;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.zr-header__burger span {
  display: block;
  height: 1.5px;
  width: 20px;
  background: var(--color-text);
  transition: transform var(--transition-fast);
}

/* ── Mobile drawer ───────────────────────────────────────────────────── */
.zr-drawer { position: fixed; inset: 0; z-index: 120; }
.zr-drawer__backdrop {
  position: absolute; inset: 0;
  background: rgba(18, 18, 18, 0.45);
  opacity: 0;
  transition: opacity 240ms ease;
}
.zr-drawer__panel {
  position: absolute; top: 0; left: 0; bottom: 0;
  width: 320px; max-width: 86vw;
  background: var(--color-bg);
  transform: translateX(-100%);
  transition: transform 240ms cubic-bezier(0.2, 0.7, 0.2, 1);
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.zr-drawer.is-open .zr-drawer__backdrop { opacity: 1; }
.zr-drawer.is-open .zr-drawer__panel   { transform: translateX(0); }

.zr-drawer__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--color-border);
}
.zr-drawer__title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--color-text);
}
.zr-drawer__close {
  width: 32px; height: 32px;
  background: transparent; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--color-text);
}
.zr-drawer__nav { display: flex; flex-direction: column; padding: 12px 0; }
.zr-drawer__link {
  padding: 13px 20px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text);
}
.zr-drawer__link:hover { color: var(--color-accent); }
.zr-drawer__sublist { display: flex; flex-direction: column; padding-bottom: 6px; }
.zr-drawer__sublink {
  padding: 9px 20px 9px 36px;
  font-size: 13px;
  color: var(--color-text-muted);
}
.zr-drawer__sublink:hover { color: var(--color-accent); }
.zr-drawer__actions {
  margin-top: auto;
  border-top: 1px solid var(--color-border);
  display: flex; flex-direction: column;
  padding: 12px 0 24px;
}
.zr-drawer__action {
  padding: 11px 20px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.zr-drawer__action:hover { color: var(--color-accent); }

/* ── Breakpoints ─────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .zr-header__inner { padding: 20px 32px; }
  .zr-header__nav { gap: 20px; }
}
@media (max-width: 860px) {
  .zr-header__inner {
    grid-template-columns: auto 1fr auto;
    padding: 10px 16px;
  }
  .zr-header__nav { display: none; }
  .zr-header__burger { display: flex; }
  .zr-header__util, .zr-header__cart-label { display: none; }
  .zr-header__icon { display: inline-flex; }
  .zr-header__wordmark { font-size: 26px; }
  .zr-header__tagline { display: none; }
  .zr-header__cart {
    position: relative;
    width: 36px; height: 36px;
    align-items: center; justify-content: center;
  }
  .zr-header__cart::before {
    content: '';
    width: 19px; height: 19px;
    background-color: currentColor;
    color: var(--color-text);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z'/%3E%3Cline x1='3' y1='6' x2='21' y2='6'/%3E%3Cpath d='M16 10a4 4 0 0 1-8 0'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z'/%3E%3Cline x1='3' y1='6' x2='21' y2='6'/%3E%3Cpath d='M16 10a4 4 0 0 1-8 0'/%3E%3C/svg%3E") no-repeat center / contain;
  }
  .zr-header__cart-badge {
    position: absolute;
    top: 0; right: -2px;
    min-width: 15px;
    padding: 1px 4px;
    font-size: 9px;
  }
}


/* Logo image cap — square/tall merchant logos must not blow up the header. */
.zr-header__logo img { max-height: 48px; width: auto; object-fit: contain; }
@media (max-width: 860px) {
  .zr-header__logo img { max-height: 34px; }
}
