/* ─── SHARED NAV COMPONENT ──────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: 58px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5vw;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s;
}

.nav-logo {
  font-size: 1.05rem; font-weight: 800; letter-spacing: -0.03em;
  color: var(--ink); cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  text-decoration: none;
}
.nav-logo .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--blue); display: inline-block;
  animation: breathe 3s ease-in-out infinite;
}

.nav-links { display: flex; gap: 6px; }
.nav-links a {
  font-size: .82rem; font-weight: 500; color: var(--ink-soft);
  text-decoration: none; cursor: pointer; transition: color .2s;
  padding: 6px 12px; border-radius: 50px;
}
.nav-links a:hover { color: var(--ink); background: var(--off); }
.nav-links a.active { color: var(--blue); background: var(--blue-soft); font-weight: 700; }

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

.nav-profile {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), #3B82F6);
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 800; color: #fff; cursor: pointer;
  border: 2px solid var(--blue-soft);
}

/* ─── CART BUTTON ─── */
.cart-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 18px; border-radius: 50px;
  background: var(--ink); color: #fff;
  font-size: .8rem; font-weight: 700; cursor: pointer; border: none;
  font-family: 'Plus Jakarta Sans', sans-serif; transition: all .2s;
  position: relative;
}
.cart-btn:hover { background: var(--blue); transform: scale(1.03); }
.cart-badge {
  background: var(--blue); color: #fff;
  width: 18px; height: 18px; border-radius: 50%;
  font-size: .62rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  transition: transform .3s;
}
.cart-btn:hover .cart-badge { background: #fff; color: var(--blue); }
.cart-badge.pop { animation: pop .35s ease; }

/* ─── HAMBURGER ─── */
.hamburger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 38px; height: 38px; background: var(--off); border: 1.5px solid var(--line);
  border-radius: 10px; cursor: pointer; padding: 8px; flex-shrink: 0;
}
.hamburger span {
  display: block; height: 2px; background: var(--ink); border-radius: 2px;
  transition: all .25s; transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── MOBILE MENU (marketplace) ─── */
.mobile-menu {
  display: none; position: fixed; top: 58px; left: 0; right: 0; z-index: 299;
  background: var(--white); border-bottom: 1px solid var(--line);
  padding: 16px 5vw 20px;
  box-shadow: 0 8px 32px rgba(29,52,97,.1);
  animation: fadeIn .2s ease;
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: flex; align-items: center; padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: .9rem; font-weight: 600; color: var(--ink-mid);
  text-decoration: none; transition: color .2s;
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover { color: var(--blue); }
.mobile-menu a.active { color: var(--blue); }

/* ─── DRAWER (landing) ─── */
.drawer-overlay {
  display: none; position: fixed; inset: 0; z-index: 198;
  background: rgba(0,0,0,.4); backdrop-filter: blur(3px);
}
.drawer-overlay.open { display: block; }
.drawer-menu {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 199;
  width: 80vw; max-width: 300px;
  background: var(--white);
  transform: translateX(-100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  padding: 0;
  box-shadow: 8px 0 32px rgba(29,52,97,.15);
  display: flex; flex-direction: column;
}
.drawer-menu.open { transform: translateX(0); }
.drawer-head {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
}
.drawer-logo {
  font-size: .95rem; font-weight: 800; letter-spacing: -.03em;
  color: var(--ink); display: flex; align-items: center; gap: 7px;
}
.drawer-body { padding: 12px 0; flex: 1; }
.drawer-link {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px;
  font-size: .9rem; font-weight: 600; color: var(--ink-mid);
  text-decoration: none; cursor: pointer; transition: all .2s;
  border-bottom: 1px solid var(--line);
}
.drawer-link:last-child { border-bottom: none; }
.drawer-link:hover, .drawer-link:active { background: var(--off); color: var(--blue); }
.drawer-link .dl-icon { font-size: 1.1rem; }
.drawer-foot {
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}
.drawer-foot-btn {
  width: 100%; padding: 14px; border-radius: 12px;
  background: var(--ink); color: #fff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: .88rem; font-weight: 800; cursor: pointer; border: none;
  transition: background .2s;
}
.drawer-foot-btn:hover { background: var(--blue); }

/* ─── BOTTOM NAV (marketplace mobile) ─── */
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 290;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -4px 24px rgba(29,52,97,.07);
}
.bottom-nav-inner {
  display: flex; align-items: stretch; height: 60px;
}
.bnav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; cursor: pointer; color: var(--ink-pale);
  font-size: .55rem; font-weight: 700; letter-spacing: .02em;
  text-decoration: none; border: none; background: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
  transition: color .15s; -webkit-tap-highlight-color: transparent;
  position: relative; padding: 0; min-height: 44px;
}
.bnav-item:active { opacity: .7; }
.bnav-item.active { color: var(--blue); }
.bnav-icon { font-size: 1.3rem; line-height: 1; transition: transform .15s; }
.bnav-item.active .bnav-icon { transform: scale(1.1); }
.bnav-badge {
  position: absolute; top: 6px; right: calc(50% - 20px);
  min-width: 16px; height: 16px; border-radius: 8px;
  background: var(--blue); color: #fff;
  font-size: .52rem; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--white); padding: 0 3px;
}
.bnav-badge.hidden { display: none; }
.bnav-active-dot {
  position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--blue);
  display: none;
}
.bnav-item.active .bnav-active-dot { display: block; }

/* ─── NAV BACK (checkout, perfil) ─── */
.nav-back {
  display: flex; align-items: center; gap: 5px;
  font-size: .8rem; font-weight: 600; color: var(--ink-soft);
  text-decoration: none; transition: color .2s; cursor: pointer;
  padding: 6px 12px; border-radius: 8px;
}
.nav-back:hover { color: var(--blue); background: var(--blue-soft); }

/* ─── NAV SMALL PHONE ─── */
@media (max-width: 375px) {
  nav { padding: 0 3.5vw; }
  .nav-logo { font-size: .92rem; gap: 6px; }
  .nav-logo .dot { width: 7px; height: 7px; }
  .hamburger { width: 34px; height: 34px; padding: 6px; }
  .cart-btn { padding: 7px 12px; }
}

/* ─── TOAST ─── */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); border-radius: 50px;
  padding: 12px 22px; font-size: .82rem; color: #fff;
  opacity: 0; transition: all .3s; pointer-events: none; z-index: 999;
  font-weight: 600; letter-spacing: -.01em;
  display: flex; align-items: center; gap: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,.2); white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
