.zp-mobile-nav {
  position: fixed;
  inset: 0;
  width: 100%; /* Changed from 100vw to 100% to avoid scrollbar width issues */
  height: 100%;
  z-index: 20000;
  overflow: hidden; /* Clips any content outside viewport */
  visibility: hidden;
  pointer-events: none;
  font-family: var(--font-base, system-ui, sans-serif);
  /* Ensure it doesn't affect layout flow */
  contain: strict;
}

.zp-mobile-nav[data-state="open"],
.zp-mobile-nav[data-state="closing"] {
  visibility: visible;
  pointer-events: auto;
}

/* Backdrop */
.zp-mobile-nav__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(19, 7, 11, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.zp-mobile-nav[data-state="open"] .zp-mobile-nav__backdrop {
  opacity: 1;
}

/* Panel / Drawer */
.zp-mobile-nav__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(86vw, 380px);
  height: 100%;
  background: #fff;
  border-left: 1px solid rgba(39, 17, 22, 0.1);
  box-shadow: -24px 0 60px rgba(0, 0, 0, 0.2);
  z-index: 2;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  will-change: transform;
}

.zp-mobile-nav[data-state="open"] .zp-mobile-nav__panel {
  transform: translateX(0);
}

/* Header inside panel */
.zp-mobile-nav__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(39, 17, 22, 0.08);
  min-height: 60px;
  box-sizing: border-box;
}

.zp-mobile-nav__title {
  font-size: 0.78rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #8a121d;
  font-weight: 780;
}

.zp-mobile-nav__close {
  background: transparent;
  border: 1px solid rgba(39, 17, 22, 0.2);
  color: #1b0b10;
  width: 38px;
  height: 38px;
  border-radius: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
  font-size: 1.1rem;
  padding: 0;
  margin: 0;
}

.zp-mobile-nav__close:hover {
  color: #8a121d;
  border-color: #8a121d;
}

.zp-mobile-nav__close:focus-visible {
  outline: 2px solid #8a121d;
  outline-offset: 2px;
}

/* Links List */
.zp-mobile-nav__content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px 0;
  -webkit-overflow-scrolling: touch;
}

.zp-mobile-nav__link {
  display: flex;
  align-items: center;
  padding: 14px 24px;
  color: #201015;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  transition: background 0.2s, color 0.2s;
  border-left: 3px solid transparent;
  max-width: 100%;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.zp-mobile-nav__link:hover {
  background: rgba(138, 18, 29, 0.08);
  color: #8a121d;
}

.zp-mobile-nav__link.is-active {
  color: #8a121d;
  border-left-color: #8a121d;
}

.zp-mobile-nav__link:focus-visible {
  outline: none;
  background: rgba(138, 18, 29, 0.06);
  box-shadow: inset 0 0 0 2px rgba(138, 18, 29, 0.3);
}

/* Footer inside panel */
.zp-mobile-nav__footer {
  padding: 18px 24px;
  border-top: 1px solid rgba(39, 17, 22, 0.08);
  padding-bottom: max(18px, env(safe-area-inset-bottom));
  background: #f7f4f4;
}

.zp-mobile-nav__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.zp-mobile-nav__label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #8a121d;
  font-weight: 700;
}

.zp-mobile-nav__brand-footer {
  font-size: 0.75rem;
  color: #6d454a;
  text-align: center;
  margin-top: 12px;
  letter-spacing: 0.2em;
}
.zp-mobile-nav__brand-footer span {
  color: #1b0b10;
  font-weight: 700;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .zp-mobile-nav__backdrop,
  .zp-mobile-nav__panel {
    transition: none;
  }
}
