body { font-family: 'Sora', sans-serif; font-weight: 500; touch-action: manipulation; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }

h1,h2,h3,h4,h5 { letter-spacing: -0.02em; font-weight: 700; }
input, select, textarea, button { font-family: 'Sora', sans-serif; font-weight: 500; }

@media (max-width: 639px) {
  #mainFeed {
    padding-bottom: calc(7rem + env(safe-area-inset-bottom)) !important;
    scroll-padding-bottom: calc(7rem + env(safe-area-inset-bottom));
  }

  .mobile-bottom-nav {
    height: calc(4rem + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
  }
}
/* Darken ALL slate text so nothing looks ghostly */
.text-slate-400 { color: #475569 !important; }
.text-slate-500 { color: #334155 !important; }
.text-slate-600 { color: #1e293b !important; }
.text-slate-700 { color: #0f172a !important; }
.placeholder-slate-400::placeholder { color: #94a3b8; }
.custom-scrollbar::-webkit-scrollbar { width: 5px; }
.custom-scrollbar::-webkit-scrollbar-track { background: #f8fafc; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.card:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.07); }
.slide-in { animation: slideIn 0.26s ease forwards; }
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
.fade-in { animation: fadeIn 0.18s ease forwards; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.tab-on  { background: #059669; color: #fff; }
.tab-off { background: transparent; color: #334155; }
.star { color: #f59e0b; }
.c-mint  { background: #dcfce7; color: #166534; }
.c-good  { background: #dbeafe; color: #1e40af; }
.c-fair  { background: #fef9c3; color: #854d0e; }
.c-parts { background: #fee2e2; color: #991b1b; }
.dropdown-menu { transform-origin: top right; }
.dropdown-menu.open { animation: dropIn 0.15s ease forwards; }
@keyframes dropIn { from { opacity:0; transform:scale(0.95) translateY(-4px); } to { opacity:1; transform:scale(1) translateY(0); } }
.success-card { animation: successPop 0.35s cubic-bezier(0.34,1.56,0.64,1) forwards; }
@keyframes successPop { from { opacity:0; transform:scale(0.7); } to { opacity:1; transform:scale(1); } }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }

/* --- Gift Card Animations & Enhanced Interactions --- */
.gift-card { 
  transition: all 0.3s cubic-bezier(0.25,0.46,0.45,0.94); 
  border-radius: 1rem; 
  position: relative;
  overflow: hidden;
}
.gift-card::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.6s;
  z-index: 1;
}
.gift-card:hover::before { left: 100%; }
.gift-card:hover { 
  transform: translateY(-6px) scale(1.02); 
  box-shadow: 0 20px 60px rgba(0,0,0,0.12), 0 8px 25px rgba(16,185,129,0.15); 
}
.gift-card .card-img { transition: transform 0.6s cubic-bezier(0.25,0.46,0.45,0.94); }
.gift-card:hover .card-img { transform: scale(1.08); }

/* --- Staggered Loading Animation for Gift Grid --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.gift-card.animate-in {
  animation: fadeInUp 0.5s cubic-bezier(0.25,0.46,0.45,0.94) forwards;
  opacity: 0;
}
.gift-card.animate-in:nth-child(1) { animation-delay: 0.1s; }
.gift-card.animate-in:nth-child(2) { animation-delay: 0.15s; }
.gift-card.animate-in:nth-child(3) { animation-delay: 0.2s; }
.gift-card.animate-in:nth-child(4) { animation-delay: 0.25s; }
.gift-card.animate-in:nth-child(5) { animation-delay: 0.3s; }
.gift-card.animate-in:nth-child(6) { animation-delay: 0.35s; }

/* --- Pulse Animation for Loading States --- */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
.loading-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }

/* --- Skeleton --- */
.skel { background: linear-gradient(90deg,#f0f4f8 25%,#e6eaf0 50%,#f0f4f8 75%); background-size:200% 100%; animation:skel-anim 1.4s infinite; border-radius:0.5rem; }
@keyframes skel-anim { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* --- Detail Pane --- */
.detail-slide { animation: detSlide 0.28s cubic-bezier(0.22,1,0.36,1) forwards; }
@keyframes detSlide { from{opacity:0;transform:translateY(18px)} to{opacity:1;transform:translateY(0)} }

/* --- Micro-animations --- */
@keyframes bellShake { 0%,100%{transform:rotate(0)} 15%{transform:rotate(18deg)} 30%{transform:rotate(-16deg)} 45%{transform:rotate(12deg)} 60%{transform:rotate(-8deg)} 75%{transform:rotate(4deg)} }
.bell-shake { animation: bellShake 0.6s ease; }
@keyframes cardSlideOut { to { transform: translateX(110%); opacity: 0; max-height: 0; margin: 0; padding: 0; } }
.card-removing { animation: cardSlideOut 0.35s cubic-bezier(0.4,0,1,1) forwards; overflow: hidden; }

/* --- Form field states --- */
@keyframes shake { 0%,100%{transform:translateX(0)} 20%,60%{transform:translateX(-5px)} 40%,80%{transform:translateX(5px)} }
.field-error { border-color: #ef4444 !important; box-shadow: 0 0 0 3px rgba(239,68,68,0.12); animation: shake 0.38s ease; }
.field-ok    { border-color: #10b981 !important; box-shadow: 0 0 0 3px rgba(16,185,129,0.10); transition: border-color 0.2s, box-shadow 0.2s; }

/* --- Enhanced Swiper Gallery --- */
.swiper-gallery { border-radius: 16px; overflow: hidden; }
.swiper-slide img { width: 100%; height: 260px; object-fit: cover; }
.swiper-button-next, .swiper-button-prev { color: rgba(255,255,255,0.8) !important; background: rgba(0,0,0,0.3); width: 36px !important; height: 36px !important; border-radius: 50%; backdrop-filter: blur(8px); }
.swiper-button-next:after, .swiper-button-prev:after { font-size: 14px !important; }
.swiper-pagination-bullet { background: rgba(255,255,255,0.6) !important; }
.swiper-pagination-bullet-active { background: #fff !important; }

/* --- Enhanced Button Interactions --- */
.btn-premium { transition: all 0.2s cubic-bezier(0.4,0,0.2,1); }
.btn-premium:hover { transform: translateY(-1px); box-shadow: 0 8px 25px rgba(0,0,0,0.15); }
.btn-premium:active { transform: translateY(0); box-shadow: 0 2px 10px rgba(0,0,0,0.1); }

/* --- Floating Label Animation --- */
.floating-label-group { position: relative; }
.floating-label-input { padding-top: 20px; padding-bottom: 4px; }
.floating-label { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; transition: all 0.2s cubic-bezier(0.4,0,0.2,1); color: #94a3b8; font-size: 13px; }
.floating-label-input:focus + .floating-label, .floating-label-input:not(:placeholder-shown) + .floating-label { top: 8px; font-size: 10px; color: #059669; font-weight: 600; }

/* --- Success Ripple Effect --- */
@keyframes ripple { 0% { transform: scale(0); opacity: 1; } 100% { transform: scale(4); opacity: 0; } }
.success-ripple { position: relative; overflow: hidden; }
.success-ripple::after { content: ''; position: absolute; top: 50%; left: 50%; width: 20px; height: 20px; background: rgba(16,185,129,0.3); border-radius: 50%; transform: translate(-50%, -50%) scale(0); animation: ripple 0.6s ease-out; }

/* --- Nearby Button Pulse --- */
@keyframes nearbyPulse { 0%,100%{box-shadow:0 0 0 0 rgba(16,185,129,0.4)} 60%{box-shadow:0 0 0 6px rgba(16,185,129,0)} }
#nearbyBtn:not(.active-nearby) { animation: nearbyPulse 2.2s ease infinite; }
#nearbyBtn.active-nearby { animation: none; }

/* --- Enhanced Notifications --- */
@keyframes notifSlideIn { from { transform: translateX(120%) translateY(-50%); opacity: 0; } to { transform: translateX(0) translateY(-50%); opacity: 1; } }
.notif-toast { position: fixed; top: 50%; right: 16px; transform: translateY(-50%); background: linear-gradient(135deg, #10b981, #059669); color: white; padding: 12px 14px 12px 18px; border-radius: 14px; box-shadow: 0 8px 32px rgba(16,185,129,0.35); animation: notifSlideIn 0.4s cubic-bezier(0.34,1.56,0.64,1); z-index: 10000; max-width: min(320px, calc(100vw - 32px)); width: max-content; }
.notif-toast.notif-error { background: linear-gradient(135deg, #ef4444, #dc2626); box-shadow: 0 8px 32px rgba(239,68,68,0.3); }
.notif-toast.notif-info { background: linear-gradient(135deg, #1e293b, #0f172a); border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 8px 32px rgba(15,23,42,0.3); }
.notif-toast .toast-close-btn:hover { transform: scale(1.2); }

/* --- Enhanced Image Hover --- */
.image-hover-zoom { transition: transform 0.6s cubic-bezier(0.25,0.46,0.45,0.94); }
.image-hover-zoom:hover { transform: scale(1.08); }

