/* ================================
   Products Page - Modern Redesign
   ================================ */

/* ======= Modern Products Hero ======= */
.products-modern-hero {
  padding: 8rem 0 4rem;
  background: linear-gradient(135deg, var(--primary) 0%, #1e5e23 100%);
  position: relative;
  overflow: hidden;
}

.products-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(255, 152, 0, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  background-size: cover;
}

.products-hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 50px;
  color: white;
  font-weight: 600;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-badge i {
  font-size: 1.2rem;
}

.products-main-heading {
  font-size: 3.5rem;
  font-weight: 800;
  color: white;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.products-hero-desc {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2.5rem;
}

/* Search Bar */
.products-search-bar {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.products-search-bar i {
  position: absolute;
  right: 25px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.2rem;
}

.products-search-bar input {
  width: 100%;
  padding: 1.2rem 4rem 1.2rem 2rem;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  background: white;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.products-search-bar input:focus {
  outline: none;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

/* ======= Products Main Section ======= */
.products-main-section {
  padding: 4rem 0;
  background: #f8f9fa;
  min-height: 70vh;
}

.container-large {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.products-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 3rem;
  align-items: start;
}

/* ======= Sidebar ======= */
.products-sidebar {
  position: sticky;
  top: 100px;
}

.sidebar-widget {
  background: white;
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  margin-bottom: 2rem;
}

.widget-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #f0f0f0;
}

.widget-title i {
  color: var(--primary);
}

/* Filter Categories */
.filter-categories {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.filter-category-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: #f8f9fa;
  border: 2px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: right;
  width: 100%;
}

.filter-category-btn:hover {
  background: rgba(46, 125, 50, 0.05);
  border-color: var(--primary);
  transform: translateX(-5px);
}

.filter-category-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.filter-category-btn.active .category-icon,
.filter-category-btn.active .category-count {
  color: white;
}

.category-icon {
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.filter-category-btn.active .category-icon {
  background: rgba(255, 255, 255, 0.2);
}

.category-text {
  flex: 1;
  font-weight: 600;
  font-size: 0.95rem;
}

.category-count {
  width: 30px;
  height: 30px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}

/* Contact Widget */
.sidebar-contact-widget {
  background: linear-gradient(135deg, var(--primary), #1e5e23);
  color: white;
  text-align: center;
}

.sidebar-contact-widget .widget-title {
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
}

.widget-contact-icon {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.widget-contact-icon i {
  font-size: 2.5rem;
  color: white;
}

.sidebar-contact-widget h4 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  color: white;
}

.sidebar-contact-widget p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.widget-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 2rem;
  background: white;
  color: var(--primary);
  font-weight: 700;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.widget-contact-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* ======= Products Grid Area ======= */
.products-grid-area {
  min-height: 600px;
}

.products-grid-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1.5rem 2rem;
  background: white;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.results-count {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 1rem;
  color: var(--text-muted);
}

.results-count strong {
  font-size: 1.5rem;
  color: var(--primary);
  font-weight: 800;
}

.view-toggle {
  display: flex;
  gap: 0.5rem;
}

.view-btn {
  width: 45px;
  height: 45px;
  background: #f8f9fa;
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.view-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.view-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ======= Products Masonry Grid ======= */
.products-masonry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.product-masonry-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.4s ease;
  cursor: pointer;
  position: relative;
}

.product-masonry-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.product-masonry-image {
  position: relative;
  height: 280px;
  overflow: hidden;
}

.product-masonry-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-masonry-card:hover .product-masonry-image img {
  transform: scale(1.1);
}

.product-category-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-category-badge i {
  font-size: 1rem;
}

.product-quick-view {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  opacity: 0;
  transition: all 0.3s ease;
}

.product-masonry-card:hover .product-quick-view {
  opacity: 1;
}

.product-masonry-content {
  padding: 1.75rem;
}

.product-masonry-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.product-masonry-desc {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.product-masonry-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 2px solid #f0f0f0;
}

.product-inquiry-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  background: var(--primary);
  color: white;
  font-weight: 600;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.product-inquiry-btn:hover {
  background: #1e5e23;
  transform: translateX(-5px);
  gap: 1rem;
}

.product-quality-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
}

.product-quality-badge i {
  font-size: 1.1rem;
}

/* ======= Products List View ======= */
.products-list-view {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.products-list-view .product-masonry-card {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 2rem;
  align-items: center;
}

.products-list-view .product-masonry-image {
  height: 250px;
  width: 350px;
}

.products-list-view .product-masonry-content {
  padding: 2rem;
}

.products-list-view .product-masonry-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.products-list-view .product-masonry-desc {
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.products-list-view .product-masonry-card:hover {
  transform: translateX(10px);
}

/* No Results Message */
.no-results-message {
  text-align: center;
  padding: 5rem 2rem;
  background: white;
  border-radius: 20px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.no-results-icon {
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  color: white;
  font-size: 3rem;
}

.no-results-message h3 {
  font-size: 1.8rem;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.no-results-message p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* ======= Responsive Design ======= */
@media (max-width: 1200px) {
  .products-layout {
    grid-template-columns: 280px 1fr;
    gap: 2rem;
  }
}

@media (max-width: 992px) {
  .products-layout {
    grid-template-columns: 1fr;
  }
  
  .products-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
  
  .products-masonry-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .products-main-heading {
    font-size: 2.5rem;
  }
  
  .products-layout {
    display: flex;
    flex-direction: column;
  }
  
  .products-sidebar {
    grid-template-columns: 1fr;
    order: 2;
  }
  
  .products-grid-area {
    order: 1;
  }
  
  .sidebar-widget:first-child {
    order: -1;
  }
  
  .sidebar-contact-widget {
    order: 3;
    margin-top: 2rem;
  }
  
  .products-masonry-grid {
    grid-template-columns: 1fr;
  }
  
  .products-list-view .product-masonry-card {
    grid-template-columns: 1fr;
  }
  
  .products-list-view .product-masonry-image {
    width: 100%;
    height: 250px;
  }
  
  .products-grid-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .view-toggle {
    display: none;
  }
  
  .filter-category-btn {
    padding: 1.25rem;
  }
}

@media (max-width: 576px) {
  .products-modern-hero {
    padding: 6rem 0 3rem;
  }
  
  .products-main-heading {
    font-size: 2rem;
  }
  
  .products-search-bar input {
    font-size: 0.9rem;
    padding: 1rem 3.5rem 1rem 1.5rem;
  }
}

/* ======= Loading Animation ======= */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.product-skeleton {
  background: linear-gradient(
    90deg,
    #f0f0f0 25%,
    #e0e0e0 50%,
    #f0f0f0 75%
  );
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
  border-radius: 20px;
  height: 450px;
}
