/* product_cards.css : product grid + cards (used by products.php and index.php) */
.pgrid {
    --pc-brand: #561373;
    --pc-ink: #222;
    --pc-muted: #777;
    --pc-line: #e6e6e6;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
    color: var(--pc-ink);
}

.pgrid .card {
    position: relative;
    background: #fff;
    border: 1px solid var(--pc-line);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .15s, transform .15s;
}

.pgrid .card:hover {
    box-shadow: 0 8px 22px rgba(0,0,0,.10);
    transform: translateY(-2px);
}

.pgrid .clink {
    display: flex;
    flex-direction: column;
    flex: 1;
    color: inherit;
    text-decoration: none;
}

.pgrid .thumb {
    aspect-ratio: 1 / 1;
    background: #fafafa;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.pgrid .thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.pgrid .thumb .emoji {
    font-size: 84px;
    line-height: 1;
}

.pgrid .badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--pc-brand);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 20px;
}

.pgrid .info {
    padding: 12px 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pgrid .pname {
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.35;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
}

.pgrid .dim {
    font-size: 12.5px;
    color: var(--pc-muted);
}

.pgrid .rate {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--pc-muted);
}

.pgrid .stars {
    position: relative;
    display: inline-block;
    font-size: 15px;
    letter-spacing: 2px;
    color: #ddd;
    line-height: 1;
}

.pgrid .stars span {
    position: absolute;
    left: 0;
    top: 0;
    overflow: hidden;
    white-space: nowrap;
    color: #f5a623;
}

.pgrid .price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 2px;
}

.pgrid .now {
    font-size: 18px;
    font-weight: 700;
    color: var(--pc-brand);
}

.pgrid .was {
    font-size: 13px;
    color: var(--pc-muted);
    text-decoration: line-through;
}
