/* Products Module Styles */

/* Products Section Container */
.products-section {
  padding: 60px 0;
  background-color: #fff;
  min-height: calc(100vh - 200px);
}

.products-section h2 {
  font-size: 36px;
  color: #2c3e50;
  margin-bottom: 40px;
  text-align: center;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Products Layout - Left Sidebar + Right Content */
.products-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: start;
}

/* Left Sidebar - Product Categories */
.products-sidebar {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 25px;
  position: sticky;
  top: 100px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.category-title {
  font-size: 20px;
  color: #2c3e50;
  margin-bottom: 20px;
  font-weight: 700;
  padding-bottom: 15px;
  border-bottom: 2px solid #0066cc;
}

.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-item {
  margin-bottom: 8px;
}

.category-link {
  display: block;
  padding: 12px 18px;
  color: #5a6c7d;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 15px;
  border-left: 3px solid transparent;
}

.category-link:hover {
  background-color: #e9ecef;
  color: #0066cc;
  border-left-color: #0066cc;
  padding-left: 22px;
}

.category-link.active {
  background-color: #0066cc;
  color: #fff;
  border-left-color: #0052a3;
  padding-left: 22px;
}

/* Right Content - Products Grid */
.products-content {
  min-height: 600px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-top: 30px;
}

/* Product Card Styles */
.product-card {
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid #e8e8e8;
  position: relative;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: #0066cc;
}

/* Product Image Container */
.product-card-image {
  height: 300px;
  background-color: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  padding: 15px;
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.product-card:hover .product-card-image img {
  transform: scale(1.05);
}

.product-placeholder {
  width: 120px;
  height: 120px;
  background-color: #dee2e6;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  font-size: 14px;
  font-weight: 500;
}

/* Product Info */
.product-card-info {
  padding: 20px;
}

.product-card-title {
  font-size: 18px;
  color: #2c3e50;
  margin-bottom: 10px;
  font-weight: 700;
  line-height: 1.4;
}

.product-card-description {
  font-size: 14px;
  color: #5a6c7d;
  line-height: 1.6;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-link {
  display: inline-block;
  color: #0066cc;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: color 0.3s ease;
}

.product-card-link:hover {
  color: #0052a3;
}

/* Product Detail Overlay (Hover Effect) */
.product-detail-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 102, 204, 0.95);
  color: #fff;
  padding: 25px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  z-index: 10;
}

.product-card:hover .product-detail-overlay {
  opacity: 1;
  visibility: visible;
}

.overlay-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 15px;
  color: #fff;
}

.overlay-description {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.95);
  max-height: 200px;
  overflow-y: auto;
  padding-right: 5px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) rgba(255, 255, 255, 0.1);
}

.overlay-description::-webkit-scrollbar {
  width: 6px;
}

.overlay-description::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.overlay-description::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.overlay-description::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

.overlay-button {
  display: inline-block;
  background-color: #fff;
  color: #0066cc;
  padding: 10px 24px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
}

.overlay-button:hover {
  background-color: #f8f9fa;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Loading State */
.products-loading {
  text-align: center;
  padding: 60px 20px;
  color: #6c757d;
  font-size: 16px;
}

.products-loading::after {
  content: '...';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%,
  20% {
    content: '.';
  }
  40% {
    content: '..';
  }
  60%,
  100% {
    content: '...';
  }
}

/* Empty State */
.products-empty {
  text-align: center;
  padding: 60px 20px;
  color: #6c757d;
}

.products-empty-icon {
  font-size: 48px;
  margin-bottom: 20px;
  color: #dee2e6;
}

.products-empty-text {
  font-size: 16px;
  margin-bottom: 10px;
}

.products-empty-subtext {
  font-size: 14px;
  color: #adb5bd;
}

/* Responsive Design */
@media (max-width: 992px) {
  .products-layout {
    grid-template-columns: 1fr;
  }

  .products-sidebar {
    position: static;
    margin-bottom: 30px;
  }

  .category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .category-item {
    margin-bottom: 0;
  }

  .category-link {
    padding: 10px 16px;
    font-size: 14px;
  }

  .category-link:hover,
  .category-link.active {
    padding-left: 16px;
  }
}

@media (max-width: 768px) {
  .products-section {
    padding: 40px 0;
  }

  .products-section h2 {
    font-size: 28px;
    margin-bottom: 30px;
  }

  .products-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .category-list {
    flex-direction: column;
    gap: 0;
  }

  .category-item {
    margin-bottom: 8px;
  }

  .product-card-image {
    height: 200px;
  }

  .overlay-description {
    max-height: 120px;
  }
}

@media (max-width: 480px) {
  .products-sidebar {
    padding: 20px 15px;
  }

  .category-title {
    font-size: 18px;
  }

  .category-link {
    padding: 10px 14px;
    font-size: 13px;
  }

  .product-card-info {
    padding: 15px;
  }

  .product-card-title {
    font-size: 16px;
  }

  .product-card-description {
    font-size: 13px;
  }

  .overlay-title {
    font-size: 18px;
  }

  .overlay-description {
    font-size: 13px;
  }

  .overlay-features-list li {
    font-size: 12px;
  }
}
