/* ─── Home Page Styles ─── */

/* ── Hero Section ── */
.hero-section {
  position: relative;
  width: 100%;
  min-height: 90vh;
  background: var(--gradient-hero);
  display: flex;
  align-items: center;
  padding-top: 90px; /* clear fixed navbar */
  overflow: hidden;
}

/* ── Background Blobs ── */
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
}

.hero-blob-pink {
  width: 420px;
  height: 420px;
  background: var(--color-primary-light);
  top: -120px;
  right: -80px;
  border-radius: 60% 40% 70% 30% / 50% 60% 40% 50%;
  animation: blobPulse 8s ease-in-out infinite;
}

.hero-blob-teal {
  width: 360px;
  height: 360px;
  background: var(--color-secondary-light);
  bottom: -100px;
  left: -80px;
  border-radius: 40% 60% 30% 70% / 60% 40% 50% 50%;
  animation: blobPulse 10s ease-in-out infinite reverse;
}

/* ── Scattered Paw Prints ── */
.hero-paws {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero-paws .paw {
  position: absolute;
  font-size: 28px;
  opacity: 0.07;
  user-select: none;
}

.hero-paws .paw:nth-child(1) { top: 12%;  left: 5%;   font-size: 22px; transform: rotate(-20deg); }
.hero-paws .paw:nth-child(2) { top: 70%;  left: 2%;   font-size: 32px; transform: rotate(15deg);  }
.hero-paws .paw:nth-child(3) { top: 20%;  right: 6%;  font-size: 18px; transform: rotate(30deg);  }
.hero-paws .paw:nth-child(4) { top: 80%;  right: 4%;  font-size: 26px; transform: rotate(-10deg); }
.hero-paws .paw:nth-child(5) { top: 45%;  left: 48%;  font-size: 16px; transform: rotate(45deg);  }
.hero-paws .paw:nth-child(6) { top: 90%;  left: 55%;  font-size: 20px; transform: rotate(-30deg); }

/* ── Hero Grid Layout ── */
.hero-container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: var(--space-xxl);
  align-items: center;
  padding-top: var(--space-xxl);
  padding-bottom: var(--space-xxl);
}

/* ── Left: Content ── */
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-lg);
}

.shipping-badge {
  font-size: var(--font-size-sm);
  font-weight: var(--font-semibold);
  letter-spacing: 0.02em;
}

.hero-title {
  font-family: var(--font-display);
  font-size: var(--font-size-hero); /* 64px */
  font-weight: var(--font-bold);
  color: var(--color-text);
  line-height: 1.15;
}

.hero-tagline {
  font-family: var(--font-family);
  font-size: var(--font-size-md); /* 18px */
  font-weight: var(--font-medium);
  color: var(--color-secondary); /* Teal */
  letter-spacing: 0.06em;
  margin-top: calc(var(--space-sm) * -1);
}

.hero-description {
  color: var(--color-text-light);
  font-size: var(--font-size-md); /* 18px */
  line-height: 1.7;
  max-width: 500px;
}

.hero-buttons {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.hero-trust {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-top: var(--space-sm);
}

.trust-item {
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
  font-weight: var(--font-medium);
}

.trust-divider {
  color: var(--color-primary-light);
  opacity: 0.6;
}

/* ── Right: Hero Image ── */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image-wrapper {
  position: relative;
  width: 100%;
  max-width: 520px;
}

.hero-image {
  width: 100%;
  height: auto;
  border-radius: var(--radius-xl);
  box-shadow:
    var(--shadow-hover),
    0 0 0 6px rgba(232, 116, 138, 0.1),
    0 0 0 12px rgba(123, 191, 184, 0.06);
  display: block;
  object-fit: cover;
  animation: float 3s ease-in-out infinite;
}

/* Fallback shown when hero-banner.jpg is missing */
.hero-image-fallback {
  display: none; /* toggled via JS onerror */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: 100%;
  height: 340px;
  background: var(--gradient-pink);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-hover);
  text-align: center;
  animation: float 3s ease-in-out infinite;
  color: var(--color-text-white);
}

.hero-image-fallback .fallback-emoji {
  font-size: 100px;
}

.hero-image-fallback p {
  font-weight: var(--font-semibold);
  font-size: var(--font-size-md);
  opacity: 0.9;
}

.hero-image-fallback small {
  font-size: var(--font-size-xs);
  opacity: 0.6;
}

/* ── Animations ── */
@keyframes float {
  0%,  100% { transform: translateY(0px); }
  50%        { transform: translateY(-15px); }
}

@keyframes blobPulse {
  0%,  100% { transform: scale(1)    rotate(0deg);   }
  50%        { transform: scale(1.08) rotate(8deg);   }
}

/* ── Categories Section ── */
.categories {
  padding: var(--space-section) 0;
  background-color: var(--color-bg-light);
}

.categories .section-title {
  text-align: center;
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  font-weight: var(--font-bold);
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.categories .section-subtitle {
  text-align: center;
  color: var(--color-text-light);
  font-size: var(--font-size-md);
  margin-bottom: var(--space-xxl);
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-lg);
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background-color: var(--color-bg-card);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  border: 2px solid transparent;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
}

.category-circle {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  transition: var(--transition);
}

.category-emoji {
  font-size: 48px;
  line-height: 1;
}

.category-name {
  font-family: var(--font-family);
  font-size: var(--font-size-md);
  font-weight: var(--font-bold);
  color: var(--color-text);
  margin: 0;
}

/* Alternating Colors */
.category-card.accent-pink .category-circle {
  background-color: var(--color-bg-pink);
}

.category-card.accent-teal .category-circle {
  background-color: var(--color-bg-teal);
}

/* Hover effects */
.category-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-hover);
}

/* Active/selected card */
.category-card.active,
.category-card.selected {
  border-color: var(--color-primary);
}

/* ── Best Sellers Section ── */
.best-sellers {
  padding: var(--space-section) 0;
  background-color: var(--color-bg);
}

.best-sellers .section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: var(--space-xxl);
}

.best-sellers .section-title {
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  font-weight: var(--font-bold);
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.best-sellers .section-subtitle {
  color: var(--color-text-light);
  font-size: var(--font-size-md);
  margin: 0;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

.product-card {
  background-color: var(--color-bg-card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  text-decoration: none;
  color: inherit;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.product-image-wrapper {
  position: relative;
  aspect-ratio: 1/1;
  overflow: hidden;
  background-color: var(--color-bg-light);
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

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

/* Badges */
.product-category-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
}

.sale-badge {
  position: absolute;
  top: 40px;
  left: 12px;
  z-index: 3;
}

/* Wishlist Button */
.wishlist-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--color-bg-card);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  z-index: 3;
}

.wishlist-btn:hover {
  transform: scale(1.1);
}

.wishlist-btn .heart-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 2px;
  transition: var(--transition);
}

.wishlist-btn.active .heart-icon {
  fill: var(--color-primary);
}

/* Add to Cart Button (smooth hover appearance) */
.product-image-wrapper .add-to-cart-btn {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 14px;
  background: var(--gradient-pink);
  color: var(--color-text-white);
  border: none;
  font-family: var(--font-family);
  font-weight: var(--font-bold);
  font-size: var(--font-size-sm);
  text-align: center;
  cursor: pointer;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  z-index: 2;
}

.product-card:hover .add-to-cart-btn {
  transform: translateY(0);
  opacity: 1;
}

/* Product Info */
.product-info {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
}

.rating-val {
  font-weight: var(--font-semibold);
  color: var(--color-text);
}

.reviews-count {
  color: var(--color-text-light);
}

.product-name {
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: var(--font-bold);
  color: var(--color-text);
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 42px;
}

.product-price-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: auto;
}

.price-sale {
  font-size: 16px;
  font-weight: var(--font-bold);
  color: var(--color-primary);
}

.price-original {
  font-size: 14px;
  text-decoration: line-through;
  color: var(--color-text-light);
}

/* ── Why Choose Sniff Ship Section ── */
.why-us {
  background-color: var(--color-bg-light);
  padding: var(--space-section) 0;
}

.why-us .section-title {
  text-align: center;
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  font-weight: var(--font-bold);
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.why-us .section-subtitle {
  text-align: center;
  color: var(--color-text-light);
  font-size: var(--font-size-md);
  margin-bottom: var(--space-xxl);
}

.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 400px;
  margin: 0 auto;
  text-align: center;
}

.why-card {
  background-color: var(--color-bg-card);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border-top: 3px solid transparent;
}

.why-card:hover {
  border-top: 3px solid var(--color-primary);
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.why-icon {
  font-size: 56px;
  line-height: 1;
  margin-bottom: 16px;
}

.why-card h3 {
  font-family: var(--font-family);
  font-size: 18px;
  font-weight: var(--font-bold);
  color: var(--color-text);
  margin: 16px 0 8px;
}

.why-card p {
  color: var(--color-text-light);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

/* ── Customer Reviews Section ── */
.testimonials {
  background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-pink) 100%);
  padding: var(--space-section) 0;
}

.testimonials .section-title {
  text-align: center;
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  font-weight: var(--font-bold);
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.testimonials .section-subtitle {
  text-align: center;
  color: var(--color-text-light);
  font-size: var(--font-size-md);
  margin-bottom: var(--space-xxl);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.testimonial-card {
  background-color: var(--color-bg-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.quote-icon {
  font-family: var(--font-display);
  font-size: 64px;
  color: var(--color-primary-light);
  line-height: 0.8;
  margin-bottom: var(--space-sm);
}

.testimonial-stars {
  font-size: 16px;
  margin-bottom: var(--space-md);
}

.testimonial-text {
  font-style: italic;
  color: var(--color-text-light);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: var(--space-lg);
}

.testimonial-divider {
  border: 0;
  border-top: 1px solid rgba(232, 116, 138, 0.2);
  margin-bottom: var(--space-lg);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--gradient-pink);
}

.author-info {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-family: var(--font-family);
  font-weight: var(--font-bold);
  font-size: 16px;
  color: var(--color-text);
  margin: 0;
}

.author-pet {
  color: var(--color-secondary);
  font-size: 14px;
  font-weight: var(--font-medium);
}

/* ── Newsletter Section ── */
.newsletter {
  background: var(--gradient-brand);
  position: relative;
  overflow: hidden;
  padding: var(--space-section) 0;
  margin-top: var(--space-section);
}

/* Subtle paw print overlay */
.newsletter::before {
  content: '🐾 🐾 🐾 🐾 🐾 🐾 🐾';
  position: absolute;
  font-size: 150px;
  opacity: 0.05;
  top: -40px;
  left: -50px;
  letter-spacing: 150px;
  transform: rotate(-15deg);
  pointer-events: none;
  white-space: nowrap;
}

.newsletter-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
  color: var(--color-text-white);
}

.newsletter-text h2 {
  font-family: var(--font-display);
  font-size: 36px;
  margin-bottom: var(--space-xs);
  color: var(--color-text-white);
}

.newsletter-text p {
  font-size: var(--font-size-md);
  margin-bottom: var(--space-sm);
  opacity: 0.9;
}

.newsletter-text small {
  opacity: 0.8;
  font-size: var(--font-size-xs);
}

.newsletter-form {
  display: flex;
  gap: var(--space-sm);
  flex-shrink: 0;
  width: 100%;
  max-width: 480px;
}

.newsletter-input {
  flex: 1;
  background: var(--color-bg-card);
  border-radius: var(--radius-full);
  padding: 14px 24px;
  border: none;
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  outline: none;
  color: var(--color-text);
}

.newsletter-input:focus {
  box-shadow: 0 0 0 4px rgba(255,255,255,0.3);
}

.newsletter-form .btn {
  background: var(--color-bg-card);
  color: var(--color-primary);
  white-space: nowrap;
}

.newsletter-form .btn:hover {
  background: var(--color-text-white);
  color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .hero-title { font-size: 52px; }
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero-section {
    padding-top: 80px;
  }

  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content {
    align-items: center;
  }

  .hero-description {
    max-width: 100%;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-trust {
    justify-content: center;
  }

  .hero-image-wrapper {
    max-width: 360px;
  }

  .hero-image-fallback {
    height: 320px;
  }

  .hero-blob-pink {
    width: 280px;
    height: 280px;
    top: -60px;
    right: -40px;
  }

  .hero-blob-teal {
    width: 240px;
    height: 240px;
    bottom: -60px;
    left: -40px;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }

  .category-card {
    padding: var(--space-lg);
  }

  .newsletter-content {
    flex-direction: column;
    text-align: center;
  }
  
  .newsletter-form {
    flex-direction: column;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .hero-title { font-size: 40px; }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

}