/* ====================================================================
   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;
}

/* ══════════════════════════════════════════════════════════════════════════
   ASTA MART — PREMIUM PERFORMANCE + POLISH LAYER  v1
   Loads LAST across every page → wins the cascade with zero extra requests.
   Goals: butter-smooth 60fps scrolling, a richer premium palette, and extra
   GPU-composited micro-animations. No existing animation is removed — the
   janky ones are simply promoted to the compositor so they never stutter.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── 1 · PREMIUM PALETTE — LIGHT (warm ivory + terracotta + champagne) ──── */
:root {
  --am-accent: #C24E38;
  --am-accent-dark: #9E3B29;
  --am-accent-light: #E37E64;
  --am-accent-glow: rgba(194, 78, 56, 0.28);
  --am-accent-soft: rgba(194, 78, 56, 0.07);

  --am-bg-0: #F7F2EC;
  --am-bg-1: #F0E9E1;
  --am-bg-2: #E9DFD3;
  --am-bg-3: #D8C8B4;

  --am-gold: #BE924A;
  --am-gold-light: #E4C489;
  --am-gold-glow: rgba(190, 146, 74, 0.30);

  --am-text-1: #241D18;
  --am-text-2: #453A32;
  --am-text-3: #6B5B4C;

  --am-border: rgba(36, 29, 24, 0.09);
  --am-border-hover: rgba(194, 78, 56, 0.28);

  /* Layered, soft "premium" shadows — tighter contact + wide ambient */
  --am-shadow-sm: 0 1px 2px rgba(36,29,24,0.05), 0 2px 6px rgba(36,29,24,0.05);
  --am-shadow-md: 0 2px 6px rgba(36,29,24,0.05), 0 8px 24px -6px rgba(36,29,24,0.12);
  --am-shadow-lg: 0 4px 12px rgba(36,29,24,0.06), 0 18px 44px -10px rgba(36,29,24,0.16);
  --am-shadow-xl: 0 8px 24px rgba(36,29,24,0.08), 0 36px 80px -18px rgba(36,29,24,0.22);

  /* Signature gradient used for premium text + accents */
  --am-grad: linear-gradient(120deg, #C24E38 0%, #E37E64 42%, #BE924A 100%);
  --am-grad-soft: linear-gradient(120deg, rgba(194,78,56,0.14), rgba(190,146,74,0.14));
}

/* ── PREMIUM PALETTE — DARK (deep obsidian + plum + luminous ember/gold) ── */
html[data-theme="dark"] {
  --am-accent: #EE8368;
  --am-accent-dark: #C85A40;
  --am-accent-light: #FBA98F;
  --am-accent-glow: rgba(238, 131, 104, 0.34);
  --am-accent-soft: rgba(238, 131, 104, 0.10);

  --am-bg-0: #09070C;
  --am-bg-1: #110D16;
  --am-bg-2: #1A1522;
  --am-bg-3: #2A2233;

  --am-gold: #E4B972;
  --am-gold-light: #F5D79E;
  --am-gold-glow: rgba(228, 185, 114, 0.30);

  --am-text-1: #F4F0F8;
  --am-text-2: #CBC4D6;
  --am-text-3: #948CA6;

  --am-border: rgba(255, 255, 255, 0.07);
  --am-border-hover: rgba(238, 131, 104, 0.30);

  --am-shadow-sm: 0 1px 2px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.4);
  --am-shadow-md: 0 4px 16px rgba(0,0,0,0.5), 0 10px 30px -8px rgba(0,0,0,0.6);
  --am-shadow-lg: 0 8px 28px rgba(0,0,0,0.55), 0 24px 60px -14px rgba(0,0,0,0.7);
  --am-shadow-xl: 0 12px 40px rgba(0,0,0,0.6), 0 48px 100px -20px rgba(0,0,0,0.8);

  --am-grad: linear-gradient(120deg, #FBA98F 0%, #EE8368 45%, #E4B972 100%);
  --am-grad-soft: linear-gradient(120deg, rgba(238,131,104,0.16), rgba(228,185,114,0.16));
}

/* Richer ambient page glows (subtle, GPU-cheap, painted once) */
html[data-theme="dark"] body {
  background-image:
    radial-gradient(ellipse 90% 55% at 50% -8%, rgba(238,131,104,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 70% 50% at 88% 8%, rgba(228,185,114,0.045) 0%, transparent 55%),
    radial-gradient(ellipse 60% 45% at 10% 92%, rgba(140,90,210,0.05) 0%, transparent 55%) !important;
  background-attachment: fixed;
}

/* ══════════════════════════════════════════════════════════════════════════
   2 · SMOOTHNESS ENGINE — the anti-stutter fixes
   ══════════════════════════════════════════════════════════════════════════ */

/* 2a. The #1 scroll-jank source: heavy backdrop-blur on every grid card.
   blur(24–28px) is recomposited on every scroll frame for each card. We cap
   it to a still-glassy radius and add paint containment so a card's blur can
   never invalidate anything outside its own box. Huge win on card-heavy pages. */
.liquid-glass, .listing-card, .dash-stat, .feature-card, .vp-card,
.create-section, .browse-card, .saved-card, .vault-card {
  backdrop-filter: blur(14px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(160%) !important;
  contain: paint !important;
}
html[data-theme="dark"] .liquid-glass,
html[data-theme="dark"] .listing-card,
html[data-theme="dark"] .dash-stat,
html[data-theme="dark"] .feature-card,
html[data-theme="dark"] .vp-card,
html[data-theme="dark"] .create-section,
html[data-theme="dark"] .browse-card,
html[data-theme="dark"] .saved-card,
html[data-theme="dark"] .vault-card,
html[data-theme="dark"] 
html[data-theme="dark"] body:not(.page-admin) .card {
  backdrop-filter: blur(16px) saturate(150%) brightness(1.04) !important;
  -webkit-backdrop-filter: blur(16px) saturate(150%) brightness(1.04) !important;
}

/* 2b. The sticky navbar blurs the whole page behind it on every frame.
   Trim its radius and give it its own compositor layer. */
.navbar-glass {
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  will-change: transform;
  transform: translateX(-50%) translateZ(0);
  transition: height 0.35s var(--am-ease, cubic-bezier(.4,0,.2,1)),
              background 0.35s var(--am-ease, cubic-bezier(.4,0,.2,1)),
              box-shadow 0.35s var(--am-ease, cubic-bezier(.4,0,.2,1)),
              border-color 0.35s ease, top 0.35s var(--am-ease, cubic-bezier(.4,0,.2,1)) !important;
}
.navbar-glass.scrolled { transform: translateX(-50%) translateZ(0); }

/* 2c. Promote the known looping/continuously-animated layers onto their own
   GPU layer so their repaints stay isolated and never touch page layout.
   Deliberately a short, specific list — over-promoting elements creates layer
   bloat that hurts more than it helps. Nothing is disabled; these still animate
   exactly as before, just cheaply. */
.particle, .cine-iphone, .cine-badge, .cine-scroll-hint, .cine-scroll-dot,
.testimonials-grid, .cta-btn-pulse, .cine-widget-anim, .cine-holo,
.cine-light-streak, .skeleton, .scroll-progress {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* 2d. Kill layout thrash from `transition: all` on the elements that change
   most often (cards + buttons). We restrict them to compositor-only props so
   hovering never triggers a full layout/paint pass. */
.listing-card, .feature-card, .vp-card, .browse-card, .saved-card,
.vault-card, .dash-stat, .liquid-glass {
  transition: transform 0.45s var(--am-ease, cubic-bezier(.4,0,.2,1)),
              box-shadow 0.45s var(--am-ease, cubic-bezier(.4,0,.2,1)),
              border-color 0.3s ease !important;
}

/* 2e. Smooth momentum + no accidental horizontal jitter */
html { scroll-behavior: smooth; }
body { overflow-x: hidden; overscroll-behavior-y: none; }

/* ══════════════════════════════════════════════════════════════════════════
   3 · NEW PREMIUM ANIMATIONS (all transform/opacity → 60fps)
   ══════════════════════════════════════════════════════════════════════════ */

/* 3a. Animated gradient brand wordmark */
.navbar-glass .ng-brand-text .accent,
.am-gradient-text {
  background: var(--am-grad);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: amGradShift 7s ease-in-out infinite;
}
@keyframes amGradShift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* 3b. Premium hover lift + luminous ring on cards */
.listing-card:hover, .feature-card:hover, .vp-card:hover, .browse-card:hover,
.saved-card:hover, .vault-card:hover:hover {
  transform: translateY(-6px) !important;
  border-color: var(--am-border-hover) !important;
  box-shadow: var(--am-shadow-lg), 0 0 0 1px var(--am-accent-soft),
              0 18px 50px -12px var(--am-accent-glow) !important;
}

/* 3c. Sheen sweep across primary buttons on hover (uses ::after — ::before is
   already taken on .btn-primary, so this never collides) */
.btn-primary, .nav-btn-primary, .btn-hero-primary, .btn-cta-white,
.ng-cta, .btn-cta, .create-btn, .vp-buy-btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn-primary::after, .nav-btn-primary::after, .btn-hero-primary::after,
.btn-cta-white::after, .ng-cta::after, .btn-cta::after,
.create-btn::after, .vp-buy-btn::after {
  content: "";
  position: absolute;
  top: 0; left: -140%;
  width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.55), transparent);
  transform: skewX(-18deg);
  pointer-events: none;
  z-index: 1;
}
.btn-primary:hover::after, .nav-btn-primary:hover::after,
.btn-hero-primary:hover::after, .btn-cta-white:hover::after,
.ng-cta:hover::after, .btn-cta:hover::after,
.create-btn:hover::after, .vp-buy-btn:hover::after {
  animation: amSheen 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes amSheen { to { left: 160%; } }

/* 3d. Nav links: gradient underline that grows from the centre on hover */
.navbar-glass .ng-link {
  position: relative;
  transition: color 0.25s ease;
}
.navbar-glass .ng-link::before {
  content: "";
  position: absolute;
  left: 50%; bottom: 2px;
  width: 0; height: 2px;
  border-radius: 2px;
  background: var(--am-grad);
  transform: translateX(-50%);
  transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.navbar-glass .ng-link:hover::before { width: 70%; }
.navbar-glass .ng-link:hover { color: var(--am-accent); }

/* 3e. Buttons get a spring-lift micro-interaction */
.btn-primary, .nav-btn-primary, .btn-hero-primary, .btn-cta-white,
.ng-cta, .btn-cta, .create-btn, .vp-buy-btn {
  transition: transform 0.28s var(--am-ease-spring, cubic-bezier(.34,1.56,.64,1)),
              box-shadow 0.28s ease, background 0.28s ease, filter 0.28s ease;
}
.btn-primary:hover, .nav-btn-primary:hover, .btn-hero-primary:hover,
.btn-cta-white:hover, .ng-cta:hover, .btn-cta:hover,
.create-btn:hover, .vp-buy-btn:hover {
  transform: translateY(-2px) scale(1.015);
  filter: saturate(1.08);
}
.btn-primary:active, .nav-btn-primary:active, .btn-hero-primary:active,
.btn-cta-white:active, .ng-cta:active, .btn-cta:active,
.create-btn:active, .vp-buy-btn:active { transform: translateY(0) scale(0.99); }

/* 3f. Theme-toggle spin delight */
.navbar-glass .theme-toggle { transition: transform 0.5s var(--am-ease-spring, cubic-bezier(.34,1.56,.64,1)); }
.navbar-glass .theme-toggle:hover { transform: rotate(18deg) scale(1.08); }

/* 3g. First-paint entrance — sections fade/rise in (respects reduced motion).
   Applied only where JS reveal classes are NOT present so it never conflicts. */
@keyframes amRise {
  from { opacity: 0; transform: translate3d(0, 18px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}
.am-rise { animation: amRise 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; }

/* ══════════════════════════════════════════════════════════════════════════
   4 · ACCESSIBILITY — honour the OS "reduce motion" preference
   ══════════════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
