/* assets/css/product_extra.css - Premium product listing UI */

:root {
  --card-bg: #ffffff;
  --primary: #ff6600; 
  --primary-dark: #e65500;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
}

/* Grid layout */
.product-grid {
  display: grid;
  gap: 1.5rem;
  padding: 1rem 0;
  border-radius: 12px;
  overflow: hidden;
}

/* Responsive grid columns */
@media (min-width: 1200px) {
  .product-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (min-width: 992px) and (max-width: 1199px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 768px) and (max-width: 991px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Small screens – 2 columns (side-by-side) */
@media (max-width: 599px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 10px 0;
  }
}

/* Card container */
.product-card {
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--card-bg);

}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* Out‑of‑stock overlay */
.out-of-stock-card {
  opacity: 0.6;
}

/* Image thumbnail */
  .product-thumb {
    position: relative;
    overflow: hidden;
    height: 140px;
    background: #f5f5f5;
  }

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-thumb img {
  transform: scale(1.07);
}

/* Badges */
.new-badge, .stock-badge, .sold-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--primary);
  color: #fff;
  padding: 2px 6px;
  font-size: 0.75rem;
  border-radius: 4px;
  z-index: 2;
}

.sold-badge {
  background: #777;
}

/* Info area */
  .product-info {
    padding: 0.5rem 0.8rem;
    display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.product-category {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

  .product-info h3 {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

  .price {
    font-weight: 600;
    font-size: 0.9rem;
  color: var(--primary);
}

  .rating {
    font-size: 0.8rem;
    color: #ffb400; /* gold star */
}

/* Button */
.product-btn {
  margin-top: 0.6rem;
  align-self: flex-start;
  background: var(--primary);
  color: #fff;
  padding: 0.45rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: background .2s, transform .2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.product-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.disabled-btn {
  background: #999;
  cursor: not-allowed;
}

/* Responsive tweaks */
@media (max-width: 600px) {
  .product-thumb {
    height: 150px;
  }
}
