/* Enhanced Products Section Styles */

/* Background styling */
.products {
  position: relative;
  padding: 100px 0;
  background-color: #f9f9f9;
  background-image: url('../assets/images/products/grain-bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  overflow: hidden;
}

.products::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(249, 249, 249, 0.85) 100%);
  z-index: 1;
}

.products .container {
  position: relative;
  z-index: 2;
}

/* Floating decorative elements */
.products-floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.products-element {
  position: absolute;
  opacity: 0.15;
  pointer-events: none;
}

.products-element.leaf {
  background-image: url('../assets/images/products/leaf-icon.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.products-element.grain {
  background-image: url('../assets/images/products/grain-icon.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.products-element.p1 {
  width: 60px;
  height: 60px;
  top: 10%;
  left: 5%;
  animation: float-rotate 20s infinite linear;
  opacity: 0.1;
}

.products-element.p2 {
  width: 40px;
  height: 40px;
  top: 30%;
  right: 7%;
  animation: float-rotate 25s infinite linear reverse;
  opacity: 0.1;
}

.products-element.p3 {
  width: 50px;
  height: 50px;
  bottom: 15%;
  left: 10%;
  animation: float-rotate 22s infinite linear;
  opacity: 0.1;
}

.products-element.p4 {
  width: 45px;
  height: 45px;
  bottom: 20%;
  right: 8%;
  animation: float-rotate 18s infinite linear reverse;
  opacity: 0.1;
}

@keyframes float-rotate {
  0% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(20px, 10px) rotate(90deg); }
  50% { transform: translate(0, 20px) rotate(180deg); }
  75% { transform: translate(-20px, 10px) rotate(270deg); }
  100% { transform: translate(0, 0) rotate(360deg); }
}

/* Enhanced section header */
.products .section-header {
  margin-bottom: 60px;
}

.products .section-header h2 {
  position: relative;
  display: inline-block;
}

.products .section-header h2::after {
  content: '';
  position: absolute;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #7ED957, #FFC107);
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}

/* Enhanced filter buttons */
.product-filter {
  margin-bottom: 50px;
  padding: 10px;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 50px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  display: inline-flex;
}

.filter-btn {
  padding: 12px 25px;
  margin: 0 5px;
  border-radius: 30px;
  font-weight: 500;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  background-color: transparent;
  color: #555;
  border: none;
  position: relative;
  overflow: hidden;
}

.filter-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(126, 217, 87, 0.1);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
  z-index: -1;
}

.filter-btn:hover {
  color: #7ED957;
  transform: translateY(-2px);
}

.filter-btn:hover::before {
  transform: scaleX(1);
}

.filter-btn.active {
  background-color: #7ED957;
  color: white;
  box-shadow: 0 5px 15px rgba(126, 217, 87, 0.3);
}

/* Enhanced product cards */
.modern-product-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.modern-product-card:hover {
  transform: translateY(-15px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.product-image-container {
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(249, 249, 249, 0.5) 100%);
}

.product-image-container img {
  max-height: 180px;
  max-width: 80%;
  object-fit: cover;
  transition: all 0.5s ease;
  filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.1));
  transform: translateY(0);
}

.modern-product-card:hover .product-image-container img {
  transform: translateY(-10px) scale(1.05);
  filter: drop-shadow(0 15px 20px rgba(0, 0, 0, 0.15));
}

.product-content {
  padding: 25px;
  background-color: white;
  border-top-left-radius: 30px;
  position: relative;
  z-index: 2;
}

.modern-product-card:hover .product-content {
  background-color: rgba(255, 255, 255, 0.95);
}

.product-content h3 {
  color: #333;
  margin-bottom: 15px;
  font-size: 22px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.modern-product-card:hover .product-content h3 {
  color: #7ED957;
}

.product-short-desc {
  color: #666;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.product-hover-overlay {
  opacity: 0;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0) 100%);
  transition: all 0.5s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  transform: translateY(50px);
}

.modern-product-card:hover .product-hover-overlay {
  opacity: 1;
  transform: translateY(0);
}

.quote-btn {
  background-color: #FFC107;
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 30px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(255, 193, 7, 0.3);
}

.quote-btn:hover {
  background-color: #f0b500;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(255, 193, 7, 0.4);
}

/* Product category indicator */
.cattle-card::after,
.poultry-card::after,
.swine-card::after,
.aqua-card::after {
  content: '';
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-size: 60%;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  z-index: 3;
  transition: all 0.3s ease;
}

.cattle-card::after {
  background-color: rgba(126, 217, 87, 0.2);
  background-image: url('../assets/images/products/cattle-icon.png');
}

.poultry-card::after {
  background-color: rgba(233, 30, 99, 0.2);
  background-image: url('../assets/images/products/poultry-icon.png');
}

.swine-card::after {
  background-color: rgba(156, 39, 176, 0.2);
  background-image: url('../assets/images/products/swine-icon.png');
}

.aqua-card::after {
  background-color: rgba(3, 169, 244, 0.2);
  background-image: url('../assets/images/products/aqua-icon.png');
}

.cattle-card:hover::after,
.poultry-card:hover::after,
.swine-card:hover::after,
.aqua-card:hover::after {
  transform: scale(1.1);
}

/* Responsive styles */
@media (max-width: 992px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
  
  .filter-btn {
    padding: 10px 20px;
    margin: 5px;
  }
}

@media (max-width: 768px) {
  .products {
    padding: 60px 0;
  }
  
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
  
  .product-filter {
    flex-wrap: wrap;
  }
}

@media (max-width: 576px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
}
