/* ==========================================
   JATIN JEWELLERS - Mobile App Animations
   css/mobile.css
   ========================================== */

/* ============================================
   1. PAGE TRANSITION
   ============================================ */
.page-transition {
  animation: pageFadeIn 0.35s ease forwards;
}
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   2. SCROLL ANIMATIONS
   ============================================ */
.anim-fade-up {
  opacity: 0; transform: translateY(40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.anim-fade-left {
  opacity: 0; transform: translateX(-40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.anim-fade-right {
  opacity: 0; transform: translateX(40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.anim-scale {
  opacity: 0; transform: scale(0.92);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.anim-visible {
  opacity: 1 !important;
  transform: none !important;
}

/* Stagger delay for grid items */
.anim-delay-1 { transition-delay: 0.1s; }
.anim-delay-2 { transition-delay: 0.2s; }
.anim-delay-3 { transition-delay: 0.3s; }
.anim-delay-4 { transition-delay: 0.4s; }

/* ============================================
   3. RIPPLE EFFECT ON BUTTONS
   ============================================ */
.btn {
  position: relative;
  overflow: hidden;
}
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transform: scale(0);
  animation: rippleAnim 0.55s linear;
  pointer-events: none;
}
@keyframes rippleAnim {
  to { transform: scale(4); opacity: 0; }
}

/* ============================================
   4. BOTTOM NAVIGATION BAR
   FIX: Single definition at 768px only
        Removed duplicate 600px rule from style.css
        body padding-bottom unified here as 68px
   ============================================ */
.bottom-nav { display: none; }

@media (max-width: 768px) {
  /* FIX: Single unified padding-bottom — 68px matches nav height of 64px + safe area */
  body { padding-bottom: 68px; }

  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 998;
    background: rgba(10, 8, 2, 0.97);
    border-top: 1px solid rgba(201,168,76,0.2);
    backdrop-filter: blur(16px);
    height: 64px;
    align-items: stretch;
    padding: 0 4px;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .bottom-nav-item {
    flex: 1;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 3px; text-decoration: none;
    color: rgba(255,255,255,0.4);
    font-family: 'Jost', sans-serif;
    font-size: 0.62rem; letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 8px 4px; border-radius: 12px;
    transition: all 0.2s ease;
    position: relative; overflow: hidden;
  }
  .bottom-nav-item .nav-icon { font-size: 1.3rem; line-height: 1; transition: transform 0.2s ease; }
  .bottom-nav-item span { font-size: 0.6rem; }

  .bottom-nav-item.active { color: var(--gold-light, #E8C97A); }
  .bottom-nav-item.active .nav-icon { transform: translateY(-2px) scale(1.15); }
  .bottom-nav-item.active::after {
    content: '';
    position: absolute; bottom: 6px; left: 50%;
    transform: translateX(-50%);
    width: 4px; height: 4px;
    background: var(--gold, #C9A84C);
    border-radius: 50%;
  }
  .bottom-nav-item:active { background: rgba(201,168,76,0.08); }

  .bottom-nav-item.nav-wa       { color: #25D366; }
  .bottom-nav-item.nav-wa.active { color: #25D366; }
}

/* ============================================
   5. SWIPE HINT on collections (mobile)
   ============================================ */
@media (max-width: 768px) {
  .swipe-hint {
    text-align: center; font-size: 0.72rem;
    color: rgba(255,255,255,0.3);
    font-family: 'Jost', sans-serif;
    letter-spacing: 0.1em; padding: 12px 0 0;
    animation: swipeHintAnim 2s ease-in-out 2s 2 forwards;
  }
  @keyframes swipeHintAnim {
    0%   { opacity: 0; transform: translateX(0); }
    25%  { opacity: 1; transform: translateX(-6px); }
    75%  { opacity: 1; transform: translateX(6px); }
    100% { opacity: 0; transform: translateX(0); }
  }
}

/* ============================================
   6. SKELETON LOADING
   ============================================ */
.skeleton {
  background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.4s infinite;
  border-radius: 4px;
}
@keyframes skeletonShimmer {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}

/* ============================================
   7. PULL TO REFRESH indicator
   ============================================ */
#pull-refresh {
  position: fixed; top: -60px; left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: rgba(201,168,76,0.15);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 50px; padding: 10px 20px;
  font-family: 'Jost', sans-serif; font-size: 0.78rem;
  color: var(--gold-light, #E8C97A);
  display: flex; align-items: center; gap: 8px;
  transition: top 0.3s ease; pointer-events: none;
}
#pull-refresh.visible { top: 80px; }
/* FIX: Renamed to spin-pull — avoids conflict with spin-ring in style.css */
#pull-refresh .pr-icon { font-size: 1rem; animation: spin-pull 1s linear infinite; }
@keyframes spin-pull { to { transform: rotate(360deg); } }

/* ============================================
   8. TOUCH FEEDBACK - Cards
   ============================================ */
@media (max-width: 768px) {
  .card, .col-card, .service-card, .gallery-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease !important;
  }
  .card:active, .col-card:active, .service-card:active, .gallery-card:active {
    transform: scale(0.97) !important;
  }
}

/* ============================================
   9. SMOOTH IMAGE LAZY LOAD
   ============================================ */
img.lazy { opacity: 0; transition: opacity 0.4s ease; }
img.lazy.loaded { opacity: 1; }