.mm-product-loop {
    --mm-product-loop-gap: 12px;
    --mm-product-loop-columns: 4;
    --mm-product-loop-columns-tablet: 2;
    --mm-product-loop-columns-mobile: 1;
    margin: 0;
}

.mm-product-loop__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.mm-product-loop__title,
.mm-product-loop__title-spacer {
    margin: 0;
    min-height: 1px;
}

.mm-product-loop__title {
    color: #111;
    font-size: clamp(22px, 4vw, 32px);
    line-height: 1;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.mm-product-loop__nav {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.mm-product-loop__nav-button {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d9d9d9;
    border-radius: 999px;
    background: #fff;
    color: #111;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.mm-product-loop__nav-button:hover:not(:disabled) {
    background: #111;
    border-color: #111;
    color: #fff;
}

.mm-product-loop__nav-button:disabled {
    opacity: 0.35;
    cursor: default;
}

.mm-product-loop__items {
    display: grid;
    grid-template-columns: repeat(var(--mm-product-loop-columns), minmax(0, 1fr));
    gap: var(--mm-product-loop-gap);
}

.mm-product-loop-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 0;
    border-radius: 0;
    background: #fff;
    overflow: hidden;
    box-shadow: none;
}

.mm-product-loop-card__media {
    position: relative;
    display: block;
    background: #f7f7f7;
    text-decoration: none;
}

.mm-product-loop-card__media--gallery {
    overflow: hidden;
}

.mm-product-loop-card__media-viewport {
    display: block;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y pinch-zoom;
    cursor: grab;
}

.mm-product-loop-card__media-viewport::-webkit-scrollbar {
    display: none;
}

.mm-product-loop-card__media-viewport.is-dragging {
    cursor: grabbing;
}

.mm-product-loop-card__media-track {
    display: flex;
    width: 100%;
}

.mm-product-loop-card__media-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
}

.mm-product-loop-card__media img {
    display: block;
    width: 100%;
    height: auto;
    user-select: none;
    -webkit-user-drag: none;
}

.mm-product-loop-card__badge {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 1;
    padding: 4px 6px;
    border-radius: 8px;
    border: 1px solid #b8b8b8;
    background: #dfdbda;
    color: #5e5e5e;
    font-size: 8px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.mm-product-loop-card__content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 14px;
    padding-top: 20px;
}

.mm-product-loop-card__title {
    margin: 0;
    color: #111;
    font-size: 18px;
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.mm-product-loop-card__title a {
    color: inherit;
    text-decoration: none;
}

.mm-product-loop-card__description {
    color: #666;
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-line;
}

.mm-product-loop-card__price {
    color: #111;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 700;
}

.mm-product-loop-card__price del {
    color: #888;
    font-weight: 400;
    margin-right: 8px;
}

.mm-product-loop-card__price ins {
    text-decoration: none;
}

.mm-product-loop-card__actions {
    margin-top: auto;
}

.mm-product-loop-card__cart {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
}

.mm-product-loop-card__purchase-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.mm-product-loop-card__attributes {
    flex: 0 1 auto;
    min-width: 0;
}

.mm-product-loop-card__attribute-group {
    margin-bottom: 0;
}

.mm-product-loop-card__attribute-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mm-product-loop-card__attribute-option {
    min-width: 52px;
    min-height: 46px;
    padding: 0 16px;
    border: 1px solid #d7d7d7;
    border-radius: 10px;
    background: #f3f3f3;
    color: #111;
    font-size: 13px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}

.mm-product-loop-card__attribute-option:hover:not(:disabled) {
    border-color: #111;
}

.mm-product-loop-card__attribute-option.is-selected {
    border-color: #b8b8b8;
    background: #dfdbda;
    color: #5e5e5e;
}

.mm-product-loop-card__attribute-option:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.mm-product-loop-card__attribute-options--single .mm-product-loop-card__attribute-option {
    width: auto;
    min-height: 36px;
}

.mm-product-loop-card__purchase-row .mm-product-loop-card__actions {
    margin-top: 0;
    flex: 1 1 auto;
}

.mm-product-loop-card__actions .button,
.mm-product-loop-card__actions .added_to_cart {
    width: 100%;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #111;
    border-radius: 10px;
    background: #111;
    color: #fff;
    font-size: 12px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
}

.mm-product-loop-card__actions .button.loading {
    opacity: 0.85;
}

.mm-product-loop-card__actions .button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.mm-product-loop-card__actions .button:hover,
.mm-product-loop-card__actions .added_to_cart:hover {
    background: #000;
    border-color: #000;
    color: #fff;
}

.mm-product-loop-card__actions .mm-product-loop-card__button--single {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 36px;
    border: 1px solid #000;
    border-radius: 10px;
    background: #000;
    color: #fff;
    padding: 8px 12px !important;
    gap: 8px;
    font-size: 10px;
    line-height: 1;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.mm-product-loop-card__actions .mm-product-loop-card__button--single::before {
    content: "";
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6.5 8.5H17.5L18.5 21H5.5L6.5 8.5Z' stroke='white' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M9 8.5V6.5C9 4.84315 10.3431 3.5 12 3.5C13.6569 3.5 15 4.84315 15 6.5V8.5' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.mm-product-loop-card__actions .mm-product-loop-card__button--single:hover {
    background: #000;
    border-color: #000;
    color: #fff;
    opacity: 0.92;
}

.mm-product-loop-card__actions .mm-product-loop-card__button--single:disabled {
    opacity: 0.6;
    cursor: wait;
}

.mm-product-loop-card__actions .mm-product-loop-card__button--single.loading::after {
    content: none !important;
    display: none !important;
}

.mm-product-loop--slider .mm-product-loop__viewport {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x proximity;
}

.mm-product-loop--slider .mm-product-loop__viewport::-webkit-scrollbar {
    display: none;
}

.mm-product-loop--slider .mm-product-loop__items {
    display: flex;
    gap: var(--mm-product-loop-gap);
}

.mm-product-loop--slider .mm-product-loop-card {
    flex: 0 0 calc((100% - (var(--mm-product-loop-gap) * (var(--mm-product-loop-columns) - 1))) / var(--mm-product-loop-columns));
    scroll-snap-align: start;
}

.mm-product-loop__empty {
    padding: 18px 20px;
    border: 1px solid #ececec;
    border-radius: 16px;
    background: #fff;
}

@media (max-width: 1024px) {
    .mm-product-loop__items {
        grid-template-columns: repeat(var(--mm-product-loop-columns-tablet), minmax(0, 1fr));
    }

    .mm-product-loop--slider .mm-product-loop-card {
        flex-basis: calc((100% - (var(--mm-product-loop-gap) * (var(--mm-product-loop-columns-tablet) - 1))) / var(--mm-product-loop-columns-tablet));
    }

    .mm-product-loop-card__title {
        font-size: 20px;
    }
}

@media (max-width: 767px) {
    .mm-product-loop {
        --mm-product-loop-gap: 12px;
    }

    .mm-product-loop__bar {
        margin-bottom: 18px;
    }

    .mm-product-loop__nav-button {
        width: 40px;
        height: 40px;
    }

    .mm-product-loop__items {
        grid-template-columns: repeat(var(--mm-product-loop-columns-mobile), minmax(0, 1fr));
    }

    .mm-product-loop--slider .mm-product-loop-card {
        flex-basis: calc((100% - (var(--mm-product-loop-gap) * (var(--mm-product-loop-columns-mobile) - 1))) / var(--mm-product-loop-columns-mobile));
    }

    .mm-product-loop-card__title {
        font-size: 12px;
        text-align: left;
    }

    .mm-product-loop-card__price {
        font-size: 12px;
        text-align: left;
    }

    .mm-product-loop-card__price .woocommerce-Price-amount,
    .mm-product-loop-card__price .woocommerce-Price-currencySymbol,
    .mm-product-loop-card__price del,
    .mm-product-loop-card__price del .woocommerce-Price-amount,
    .mm-product-loop-card__price del .woocommerce-Price-currencySymbol {
        font-size: 12px;
    }

    .mm-product-loop-card__description {
        font-size: 11px;
        white-space: normal;
    }

    .mm-product-loop-card__actions .button,
    .mm-product-loop-card__actions .added_to_cart {
        min-height: 30px;
        border-radius: 10px;
        padding: 8px 12px !important;
        font-size: 10px;
    }

    .mm-product-loop-card__actions .mm-product-loop-card__button--single {
        min-height: 30px;
        border-radius: 10px;
        padding: 8px 12px !important;
        font-size: 10px;
    }

    .mm-product-loop-card__actions .mm-product-loop-card__button--single::before {
        width: 12px;
        height: 12px;
        flex-basis: 12px;
    }

    .mm-product-loop-card__purchase-row .mm-product-loop-card__actions {
        flex: 1 1 auto;
    }

    .mm-product-loop-card__attribute-option {
        min-height: 0;
        padding: 0 12px;
        font-size: 10px;
        border-radius: 8px;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .mm-product-loop-card__attribute-options--single .mm-product-loop-card__attribute-option {
        min-height: 30px;
        font-size: 9px;
    }


}
