/* Product container adjustments for fixed header */
.products-container {
  margin-top: 20px;
}

/* Product card styles */
.product-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-image {
  width: 100%;
  height: 150px;
  object-fit: contain;
  background-color: #f8f9fa;
}

.product-info {
  padding: 15px;
}

.product-name {
  font-weight: 600;
  margin-bottom: 5px;
}

.product-subname {
  color: #6c757d;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.product-description {
  font-size: 0.85rem;
  color: #495057;
  margin-bottom: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-price {
  font-weight: 700;
  color: #0d6efd;
  font-size: 1.2rem;
  margin-bottom: 15px;
}

/* List view styles - Fixed */
.list-view .product-item {
  width: 100%;
  max-width: 100%;
  flex: 0 0 100%;
}

.list-view .product-card {
  display: flex;
  flex-direction: row;
  margin-bottom: 15px;
}

.list-view .product-image-container {
  width: 150px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.list-view .product-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Grid view styles */
.grid-view .product-card {
  margin-bottom: 20px;
}

/* Modal styles */
.product-modal-image {
  max-height: 250px;
  object-fit: contain;
}

.quantity-selector input {
  max-width: 70px;
}

/* Responsive adjustments */
@media (max-width: 768px) {

  /* Mobile grid - 2 columns */
  .grid-view .product-item {
    width: 50%;
    max-width: 50%;
    flex: 0 0 50%;
  }

  /* List view on mobile */
  .list-view .product-card {
    flex-direction: row; /* Keep horizontal layout even on mobile */
  }

  .list-view .product-image-container {
    width: 100px; /* Smaller image on mobile */
  }
}
