/* Related Product image chooser */
.mcs-product-image-chooser {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.mcs-product-image-option {
    position: relative;
    width: 110px;
    height: 110px;
    padding: 5px;
    margin: 0;
    background: #fff;
    border: 2px solid #dcdcde;
    border-radius: 5px;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mcs-product-image-option:hover {
    border-color: #2271b1;
}

.mcs-product-image-option img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.mcs-product-image-option.is-selected {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.mcs-product-image-option.is-selected::after {
    content: "✓";
    position: absolute;
    top: 5px;
    right: 5px;
    width: 22px;
    height: 22px;
    line-height: 22px;
    text-align: center;
    border-radius: 50%;
    background: #2271b1;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.mcs-featured-label {
    position: absolute;
    left: 4px;
    bottom: 4px;
    padding: 2px 6px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 10px;
    line-height: 16px;
    border-radius: 3px;
}

.mcs-image-loading,
.mcs-no-images {
    width: 100%;
    margin: 5px 0;
}


/* Hide the raw attachment ID field.
   The value is managed by the product image selector. */
[data-name="display_image"] > .acf-input > .acf-input-wrap {
    display: none;
}