.jwbwn-buy-now-wrap {
    display: block;
    width: var(--jwbwn-width, auto);
    box-sizing: border-box;
    margin: 0;
}

.jwbwn-buy-now-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 34px;
    box-sizing: border-box;
    padding: 7px 14px !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--jwbwn-bg, #e9e9e9) !important;
    color: var(--jwbwn-color, #111111) !important;
    box-shadow: none !important;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.2;
    text-align: center;
    text-decoration: none !important;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.jwbwn-buy-now-button:hover,
.jwbwn-buy-now-button:focus-visible {
    background: var(--jwbwn-hover-bg, #dedede) !important;
    color: var(--jwbwn-hover-color, #000000) !important;
    text-decoration: none !important;
}

/*
 * The native WoodMart loop builder is Gutenberg-based. When this block and
 * WoodMart's Product Add to Cart block share the same product-actions wrapper,
 * these selectors create the supplied two-button layout.
 */
.jwbwn-pair-style {
    flex: 1 1 0;
    min-width: 0;
}

.jwbwn-pair-style .jwbwn-buy-now-button {
    width: 100%;
}

.jwbwn-pair-style ~ .jwbwn-buy-now-wrap,
.jwbwn-pair-style + .jwbwn-pair-style {
    margin-left: 0;
}

/* Common WoodMart action-row wrappers. */
.wd-product .jwbwn-pair-style,
.product-wrapper .jwbwn-pair-style,
.product-element-bottom .jwbwn-pair-style,
.product-actions .jwbwn-pair-style,
.product-buttons .jwbwn-pair-style {
    flex: 1 1 0;
}

.product-actions:has(.jwbwn-pair-style),
.product-buttons:has(.jwbwn-pair-style),
.wd-product .jwbwn-pair-style {
    gap: 10px;
}

/* When the native Add to Cart element is in the same action row. */
.jwbwn-pair-style ~ .wd-add-btn,
.wd-add-btn:has(~ .jwbwn-pair-style) {
    flex: 1 1 0;
    min-width: 0;
}

.jwbwn-pair-style ~ .wd-add-btn a,
.wd-add-btn:has(~ .jwbwn-pair-style) a {
    width: 100%;
    box-sizing: border-box;
    border-radius: 999px !important;
}

.jwbwn-align-left { text-align: left; }
.jwbwn-align-center { text-align: center; }
.jwbwn-align-right { text-align: right; }

.jwbwn-editor-placeholder {
    display: inline-block;
    padding: 8px 12px;
    border: 1px dashed #999;
    font-size: 12px;
}

.jwbwn-editor-preview {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px dashed #ccc;
    border-radius: 6px;
}

.jwbwn-editor-label {
    font-size: 11px;
    opacity: .65;
}

.jwbwn-editor-preview .jwbwn-buy-now-button {
    width: 140px !important;
}

/* Avoid overflow on narrow product cards. */
@media (max-width: 767px) {
    .jwbwn-buy-now-button {
        padding-left: 10px !important;
        padding-right: 10px !important;
        font-size: 12px;
    }
}
