/* Popular products feed — WB-inspired density, MEGAMART palette */
.mm-popular-products {
    width: 100%;
    margin: 28px 0 36px;
}

.mm-products-heading {
    margin: 0 0 20px;
    color: #17212b;
    font-family: 'RobotoAz', Arial, sans-serif;
    font-size: 26px;
    font-weight: 600;
    line-height: 32px;
}

.mm-products-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 30px 14px;
    width: 100%;
    overflow: visible;
}

.mm-product-card {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 8px;
    border: 1px solid #edf0f3;
    border-radius: 12px;
    background: #fff;
    color: #242424;
    font-family: 'RobotoAz', Arial, sans-serif;
    font-size: 14px;
    line-height: 20px;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.mm-product-card:hover {
    border-color: #e4e8ed;
    box-shadow: 0 8px 24px rgba(23, 33, 43, .08);
}

.mm-product-photo {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: .78;
    overflow: hidden;
    border-radius: 12px;
    background: #ffffff;
}

.mm-product-photo::after {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: transparent;
    content: '';
    pointer-events: none;
}

.mm-product-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.mm-product-favorite {
    position: absolute;
    z-index: 4;
    top: 8px;
    right: 8px;
    display: flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 2px 8px rgba(23, 33, 43, .12);
    color: #17212b;
    cursor: pointer;
    text-decoration: none;
}

.mm-product-favorite:hover,
.mm-product-favorite:focus {
    color: #0050dd;
    text-decoration: none;
    outline: none;
}

.mm-product-favorite .like::before,
.mm-product-favorite .liked::before {
    display: block;
    font-family: Arial, sans-serif;
    font-size: 25px;
    line-height: 1;
}

.mm-product-favorite .like::before {
    content: '\2661';
}

.mm-product-favorite .liked::before {
    color: #0050dd;
    content: '\2665';
}

.mm-product-price-row {
    display: flex;
    min-height: 24px;
    align-items: baseline;
    gap: 6px;
    margin-top: 10px;
    white-space: nowrap;
}

.mm-wallet-icon {
    display: inline-flex;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    align-items: center;
    align-self: center;
    justify-content: center;
    color: #0050dd;
}

.mm-product-price {
    color: #0046be;
    font-size: 18px;
    font-weight: 600;
    line-height: 24px;
}

.mm-product-old-price {
    overflow: hidden;
    color: #9d9da5;
    font-size: 13px;
    line-height: 18px;
    text-decoration: line-through;
    text-overflow: ellipsis;
}

.mm-product-name {
    display: -webkit-box;
    min-height: 40px;
    margin-top: 3px;
    overflow: hidden;
    color: #6b6b73;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    text-decoration: none;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.mm-product-name strong {
    color: #242424;
    font-weight: 600;
}

.mm-product-name:hover,
.mm-product-name:focus {
    color: #6b6b73;
    text-decoration: none;
}

.mm-product-rating {
    display: flex;
    min-height: 20px;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    color: #242424;
    font-size: 13px;
    line-height: 18px;
}

.mm-rating-star {
    color: #ff9f2d;
    font-size: 15px;
}

.mm-review-count {
    color: #9d9da5;
}

.mm-product-buy {
    display: flex;
    width: 100%;
    height: 40px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    border-radius: 10px;
    background: #0050dd;
    color: #fff;
    font-family: 'Montserrat-Medium', Montserrat, Arial, sans-serif;
    font-size: 15px;
    font-weight: 500;
    line-height: 20px;
    text-decoration: none;
    transition: background .18s ease;
}

.mm-product-buy:hover,
.mm-product-buy:focus {
    background: #003795;
    color: #fff;
    text-decoration: none;
}

.mm-product-buy.disabled {
    opacity: .58;
    pointer-events: none;
}

.mm-products-loader {
    display: flex;
    min-height: 60px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #6b6b73;
    font-size: 14px;
}

.mm-products-loader[hidden] {
    display: none;
}

.mm-products-loader-dot {
    width: 18px;
    height: 18px;
    border: 2px solid #dce7f8;
    border-top-color: #0046be;
    border-radius: 50%;
    animation: mm-products-spin .7s linear infinite;
}

.mm-products-sentinel {
    width: 100%;
    height: 2px;
}

@keyframes mm-products-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 1199px) {
    .mm-products-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 991px) {
    .mm-products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
    .mm-popular-products { margin-top: 20px; }
    .mm-products-heading { font-size: 22px; line-height: 28px; }
    .mm-products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 10px; }
    .mm-product-price { font-size: 16px; }
}
