/* ==========================================================================
   View Product Count – Mosaic Layout
   ========================================================================== */

.vpc-top-viewed {
    margin: 2.5em 0;
}

.vpc-title {
    margin: 0 0 0.75em;
    font-size: 1.1em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #555;
}

.vpc-mosaic {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    grid-auto-rows: 190px;
    gap: 6px;
}

.vpc-card--hero {
    grid-row: span 2;
}

.vpc-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 6px;
    text-decoration: none;
    color: #fff;
    background: #222;
}

.vpc-card:hover .vpc-card__img {
    transform: scale(1.04);
    opacity: 0.85;
}

.vpc-card__img {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    display: block;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.vpc-card__img--placeholder {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #d0d0d0 0%, #b0b0b0 100%);
}

.vpc-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.15) 55%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0.7em 0.8em;
    gap: 0.2em;
    z-index: 1;
}

.vpc-card__rank {
    position: absolute;
    top: 0.55em;
    left: 0.65em;
    z-index: 2;
    font-size: 0.75em;
    font-weight: 800;
    line-height: 1;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(4px);
    color: #fff;
    border-radius: 4px;
    padding: 3px 7px;
    letter-spacing: 0.04em;
}

.vpc-card--hero .vpc-card__rank {
    font-size: 0.9em;
    padding: 5px 11px;
}

.vpc-card__meta {
    display: flex;
    flex-direction: column;
    gap: 0.1em;
}

.vpc-card__title {
    font-weight: 700;
    line-height: 1.3;
    font-size: 0.78em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.vpc-card--hero .vpc-card__title {
    font-size: 1.05em;
    -webkit-line-clamp: 3;
}

.vpc-card__price {
    font-size: 0.8em;
    font-weight: 700;
    color: #fff;
    opacity: 0.95;
}

.vpc-card__price .woocommerce-Price-amount {
    color: #fff;
}

.vpc-card__price ins {
    text-decoration: none;
}

.vpc-card__price del {
    opacity: 0.6;
    font-size: 0.85em;
    margin-right: 3px;
}

.vpc-card--hero .vpc-card__price {
    font-size: 1em;
}

.vpc-card__count {
    font-size: 0.65em;
    opacity: 0.75;
    color: #fff;
}

.vpc-card--hero .vpc-card__count {
    font-size: 0.75em;
}

/* Mobile */
@media (max-width: 540px) {
    .vpc-mosaic {
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: 130px;
    }
    .vpc-card--hero {
        grid-column: span 2;
        grid-row: span 1;
    }
}
