.storefront-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    white-space: normal;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}

.storefront-card__link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.storefront-card__badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.18rem 0.42rem;
    border-radius: 999px;
    font-size: 0.65rem;
    line-height: 1.15;
    font-weight: 700;
    text-align: center;
}

.storefront-card__media {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #f8f9fa;
}

.storefront-card__media img,
.storefront-card__media picture,
.storefront-card__media picture img,
.storefront-card__media .carousel,
.storefront-card__media .carousel-inner,
.storefront-card__media .carousel-item,
.storefront-card__media .carousel-item img {
    width: 100%;
    height: 100%;
}

.storefront-card__media img,
.storefront-card__media picture img,
.storefront-card__media .carousel-item img {
    display: block;
    object-fit: contain;
    object-position: center center;
}

.storefront-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.56rem 0.56rem 0.46rem;
}

.storefront-card__meta {
    margin: 0;
    color: #6b7280;
    font-size: 0.7rem;
    line-height: 1.18;
    font-weight: 600;
}

.storefront-card__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    min-height: 2.32em;
    color: #111827;
    font-size: 0.92rem;
    line-height: 1.16;
    font-weight: 700;
    text-decoration: none;
}

.storefront-card__title:hover {
    text-decoration: none;
}

.storefront-card__reviews {
    margin: 0;
    font-size: 0.69rem;
    line-height: 1.16;
}

.storefront-card__reviews .review-stars,
.storefront-card__reviews .rating-stars {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 2px;
}

.storefront-card__reviews .review-stars i,
.storefront-card__reviews .rating-stars .star {
    font-size: 0.72rem;
}

.storefront-card__price-group,
.storefront-card__pricing {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.2rem 0.45rem;
}

.storefront-card__price {
    font-size: 1.02rem;
    line-height: 1.08;
    font-weight: 700;
}

.storefront-card__price--old {
    font-size: 0.78rem;
    line-height: 1.16;
    color: #9ca3af;
    text-decoration: line-through;
    font-weight: 600;
}

.storefront-card__price--accent {
    color: #ff6b35;
}

.storefront-card__utility {
    font-size: 0.72rem;
    line-height: 1.18;
    font-weight: 700;
}

.storefront-card__actions {
    width: 100%;
    margin-top: auto;
    padding: 0 0.56rem 0.56rem;
}

/* Some legacy storefront pages still style generic .product-actions as a
   hidden hover overlay. Shared storefront cards should always own their
   action-row layout instead of inheriting that older pattern. */
.storefront-card .product-actions.storefront-card__actions {
    position: static !important;
    top: auto !important;
    right: auto !important;
    opacity: 1 !important;
    transform: none !important;
}

.storefront-card__action-row {
    display: flex;
    width: 100%;
    gap: 0.35rem;
}

.storefront-card__action-row .btn {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 2.35rem;
    padding: 0.38rem 0.3rem;
    border-radius: 12px;
    font-size: 0.76rem;
    line-height: 1.1;
    font-weight: 700;
}

.storefront-card__action-row .btn i {
    font-size: 0.8rem;
}

.storefront-card--compact .storefront-card__media,
.storefront-card--promo .storefront-card__media {
    aspect-ratio: 1 / 1;
    min-height: 9.1rem;
}

.storefront-card--compact .storefront-card__body,
.storefront-card--grid .storefront-card__body,
.storefront-card--content .storefront-card__body {
    padding: 0.56rem 0.56rem 0.46rem;
}

.storefront-card--compact .storefront-card__title,
.storefront-card--grid .storefront-card__title,
.storefront-card--content .storefront-card__title {
    font-size: 0.92rem;
}

.storefront-card--compact .storefront-card__price,
.storefront-card--grid .storefront-card__price,
.storefront-card--content .storefront-card__price {
    font-size: 1.02rem;
}

.storefront-card--promo {
    width: 100%;
    flex: 0 0 auto;
    border-radius: 18px;
}

.storefront-card--promo .storefront-card__body {
    padding: 0.64rem 0.64rem 0.58rem;
    gap: 0.35rem;
}

.storefront-card--promo .storefront-card__meta {
    font-size: 0.66rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.storefront-card--promo .storefront-card__title {
    font-size: 0.92rem;
}

.storefront-card--promo .storefront-card__price {
    font-size: 1.08rem;
}

.storefront-card--promo .storefront-card__actions {
    padding: 0 0.64rem 0.64rem;
}

.storefront-card--promo .storefront-card__action-row {
    flex-direction: column;
    gap: 0.36rem;
}

.storefront-card--promo .storefront-card__action-row .btn {
    min-height: 2.45rem;
    font-size: 0.78rem;
}

.storefront-card--grid .storefront-card__media,
.storefront-card--content .storefront-card__media {
    aspect-ratio: 0.95 / 1;
    min-height: 8.9rem;
}

@media (min-width: 576px) {
    .storefront-card__body {
        padding: 0.66rem 0.66rem 0.56rem;
    }

    .storefront-card__actions {
        padding: 0 0.66rem 0.66rem;
    }

    .storefront-card__price {
        font-size: 1.08rem;
    }

    .storefront-card--compact .storefront-card__media,
    .storefront-card--promo .storefront-card__media {
        min-height: 10rem;
    }

    .storefront-card--grid .storefront-card__media,
    .storefront-card--content .storefront-card__media {
        min-height: 9.75rem;
    }
}

@media (min-width: 768px) {
    .storefront-card__badge {
        top: 0.62rem;
        left: 0.62rem;
        padding: 0.26rem 0.54rem;
        font-size: 0.7rem;
    }

    .storefront-card__body {
        gap: 0.5rem;
        padding: 0.85rem 0.85rem 0.72rem;
    }

    .storefront-card__meta {
        font-size: 0.76rem;
    }

    .storefront-card__title {
        font-size: 1.02rem;
        line-height: 1.28;
    }

    .storefront-card__reviews {
        font-size: 0.76rem;
    }

    .storefront-card__price {
        font-size: 1.2rem;
    }

    .storefront-card__price--old {
        font-size: 0.88rem;
    }

    .storefront-card__utility {
        font-size: 0.78rem;
    }

    .storefront-card__actions {
        padding: 0 0.85rem 0.85rem;
    }

    .storefront-card__action-row .btn {
        min-height: 2.75rem;
        padding: 0.58rem 0.5rem;
        font-size: 0.84rem;
    }

    .storefront-card__action-row .btn i {
        font-size: 0.9rem;
    }

    .storefront-card--compact .storefront-card__media {
        min-height: 11.5rem;
    }

    .storefront-card--promo .storefront-card__media {
        min-height: 12.25rem;
    }

    .storefront-card--promo .storefront-card__action-row {
        flex-direction: row;
    }

    .storefront-card--promo .storefront-card__action-row .btn {
        min-height: 2.75rem;
    }

    .storefront-card--grid .storefront-card__media,
    .storefront-card--content .storefront-card__media {
        min-height: 11rem;
    }
}
