.dmms-swatches {
    display: block;
    flex: 0 0 100%;
    order: 20;
    width: 100%;
    max-width: 100%;
    margin: 16px 0 18px;
    clear: both;
    box-sizing: border-box;
}

form.cart .dmms-swatches,
.cart .dmms-swatches {
    flex-basis: 100%;
}

form.cart .single_add_to_cart_button,
form.cart button[name="add-to-cart"],
form.cart input[name="add-to-cart"] {
    flex: 0 0 155px !important;
    width: 155px !important;
    max-width: 155px !important;
    min-height: 42px !important;
    box-sizing: border-box;
}

form.cart .dmms-swatches ~ .buy_now_button,
form.cart .dmms-swatches ~ .buy-now-button,
form.cart .dmms-swatches ~ .single_buy_now_button,
form.cart .dmms-swatches ~ .wc-buy-now-btn,
form.cart .dmms-swatches ~ [name="buy-now"],
form.cart .dmms-swatches ~ [class*="buy-now"],
form.cart .dmms-swatches ~ [class*="buy_now"] {
    order: 30;
    flex: 0 0 min(260px, 100%) !important;
    width: min(260px, 100%) !important;
    max-width: 260px !important;
    min-height: 42px !important;
    margin-top: 0 !important;
    box-sizing: border-box;
}

form.cart .buy_now_button,
form.cart .buy-now-button,
form.cart .single_buy_now_button,
form.cart .wc-buy-now-btn,
form.cart [name="buy-now"],
form.cart [class*="buy-now"],
form.cart [class*="buy_now"] {
    order: 30;
    flex: 0 0 min(260px, 100%) !important;
    width: min(260px, 100%) !important;
    max-width: 260px !important;
    min-height: 42px !important;
    box-sizing: border-box;
}

.dmms-choice-group {
    display: block;
    width: 100%;
    margin: 0 0 14px;
    box-sizing: border-box;
}

.dmms-choice-group:last-child {
    margin-bottom: 0;
}

.dmms-swatches__label {
    margin: 0 0 10px;
    color: #202020;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
}

.dmms-swatches__items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(136px, 136px));
    gap: 10px;
    align-items: stretch;
}

.dmms-swatch {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 78px;
    width: 100%;
    max-width: 136px;
    padding: 8px;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    background: #fff;
    color: #171717;
    text-align: left;
    cursor: pointer;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.dmms-swatch:hover,
.dmms-swatch:focus {
    border-color: #4bc8cf;
    box-shadow: 0 0 0 3px rgba(75, 200, 207, 0.16);
    outline: none;
}

.dmms-swatch.is-selected {
    border-color: #30bfc8;
    box-shadow: 0 0 0 2px rgba(48, 191, 200, 0.26);
}

.dmms-swatch.is-selected::after {
    content: "\2713";
    position: absolute;
    top: 5px;
    right: 5px;
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #30bfc8;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.dmms-swatch__image {
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    overflow: hidden;
    border-radius: 6px;
    background: #f5f5f5;
}

.dmms-swatch__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dmms-swatch__content {
    display: block;
    min-width: 0;
    padding-right: 12px;
}

.dmms-swatch__name,
.dmms-swatch__price {
    display: block;
}

.dmms-swatch__name {
    color: #181818;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.dmms-swatch__price {
    margin-top: 4px;
    color: #505050;
    font-size: 12px;
    line-height: 1.25;
}

.dmms-swatch__price del,
.dmms-swatch__price ins {
    display: inline-block;
}

@media (max-width: 480px) {
    .dmms-swatches__items {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dmms-swatch {
        max-width: none;
    }
}
