.wavp-vendor-block.pixel-vendor-pay,
.wavp-vendor-modal {
    --pixel-vendor-accent: #cf1e2e;
    --pixel-vendor-accent-hover: #b51927;
    --pixel-vendor-rule: #e4e4e4;
    --pixel-vendor-text: #444;
    --pixel-vendor-muted: #666;
    --pixel-vendor-neutral: #f5f5f5;
}

.wavp-vendor-block.pixel-vendor-pay {
    container-type: inline-size;
    margin: 0;
    color: var(--pixel-vendor-text);
}

.pixel-vendor-pay .pixel-vendor-pay__title {
    margin: 0 0 9px;
    color: var(--pixel-vendor-text);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.75;
}

.pixel-vendor-pay__offers {
    margin-block-end: 22px;
    border: 1px solid var(--pixel-vendor-rule);
    background: #fff;
}

.pixel-vendor-pay__offer {
    display: grid;
    grid-template-columns: minmax(105px, 1fr) minmax(0, max-content);
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
}

.pixel-vendor-pay__offer + .pixel-vendor-pay__offer {
    border-block-start: 1px solid var(--pixel-vendor-rule);
}

.pixel-vendor-pay__seller,
.pixel-vendor-pay__price {
    min-inline-size: 0;
    overflow-wrap: anywhere;
}

.pixel-vendor-pay .pixel-vendor-pay__method {
    margin: 0;
    color: var(--pixel-vendor-text);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.75;
}

.pixel-vendor-pay__name,
.pixel-vendor-pay__note,
.pixel-vendor-pay__description,
.pixel-vendor-pay__details {
    color: var(--pixel-vendor-muted);
    font-size: 12px;
    line-height: 1.75;
}

.pixel-vendor-pay__note {
    margin-inline-start: 6px;
}

.pixel-vendor-pay__description,
.pixel-vendor-pay__details {
    margin-block: 5px 0;
}

.pixel-vendor-pay__details {
    display: flex;
    flex-wrap: wrap;
    gap: 3px 10px;
    padding: 0;
    list-style: none;
}

.pixel-vendor-pay__purchase {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 6px 14px;
    min-inline-size: 0;
}

.pixel-vendor-pay__price {
    color: #333;
    text-align: end;
    font-size: 17px;
    line-height: 1.65;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.pixel-vendor-pay:lang(fa) .pixel-vendor-pay__price {
    font-family: IRANSansF, IRANSans, Tahoma, sans-serif;
}

.pixel-vendor-pay__discount {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 8px;
    justify-content: flex-end;
    color: var(--pixel-vendor-muted);
    font-size: 12px;
    font-weight: 400;
}

.pixel-vendor-pay__discount span {
    color: var(--pixel-vendor-accent);
}

.pixel-vendor-pay .wavp-add-to-cart {
    min-inline-size: 0;
    min-block-size: 44px;
    padding: 9px 16px;
    border: 2px solid var(--pixel-vendor-accent);
    border-radius: 0;
    background: var(--pixel-vendor-accent);
    color: #fff;
    box-shadow: none;
    font: inherit;
    font-size: 14px;
    font-weight: 400;
    white-space: nowrap;
}

.pixel-vendor-pay .wavp-add-to-cart:not(:disabled):hover {
    border-color: var(--pixel-vendor-accent-hover);
    background: var(--pixel-vendor-accent-hover);
}

.pixel-vendor-pay .wavp-add-to-cart:focus-visible {
    outline: 2px solid #333;
    outline-offset: 2px;
}

@container (max-width: 520px) {
    .pixel-vendor-pay__offer {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
        padding: 12px;
    }

    .pixel-vendor-pay__purchase {
        gap: 6px 8px;
    }

    .pixel-vendor-pay__price {
        font-size: 15px;
    }

    .pixel-vendor-pay .wavp-add-to-cart {
        max-inline-size: 100%;
        padding-inline: 12px;
        font-size: 13px;
        white-space: normal;
    }
}

/* Match the product vendor confirmation to the theme's checkout dialog. */
.wavp-vendor-modal .wavp-vendor-modal__backdrop {
    background: rgba(0, 0, 0, 0.48);
    backdrop-filter: none;
}

.wavp-vendor-modal .wavp-vendor-modal__dialog {
    border: 1px solid var(--pixel-vendor-rule);
    border-radius: 0;
    background: #fff;
    color: var(--pixel-vendor-text);
    font-family: IRANSans, Tahoma, Arial, sans-serif;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.16);
}

.wavp-vendor-modal .wavp-vendor-modal__handle span {
    background: var(--pixel-vendor-rule);
}

.wavp-vendor-modal .wavp-vendor-modal__header {
    border-block-end-color: var(--pixel-vendor-rule);
}

.wavp-vendor-modal .wavp-vendor-modal__title-row {
    padding-inline-end: 44px;
    gap: 10px;
}

.wavp-vendor-modal .wavp-vendor-modal__title {
    color: var(--pixel-vendor-text);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.65;
}

.wavp-vendor-modal .wavp-vendor-modal__icon {
    flex: 0 0 36px;
    inline-size: 36px;
    block-size: 36px;
    border-radius: 0;
    background: var(--pixel-vendor-neutral);
    color: var(--pixel-vendor-accent);
}

.wavp-vendor-modal .wavp-vendor-modal__close {
    inset-block-start: 12px;
    inset-inline-end: 14px;
    inline-size: 44px;
    block-size: 44px;
    border-radius: 0;
    color: var(--pixel-vendor-muted);
}

.wavp-vendor-modal .wavp-vendor-modal__lead,
.wavp-vendor-modal .wavp-vendor-modal__message,
.wavp-vendor-modal .wavp-vendor-modal__hint {
    color: var(--pixel-vendor-muted);
    font-size: 14px;
    line-height: 1.85;
}

.wavp-vendor-modal .wavp-vendor-modal__lead {
    padding-inline-start: 0;
}

.wavp-vendor-modal .wavp-vendor-modal__lead strong,
.wavp-vendor-modal .wavp-vendor-modal__subtitle,
.wavp-vendor-modal .wavp-vendor-modal__list,
.wavp-vendor-modal .wavp-vendor-modal__vendor-name,
.wavp-vendor-modal .wavp-vendor-modal__row dd {
    color: var(--pixel-vendor-text);
    font-weight: 700;
}

.wavp-vendor-modal .wavp-vendor-modal__body {
    background: #fff;
}

.wavp-vendor-modal .wavp-vendor-modal__card {
    min-inline-size: 0;
    border: 1px solid var(--pixel-vendor-rule);
    border-radius: 0;
    box-shadow: none;
}

.wavp-vendor-modal .wavp-vendor-modal__card--new {
    border-color: var(--pixel-vendor-accent);
}

.wavp-vendor-modal .wavp-vendor-modal__badge,
.wavp-vendor-modal .wavp-vendor-modal__label {
    border-radius: 0;
    background: var(--pixel-vendor-neutral);
    color: var(--pixel-vendor-muted);
    font-size: 12px;
    font-weight: 700;
}

.wavp-vendor-modal .wavp-vendor-modal__badge--new {
    background: var(--pixel-vendor-accent);
    color: #fff;
}

.wavp-vendor-modal .wavp-vendor-modal__row {
    gap: 8px;
}

.wavp-vendor-modal .wavp-vendor-modal__row dt,
.wavp-vendor-modal .wavp-vendor-modal__row .wavp-vendor-modal__total--current,
.wavp-vendor-modal .wavp-vendor-modal__arrow {
    color: var(--pixel-vendor-muted);
}

.wavp-vendor-modal .wavp-vendor-modal__row dd {
    min-inline-size: 0;
    overflow-wrap: anywhere;
}

.wavp-vendor-modal .wavp-vendor-modal__row--total {
    border-block-start-color: var(--pixel-vendor-rule);
}

.wavp-vendor-modal .wavp-vendor-modal__total,
.wavp-vendor-modal .wavp-vendor-modal__delta {
    font-family: IRANSansF, IRANSans, Tahoma, sans-serif;
    font-variant-numeric: tabular-nums;
}

.wavp-vendor-modal .wavp-vendor-modal__total {
    font-size: 14px;
    white-space: normal;
}

.wavp-vendor-modal .wavp-vendor-modal__row .wavp-vendor-modal__total--new {
    color: var(--pixel-vendor-accent);
}

.wavp-vendor-modal .wavp-vendor-modal__arrow svg {
    border-color: var(--pixel-vendor-rule);
    box-shadow: none;
}

.wavp-vendor-modal .wavp-vendor-modal__delta {
    justify-content: flex-start;
    gap: 8px;
    border-color: var(--pixel-vendor-rule);
    border-radius: 0;
    background: var(--pixel-vendor-neutral);
    color: var(--pixel-vendor-text);
}

.wavp-vendor-modal .wavp-vendor-modal__delta svg {
    background: transparent;
    color: inherit;
}

.wavp-vendor-modal .wavp-vendor-modal__delta--decrease {
    color: #146546;
}

.wavp-vendor-modal .wavp-vendor-modal__delta--increase {
    color: #a6202e;
}

.wavp-vendor-modal .wavp-vendor-modal__footer {
    border-block-start-color: var(--pixel-vendor-rule);
    border-radius: 0;
}

.wavp-vendor-modal .wavp-vendor-modal__footer .btn {
    min-block-size: 44px;
    padding: 9px 14px;
    border: 2px solid var(--pixel-vendor-rule);
    border-radius: 0;
    background: #fff;
    color: var(--pixel-vendor-text);
    box-shadow: none;
    font: inherit;
    font-size: 14px;
    line-height: 1.55;
    white-space: normal;
}

.wavp-vendor-modal .wavp-vendor-modal__footer .wavp-vendor-modal__primary {
    border-color: var(--pixel-vendor-accent);
    background: var(--pixel-vendor-accent);
    color: #fff;
}

.wavp-vendor-modal .wavp-vendor-modal__footer .wavp-vendor-modal__primary:not(:disabled):hover {
    border-color: var(--pixel-vendor-accent-hover);
    background: var(--pixel-vendor-accent-hover);
}

.wavp-vendor-modal .wavp-vendor-modal__footer .wavp-vendor-modal__secondary:hover,
.wavp-vendor-modal .wavp-vendor-modal__close:hover,
.wavp-vendor-modal .wavp-vendor-modal__close:focus {
    background: var(--pixel-vendor-neutral);
    color: var(--pixel-vendor-text);
}

.wavp-vendor-modal button:focus-visible {
    outline: 2px solid var(--pixel-vendor-text);
    outline-offset: 2px;
}

@media (max-width: 767px) {
    .wavp-vendor-modal .wavp-vendor-modal__header,
    .wavp-vendor-modal .wavp-vendor-modal__body {
        padding: 14px 16px;
    }

    .wavp-vendor-modal .wavp-vendor-modal__card {
        padding: 12px 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wavp-vendor-modal .wavp-vendor-modal__dialog {
        animation: none;
    }
}

/* Grid placement keeps the independently refreshed purchase and price fragments intact. */
.pixel-product-purchase-container {
    container: pixel-product-info / inline-size;
}

.pixel-product-purchase {
    display: grid;
    grid-template-columns: [button] max-content [price] minmax(0, max-content);
    grid-template-rows: [stock] auto [minimum] auto [date] auto [quantity] auto [purchase] auto [buy-now] auto [actions] auto;
    align-items: center;
    column-gap: 12px;
    margin-block-end: 1rem;
}

.pixel-product-purchase > .product-add-to-cart,
.pixel-product-purchase > .product-add-to-cart > .pro_cart_block,
.pixel-product-purchase .pro_cart_block > .product-quantity:not(.hide_main_cart_button) {
    display: contents;
}

.pixel-product-purchase > .product-add-to-cart > *,
.pixel-product-purchase .product-quantity > .qty,
.pixel-product-purchase .product-quantity > .add_buy_now,
.pixel-product-purchase .pro_cart_block > .pro_cart_right {
    grid-column: 1 / -1;
}

.pixel-product-purchase #product-availability {
    grid-row: stock;
}

.pixel-product-purchase .product-minimal-quantity {
    grid-row: minimum;
}

.pixel-product-purchase .product-availability-date {
    grid-row: date;
}

.pixel-product-purchase .product-quantity > .qty {
    grid-row: quantity;
}

.pixel-product-purchase .product-quantity > .add {
    grid-column: button;
    grid-row: purchase;
    min-inline-size: 0;
    margin-inline: 0;
}

.pixel-product-purchase > .pro_price_block {
    grid-column: price;
    grid-row: purchase;
    min-inline-size: 0;
    margin-block-end: 6px;
    flex-wrap: wrap;
}

.pixel-product-purchase > .pro_price_block :is(.product-prices, .product-price, .pro_price_right) {
    min-inline-size: 0;
    max-inline-size: 100%;
}

.pixel-product-purchase > .pro_price_block .current-price {
    overflow-wrap: anywhere;
}

.pixel-product-purchase > .pro_price_block .current-price :is(.price, .regular-price) {
    white-space: normal;
}

.pixel-product-purchase > .pro_price_block .current-price > .price {
    font-size: clamp(18px, 6.1cqi, 24px);
}

.pixel-product-purchase:not(:has(.product-quantity:not(.hide_main_cart_button))) > .pro_price_block {
    grid-column: 1 / -1;
}

.pixel-product-purchase .product-quantity > .add_buy_now {
    grid-row: buy-now;
}

.pixel-product-purchase .pro_cart_block > .pro_cart_right {
    grid-row: actions;
}

.pixel-product-purchase .product-quantity > .add .add-to-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-block-size: 44px;
    max-inline-size: 100%;
    min-inline-size: 0;
    padding-inline: 10px;
    white-space: normal;
}

.pixel-product-purchase .product-quantity > .add .add-to-cart .icon_btn {
    margin: 0;
}

@container pixel-product-info (min-width: 440px) {
    .pixel-product-purchase {
        grid-template-columns: [qty] max-content [button] max-content [price] minmax(0, max-content);
    }

    .pixel-product-purchase .product-quantity > .qty:not(.qty_full_width) {
        grid-column: qty;
        grid-row: purchase;
    }
}
