/* ========================================
   LocalBazaar — Custom Styles
   ======================================== */

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Google Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

body {
  font-family: 'Inter', sans-serif;
  background: #F8FAFC;
  overflow-x: hidden;
}

/* ========= Glassmorphism Search ========= */
.glass-search {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.glass-search:focus-within {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 32px rgba(46, 105, 184, 0.15);
  border-color: rgba(46, 105, 184, 0.3);
}

/* ========= Sticky Header Shadow ========= */
.header-scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.97) !important;
  backdrop-filter: blur(10px);
}

/* ========= Cart Drawer ========= */
.cart-drawer-overlay {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  transition: opacity 0.3s ease;
}

.cart-drawer {
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.12);
}

.cart-drawer.open {
  transform: translateX(0);
}

/* ========= Skeleton Loader ========= */
.skeleton {
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
}

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

/* ========= Toast Notification ========= */
.toast-enter {
  animation: toastIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.toast-leave {
  animation: toastOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes toastIn {
  0% { transform: translateX(120%); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

@keyframes toastOut {
  0% { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(120%); opacity: 0; }
}

/* ========= Add to Cart Animation ========= */
.add-cart-pop {
  animation: cartPop 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes cartPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

.cart-badge-bounce {
  animation: badgeBounce 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes badgeBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.4); }
}

/* ========= Blinkit-Style Category Card ========= */
.blinkit-cat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.blinkit-cat:hover {
  transform: translateY(-4px);
}

.blinkit-cat-icon {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.3s ease;
}

.blinkit-cat:hover .blinkit-cat-icon {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.blinkit-cat-label {
  font-size: 11px;
  font-weight: 600;
  color: #374151;
  text-align: center;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 640px) {
  .blinkit-cat-label {
    font-size: 12px;
  }
  .blinkit-cat-icon {
    border-radius: 20px;
  }
}

/* Extra-small phone screens */
@media (max-width: 374px) {
  .blinkit-cat-icon {
    border-radius: 12px;
  }
  .blinkit-cat-label {
    font-size: 10px;
  }
}

/* ========= Product Card V2 ========= */
.product-card-v2 {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card-v2:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

/* ========= ADD Button ========= */
.add-btn {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.add-btn:active {
  transform: scale(0.92);
}

/* ========= Promo Banner ========= */
.promo-banner {
  transition: all 0.3s ease;
}

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

/* ========= USP Card ========= */
.usp-card {
  transition: all 0.25s ease;
}

.usp-card:hover {
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.08);
}

/* ========= Legacy: Category Card Hover (kept for other pages) ========= */
.category-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(46, 105, 184, 0.12);
}

/* ========= Product Card ========= */
.product-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ========= Shop Card ========= */
.shop-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ========= Horizontal Scroll ========= */
.scroll-container {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.scroll-container::-webkit-scrollbar {
  display: none;
}

/* ========= Custom Scrollbar ========= */
.custom-scroll::-webkit-scrollbar {
  width: 5px;
}

.custom-scroll::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 10px;
}

.custom-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.custom-scroll::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ========= Bottom Nav ========= */
.bottom-nav-item.active {
  color: #2E69B8;
}

.bottom-nav-item.active svg {
  stroke: #2E69B8;
}

.bottom-nav-item.active .nav-dot {
  opacity: 1;
  transform: scaleX(1);
}

.nav-dot {
  opacity: 0;
  transform: scaleX(0);
  transition: all 0.3s ease;
}

/* ========= Floating Cart Button ========= */
.floating-cart {
  animation: floatPulse 2s ease-in-out infinite;
}

@keyframes floatPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(46, 105, 184, 0.3); }
  50% { box-shadow: 0 8px 30px rgba(46, 105, 184, 0.5); }
}

/* ========= Timeline / Order Tracking ========= */
.timeline-step.completed .timeline-dot {
  background: #10B981;
  border-color: #10B981;
}

.timeline-step.completed .timeline-line {
  background: #10B981;
}

.timeline-step.active .timeline-dot {
  background: #2E69B8;
  border-color: #2E69B8;
  box-shadow: 0 0 0 4px rgba(46, 105, 184, 0.2);
}

/* ========= Filter Sidebar Mobile ========= */
.filter-sidebar {
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-sidebar.open {
  transform: translateX(0);
}

/* ========= Pill Tab Active ========= */
.pill-tab {
  transition: all 0.25s ease;
}

.pill-tab.active {
  background: #2E69B8;
  color: white;
  box-shadow: 0 4px 12px rgba(46, 105, 184, 0.3);
}

/* ========= Hero Gradient ========= */
.hero-gradient {
  background: linear-gradient(135deg, #2E69B8 0%, #1a4d91 40%, #10B981 100%);
}

/* ========= Offer Banner Gradient ========= */
.offer-gradient {
  background: linear-gradient(135deg, #F59E0B 0%, #f97316 100%);
}

/* ========= Fade In Animation ========= */
.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ========= Pulse Dot ========= */
.pulse-dot {
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ========= Quantity Stepper ========= */
.qty-btn {
  transition: all 0.2s ease;
}

.qty-btn:hover {
  background: #2E69B8;
  color: white;
}

.qty-btn:active {
  transform: scale(0.9);
}

/* ========= Search Autocomplete ========= */
.search-dropdown {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.25s ease;
}

.search-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ========= Page Transitions ========= */
.page-content {
  animation: pageIn 0.4s ease forwards;
}

@keyframes pageIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

/* ========= Badge ========= */
.status-badge {
  font-size: 0.7rem;
  letter-spacing: 0.03em;
}

/* ========= Address Card ========= */
.address-card {
  transition: all 0.25s ease;
}

.address-card.selected {
  border-color: #2E69B8;
  background: rgba(46, 105, 184, 0.04);
  box-shadow: 0 0 0 3px rgba(46, 105, 184, 0.12);
}
