/* ── Catalog Container ─────────────────────────────────────── */

.catalog-container {
    max-width: 1024px;
    margin: 0 auto;
}

/* ── Product Card ───────────────────────────────────────────── */

.product-card {
    border: 1px solid var(--theme-border);
    border-radius: var(--theme-radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--theme-surface);
}

.product-card:hover {
    box-shadow: var(--theme-shadow-card);
    transform: var(--theme-card-hover-transform);
}

/* ── Image ─────────────────────────────────────────────────── */

.product-card-image {
    background: var(--theme-surface-light);
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--theme-card-image-height);
    overflow: hidden;
    position: relative;
}

.product-card-image img,
.product-card-image video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-card-no-image {
    background: var(--theme-surface-light);
}

/* ── Hover media (primary2) ────────────────────────────────── */

.product-card-hover-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-card-hover-image {
    opacity: 1;
}

.product-card:hover .product-card-hover-video {
    opacity: 1;
}

/* ── Video play overlay ────────────────────────────────────── */

.product-card-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.play-icon {
    width: 48px;
    height: 48px;
    fill: rgba(255, 255, 255, 0.9);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.product-card:hover .product-card-play-overlay {
    opacity: 0;
}

/* ── Content ───────────────────────────────────────────────── */

.product-card-content {
    padding: var(--theme-card-content-padding) !important;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

/* ── Header (price + stock code) ───────────────────────────── */

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.product-pricing {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.price-wholesale {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--theme-price-color);
}

.price-rrp {
    font-size: 0.72rem;
    color: var(--theme-text-muted);
    text-decoration: line-through;
}

.stock-code {
    font-family: var(--theme-font-family-mono);
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    color: var(--theme-code-color) !important;
    letter-spacing: 0.3px;
}

/* ── Packs (colour + size grid) ────────────────────────────── */

.product-packs {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pack-block {
    padding: 2px 0;
}

.pack-block + .pack-block {
    border-top: 1px solid var(--theme-surface-light);
    padding-top: 4px;
}

.pack-code {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--theme-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.pack-colour {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--theme-text-primary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.size-grid {
    border-collapse: collapse;
    width: auto;
}

.size-grid td {
    text-align: center;
    font-size: 0.68rem;
    padding: 1px 6px;
    border: 1px solid var(--theme-border-strong);
    min-width: 24px;
}

.size-grid .size-row td {
    font-weight: 600;
    color: var(--theme-text-on-surface);
    background: var(--theme-surface);
}

.size-grid .qty-row td {
    color: #666;
    background: var(--theme-border-subtle);
}

/* ── Material ──────────────────────────────────────────────── */

.product-material {
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    color: var(--theme-text-secondary) !important;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ── Footer (brand + label) ────────────────────────────────── */

.product-footer {
    margin-top: auto;
    padding-top: 4px;
    border-top: 1px solid var(--theme-border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-name {
    font-size: 0.7rem !important;
    color: var(--mud-palette-primary) !important;
    font-weight: 600 !important;
    text-transform: uppercase;
}

.product-label {
    display: flex;
    align-items: center;
}

.label-image {
    max-height: 24px;
    max-width: 60px;
    object-fit: contain;
}

.label-text {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--theme-text-secondary);
    letter-spacing: 0.5px;
}

/* ── Responsive ────────────────────────────────────────────── */

@media (max-width: 599px) {
    .product-card-image {
        height: 60vh;
        min-height: 280px;
    }

    .product-card-content {
        padding: 10px !important;
        gap: 6px;
    }

    .price-wholesale {
        font-size: 1rem;
    }

    .pack-colour {
        font-size: 0.7rem;
    }

    .size-grid td {
        font-size: 0.6rem;
        padding: 1px 4px;
        min-width: 20px;
    }
}

@media (min-width: 600px) and (max-width: 959px) {
    .product-card-image {
        height: 280px;
    }
}

@media (min-width: 960px) and (max-width: 1279px) {
    .product-card-image {
        height: 300px;
    }
}

@media (min-width: 1280px) {
    .product-card-image {
        height: 400px;
    }
}
