/* Search Bar */
.search-bar {
  position: relative;
  margin-bottom: 16px;
}

.search-bar input {
  width: 100%;
  padding: 12px 40px 12px 40px;
  border: 1px solid var(--border);
  border-radius: 14px;
  font-size: 15px;
  font-weight: 500;
  background: var(--card-bg);
  transition: all 0.2s;
}

.search-bar input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 99, 71, 0.1);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  opacity: 0.5;
}

.search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 24px;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.search-clear:hover {
  color: var(--text);
}

/* Filter Chips */
.filter-chips {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.filter-chips::-webkit-scrollbar {
  height: 4px;
}

.filter-chips::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.filter-chip {
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-chip:hover {
  border-color: var(--accent);
  background: rgba(255, 99, 71, 0.05);
}

.filter-chip.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* Floating Action Button */
.fab {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  border: none;
  font-size: 24px;
  box-shadow: 0 4px 12px rgba(255, 99, 71, 0.3);
  cursor: pointer;
  transition: all 0.3s;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(255, 99, 71, 0.4);
}

.fab:active {
  transform: scale(0.95);
}

@media (min-width: 768px) {
  .fab {
    bottom: 30px;
    right: 30px;
  }
}

/* Toast Undo Button */
.toast-undo {
  margin-left: 12px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  color: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.toast-undo:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.toast-undo:active {
  transform: scale(0.95);
}

/* Progress Dashboard */
.progress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.progress-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
}

.progress-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.progress-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 4px;
}

.progress-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.progress-sublabel {
  font-size: 12px;
  color: var(--muted);
}

/* Milestones */
.milestones-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.milestone-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.2s;
}

.milestone-card.achieved {
  background: linear-gradient(135deg, #fff5f0 0%, #ffffff 100%);
  border-color: rgba(255, 107, 71, 0.3);
}

.milestone-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.milestone-info {
  flex: 1;
}

.milestone-info strong {
  display: block;
  font-size: 15px;
  margin-bottom: 2px;
}

.milestone-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}

.milestone-progress {
  width: 60px;
  height: 8px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
}

.milestone-progress div {
  height: 100%;
  background: var(--accent);
  transition: width 0.3s;
}

/* Savings Breakdown */
.savings-breakdown {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.savings-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.savings-item-info strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

.savings-amount {
  font-size: 16px;
  font-weight: 700;
  color: #10b981;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .progress-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Onboarding Overlay */
.onboarding-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease-out;
}

.onboarding-container {
  background: white;
  border-radius: 24px;
  padding: 40px 32px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s ease-out;
}

.onboarding-progress {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 32px;
}

.progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #E5E7EB;
  transition: all 0.3s;
}

.progress-dot.active {
  width: 24px;
  border-radius: 4px;
  background: var(--accent);
}

.progress-dot.completed {
  background: var(--accent);
}

.onboarding-content {
  text-align: center;
  margin-bottom: 32px;
}

.onboarding-illustration {
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
}

.onboarding-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 12px;
}

.onboarding-description {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.6;
}

.onboarding-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Enhanced Empty States */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state-illustration {
  width: 200px;
  height: 200px;
  margin: 0 auto 24px;
  background: linear-gradient(135deg, #FFF5F0 0%, #FFE5DC 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
}

.empty-state h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 24px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.empty-state-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Skeleton Loaders */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 8px;
}

.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
}

.skeleton-title {
  height: 24px;
  width: 60%;
  margin-bottom: 12px;
}

.skeleton-card {
  height: 120px;
  margin-bottom: 16px;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Micro-interactions */
.btn {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:active {
  transform: scale(0.96);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

/* Spring animations */
@keyframes spring {
  0% {
    transform: scale(0.9);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.spring-in {
  animation: spring 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Premium Badge */
.badge-premium {
  background: linear-gradient(135deg, #FF6B47, #FF8C69);
  color: white;
  font-weight: 600;
}

.premium-upsell {
  background: linear-gradient(135deg, #FFF5F0, #FFE8E0);
  border: 2px solid #FF6B47;
}

.premium-upsell h3 {
  color: #FF6B47;
  margin-bottom: 8px;
}

/* Inline Price Comparison */
.item-price-comparison {
  margin-top: 12px;
  padding: 12px;
  background: #F9FAFB;
  border-radius: 8px;
  border: 1px solid #E5E7EB;
}

.price-comparison-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.price-comparison-title {
  font-size: 13px;
  font-weight: 600;
  color: #6B7280;
  display: flex;
  align-items: center;
  gap: 6px;
}

.price-comparison-loading {
  font-size: 12px;
  color: #9CA3AF;
  font-style: italic;
}

.price-comparison-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.price-comparison-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px;
  background: white;
  border-radius: 6px;
  border: 1px solid #E5E7EB;
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.price-comparison-item:hover {
  border-color: #FF6B47;
  box-shadow: 0 2px 8px rgba(255, 107, 71, 0.1);
  transform: translateY(-1px);
}

.price-comparison-item.best-price {
  border-color: #10B981;
  background: #F0FDF4;
}

.price-comparison-store {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.price-comparison-icon {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: white;
}

.price-comparison-name {
  font-size: 13px;
  font-weight: 500;
  color: #374151;
}

.price-comparison-price {
  font-size: 14px;
  font-weight: 700;
  color: #FF6B47;
}

.price-comparison-item.best-price .price-comparison-price {
  color: #10B981;
}

.price-comparison-badge {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #10B981;
  color: white;
  font-weight: 600;
  margin-left: 6px;
}

.price-comparison-error {
  font-size: 12px;
  color: #9CA3AF;
  text-align: center;
  padding: 8px;
}

.price-comparison-toggle {
  background: none;
  border: none;
  color: #FF6B47;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.price-comparison-toggle:hover {
  background: #FFF5F0;
}

.price-comparison-collapsed {
  display: none;
}

/* Onboarding dots */
.ob-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #E5E7EB;
  transition: all 0.25s;
}
.ob-dot-active {
  width: 22px;
  border-radius: 4px;
  background: #FF6B47;
}
.ob-dot-done {
  background: #FF6B4780;
}

/* Price comparison loading spinner */
.price-comparison-loading {
  font-size: 12px;
  color: #9CA3AF;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.price-comparison-loading::before {
  content: '';
  display: inline-block;
  width: 10px; height: 10px;
  border: 2px solid #E5E7EB;
  border-top-color: #FF6B47;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Product Preview States */
.success-preview {
  border-left: 4px solid #10B981;
  background: linear-gradient(to right, #F0FDF4, white);
}

.warning-preview {
  border-left: 4px solid #F59E0B;
  background: linear-gradient(to right, #FFFBEB, white);
}

.success-preview strong {
  color: #10B981;
}

.warning-preview strong {
  color: #F59E0B;
}

/* Responsive */
@media (max-width: 640px) {
  .price-comparison-item {
    padding: 6px;
  }
  
  .price-comparison-name {
    font-size: 12px;
  }
  
  .price-comparison-price {
    font-size: 13px;
  }
}

/* ═══════════════════════════════════════════════
   UI/UX REDESIGN — Industry-standard improvements
   ═══════════════════════════════════════════════ */

/* ── Bottom navigation ──────────────────────── */
.app-bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 6px 0 env(safe-area-inset-bottom, 12px);
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0,0,0,0.08);
  z-index: 100;
  height: 64px;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 16px;
  background: none;
  border: none;
  color: #9CA3AF;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.15s;
  position: relative;
  min-width: 56px;
  letter-spacing: 0.01em;
}
.nav-item .ni {
  font-size: 20px;
  line-height: 1;
  display: block;
  transition: transform 0.15s;
}
.nav-item.active {
  color: var(--coral);
}
.nav-item.active .ni {
  transform: scale(1.1);
}
.nav-item-add {
  width: 52px;
  height: 52px;
  background: var(--coral);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 300;
  margin-bottom: 10px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255,107,71,0.45);
  transition: transform 0.15s, box-shadow 0.15s;
  flex-shrink: 0;
}
.nav-item-add:active {
  transform: scale(0.93);
  box-shadow: 0 2px 8px rgba(255,107,71,0.3);
}

/* Notification badge dot */
.nav-badge-dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--coral);
  border-radius: 50%;
  margin-left: 2px;
  vertical-align: middle;
}

/* ── App header ─────────────────────────────── */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 56px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.07);
}
.app-header .brand {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: var(--coral);
  letter-spacing: -0.3px;
}
.app-header .brand span { font-size: 22px; }

/* ── Page header row ────────────────────────── */
.page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.page-header-row h1 {
  font-size: 24px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.3px;
}

/* ── Wishlist cards ─────────────────────────── */
.wishlist-card {
  background: white;
  border-radius: 18px;
  padding: 18px;
  border: 1.5px solid rgba(0,0,0,0.07);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.wishlist-card:hover, .wishlist-card:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.09);
  border-color: rgba(255,107,71,0.25);
}

/* ── Item rows ──────────────────────────────── */
.item-row {
  background: white;
  border-radius: 16px;
  border: 1.5px solid rgba(0,0,0,0.07);
  padding: 14px;
  display: flex;
  gap: 12px;
  transition: box-shadow 0.15s;
}
.item-row:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.07);
}
.item-img {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  overflow: hidden;
}
.item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.item-body h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
  margin-bottom: 3px;
}
.item-body .desc {
  font-size: 13px;
  color: #9CA3AF;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.item-price {
  font-size: 14px;
  font-weight: 800;
  color: var(--coral);
}

/* ── Claim button ───────────────────────────── */
.claim-btn {
  background: #F9FAFB;
  border: 1.5px solid rgba(0,0,0,0.1);
  color: var(--navy);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.claim-btn:hover {
  background: var(--coral);
  color: white;
  border-color: var(--coral);
}

/* ── Dashboard header ───────────────────────── */
.dash-header {
  margin-bottom: 20px;
}
.dash-header h1 {
  font-size: 24px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.3px;
}
.dash-header p {
  color: #9CA3AF;
  font-size: 14px;
  margin-top: 1px;
}

/* ── Stat pills ─────────────────────────────── */
.stat-pills {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.stat-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  background: white;
  border: 1.5px solid rgba(0,0,0,0.08);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  transition: all 0.15s;
}
.stat-pill:hover {
  border-color: var(--coral);
  color: var(--coral);
  transform: translateY(-1px);
}
.stat-pill .stat-num {
  font-weight: 800;
  font-size: 15px;
  color: var(--coral);
}

/* ── Section headers ────────────────────────── */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.section-header h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--navy);
}
.section-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--coral);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 8px;
  transition: background 0.15s;
}
.section-link:hover { background: #fff5f0; }

/* ── Empty states ───────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
}
.empty-state .es-icon {
  font-size: 52px;
  margin-bottom: 14px;
  display: block;
  opacity: 0.6;
}
.empty-state h2 {
  font-size: 19px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 8px;
}
.empty-state p {
  color: #9CA3AF;
  font-size: 14px;
  margin-bottom: 22px;
}

/* ── Auth card ──────────────────────────────── */
.auth-card {
  background: white;
  border-radius: 24px;
  padding: 36px 28px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 8px 40px rgba(0,0,0,0.10);
  border: 1px solid rgba(0,0,0,0.06);
}

/* ── Buttons (app-mode only, don't break landing) ── */
.app-mode .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 13px 22px;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 14px;
  transition: all 0.15s;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: -0.1px;
}
.app-mode .btn-primary {
  background: var(--coral);
  color: white;
  box-shadow: 0 4px 14px rgba(255,107,71,0.3);
}
.app-mode .btn-primary:hover {
  background: var(--coral-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255,107,71,0.4);
}
.app-mode .btn-primary:active { transform: translateY(0); }
.app-mode .btn-outline {
  background: transparent;
  border: 1.5px solid rgba(0,0,0,0.12);
  color: var(--navy);
}
.app-mode .btn-outline:hover {
  border-color: var(--coral);
  color: var(--coral);
  background: #fff8f6;
}
.app-mode .btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.app-mode .btn-full { width: 100%; }

/* ── Toast ──────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: #1B2845;
  color: white;
  padding: 11px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.34,1.56,0.64,1);
  z-index: 1000;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Wishlist detail header ─────────────────── */
.wl-detail-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  padding: 16px;
  background: white;
  border-radius: 18px;
  border: 1.5px solid rgba(0,0,0,0.07);
}
.wl-detail-header .wl-icon { font-size: 48px; }
.wl-detail-header h1 {
  font-size: 20px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 2px;
}
.wl-detail-header p { color: #9CA3AF; font-size: 13px; }

/* ── Items header ───────────────────────────── */
.items-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.items-header h2 {
  font-size: 17px;
  font-weight: 800;
  color: var(--navy);
}

/* ── Price comparison ───────────────────────── */
.item-price-comparison {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(0,0,0,0.07);
}
.price-comparison-title {
  font-size: 12px;
  font-weight: 700;
  color: #9CA3AF;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.price-comparison-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.price-comparison-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 10px;
  background: #F9FAFB;
  text-decoration: none;
  transition: background 0.12s;
}
.price-comparison-item:hover {
  background: #FFF5F0;
}
.price-comparison-origin {
  background: #F0FDF4;
}
.price-comparison-origin:hover { background: #dcfce7; }
.price-comparison-store {
  display: flex;
  align-items: center;
  gap: 8px;
}
.price-comparison-icon {
  width: 26px; height: 26px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}
.price-comparison-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}
.price-comparison-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--coral);
}
.price-comparison-price strong {
  color: #059669;
}

/* ── Responsive ─────────────────────────────── */
@media (min-width: 1024px) {
  .app-bottom-nav { display: none; }
  .app-page { padding-bottom: 0; }
}
@media (max-width: 640px) {
  .app-main { padding: 16px; }
}

/* ══════════════════════════════════════════════
   LANDING PAGE — missing feature/section styles
   ══════════════════════════════════════════════ */

.features { padding: 80px 0; background: var(--white); }
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}
@media (max-width: 900px) { .features-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 580px) { .features-grid { grid-template-columns: 1fr; } }

.feature-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 28px 24px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(26,43,74,0.09);
  border-color: rgba(255,107,71,0.3);
}
.feature-emoji {
  font-size: 36px;
  margin-bottom: 14px;
  display: block;
}
.feature-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
}

.section-title {
  font-size: 38px;
  font-weight: 800;
  color: var(--navy);
  text-align: center;
  letter-spacing: -0.5px;
}
.section-subtitle {
  text-align: center;
  color: var(--text-light);
  font-size: 17px;
  margin-top: 10px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 768px) {
  .section-title { font-size: 28px; }
  .features { padding: 56px 0; }
}

/* ══════════════════════════════════════════════
   PAGE TRANSITIONS & PERFORMANCE
   ══════════════════════════════════════════════ */

/* Smooth fade-in for every page mount.
   IMPORTANT: exclude overlays/toasts — animation-fill-mode:both would
   pin their opacity to 1 and override their hidden (.modal-overlay opacity:0)
   state, creating a permanent ghost overlay. */
#app > *:not(.modal-overlay):not(.toast) {
  animation: pageFadeIn 0.22s ease both;
}
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* App main content slide */
.app-main {
  animation: pageFadeIn 0.2s ease both;
}

/* Faster interactive feedback */
button, a, [data-nav], [data-action] {
  -webkit-tap-highlight-color: transparent;
}

/* Login/auth card entrance */
.auth-page .auth-card {
  animation: cardEntrance 0.3s cubic-bezier(0.34,1.2,0.64,1) both;
}
@keyframes cardEntrance {
  from { opacity: 0; transform: scale(0.96) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Wishlist card stagger */
.wishlist-grid .wishlist-card:nth-child(1) { animation-delay: 0.03s; }
.wishlist-grid .wishlist-card:nth-child(2) { animation-delay: 0.07s; }
.wishlist-grid .wishlist-card:nth-child(3) { animation-delay: 0.11s; }
.wishlist-card { animation: pageFadeIn 0.25s ease both; }

/* Item row stagger */
.items-list .item-row { animation: pageFadeIn 0.22s ease both; }
.items-list .item-row:nth-child(1) { animation-delay: 0.03s; }
.items-list .item-row:nth-child(2) { animation-delay: 0.07s; }
.items-list .item-row:nth-child(3) { animation-delay: 0.1s; }
.items-list .item-row:nth-child(4) { animation-delay: 0.13s; }

/* Preload fonts hint */
body { text-rendering: optimizeSpeed; }

/* Nuclear fix: hide any lingering onboarding elements */
#onboarding-screen[data-destroyed="true"],
#onboarding-screen.destroyed,
body.onboarding-complete #onboarding-screen {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  z-index: -9999 !important;
}

/* Ensure onboarding doesn't reappear */
#onboarding-screen {
  will-change: opacity;
}

/* ═══════════════════════════════════════════════════════════════
   FESTIVE SUCCESS CELEBRATION STYLES
   ═══════════════════════════════════════════════════════════════ */

.auth-celebration {
  text-align: center;
  padding: 24px 20px;
  background: linear-gradient(135deg, #FFF5F0 0%, #FFE8E0 100%);
  border-radius: 20px;
  border: 2px solid rgba(255,107,71,0.2);
  position: relative;
  overflow: hidden;
  animation: celebrationPop 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes celebrationPop {
  0% { transform: scale(0.8); opacity: 0; }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); opacity: 1; }
}

.celebration-emoji {
  font-size: 48px;
  margin-bottom: 12px;
  animation: emojiBounce 1s ease infinite;
  display: block;
}

@keyframes emojiBounce {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-8px) rotate(5deg); }
}

.celebration-check {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 28px;
  font-weight: bold;
  margin: -28px auto 16px;
  box-shadow: 0 4px 16px rgba(16,185,129,0.4);
  animation: checkPop 0.4s ease 0.2s both;
  position: relative;
  z-index: 2;
}

@keyframes checkPop {
  0% { transform: scale(0); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.celebration-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 8px 0;
  letter-spacing: -0.3px;
}

.celebration-subtitle {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 16px 0;
  line-height: 1.5;
}

.celebration-confetti {
  display: flex;
  justify-content: center;
  gap: 12px;
  font-size: 20px;
}

.celebration-confetti span {
  animation: confettiFloat 2s ease-in-out infinite;
  display: inline-block;
}

.celebration-confetti span:nth-child(1) { animation-delay: 0s; }
.celebration-confetti span:nth-child(2) { animation-delay: 0.2s; }
.celebration-confetti span:nth-child(3) { animation-delay: 0.4s; }
.celebration-confetti span:nth-child(4) { animation-delay: 0.6s; }
.celebration-confetti span:nth-child(5) { animation-delay: 0.8s; }

@keyframes confettiFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(10deg); }
}

/* Sparkle decoration behind celebration */
.auth-celebration::before,
.auth-celebration::after {
  content: '✨';
  position: absolute;
  font-size: 24px;
  opacity: 0.6;
  animation: sparkleTwinkle 1.5s ease-in-out infinite;
}

.auth-celebration::before {
  top: 16px;
  left: 16px;
  animation-delay: 0s;
}

.auth-celebration::after {
  top: 16px;
  right: 16px;
  animation-delay: 0.7s;
}

@keyframes sparkleTwinkle {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

.success-msg.celebration {
  background: transparent;
  border: none;
  padding: 0;
}

/* ═══════════════════════════════════════════════════════════════
   WORLD-CLASS CARD DESIGN SYSTEM
   Following modern design principles: hierarchy, spacing, depth
   ═══════════════════════════════════════════════════════════════ */

/* ── Enhanced Wishlist Cards ──────────────────────────────────── */
.wishlist-card {
  position: relative;
  background: linear-gradient(180deg, #FFFFFF 0%, #FAFAFA 100%);
  border-radius: 20px;
  padding: 20px 20px 16px;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 
    0 1px 2px rgba(0,0,0,0.02),
    0 4px 8px rgba(0,0,0,0.03),
    0 12px 24px rgba(0,0,0,0.04);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.wishlist-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--coral) 0%, var(--coral-light) 100%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.wishlist-card:hover::before,
.wishlist-card:focus-within::before {
  opacity: 1;
}

.wishlist-card:hover {
  transform: translateY(-3px) scale(1.005);
  box-shadow: 
    0 2px 4px rgba(0,0,0,0.02),
    0 8px 16px rgba(0,0,0,0.04),
    0 20px 40px rgba(0,0,0,0.06);
  border-color: rgba(255,107,71,0.15);
}

.wishlist-card:active {
  transform: translateY(-1px) scale(0.998);
  transition-duration: 0.1s;
}

/* Card content layout improvements */
.wl-card-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}

.wl-icon {
  font-size: 44px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.06));
  flex-shrink: 0;
}

.wl-info h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 4px 0;
  letter-spacing: -0.2px;
}

.wl-info p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  line-height: 1.4;
}

/* Progress bar enhancement */
.wl-progress-wrap {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(0,0,0,0.04);
}

.wl-progress-bar {
  height: 6px;
  background: rgba(0,0,0,0.06);
  border-radius: 100px;
  overflow: hidden;
  position: relative;
}

.wl-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--coral) 0%, var(--coral-light) 100%);
  border-radius: 100px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.wl-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ── Enhanced Item Rows ──────────────────────────────────────── */
.item-row {
  position: relative;
  background: #FFFFFF;
  border-radius: 16px;
  border: 1.5px solid rgba(0,0,0,0.05);
  padding: 14px 16px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.item-row::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--coral);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.item-row:hover::before {
  opacity: 1;
}

.item-row:hover {
  border-color: rgba(255,107,71,0.2);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transform: translateX(2px);
}

.item-row.claimed {
  opacity: 0.75;
  background: linear-gradient(180deg, #FAFAFA 0%, #F5F5F5 100%);
}

.item-row.claimed::before {
  background: #10B981;
  opacity: 1;
}

/* Item image enhancement */
.item-img {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: linear-gradient(135deg, #F8F9FA 0%, #F0F1F2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.04);
}

.item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.item-row:hover .item-img img {
  transform: scale(1.05);
}

/* Item body improvements */
.item-body {
  flex: 1;
  min-width: 0;
  padding-right: 8px;
}

.item-body h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 4px 0;
  letter-spacing: -0.15px;
  line-height: 1.3;
}

.item-body .desc {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  align-items: center;
  flex-wrap: wrap;
}

.item-price {
  font-weight: 700;
  color: var(--coral);
  font-size: 13px;
  background: rgba(255,107,71,0.08);
  padding: 2px 8px;
  border-radius: 100px;
}

/* Claim button enhancement */
.claim-btn {
  background: linear-gradient(135deg, var(--coral) 0%, var(--coral-dark) 100%);
  border: none;
  color: white;
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(255,107,71,0.3);
  position: relative;
  overflow: hidden;
}

.claim-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.claim-btn:hover::before {
  left: 100%;
}

.claim-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255,107,71,0.4);
}

.claim-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(255,107,71,0.3);
}

.claimed-badge {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 100px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(16,185,129,0.2);
}

/* ── Feature Cards Enhancement ──────────────────────────────── */
.feature-card {
  background: linear-gradient(180deg, #FFFFFF 0%, #FAFAFA 100%);
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 20px;
  padding: 28px 24px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--coral) 0%, var(--coral-light) 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 
    0 4px 12px rgba(0,0,0,0.05),
    0 16px 32px rgba(0,0,0,0.08);
  border-color: rgba(255,107,71,0.15);
}

.feature-card:hover::after {
  transform: scaleX(1);
}

.feature-emoji {
  font-size: 40px;
  margin-bottom: 16px;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.06));
  transition: transform 0.3s ease;
}

.feature-card:hover .feature-emoji {
  transform: scale(1.1) rotate(-2deg);
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 10px;
  letter-spacing: -0.3px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
  margin: 0;
}

/* ── Empty State Enhancement ──────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  background: linear-gradient(180deg, #FAFAFA 0%, #F5F5F5 100%);
  border-radius: 20px;
  border: 2px dashed rgba(0,0,0,0.08);
}

.empty-state .es-icon {
  font-size: 56px;
  margin-bottom: 16px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.06));
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.empty-state h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 14px;
  color: var(--muted);
  max-width: 280px;
  margin: 0 auto;
}

/* ── Button Enhancement ────────────────────────────────────── */
.app-mode .btn {
  position: relative;
  overflow: hidden;
}

.app-mode .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.app-mode .btn:hover::before {
  left: 100%;
}

.app-mode .btn:active {
  transform: translateY(1px);
}

/* ── Bottom Nav Enhancement ────────────────────────────────── */
.app-bottom-nav {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
}

.nav-item {
  position: relative;
  transition: all 0.2s ease;
}

.nav-item.active {
  color: var(--coral);
}

.nav-item.active .ni {
  transform: translateY(-2px);
  filter: drop-shadow(0 2px 4px rgba(255,107,71,0.2));
}

.nav-item-add {
  background: linear-gradient(135deg, var(--coral) 0%, var(--coral-dark) 100%);
  box-shadow: 0 4px 12px rgba(255,107,71,0.4);
  transition: all 0.2s ease;
}

.nav-item-add:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(255,107,71,0.5);
}

.nav-item-add:active {
  transform: scale(0.95);
}

/* ── Toast Enhancement ─────────────────────────────────────── */
.toast {
  background: linear-gradient(135deg, #1A1A2E 0%, #16213E 100%);
  border-radius: 100px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  font-weight: 500;
}

/* ── Form Input Enhancement ─────────────────────────────────── */
input, textarea {
  transition: all 0.2s ease;
}

input:focus, textarea:focus {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(255,107,71,0.1);
  outline: none;
}

/* ── Link Enhancement ──────────────────────────────────────── */
.item-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--coral);
  font-weight: 600;
  text-decoration: none;
  position: relative;
  transition: all 0.2s ease;
}

.item-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--coral);
  transition: width 0.2s ease;
}

.item-link:hover::after {
  width: 100%;
}

.item-link:hover {
  color: var(--coral-dark);
}

/* ── Price Comparison Enhancement ─────────────────────────── */
.item-price-comparison {
  margin-top: 10px;
  padding: 10px 12px;
  background: linear-gradient(180deg, #F8F9FA 0%, #F0F1F2 100%);
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.04);
}

.price-comparison-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.price-comparison-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.price-comparison-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  background: white;
  border-radius: 6px;
  font-size: 12px;
  transition: all 0.15s ease;
}

.price-comparison-item:hover {
  background: #F8F9FA;
}

/* ── Responsive Improvements ──────────────────────────────── */
@media (max-width: 640px) {
  .wishlist-card {
    padding: 16px;
    border-radius: 16px;
  }
  
  .item-row {
    padding: 12px;
    gap: 12px;
  }
  
  .item-img {
    width: 52px;
    height: 52px;
    font-size: 20px;
  }
  
  .item-body h4 {
    font-size: 14px;
  }
  
  .feature-card {
    padding: 20px;
  }
  
  .claim-btn, .claimed-badge {
    font-size: 11px;
    padding: 6px 12px;
  }
}

@media (min-width: 1024px) {
  .wishlist-card {
    padding: 24px;
  }
  
  .item-row {
    padding: 16px 20px;
  }
  
  .item-img {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}
