.mm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.mm-item {
    border: 1px solid #ddd;
    padding: 15px;
    text-align: center;
    border-radius: 8px;
}

.mm-item img {
    max-width: 100%;
    height: auto;
}

.mm-qty {
    width: 80px;
    margin-top: 10px;
}

.mm-counter {
    margin: 0 0 12px;
    font-weight: 600;
}

/* ── Fixed (always-included) products ──────────────────────── */

.mm-fixed-list {
    width: 100%;
    margin-bottom: 10px;
    /* padding: 12px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fafafa; */
}

.mm-fixed-heading {
    margin: 0 0 10px;
    font-weight: 700;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #555;
}

.mm-fixed-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
}

.mm-fixed-item img {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.mm-fixed-item span {
    font-size: 0.95em;
    color: #333;
}

.mm-list {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
    width: 100%;
}

.mm-list-row {
    display: grid;
    gap: 6px;
    width: 100%;
}

.mm-list-row label {
    font-weight: 600;
}

/* ── Autocomplete ───────────────────────────────────────────── */

.mm-ac {
    position: relative;
    width: 100%;
}

.mm-ac-input-wrap {
    position: relative;
}

.mm-ac-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95em;
    background: #fff;
    box-sizing: border-box;
}

.mm-ac-input:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
    border-color: #0073aa;
}

/* Results dropdown */
.mm-ac-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 9999;
    list-style: none;
    margin: 0;
    padding: 4px 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    max-height: 280px;
    overflow-y: auto;
}

.mm-ac-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 0.95em;
    color: #333;
    transition: background 0.1s;
}

.mm-ac-result-item:hover,
.mm-ac-result-item:focus {
    background: #f0f0f0;
    outline: none;
}

.mm-ac-result-item img {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.mm-ac-no-results {
    padding: 10px 12px;
    color: #888;
    font-size: 0.9em;
    font-style: italic;
}

/* Selected product display */
.mm-ac-selected {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #f9f9f9;
    min-height: 56px;
}

.mm-ac-thumb {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.mm-ac-name {
    flex: 1;
    font-size: 0.95em;
    color: #333;
}

.mm-ac-clear {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    color: #888;
    padding: 0 4px;
    line-height: 1;
    flex-shrink: 0;
}

.mm-ac-clear:hover {
    color: #c00;
}

    /* ── Custom Select (list view) ──────────────────────────────── */

    .mm-cs {
        position: relative;
        user-select: none;
        width: 100%;
    }

    .mm-cs-trigger {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        padding: 6px 10px;
        border: 1px solid #ddd;
        border-radius: 6px;
        background: #fff;
        cursor: pointer;
        text-align: left;
        min-height: 56px;
        box-sizing: border-box;
    }

    .mm-cs-trigger:focus {
        outline: 2px solid #0073aa;
        outline-offset: 2px;
    }

    .mm-cs-thumb {
        width: 42px;
        height: 42px;
        object-fit: cover;
        border-radius: 4px;
        border: 1px solid #e0e0e0;
        background: #f8f8f8;
        flex-shrink: 0;
    }

    .mm-cs-thumb--hidden {
        display: none;
    }

    .mm-cs-label {
        flex: 1;
        font-size: 0.95em;
        color: #333;
    }

    .mm-cs-arrow {
        flex-shrink: 0;
        width: 0;
        height: 0;
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-top: 6px solid #666;
        margin-left: 4px;
        transition: transform 0.15s;
    }

    .mm-cs[aria-expanded="true"] .mm-cs-arrow {
        transform: rotate(180deg);
    }

    .mm-cs-dropdown {
        display: none;
        position: absolute;
        top: calc(100% + 4px);
        left: 0;
        right: 0;
        z-index: 9999;
        list-style: none;
        margin: 0;
        padding: 4px 0;
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 6px;
        box-shadow: 0 4px 16px rgba(0,0,0,0.12);
        max-height: 300px;
        overflow-y: auto;
    }

    .mm-cs[aria-expanded="true"] .mm-cs-dropdown {
        display: block;
    }

    .mm-cs-option {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 6px 10px;
        cursor: pointer;
        font-size: 0.95em;
        color: #333;
        transition: background 0.1s;
    }

    .mm-cs-option:hover,
    .mm-cs-option:focus {
        background: #f0f0f0;
    }

    .mm-cs-option.is-selected {
        background: #e8f0fe;
        font-weight: 600;
    }

    .mm-cs-option.is-placeholder {
        color: #888;
    }

    .mm-cs-option img {
        width: 42px;
        height: 42px;
        object-fit: cover;
        border-radius: 4px;
        border: 1px solid #e0e0e0;
        flex-shrink: 0;
    }

/* Cart details under MM product title */
.mm-cart-selected-products {
    margin-top: 6px;
}

.mm-cart-selected-products__list {
    font-size: 0.7em;
}
ul.mm-cart-selected-products__list {
    padding-left: 1em;
}
.mm-cart-selected-products__separator {
    display: block;
    height: 1px;
    border: 0;
    background: #d9d9d9;
    margin: 6px 0;
}
.mm-cart-selected-products__title {
     font-size: 0.75em;
     color: var(--porto-primary-color);
     font-weight: 600;
     margin-top: 4px;
}
