/**
 * Bento product/editorial cards — sharp chrome, modern containment, no theme-hijack.
 * Loaded only with the Bento front bundle (not on WooCommerce shop pages).
 */

:root {
    --gb-card-radius: 14px;
    --gb-card-shadow: 0 1px 3px rgba(15, 23, 42, 0.05), 0 10px 28px rgba(15, 23, 42, 0.07);
    --gb-card-shadow-hover: 0 2px 6px rgba(15, 23, 42, 0.07), 0 18px 44px rgba(15, 23, 42, 0.11);
    --gb-card-text: #0f172a;
    --gb-card-muted: #64748b;
}

.bento-card {
    background: #0f172a;
    border-radius: var(--gb-card-radius);
    border: none;
    box-shadow: var(--gb-card-shadow);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100%;
    height: 100%;
    color: var(--gb-card-text);
    text-decoration: none;
    cursor: pointer;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    contain: paint;
    outline: none;
}

.bento-card:focus-visible {
    box-shadow: var(--gb-card-shadow-hover), 0 0 0 3px rgba(37, 99, 235, 0.28);
}

.bento-card:hover {
    box-shadow: var(--gb-card-shadow-hover);
    transform: translateY(-3px);
}

.bento-card:active {
    transform: translateY(-1px);
}

.bento-card__figure {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    overflow: hidden;
}

.bento-card__figure img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transform: scale(1.001);
    transform-origin: center top;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.bento-card:hover .bento-card__figure img {
    transform: scale(1.04);
}

.bento-card__body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.85rem 1rem 1rem;
    min-width: 0;
    color: #f8fafc;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.82) 0%,
        rgba(0, 0, 0, 0.35) 55%,
        transparent 100%
    );
}

.bento-card__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    min-width: 0;
}

.bento-card__title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.02em;
    color: #f8fafc;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bento-card__meta {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(248, 250, 252, 0.88);
    line-height: 1.4;
}

.bento-card--product .bento-card__meta {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.96);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

.bento-card__badge {
    flex: 0 0 auto;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.2rem 0.45rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.14);
    color: rgba(248, 250, 252, 0.95);
    line-height: 1;
}

.bento-card--product .bento-card__badge {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

@media (prefers-reduced-motion: reduce) {
    .bento-card,
    .bento-card__figure img {
        transition: none;
    }

    .bento-card:hover {
        transform: none;
    }

    .bento-card:hover .bento-card__figure img {
        transform: none;
    }
}

@container bento (max-width: 640px) {
    .bento-card {
        border-radius: 12px;
    }

    .bento-card__body {
        padding: 0.7rem 0.85rem 0.85rem;
    }

    .bento-card__title {
        font-size: 0.875rem;
    }
}
