/* ── AUTH & CART MODALS ── */

/* OVERLAY */
.nc-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px); z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.nc-overlay.open { opacity: 1; pointer-events: all; }

/* MODAL BOX */
.nc-modal {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 24px; padding: 2rem; width: 100%; max-width: 420px;
  position: relative; transform: translateY(20px) scale(0.97);
  transition: transform 0.25s; max-height: 90vh; overflow-y: auto;
}
.nc-overlay.open .nc-modal { transform: translateY(0) scale(1); }
.nc-modal-close {
  position: absolute; top: 1rem; right: 1rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; width: 32px; height: 32px; cursor: pointer;
  color: var(--muted); font-size: 1rem; display: flex;
  align-items: center; justify-content: center; transition: all 0.2s;
}
.nc-modal-close:hover { color: var(--text); border-color: var(--accent); }

/* AUTH TABS */
.auth-tabs { display: flex; background: var(--surface); border-radius: 12px; padding: 4px; margin-bottom: 1.5rem; }
.auth-tab { flex: 1; padding: 0.6rem; border: none; background: none; color: var(--muted); font-family: 'Poppins', sans-serif; font-size: 0.82rem; font-weight: 600; cursor: pointer; border-radius: 9px; transition: all 0.2s; }
.auth-tab.active { background: var(--card); color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,0.3); }

/* AUTH FORM */
.auth-title { font-size: 1.3rem; font-weight: 800; margin-bottom: 0.25rem; }
.auth-sub { font-size: 0.78rem; color: var(--muted); margin-bottom: 1.5rem; }
.auth-form { display: flex; flex-direction: column; gap: 0.85rem; }
.auth-field { display: flex; flex-direction: column; gap: 0.3rem; }
.auth-field label { font-size: 0.7rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.auth-input {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 10px; padding: 0.7rem 1rem; color: var(--text);
  font-family: 'Poppins', sans-serif; font-size: 0.85rem; outline: none;
  transition: border-color 0.2s;
}
.auth-input:focus { border-color: var(--accent); }
.auth-input::placeholder { color: var(--muted); }
.auth-btn {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  border: none; border-radius: 12px; padding: 0.85rem;
  color: white; font-family: 'Poppins', sans-serif; font-weight: 700;
  font-size: 0.9rem; cursor: pointer; transition: all 0.2s;
  box-shadow: 0 8px 24px rgba(139,92,246,0.35); margin-top: 0.25rem;
}
.auth-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 32px rgba(139,92,246,0.5); }
.auth-divider { text-align: center; font-size: 0.75rem; color: var(--muted); margin: 0.5rem 0; position: relative; }
.auth-divider::before, .auth-divider::after { content: ''; position: absolute; top: 50%; width: 40%; height: 1px; background: var(--border); }
.auth-divider::before { left: 0; } .auth-divider::after { right: 0; }
.auth-note { font-size: 0.75rem; color: var(--muted); text-align: center; }
.auth-note a { color: var(--accent2); cursor: pointer; }
.auth-error { background: rgba(255,59,59,0.1); border: 1px solid rgba(255,59,59,0.3); border-radius: 8px; padding: 0.6rem 0.9rem; font-size: 0.78rem; color: #f87171; display: none; }
.auth-error.show { display: block; }
.auth-success { background: rgba(74,222,128,0.1); border: 1px solid rgba(74,222,128,0.3); border-radius: 8px; padding: 0.6rem 0.9rem; font-size: 0.78rem; color: #4ade80; display: none; }
.auth-success.show { display: block; }

/* USER MENU */
.user-btn {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 0.45rem 1rem; color: var(--text);
  cursor: pointer; font-size: 0.82rem; font-family: inherit;
  transition: border-color 0.2s; white-space: nowrap; position: relative;
}
.user-btn:hover { border-color: var(--accent); }
.user-avatar { width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg,#a855f7,#00d4ff); display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 700; }
.user-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 180px;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; display: none; z-index: 300; box-shadow: 0 16px 40px rgba(0,0,0,0.5);
}
.user-btn.open .user-dropdown { display: block; }
.user-dd-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.7rem 1rem; font-size: 0.8rem; cursor: pointer; transition: background 0.15s; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; }
.user-dd-item:last-child { border-bottom: none; }
.user-dd-item:hover { background: rgba(139,92,246,0.1); }
.user-dd-item.danger { color: #f87171; }
.user-dd-info { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); }
.user-dd-name { font-size: 0.82rem; font-weight: 700; }
.user-dd-email { font-size: 0.7rem; color: var(--muted); }

/* LOGIN BUTTON */
.login-btn {
  display: flex; align-items: center; gap: 0.5rem;
  background: linear-gradient(135deg,#8b5cf6,#6d28d9);
  border: none; border-radius: 10px; padding: 0.45rem 1rem;
  color: white; cursor: pointer; font-size: 0.82rem;
  font-family: inherit; font-weight: 600; transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(139,92,246,0.35); white-space: nowrap;
}
.login-btn:hover { box-shadow: 0 6px 18px rgba(139,92,246,0.5); transform: translateY(-1px); }

/* CART BADGE */
.cart-badge {
  background: var(--sale); color: white; border-radius: 50%;
  width: 18px; height: 18px; font-size: 0.6rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-left: -4px;
}

/* ── CART MODAL ── */
.cart-modal { max-width: 520px; }
.cart-modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.cart-modal-header h2 { font-size: 1.2rem; font-weight: 800; }
.cart-items { display: flex; flex-direction: column; gap: 0.75rem; max-height: 340px; overflow-y: auto; margin-bottom: 1.25rem; }
.cart-item { display: flex; align-items: center; gap: 0.75rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0.75rem; }
.cart-item-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 0.78rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item-sub { font-size: 0.68rem; color: var(--muted); margin-top: 0.15rem; }
.cart-item-price { font-size: 0.82rem; font-weight: 700; color: var(--accent2); white-space: nowrap; }
.cart-item-remove { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1rem; padding: 0.25rem; transition: color 0.2s; }
.cart-item-remove:hover { color: var(--sale); }
.cart-empty { text-align: center; padding: 2.5rem; color: var(--muted); font-size: 0.85rem; }
.cart-empty .cart-empty-icon { font-size: 3rem; margin-bottom: 0.75rem; }
.cart-total-row { display: flex; align-items: center; justify-content: space-between; padding: 1rem; background: var(--surface); border-radius: 12px; margin-bottom: 1rem; }
.cart-total-lbl { font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.cart-total-val { font-size: 1.3rem; font-weight: 900; background: linear-gradient(135deg,#00d4ff,#a855f7); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.cart-checkout-btn { background: linear-gradient(135deg,#8b5cf6,#6d28d9); border: none; border-radius: 12px; padding: 0.9rem; color: white; font-family: 'Poppins',sans-serif; font-weight: 700; font-size: 0.9rem; cursor: pointer; width: 100%; transition: all 0.2s; box-shadow: 0 8px 24px rgba(139,92,246,0.35); }
.cart-checkout-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 32px rgba(139,92,246,0.5); }
.cart-clear-btn { background: none; border: 1px solid var(--border); border-radius: 10px; padding: 0.6rem; color: var(--muted); font-family: 'Poppins',sans-serif; font-size: 0.78rem; cursor: pointer; width: 100%; margin-top: 0.5rem; transition: all 0.2s; }
.cart-clear-btn:hover { border-color: var(--sale); color: #f87171; }

/* TOAST */
.nc-toast {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 2000;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 0.9rem 1.25rem;
  display: flex; align-items: center; gap: 0.75rem;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
  transform: translateY(80px); opacity: 0;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  max-width: 320px; font-size: 0.82rem; font-weight: 600;
  pointer-events: none;
}
.nc-toast.show { transform: translateY(0); opacity: 1; }
.nc-toast.success { border-color: rgba(74,222,128,0.4); }
.nc-toast.error   { border-color: rgba(255,59,59,0.4); }
.nc-toast.info    { border-color: rgba(139,92,246,0.4); }

/* ── BAKİYE CHIP ── */
.balance-chip {
  display: flex; align-items: center; gap: 0.4rem;
  background: rgba(0,212,255,0.1); border: 1px solid rgba(0,212,255,0.3);
  border-radius: 10px; padding: 0.45rem 1rem;
  color: #00d4ff; font-size: 0.82rem; font-weight: 700;
  text-decoration: none; white-space: nowrap; transition: all 0.2s;
}
.balance-chip:hover { background: rgba(0,212,255,0.18); border-color: #00d4ff; }

/* ── LIGHT MODE MODAL/AUTH ── */
body.light-mode .nc-overlay { background: rgba(0,0,0,0.5); }
body.light-mode .nc-modal { background: #fff; border-color: var(--border); }
body.light-mode .auth-input { background: var(--surface); border-color: var(--border); color: var(--text); }
body.light-mode .auth-btn { background: linear-gradient(135deg,#7c3aed,#5b21b6); }
body.light-mode .user-dropdown { background: #fff; border-color: var(--border); }
body.light-mode .user-dd-item { color: var(--text); }
body.light-mode .user-dd-item:hover { background: var(--surface); }
body.light-mode .search-dropdown { background: #fff; border-color: var(--border); }
body.light-mode .search-item:hover { background: var(--surface); }
body.light-mode .nc-toast { background: #fff; border-color: var(--border); color: var(--text); }
