/* ====================================================================
   ASTA MART — UNIFIED APPLE-STYLE GLASS NAVBAR
   Premium SaaS Design System — Shared across ALL pages
   Inspired by Apple's frosted glass navigation
   ==================================================================== */

/* ── NAVBAR GLASS CONTAINER ─────────────────────────────────── */
.navbar-glass {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  width: calc(100% - 32px);
  max-width: 1320px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  /* Apple frosted glass effect */
  background: rgba(255, 252, 249, 0.72);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(200, 85, 61, 0.08);
  border-radius: 20px;
  box-shadow:
    0 4px 24px -2px rgba(44, 36, 32, 0.08),
    0 1px 3px rgba(44, 36, 32, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-glass.scrolled {
  top: 8px;
  height: 56px;
  background: rgba(255, 252, 249, 0.88);
  box-shadow:
    0 8px 40px -4px rgba(44, 36, 32, 0.12),
    0 2px 6px rgba(44, 36, 32, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  border-color: rgba(200, 85, 61, 0.12);
}

/* ── BRAND ─────────────────────────────────────────────────── */
.navbar-glass .ng-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.navbar-glass .ng-brand img {
  height: 34px;
  width: auto;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.navbar-glass .ng-brand:hover img {
  transform: scale(1.05) rotate(-2deg);
}

.navbar-glass .ng-brand-text {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: #2C2420;
}

.navbar-glass .ng-brand-text .accent {
  background: linear-gradient(135deg, #C8553D 0%, #E07A62 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── CENTER NAV LINKS (pill style) ────────────────────────── */
.navbar-glass .ng-links {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  background: rgba(44, 36, 32, 0.04);
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.navbar-glass .ng-link {
  padding: 8px 13px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #6B5344;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  white-space: nowrap;
}

.navbar-glass .ng-link:hover {
  color: #2C2420;
  background: rgba(0, 0, 0, 0.05);
}

.navbar-glass .ng-link.active {
  color: #C8553D;
  background: rgba(200, 85, 61, 0.1);
  box-shadow: 0 2px 8px rgba(200, 85, 61, 0.12);
}

/* Active indicator dot */
.navbar-glass .ng-link.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #C8553D;
  box-shadow: 0 0 6px rgba(200, 85, 61, 0.5);
}

/* ── RIGHT ACTIONS ─────────────────────────────────────────── */
.navbar-glass .ng-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

/* Guest buttons */
.navbar-glass .ng-btn {
  padding: 8px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Inter', sans-serif;
}

.navbar-glass .ng-btn-ghost {
  background: transparent;
  color: #6B5344;
  border: 1.5px solid rgba(0, 0, 0, 0.1);
}

.navbar-glass .ng-btn-ghost:hover {
  color: #2C2420;
  border-color: rgba(200, 85, 61, 0.3);
  background: rgba(200, 85, 61, 0.04);
  transform: translateY(-1px);
}

.navbar-glass .ng-btn-primary {
  background: linear-gradient(135deg, #C8553D 0%, #A84430 100%);
  color: #fff;
  box-shadow:
    0 2px 12px rgba(200, 85, 61, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.navbar-glass .ng-btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 4px 20px rgba(200, 85, 61, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.navbar-glass .ng-btn-primary:active {
  transform: translateY(0) scale(0.98);
}

/* ── USER AVATAR & MENU ───────────────────────────────────── */
.navbar-glass .ng-avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, #C8553D 0%, #E07A62 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  cursor: pointer;
  position: relative;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 8px rgba(200, 85, 61, 0.25);
}

.navbar-glass .ng-avatar:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 16px rgba(200, 85, 61, 0.35);
}

.navbar-glass .ng-saved-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6B5344;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.06);
  text-decoration: none;
  transition: all 0.25s ease;
}

.navbar-glass .ng-saved-btn:hover {
  color: #C8553D;
  background: rgba(200, 85, 61, 0.08);
  border-color: rgba(200, 85, 61, 0.2);
}

/* User dropdown menu */
.navbar-glass .ng-user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: rgba(255, 252, 249, 0.95);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  padding: 8px;
  display: none;
  box-shadow:
    0 20px 60px -12px rgba(44, 36, 32, 0.2),
    0 4px 12px rgba(44, 36, 32, 0.06);
  animation: menuSlideIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes menuSlideIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.navbar-glass .ng-user-menu.active {
  display: block;
}

.navbar-glass .ng-user-menu a svg,
.navbar-glass .ng-user-menu button svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.navbar-glass .ng-user-menu a,
.navbar-glass .ng-user-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #4A3F38;
  text-decoration: none;
  text-align: left;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
}

.navbar-glass .ng-user-menu a:hover,
.navbar-glass .ng-user-menu button:hover {
  background: rgba(200, 85, 61, 0.06);
  color: #C8553D;
}

.navbar-glass .ng-user-menu .ng-menu-divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.06);
  margin: 6px 8px;
}

/* ── HAMBURGER MENU ───────────────────────────────────────── */
.navbar-glass .ng-hamburger {
  display: none;
  background: none;
  border: none;
  color: #2C2420;
  cursor: pointer;
  padding: 8px;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.navbar-glass .ng-hamburger:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* ── MOBILE NAV OVERLAY ───────────────────────────────────── */
.ng-mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 360px;
  height: 100vh;
  z-index: 10000;
  background: rgba(255, 252, 249, 0.98);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  padding: 80px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.1);
}

.ng-mobile-nav.active {
  right: 0;
}

.ng-mobile-nav .ng-mobile-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2C2420;
  transition: all 0.2s;
}

.ng-mobile-nav .ng-mobile-close:hover {
  background: rgba(200, 85, 61, 0.1);
  color: #C8553D;
}

.ng-mobile-nav a {
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  color: #4A3F38;
  text-decoration: none;
  transition: all 0.2s;
}

.ng-mobile-nav a:hover {
  background: rgba(200, 85, 61, 0.06);
  color: #C8553D;
}

.ng-mobile-nav a.active {
  background: rgba(200, 85, 61, 0.1);
  color: #C8553D;
}

.ng-mobile-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(44, 36, 32, 0.3);
  backdrop-filter: blur(4px);
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ng-mobile-backdrop.active {
  display: block;
  opacity: 1;
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .navbar-glass .ng-links {
    display: none;
  }
  .navbar-glass .ng-hamburger {
    display: flex;
  }
  .navbar-glass {
    width: calc(100% - 24px);
    padding: 0 16px;
    top: 8px;
  }
}

@media (max-width: 480px) {
  .navbar-glass {
    height: 54px;
    border-radius: 16px;
  }
  .navbar-glass .ng-brand-text {
    font-size: 16px;
  }
  .navbar-glass .ng-brand img {
    height: 28px;
  }
  .navbar-glass .ng-btn {
    padding: 7px 14px;
    font-size: 12px;
  }
}

/* ── HIDE OLD NAVBAR ELEMENTS (overridden by new glass nav) ── */
#mainNav:not(.navbar-glass),
nav.navbar:not(.navbar-glass),
.mobile-nav:not(.ng-mobile-nav),
#mobileNav,
#authOverlay,
.auth-overlay:not(.auth-overlay-unified),
.modal-overlay#authModal {
  display: none !important;
}
body.has-glass-nav {
  padding-top: 86px;
}

/* Homepage has full-height hero - no padding needed */
body.has-glass-nav.page-home {
  padding-top: 0;
}

/* Ensure glass nav is above hero sections */
.navbar-glass {
  z-index: 9999;
}

/* ── AUTH MODAL — UNIFIED ─────────────────────────────────── */
.auth-overlay-unified {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(44, 36, 32, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: authFadeIn 0.2s ease;
}

.auth-overlay-unified.active {
  display: flex;
}

@keyframes authFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.auth-modal-unified {
  width: 100%;
  max-width: 420px;
  margin: 16px;
  background: rgba(255, 252, 249, 0.98);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 24px;
  padding: 32px;
  box-shadow:
    0 32px 80px -16px rgba(44, 36, 32, 0.25),
    0 8px 24px rgba(44, 36, 32, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  animation: authModalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authModalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-modal-unified .auth-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6B5344;
  transition: all 0.2s;
}

.auth-modal-unified .auth-close-btn:hover {
  background: rgba(200, 85, 61, 0.1);
  color: #C8553D;
}

.auth-modal-unified .auth-tabs-row {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 12px;
  margin-bottom: 24px;
}

.auth-modal-unified .auth-tab-btn {
  flex: 1;
  padding: 10px;
  border-radius: 9px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: #6B5344;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: 'Inter', sans-serif;
}

.auth-modal-unified .auth-tab-btn.active {
  background: #fff;
  color: #C8553D;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.auth-modal-unified .auth-form-panel {
  display: none;
}

.auth-modal-unified .auth-form-panel.active {
  display: block;
}

.auth-modal-unified .auth-input-field {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.02);
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  color: #2C2420;
  outline: none;
  transition: all 0.2s ease;
  margin-bottom: 12px;
}

.auth-modal-unified .auth-input-field:focus {
  border-color: rgba(200, 85, 61, 0.4);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(200, 85, 61, 0.08);
}

.auth-modal-unified .auth-submit-btn {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #C8553D 0%, #A84430 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: 'Inter', sans-serif;
  box-shadow: 0 4px 16px rgba(200, 85, 61, 0.3);
}

.auth-modal-unified .auth-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(200, 85, 61, 0.4);
}

.auth-modal-unified .auth-submit-btn:active {
  transform: translateY(0);
}

.auth-modal-unified .auth-divider-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
}

.auth-modal-unified .auth-divider-line::before,
.auth-modal-unified .auth-divider-line::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
}

.auth-modal-unified .auth-divider-line span {
  font-size: 12px;
  font-weight: 600;
  color: #8B7B6B;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Google Sign-In Button - Apple style */
.auth-modal-unified .google-signin-premium {
  width: 100%;
  padding: 13px 20px;
  border-radius: 12px;
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: #2C2420;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: 'Inter', sans-serif;
}

.auth-modal-unified .google-signin-premium:hover {
  border-color: rgba(200, 85, 61, 0.3);
  background: rgba(200, 85, 61, 0.02);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.auth-modal-unified .google-signin-premium svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.auth-modal-unified .auth-msg-text {
  margin-top: 12px;
  font-size: 13px;
  text-align: center;
  color: #6B5344;
  min-height: 20px;
}

.auth-modal-unified .auth-msg-text.error {
  color: #C8553D;
}

.auth-modal-unified .auth-msg-text.success {
  color: #4CAF50;
}

.auth-modal-unified .otp-row {
  display: none;
  margin-top: 12px;
}

.auth-modal-unified .otp-row.visible {
  display: block;
}
