/* assets/css/products-dynamic.css
   Adds styles for dynamically rendered product cards and the detail page.
   Import this AFTER your existing products.css and products-detail.css.
*/

/* ── Product grid ───────────────────────────────────────────── */

.category-title {
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #333;
    margin: 0;
}

.product-grid {
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(200px, 1fr));
    margin-bottom: 40px;
    gap: 20px;
}

.product-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-card {
    position: relative;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s, transform 0.2s;
    cursor: pointer;
    max-height: 320px;
}

.product-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.product-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #ed1c24;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 1;
}

.product-card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f8f8f8;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-card-image img {
    transform: scale(1.04);
}

.product-card-body {
    padding: 10px 12px 14px;
}

.product-card-title {
    font-size: 0.82rem;
    font-weight: 500;
    color: #333;
    margin: 0 0 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-price {
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    text-align: center;
}

.price-old {
    font-size: 0.60rem;
    color: #999;
    text-decoration: line-through;
}

.price-new {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ed1c24;
}

.product-section {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.product-section:last-child {
    border-bottom: none;
}

/* ── Product not found ──────────────────────────────────────── */
.product-not-found {
    padding: 60px 20px;
    text-align: center;
    font-size: 1.1rem;
    color: #666;
}
.no-results {
    grid-column: 1 / -1;
    padding: 24px 12px;
    color: #666;
    text-align: center;
}


/* Live inventory status from the Akko catalog. */
.product-stock {
  display: inline-block;
  margin: 8px 12px 0;
  font-size: 12px;
  font-weight: 600;
}
.product-stock.in, .product-stock-detail.in { color: #198754; }
.product-stock.out, .product-stock-detail.out { color: #b42318; }
.product-stock-detail { margin: 0 0 12px; font-weight: 600; }
.add-to-cart-btn:disabled, .quantity-container button:disabled, .quantity-container input:disabled {
  cursor: not-allowed;
  opacity: .55;
}
