/* Blinkit Custom Styles */

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

:root {
  --blinkit-yellow: #FFC801;
  --blinkit-green: #0C831F;
  --blinkit-dark: #1F1F1F;
  --blinkit-gray: #666666;
  --blinkit-light-gray: #F8F8F8;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--blinkit-dark);
}

/* Utility Classes */
.blinkit-yellow {
  background-color: var(--blinkit-yellow);
}

.blinkit-green {
  background-color: var(--blinkit-green);
}

.text-blinkit-green {
  color: var(--blinkit-green);
}

/* Header Styles */
.header-shadow {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Product Card Styles */
.product-card {
  transition: all 0.3s ease;
  cursor: pointer;
}

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

.product-image {
  transition: transform 0.3s ease;
}

.product-card:hover .product-image {
  transform: scale(1.05);
}

/* Button Styles */
.btn-primary {
  background-color: var(--blinkit-green);
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background-color: #0A6B1A;
  transform: translateY(-1px);
}

.btn-add-to-cart {
  background: white;
  border: 1px solid var(--blinkit-green);
  color: var(--blinkit-green);
  padding: 6px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.2s ease;
}

.btn-add-to-cart:hover {
  background: var(--blinkit-green);
  color: white;
}

/* Search Bar Styles */
.search-container {
  background: #F8F8F8;
  border-radius: 12px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  max-width: 600px;
}

.search-input {
  background: transparent;
  border: none;
  outline: none;
  width: 100%;
  font-size: 14px;
}

/* Category Pills */
.category-pill {
  background: #F3F4F6;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
}

.category-pill:hover {
  background: var(--blinkit-green);
  color: white;
}

.category-pill.active {
  background: var(--blinkit-green);
  color: white;
}

/* Cart Styles */
.cart-item {
  background: white;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.2s ease;
}

.cart-item:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

/* Delivery Timer */
.delivery-timer {
  background: var(--blinkit-dark);
  color: white;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Loading Spinner */
.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--blinkit-green);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Swiper Custom Styles */
.swiper-button-next,
.swiper-button-prev {
  background: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.swiper-button-next:after,
.swiper-button-prev:after {
  font-size: 18px;
  color: var(--blinkit-dark);
  font-weight: bold;
}

.swiper-pagination-bullet-active {
  background: var(--blinkit-green);
}

/* Responsive Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

@media (min-width: 640px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
  }
}

@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
  }
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--blinkit-dark);
  color: white;
  padding: 16px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1000;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success {
  background: var(--blinkit-green);
}

.toast.error {
  background: #DC2626;
}

/* Mobile Menu */
.mobile-menu {
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.mobile-menu.active {
  transform: translateX(0);
}

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

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

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Floating Item Animation */
.floating-item {
  position: fixed;
  width: 30px;
  height: 30px;
  background: var(--blinkit-green);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  pointer-events: none;
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Cart Bounce Animation */
@keyframes bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.bounce {
  animation: bounce 0.3s ease-in-out;
}

/* Loading Animation */
@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.animate-spin {
  animation: rotate 1s linear infinite;
}

/* Fade In Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.3s ease-out;
}

/* Shimmer Effect for Loading */
.shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

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

/* Search Suggestions */
#searchSuggestions {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  border-top: none;
}

.suggestion-item.active {
  background-color: #f3f4f6;
}

/* Mobile Responsive Adjustments */
@media (max-width: 640px) {
  .product-card {
    padding: 8px;
  }
  
  .product-card h3 {
    font-size: 12px;
  }
  
  .btn-add-to-cart {
    font-size: 11px;
    padding: 4px 12px;
  }
  
  .header-shadow {
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  }
  
  #searchSuggestions {
    max-height: 300px;
  }
}