/* Explore By Need Page Styles */

body {
  background: white;
  margin: 0;
  padding: 0;
}

/* Expand Button Styles */
.expand-button-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 20px 30px 20px;
  background: white;
  border-bottom: 1px solid #e9ecef;
  margin: 0;
}

.expand-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.expand-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.expand-btn:active {
  transform: translateY(0);
}

.expand-btn.expanded {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  padding: 20px 40px;
  box-shadow: 0 6px 25px rgba(220, 53, 69, 0.4);
}

.arrow-icon {
  width: 24px;
  height: 24px;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.expand-btn.expanded .arrow-icon {
  transform: rotate(180deg);
}

.btn-text {
  transition: opacity 0.3s ease;
}

/* Products Section */
.products-section {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.6s ease,
              padding 0.6s ease;
  padding: 0 50px;
  background: white;
}

.products-section.expanded {
  max-height: 5000px;
  opacity: 1;
  padding: 60px 50px;
  background: white;
}

/* Search Bar */
.search-container {
  position: relative;
  max-width: 600px;
  margin: 0 auto 40px;
}

.search-input {
  width: 100%;
  padding: 16px 50px 16px 20px;
  font-size: 16px;
  border: 2px solid #e9ecef;
  border-radius: 50px;
  background: white;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.search-icon {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: #6c757d;
  pointer-events: none;
}

.no-results {
  text-align: center;
  padding: 60px 20px;
  color: #6c757d;
}

.no-results svg {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  color: #dc3545;
}

.no-results p {
  font-size: 18px;
  font-weight: 500;
}

.section-title {
  font-size: 36px;
  margin-bottom: 40px;
  color: #1a3a52;
  text-align: center;
  font-weight: 700;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto;
}

.product-card {
  background: white;
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid #e9ecef;
  animation: fadeInUp 0.5s ease forwards;
  opacity: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.product-content {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

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

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
.product-card:nth-child(5) { animation-delay: 0.5s; }
.product-card:nth-child(6) { animation-delay: 0.6s; }

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border-color: #007bff;
}

.product-name {
  font-size: 18px;
  font-weight: 700;
  color: #1a3a52;
  margin-bottom: 12px;
  line-height: 1.4;
  min-height: 50px;
}

.product-composition {
  font-size: 13px;
  color: #6c757d;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 8px;
  font-weight: 500;
}

.product-price {
  font-size: 22px;
  font-weight: 700;
  color: #28a745;
  margin-bottom: 12px;
}

.product-uses {
  font-size: 13px;
  color: #495057;
  line-height: 1.6;
  margin-bottom: 16px;
  max-height: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.product-link {
  display: block;
  padding: 12px 20px;
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  text-align: center;
  margin-top: auto;
}

.product-link:hover {
  background: linear-gradient(135deg, #0056b3 0%, #003d82 100%);
  transform: scale(1.05);
}

/* View More/Less Button */
.view-more-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 50px;
  padding: 20px;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.view-more-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 45px;
  background: linear-gradient(135deg, #28a745 0%, #218838 100%);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(40, 167, 69, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

/* Ripple effect */
.view-more-btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  transform: scale(0);
  animation: ripple-animation 0.6s ease-out;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Hover glow effect */
.view-more-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 50px;
}

.view-more-btn:hover::before {
  opacity: 1;
}

.view-more-btn:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 30px rgba(40, 167, 69, 0.5);
}

.view-more-btn:active {
  transform: translateY(-2px) scale(0.98);
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

/* View Less state - Yellow/Orange */
.view-more-btn.less {
  background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
  box-shadow: 0 4px 20px rgba(255, 193, 7, 0.4);
}

.view-more-btn.less:hover {
  box-shadow: 0 8px 30px rgba(255, 193, 7, 0.5);
}

.view-more-btn.less:active {
  box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
}

.chevron-icon {
  width: 22px;
  height: 22px;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 2;
}

.view-more-btn.less .chevron-icon {
  transform: rotate(180deg);
}

.btn-text {
  position: relative;
  z-index: 2;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Smooth fade-in for new products */
.product-card.fade-in {
  animation: fadeInUp 0.6s ease forwards;
}

/* Header and Footer fade animations */
header, footer {
  transition: opacity 0.5s ease, transform 0.5s ease;
}

header.hidden, footer.hidden {
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
}

footer.hidden {
  transform: translateY(20px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
  
  .section-title {
    font-size: 28px;
  }
  
  .products-section.expanded {
    padding: 40px 20px;
  }
}
