/* Catalogue-wide products page (light theme)
 * Reuse the categories layout and styling so the page matches other catalogue views.
 */
@import url("./categories.css");

/* Products Grid - reuse styles from individual-subcategory.css */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--cat-bg-main);
  border-radius: 16px;
  box-shadow: 0 4px 12px var(--cat-shadow);
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  color: inherit;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--cat-border);
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px var(--cat-shadow-lg);
  text-decoration: none;
  color: inherit;
  border-color: var(--cat-primary);
}

/* Product Image Section */
.product-image-section {
  position: relative;
  width: 100%;
  background: var(--cat-bg-secondary);
  overflow: hidden;
}

.product-icon {
  font-size: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  position: relative;
}

.product-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.product-badges-overlay {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}

.product-badges-overlay .product-badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.badge-featured {
  background: rgba(255, 255, 255, 0.9);
  color: #f59e0b;
  border: 1px solid #f59e0b;
}

.badge-active {
  background: rgba(16, 185, 129, 0.9);
  color: white;
}

.badge-inactive {
  background: rgba(239, 68, 68, 0.9);
  color: white;
}

/* Product Content */
.product-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.product-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  color: var(--cat-text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-description {
  font-size: 0.85rem;
  color: var(--cat-text-light);
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Product Pricing */
.product-pricing {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--cat-border);
}

.pricing-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.product-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--cat-primary);
}

.product-price-sale {
  font-size: 1.3rem;
  font-weight: 700;
  color: #27ae60;
}

.product-price-original {
  font-size: 1rem;
  font-weight: 600;
  color: var(--cat-text-light);
  text-decoration: line-through;
}

.product-discount {
  background: #e74c3c;
  color: white;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
}

/* Product Status Badges */
.product-status-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-popular {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.badge-recommended {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.badge-sale {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
}

.badge-available {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.badge-unavailable {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* Product Meta */
.product-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--cat-border);
  font-size: 0.8rem;
}

.product-url {
  color: var(--cat-text-light);
  font-family: monospace;
  text-align: center;
  word-break: break-all;
}
