/* ── Menu Container ── */
.menu-container { position: fixed; width: 100%; height: 100vh; top: 0; left: 0; z-index: 100; pointer-events: none; }

/* ── Top Bar ── */
.menu-bar {
  position: fixed; top: 0;
  width: calc(100% - 4em); height: 64px; margin: 2em;
  display: flex; justify-content: space-between; align-items: flex-start;
  background: rgba(15, 15, 15, 0.6);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-radius: 1rem; overflow: visible;
  border: 1px solid rgba(108, 92, 231, 0.15);
  pointer-events: all; z-index: 100002;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.05);
  transition: background 0.5s, backdrop-filter 0.5s;
}
/* Menü açıkken bar'ı şeffaf yap */
.menu-bar.menu-open {
  background: transparent;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  box-shadow: none; border-color: transparent;
  overflow: visible;
}

.menu-bar-container {
  background: transparent; width: 100%; height: 64px;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 0.7em 0 1em;
}
.menu-logo a { position: relative; display: inline-block; top: -0.05em; color: var(--bg); }
.menu-logo .logo-img { width: 130px; height: auto; object-fit: contain; }

/* ── Header Icons ── */
.menu-actions { display: flex; align-items: center; gap: 0.4em; }
.menu-icon-btn {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 0.6rem;
  pointer-events: all;
  transition: all 0.3s;
  border: 1px solid transparent;
}
.menu-icon-btn:hover {
  background: rgba(108, 92, 231, 0.15);
  border-color: rgba(108, 92, 231, 0.3);
}
.menu-icon-btn svg { transition: transform 0.3s; }
.menu-icon-btn:hover svg { transform: scale(1.1); }

.cart-badge {
  position: absolute; top: 2px; right: 2px;
  background: var(--primary); color: #fff;
  font-family: "Onest", sans-serif; font-size: 0.55rem; font-weight: 800;
  width: 16px; height: 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  text-transform: none;
  box-shadow: 0 0 8px rgba(108, 92, 231, 0.6);
  animation: badge-pulse 2s infinite;
}
@keyframes badge-pulse {
  0%, 100% { box-shadow: 0 0 4px rgba(108, 92, 231, 0.4); }
  50% { box-shadow: 0 0 12px rgba(108, 92, 231, 0.8); }
}

/* ── Hamburger ── */
.menu-toggle { width: 60px; height: 60px; display: flex; justify-content: flex-end; align-items: center; }
.hamburger-icon {
  position: relative;
  display: flex; justify-content: center; align-items: center;
  outline: none; height: 40px; width: 48px;
  border-radius: 0.6rem; background: transparent;
  transition: all 300ms;
  border: 1px solid rgba(108, 92, 231, 0.2);
  cursor: pointer;
  z-index: 10;
}
.hamburger-icon:hover { background: rgba(108, 92, 231, 0.15); border-color: rgba(108, 92, 231, 0.4); }
.hamburger-icon:before, .hamburger-icon:after {
  content: ""; position: absolute; width: 20px; height: 1.5px;
  background: #fff; transition: all 300ms ease-in-out; transition-delay: 150ms; will-change: transform;
}
.hamburger-icon:before { transform: translateY(-3px); }
.hamburger-icon:after { transform: translateY(3px); }
.active.hamburger-icon:before { transform: translateY(0) rotate(45deg); }
.active.hamburger-icon:after { transform: translateY(0) rotate(-45deg); }
.active.hamburger-icon { border-color: rgba(108, 92, 231, 0.5); background: rgba(108, 92, 231, 0.1); }

/* ── Fullscreen Menu ── */
.menu {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100vh;
  background: rgba(15, 15, 15, 0.92);
  backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px);
  clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
  display: flex; justify-content: center; align-items: center;
  pointer-events: none; z-index: 100001;
}
.menu-link-item {
  position: relative; padding: 0.5em 0 0.1em 0;
  clip-path: polygon(0 -20%, 100% -20%, 100% 120%, 0% 120%);
  text-align: center; pointer-events: all;
}
.menu-link-item .menu-link-item-holder { position: relative; will-change: transform; }
.menu-link-item .menu-link-item-holder a {
  position: relative; color: rgba(255,255,255,0.7);
  font-family: "Rader", "Onest", sans-serif;
  font-size: 5vw; text-transform: uppercase;
  letter-spacing: -0.01em; line-height: 80%;
  transition: color 0.3s, text-shadow 0.3s;
}
.menu-link-item .menu-link-item-holder:hover a {
  color: #fff;
  text-shadow: 0 0 30px rgba(108, 92, 231, 0.5);
}

/* ── Mobile ── */
@media (max-width: 1000px) {
  .menu-bar { margin: 1.25em; width: calc(100% - 2.5em); height: 56px; }
  .menu-bar-container { height: 56px; }
  .menu-logo .logo-img { width: 110px; }
  .menu-link-item .menu-link-item-holder a { font-size: 9vw; }
  .menu-link-item { padding: 0.3em 0 0.05em; }
  .menu-actions { gap: 0.2em; }
  .menu-icon-btn { width: 36px; height: 36px; }
  .menu-icon-btn svg { width: 16px; height: 16px; }
  .hamburger-icon { width: 42px; height: 36px; }
}

/* ── User Dropdown ── */
.user-dropdown { position: relative; pointer-events: auto; }
.user-dropdown-trigger { cursor: pointer; background: none; border: none; padding: 0; }
.user-dropdown-menu {
  position: absolute; top: calc(100% + 8px); right: 0; width: 260px;
  background: rgba(15,15,15,0.95); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.08); border-radius: 0.75em;
  padding: 0.4em 0; opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: all 0.2s ease; z-index: 100003;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}
.user-dropdown:hover .user-dropdown-menu,
.user-dropdown.open .user-dropdown-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.user-dropdown-header {
  display: flex; align-items: center; gap: 0.6em;
  padding: 0.75em 1em;
}
.user-dropdown-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: rgba(108,92,231,0.2); color: #a29bfe;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700;
}
.user-dropdown-name { font-size: 0.85rem; font-weight: 600; color: #fff; }
.user-dropdown-email { font-size: 0.7rem; color: rgba(255,255,255,0.35); }
.user-dropdown-divider { height: 1px; background: rgba(255,255,255,0.06); margin: 0.25em 0; }
.user-dropdown-item {
  display: flex; align-items: center; gap: 0.6em;
  padding: 0.65em 1.1em; color: rgba(255,255,255,0.6);
  text-decoration: none; font-size: 0.82rem; font-weight: 500;
  font-family: "Onest", sans-serif; transition: all 0.12s;
  text-transform: none;
}
.user-dropdown-item svg { opacity: 0.4; flex-shrink: 0; }
.user-dropdown-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.user-dropdown-item:hover svg { opacity: 0.8; }
.user-dropdown-logout { color: rgba(231,76,60,0.6); }
.user-dropdown-logout:hover { color: #e74c3c; background: rgba(231,76,60,0.08); }

@media (max-width: 768px) {
  .user-dropdown-menu { width: 220px; right: -10px; }
}
