.product-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.85rem;
}

.product-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    border: var(--public-elevated-surface-border);
    background: var(--public-elevated-surface-bg);
    border-radius: var(--public-elevated-surface-radius);
    overflow: hidden;
    box-shadow: var(--public-elevated-surface-shadow);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.product-card:hover {
    border-color: rgba(13, 90, 167, 0.18);
    box-shadow: var(--public-elevated-surface-shadow-hover);
}

.product-card-media {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    padding: 0.85rem;
    border-bottom: 1px solid rgba(15, 34, 51, 0.06);
    background: #fff;
}

.product-card-image {
    max-height: 152px;
    width: auto;
    object-fit: contain;
}

.product-card .card-body {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding: 0.85rem;
    background: #fbfcfe;
}

.product-card-brand {
    margin: 0;
    font-size: 0.74rem;
    color: var(--public-text-muted);
    font-weight: 500;
}

.product-card .card-title {
    margin: 0;
    font-size: 0.94rem;
    line-height: 1.35;
    min-height: 2.55em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-meta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.product-card-store {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 0.3rem;
    min-width: 0;
}

.product-card-store-prefix {
    color: var(--public-text-muted);
    font-size: 0.82rem;
    font-weight: 400;
    line-height: 1.25;
}

.product-card-store-name {
    display: block;
    min-width: 0;
    color: var(--public-text-muted);
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.product-card-status {
    display: inline-flex;
    padding: 0.25rem 0.45rem;
    border-radius: 0.55rem;
    font-size: 0.72rem;
    font-weight: 500;
}

.product-card-status.in-stock {
    color: #11783f;
    background: rgba(17, 120, 63, 0.1);
}

.product-card-status.out-of-stock {
    color: #b12d44;
    background: rgba(177, 45, 68, 0.1);
}

.product-card-price {
    font-size: 1.18rem;
    line-height: 1;
    font-weight: 600;
    color: var(--public-primary);
}

.product-card-actions {
    display: grid;
    gap: 0.45rem;
    margin-top: auto;
}

.product-card-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.42rem;
    min-height: 38px;
    line-height: 1.2;
    font-weight: 500;
    width: 100%;
    font-size: 0.86rem;
}

.product-card-actions .btn .bi {
    font-size: 0.88rem;
    line-height: 1;
}

@media (max-width: 991.98px) {
    .product-card-grid {
        grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
    }
}

@media (max-width: 767.98px) {
    .product-card-grid {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }

    .product-card-grid:not(.home-featured-row) .product-card {
        flex-direction: row;
        align-items: stretch;
        min-height: 0;
    }

    .product-card-grid:not(.home-featured-row) .product-card-media {
        flex: 0 0 clamp(104px, 32vw, 132px);
        min-height: 0;
        padding: 0.58rem;
        border-right: 1px solid rgba(15, 34, 51, 0.06);
        border-bottom: 0;
    }

    .product-card-grid:not(.home-featured-row) .product-card-image {
        max-width: 100%;
        max-height: 112px;
    }

    .product-card-grid:not(.home-featured-row) .product-card .card-body {
        flex: 1 1 auto;
        min-width: 0;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-areas:
            "title title"
            "brand meta"
            "price price"
            "actions actions";
        align-content: start;
        gap: 0.42rem 0.48rem;
        padding: 0.7rem 0.72rem;
    }

    .product-card-grid:not(.home-featured-row) .product-card-brand {
        grid-area: brand;
        align-self: center;
        max-width: 5.8rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 0.72rem;
        line-height: 1.2;
    }

    .product-card-grid:not(.home-featured-row) .product-card .card-title {
        grid-area: title;
        min-height: 0;
        font-size: 0.9rem;
        line-height: 1.28;
    }

    .product-card-grid:not(.home-featured-row) .product-card-meta {
        grid-area: meta;
        align-items: center;
        flex-direction: row;
        flex-wrap: nowrap;
        min-width: 0;
        gap: 0.3rem;
        overflow: hidden;
    }

    .product-card-grid:not(.home-featured-row) .stock-status {
        flex: 0 0 auto;
        min-width: 0;
    }

    .product-card-grid:not(.home-featured-row) .product-card-status {
        white-space: nowrap;
        padding: 0.2rem 0.38rem;
        border-radius: 0.45rem;
        font-size: 0.68rem;
    }

    .product-card-grid:not(.home-featured-row) .product-card-store {
        display: flex;
        align-items: center;
        gap: 0.2rem;
        min-width: 0;
        overflow: hidden;
    }

    .product-card-grid:not(.home-featured-row) .product-card-store-prefix,
    .product-card-grid:not(.home-featured-row) .product-card-store-name {
        font-size: 0.72rem;
        line-height: 1.2;
    }

    .product-card-grid:not(.home-featured-row) .product-card-store-name {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        overflow-wrap: normal;
    }

    .product-card-grid:not(.home-featured-row) .product-card-price {
        grid-area: price;
        font-size: 1.08rem;
        line-height: 1.05;
    }

    .product-card-grid:not(.home-featured-row) .product-card-actions {
        grid-area: actions;
        margin-top: 0.05rem;
    }

    .product-card-grid:not(.home-featured-row) .product-card-actions .btn {
        min-height: 34px;
        padding: 0.35rem 0.55rem;
        font-size: 0.78rem;
    }

    .product-card-grid:not(.home-featured-row) .product-card-actions .btn span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (max-width: 359.98px) {
    .product-card-grid:not(.home-featured-row) .product-card-media {
        flex-basis: 96px;
        padding: 0.5rem;
    }

    .product-card-grid:not(.home-featured-row) .product-card .card-body {
        gap: 0.38rem 0.42rem;
        padding: 0.62rem;
    }

    .product-card-grid:not(.home-featured-row) .product-card-brand {
        max-width: 4.6rem;
    }
}
