/* Basic styles */
.card-img-top {
  height: 200px;
  object-fit: contain;
  padding: 1rem;
}

.badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.4rem;
  margin-right: 0.25rem;
}

/* Table styles */
.table-compact {
  font-size: 0.875rem;
  margin: 0;
}

.table-compact td,
.table-compact th {
  padding: 0.25rem 0.5rem;
  white-space: nowrap;
}

.table-compact .description-cell {
  white-space: normal;
  max-width: 300px;
}

.table th {
  font-weight: 500;
  color: #666;
}

.table-striped > tbody > tr:nth-of-type(odd) {
  background-color: rgba(0, 0, 0, 0.02);
}

/* Product list styles */
.product-img-small {
  height: 50px;
  width: 50px;
  object-fit: contain;
}

.filters {
  background: #f8f9fa;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 4px;
}

.filters .form-label {
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
  color: #666;
}

.filters select {
  min-width: 120px;
}

.pagination-sm {
  margin: 0.5rem 0;
}

/* Product detail styles */
.product-description {
  font-size: 0.9rem;
  line-height: 1.6;
}

.product-description p {
  margin-bottom: 1rem;
}

.product-description img {
  max-width: 100%;
  height: auto;
  margin: 1rem 0;
}

/* Card styles */
.card {
  border: 1px solid rgba(0, 0, 0, 0.125);
  border-radius: 0.25rem;
}

.card-header {
  background-color: rgba(0, 0, 0, 0.03);
  padding: 0.75rem 1rem;
  margin-bottom: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

.card-header h3 {
  color: #333;
  font-weight: 500;
}

/* Product Gallery styles */
.product-gallery {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1rem;
}

.main-image {
  background: white;
  border-radius: 6px;
  aspect-ratio: 1/1;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
}

.carousel {
  height: 100%;
  position: relative;
}

.carousel-inner {
  height: 100%;
  display: flex;
  align-items: center;
  background: white;
}

.carousel-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

.carousel-item.active {
  display: flex;
}

.carousel-item img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.thumbnails {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem;
  background: white;
  border-radius: 6px;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.thumbnails::-webkit-scrollbar {
  height: 6px;
}

.thumbnails::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.thumbnails::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.thumbnails::-webkit-scrollbar-thumb:hover {
  background: #999;
}

.thumbnail {
  height: 60px;
  width: 60px;
  flex: 0 0 60px;
  object-fit: contain;
  border: 2px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  padding: 4px;
  background: white;
  transition: border-color 0.2s;
}

.thumbnail.active {
  border-color: #0d6efd;
}

.thumbnail:hover:not(.active) {
  border-color: rgba(13, 110, 253, 0.5);
}

/* Add styles for sortable headers */
.table th a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: inherit;
}

.table th a:hover {
  color: #0d6efd;
}

/* Compare page styles */
.compare-table {
  border: 1px solid #dee2e6;
  background: white;
}

.compare-table th:first-child,
.compare-table td:first-child {
  background: #f8f9fa;
  font-weight: 500;
  width: 150px;
  position: sticky;
  left: 0;
  z-index: 1;
  border-right: 2px solid #dee2e6;
}

.compare-table th {
  min-width: 200px;
  background: white;
}

.compare-table .product-header {
  padding: 1rem;
  border-bottom: 2px solid #dee2e6;
}

.compare-table .product-image {
  max-height: 120px;
  width: auto;
  margin: 0.5rem auto;
  display: block;
}

.compare-table .product-name {
  font-weight: 600;
  margin: 0.5rem 0;
  font-size: 0.9rem;
  line-height: 1.3;
}

.compare-table .product-code {
  color: #6c757d;
  font-size: 0.8rem;
}

.compare-table td {
  vertical-align: middle;
  font-size: 0.875rem;
}

.compare-table .feature-name {
  font-weight: 500;
  color: #495057;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
}

.compare-table .feature-value {
  padding: 0.5rem 1rem;
}

.compare-table .description-cell {
  max-height: 150px;
  overflow-y: auto;
  padding: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Remove button styling */
.remove-product {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.25rem 0.5rem;
  line-height: 1;
  border-radius: 4px;
  opacity: 0.7;
}

.remove-product:hover {
  opacity: 1;
}

/* Update compare table styles */
.table-compact.table-sm td {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}
