/* Google Fonts - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* Performance optimizations */
* {
  box-sizing: border-box;
}

/* Base styles */
body {
  background: #fff;
  color: #222;
  font-family: 'Lora', 'Montserrat', 'Segoe UI', Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

/* Typography */
.navbar-brand {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 2rem;
  letter-spacing: 1px;
}

.hero-title {
  font-family: 'Poppins', sans-serif !important;
  font-weight: 600 !important;
}

/* Pufazzo brand text styling */
.pufazzo-brand {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
}

/* Cards and components */
.card {
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.card-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.btn-outline-dark {
  border-radius: 2rem;
  transition: all 0.2s ease;
}

.btn-outline-dark:hover {
  transform: translateY(-1px);
}

/* Product cards */
.product-card {
  height: 100%;
  transition: all 0.3s ease;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border: none;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.product-image-container {
  position: relative;
  overflow: hidden;
  height: 240px;
  background: #f8f9fa;
}

.product-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}

.product-card:hover .product-image-container img {
  transform: scale(1.05);
}

/* Category cards */
.category-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  height: 280px;
  display: flex;
  flex-direction: column;
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.category-image {
  position: relative;
  overflow: hidden;
  height: 240px;
  background: #f8f9fa;
}

.category-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}

.category-card:hover .category-image img {
  transform: scale(1.05);
}

.category-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #007bff;
}

.category-content {
  padding: 1.5rem;
  background: white;
  text-align: center;
}

.category-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: #333;
}

.category-count {
  font-size: 0.9rem;
  color: #666;
  margin: 0;
  font-weight: 500;
}

/* Out of stock badge */
.out-of-stock-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
  z-index: 10;
}

/* Footer */
footer {
  font-size: 0.95rem;
  background-color: #f8f9fa;
  border-top: 1px solid #dee2e6;
  padding: 2rem 0;
  margin-top: 3rem;
}

/* Responsive design */
@media (max-width: 768px) {
  .navbar-brand {
    font-size: 1.5rem;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .card-title {
    font-size: 1rem;
  }
  
  .category-title {
    font-size: 1rem;
  }
  
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .product-image-container {
    height: 180px;
  }
  
  .category-card {
    height: 240px;
  }
  
  .category-image {
    min-height: 150px;
  }
}

@media (max-width: 576px) {
  .navbar-brand {
    font-size: 1.25rem;
  }
  
  .hero-title {
    font-size: 1.5rem;
  }
  
  .card-body {
    padding: 0.75rem;
  }
  
  .btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
  }
}

/* Performance optimizations */
.lazy-load {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lazy-load.loaded {
  opacity: 1;
}

/* Loading spinner */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #28a745;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Accessibility improvements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles for accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus {
  box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
  border-color: #28a745;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .card {
    border: 2px solid #000;
  }
  
  .btn {
    border-width: 2px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
} 

/* Custom button styles */
.btn-outline-dark {
  border-radius: 2rem;
  transition: all 0.2s ease;
}

.btn-outline-dark:hover {
  transform: translateY(-1px);
}

/* Form focus states */
.form-control:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
} 

/* Lazy Loading Optimizations */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* Preload critical images */
.hero-banner img {
  loading: eager;
}

/* Optimize image loading */
.product-image-container img,
.category-image img {
  loading: lazy;
  transition: opacity 0.3s ease;
}

/* Loading placeholder */
.image-placeholder {
  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; }
}