/* ====================================
   PRODUCTS MODULE - Styles
   ==================================== */

/* Product Detail Page */
.product-detail {
  background: #f8f9fa;
}

.product-gallery .main-image {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-gallery .main-image img {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: contain;
  display: block;
}

.thumbnails {
  gap: 10px;
}

.thumbnails img {
  border: 2px solid #dee2e6;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.thumbnails img:hover {
  border-color: #0d6efd;
  transform: scale(1.05);
}

.thumbnails img.active {
  border: 3px solid #0d6efd;
  box-shadow: 0 0 10px rgba(13, 110, 253, 0.3);
}

.product-info {
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-info h1 {
  font-size: 2rem;
  font-weight: 600;
  color: #333;
}

.product-info .price h2 {
  font-size: 2.5rem;
  font-weight: 700;
}

.product-fields table {
  margin: 0;
}

.product-fields th {
  background: #f8f9fa;
  font-weight: 600;
  color: #495057;
}

.product-description {
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  line-height: 1.8;
}

.product-description img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 15px 0;
}

.product-description h1,
.product-description h2,
.product-description h3 {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

/* Products List Page */
.products-list {
  background: #f8f9fa;
  min-height: calc(100vh - 200px);
}

.product-filters {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
}

.product-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.product-card-image {
  position: relative;
  width: 100%;
  height: 250px;
  background: #f8f9fa;
  overflow: hidden;
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .product-card-image img {
  transform: scale(1.05);
}

.product-card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #ffc107;
  color: #000;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.product-card-body {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.product-card-category {
  font-size: 0.85rem;
  color: #6c757d;
  margin-bottom: 8px;
}

.product-card-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #333;
}

.product-card-title a {
  color: inherit;
  text-decoration: none;
}

.product-card-title a:hover {
  color: #0d6efd;
}

.product-card-description {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 15px;
  line-height: 1.5;
  flex-grow: 1;
}

.product-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 15px;
  border-top: 1px solid #e9ecef;
}

.product-card-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0d6efd;
}

.product-card-link {
  font-size: 0.9rem;
  text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
  }

  .product-info {
    padding: 20px;
  }

  .product-info h1 {
    font-size: 1.5rem;
  }

  .product-info .price h2 {
    font-size: 2rem;
  }

  .product-card-image {
    height: 200px;
  }
}

@media (max-width: 576px) {
  .products-grid {
    grid-template-columns: 1fr;
  }

  .thumbnails {
    flex-wrap: nowrap;
    overflow-x: auto;
  }
}

/* Empty state */
.products-empty {
  text-align: center;
  padding: 60px 20px;
  color: #6c757d;
}

.products-empty i {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.5;
}

/* Loading state */
.product-loading {
  text-align: center;
  padding: 40px;
}

.product-loading .spinner-border {
  width: 3rem;
  height: 3rem;
}
