.sp-product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

@media (min-width: 768px) {
    .sp-product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (min-width: 1200px) {
    .sp-product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 18px;
    }
}

.sp-product-card {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 100%;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.sp-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.sp-product-card-media {
    display: block;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
}

.sp-product-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    background: #f6f7f8;
    overflow: hidden;
}

.sp-product-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sp-product-badges {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
}

.sp-product-badge {
    background: #d7263d;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 0;
    padding: 3px 8px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-product-badge--info {
    background: #5b6776;
}

.sp-product-body {
    padding: 10px 10px 12px;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 148px;
}

.sp-product-title {
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.35;
    color: #2f3540;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
    max-height: 2.7em;
    margin-bottom: 6px;
}

.sp-product-title:hover {
    color: #2f3540;
}

.sp-product-category-tag {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    padding: 0.22rem 0.58rem;
    margin-bottom: 8px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #fff;
    background: #a8c4a2;
    border-radius: 999px;
    text-decoration: none;
    line-height: 1.2;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-product-category-tag:hover {
    color: #fff;
    background: #8dab86;
}

.sp-product-meta {
    flex: 1 1 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 24px;
    margin-bottom: 8px;
}

.sp-product-social-rotate {
    flex: 1 1 auto;
    min-width: 0;
}

.sp-product-rating-row {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
    margin-left: auto;
    min-height: 22px;
}

.sp-product-stars {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    color: #f4b400;
    font-size: 0.78rem;
    line-height: 1;
}

.sp-product-rating-value {
    font-size: 0.78rem;
    font-weight: 600;
    color: #5b6776;
}

.sp-product-social-rotate {
    position: relative;
    min-height: 22px;
}

.sp-product-meta:not(:has(.sp-product-social-rotate)) .sp-product-rating-row {
    margin-left: 0;
}

.sp-product-social-line {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-product-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 50%;
    font-size: 0.72rem;
    line-height: 1;
}

.sp-product-social-text {
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-product-social-line--views {
    color: #0369a1;
}

.sp-product-social-line--views .sp-product-social-icon {
    color: #0284c7;
    background: rgba(14, 165, 233, 0.18);
}

.sp-product-social-line--favorites {
    color: #be123c;
}

.sp-product-social-line--favorites .sp-product-social-icon {
    color: #e11d48;
    background: rgba(244, 63, 94, 0.16);
}

.sp-product-social-line--cart {
    color: #047857;
}

.sp-product-social-line--cart .sp-product-social-icon {
    color: #059669;
    background: rgba(16, 185, 129, 0.18);
}

.sp-product-social-line[hidden] {
    display: none !important;
}

.sp-product-price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: auto;
    min-height: 24px;
}

.sp-product-price {
    color: #c1272d;
    font-weight: 700;
    font-size: 1.12rem;
}

.sp-product-old-price {
    color: #7f8a96;
    font-size: 0.98rem;
    font-weight: 600;
    text-decoration: line-through;
}

.sp-product-grid > .col {
    display: flex;
    min-width: 0;
}
