* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #2c5530 0%, #1a472a 100%);
  min-height: 100vh;
  color: #333;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 40px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  text-align: center;
}

h1 {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, #2c5530, #1a472a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
  letter-spacing: -2px;
}

.subtitle {
  font-size: 1.2rem;
  color: #666;
  font-weight: 300;
}

.controls {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 40px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.filter-section {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: center;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  font-weight: 600;
  color: #555;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

select,
input {
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  font-size: 16px;
  background: white;
  transition: all 0.3s ease;
  min-width: 180px;
}

select:focus,
input:focus {
  outline: none;
  border-color: #2c5530;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(44, 85, 48, 0.2);
}

.search-box {
  position: relative;
}

.search-box::before {
  content: "🔍";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(30%);
  font-size: 16px;
  line-height: 1;
  pointer-events: none;
}

.search-box input {
  padding-left: 50px;
  min-width: 300px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.product-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
}

.product-image {
  width: 100%;
  height: 240px;
  background: linear-gradient(45deg, #f8f9fa, #e9ecef);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: #ccc;
  position: relative;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.product-info {
  padding: 25px;
}

.product-name {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #333;
  line-height: 1.3;
}

.product-category {
  display: inline-block;
  background: linear-gradient(135deg, #2c5530, #1a472a);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 15px;
}

.product-description {
  color: #666;
  line-height: 1.6;
  margin-bottom: 15px;
}

.product-meta {
  display: flex;
  justify-content: flex-start; /* Adjust alignment */
  align-items: center;
  padding-top: 15px;
  border-top: 1px solid #f0f0f0;
}

.product-availability {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.availability-in-stock {
  background: #e8f5e8;
  color: #2e7d32;
}

.availability-low-stock {
  background: #fff3e0;
  color: #f57c00;
}

.availability-out-of-stock {
  background: #ffebee;
  color: #d32f2f;
}

.no-results {
  text-align: center;
  padding: 80px 20px;
  color: #666;
}

.no-results h2 {
  font-size: 2rem;
  margin-bottom: 10px;
  color: #999;
}

.stats-bar {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin: 30px 0;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  display: block;
}

.stat-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.8;
}

.product-specs {
  display: flex;
  gap: 15px;
  margin: 10px 0;
  flex-wrap: wrap;
}

.spec-item {
  background: #f8f9fa;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #555;
}

/* Modal Styles */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.show {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.modal-content {
  background: white;
  border-radius: 24px;
  max-width: 90vw;
  max-height: 90vh;
  overflow: hidden;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

.modal-overlay.show .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 24px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: white;
  transform: scale(1.1);
}

.modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 500px;
}

.modal-image-section {
  position: relative;
  background: #f8f9fa;
  display: flex;
  flex-direction: column;
}

.image-slideshow {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-image {
  width: 100%;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.main-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 24px;
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  opacity: 0.8;
}

.nav-btn:hover {
  background: white;
  opacity: 1;
  transform: translateY(-50%) scale(1.1);
}

.nav-btn.hidden {
  display: none;
}

.prev-btn {
  left: 15px;
}

.next-btn {
  right: 15px;
}

.image-thumbnails {
  display: flex;
  gap: 10px;
  padding: 15px;
  justify-content: center;
  background: rgba(0, 0, 0, 0.05);
  max-width: 100%;
  overflow-x: auto;
}

.thumbnail {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.thumbnail:hover,
.thumbnail.active {
  border-color: #2c5530;
  transform: scale(1.05);
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-counter {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 5px 15px;
  border-radius: 15px;
  font-size: 0.9rem;
}

.modal-info-section {
  padding: 40px;
  overflow-y: auto;
}

.modal-category {
  display: inline-block;
  background: linear-gradient(135deg, #2c5530, #1a472a);
  color: white;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 15px 0;
}

.modal-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.modal-spec-item {
  background: #f8f9fa;
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  color: #555;
  border: 1px solid #e9ecef;
}

.modal-description {
  color: #666;
  line-height: 1.7;
  margin: 20px 0;
  font-size: 1.1rem;
}

.modal-details {
  background: #f8f9fa;
  border-radius: 16px;
  padding: 25px;
  margin-top: 25px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #e9ecef;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  font-weight: 600;
  color: #555;
}

footer {
  background: #1a472a;
  color: white;
  text-align: center;
  padding: 20px;
  margin-top: 40px;
}

footer a {
  color: #f8f9fa;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

.footer-container p {
  margin: 5px 0;
}

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  .filter-section {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box input {
    min-width: 100%;
  }

  select {
    min-width: 100%;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
  }

  .stats-bar {
    gap: 20px;
  }

  .modal-content {
    max-width: 95vw;
    max-height: 95vh;
  }

  .modal-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .modal-image-section {
    max-height: 50vh;
  }

  .main-image {
    height: 300px;
  }

  .modal-info-section {
    padding: 20px;
  }
}

.logo-section {
  text-align: center;
  padding: 20px 0 10px 0;
}

.main-logo {
  height: 80px;
  width: auto;
  max-width: 300px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

@media (max-width: 768px) {
  .main-logo {
    height: 60px;
  }
}
