/* Отдельная цена за единицу: нативные кнопки/счётчики и их суммы не меняем. */
.crmdv-sale {
    display: block;
    min-width: 0;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.35;
    color: var(--foreground, #242424);
    white-space: normal;
}
.crmdv-sale__prices { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.crmdv-sale__old { color: var(--muted-foreground, #706b66); font-size: 13px; font-weight: 400; white-space: nowrap; }
.crmdv-sale__current { font-size: 18px; font-weight: 800; white-space: nowrap; }
.crmdv-sale__badge { align-self: center; padding: 2px 6px; border-radius: 5px; font-size: 12px; font-weight: 700; color: var(--brand-accent, #c44700); background: var(--brand-accent-light, #fff1e7); white-space: nowrap; }
.crmdv-sale__unit, .crmdv-sale__note { display: block; margin-top: 3px; font-size: 11px; font-weight: 400; line-height: 1.4; }
.crmdv-sale__unit { color: var(--muted-foreground, #706b66); }
.crmdv-sale__note { color: var(--foreground, #242424); overflow-wrap: anywhere; }
.kh-card__footer > .crmdv-sale { margin-bottom: 10px; }
.crmdv-sale-modal:not(:empty) { margin-bottom: 12px; }
.crmdv-sale[hidden], .crmdv-sale-modal[hidden] { display: none; }
.crmdv-sale-refresh { margin-top: 5px; padding: 4px 0; border: 0; background: transparent; color: var(--brand-accent, #c44700); font: inherit; font-size: 12px; font-weight: 700; text-decoration: underline; cursor: pointer; }
.crmdv-sale-refresh:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
[data-crmdv-price-stale="1"] .kh-btn--card, [data-crmdv-price-stale="1"] #kh-modal-add, [data-crmdv-price-stale="1"] .kh-btn--add-product { opacity: .65; cursor: not-allowed; }

/* The image signals the offer; the CTA owns both payable and former totals. */
.kh-card .crmdv-sale__prices,
.kh-card .crmdv-sale__unit,
.crmdv-sale-modal .crmdv-sale__prices,
.crmdv-sale-modal .crmdv-sale__unit { display: none; }
.kh-card .crmdv-sale--choose .crmdv-sale__unit,
.crmdv-sale-modal .crmdv-sale--choose .crmdv-sale__unit { display: block; }
.crmdv-sale-image { position: relative; }
.crmdv-sale__image-badge {
    position: absolute; z-index: 2; top: 12px; left: 12px;
    padding: 6px 10px; border-radius: 9px;
    background: var(--color-accent, var(--brand-accent, #c44700)); color: #fff;
    font-family: inherit; font-size: 14px; font-weight: 800; line-height: 1.2;
    white-space: nowrap; pointer-events: none;
}
button.crmdv-sale-button {
    display: flex; align-items: center; justify-content: center;
    gap: 4px 8px; flex-wrap: wrap; min-width: 0;
}
.crmdv-sale__button-old { color: inherit; opacity: .75; font-size: 12px; font-weight: 400; line-height: 1.2; white-space: nowrap; }
.crmdv-sale__button-current { font-size: inherit; line-height: 1.2; white-space: nowrap; }
#kh-modal #kh-modal-add.crmdv-sale-button { gap: 2px 7px; flex-direction: row; flex-wrap: wrap; padding-top: 4px; padding-bottom: 4px; }
#kh-modal-add.crmdv-sale-button .crmdv-sale__button-label { flex-basis: 100%; font-size: 11px; line-height: 1.1; }
#kh-modal-add.crmdv-sale-button #kh-modal-total { font-size: 15px; line-height: 1.2; white-space: nowrap; }
@media (min-width: 768px) {
    #kh-modal-add.crmdv-sale-button .crmdv-sale__button-label { flex-basis: auto; font-size: 15px; }
    #kh-modal-add.crmdv-sale-button #kh-modal-total { font-size: 17px; }
    .crmdv-sale__button-old { font-size: 13px; }
}

/* Catalog previews keep their space for the dish, not promotion terms. */
.kh-card:not([data-crmdv-price-stale="1"]) .crmdv-sale { display: none; }
.crmdv-sale-modal .crmdv-sale--choose .crmdv-sale__unit { display: none; }
.crmdv-sale-modal:not(:has(.crmdv-sale__conditions, .crmdv-sale-refresh)) { display: none; }
.crmdv-sale__conditions { display: block; margin: 0; color: var(--color-kh-text-secondary, #706b66); font-size: 12px; line-height: 1.4; }
.kh-card .crmdv-sale__image-badge { top: 10px; left: 10px; padding: 5px 8px; border-radius: 7px; font-size: 12px; }
.kh-card button.crmdv-sale-button { column-gap: 7px; flex-wrap: nowrap; }
.kh-card .crmdv-sale__button-old { font-size: 11px; opacity: .65; }
.kh-card .crmdv-sale__button-current { font-weight: 700; }

/* Keep nutrition, conditions and the purchase controls as one spaced footer. */
#kh-modal .kh-modal__bottom:has(.crmdv-sale__conditions) { padding-top: 16px; gap: 12px; }
#kh-modal .kh-modal__bottom > .kh-modal__meta { order: 1; }
#kh-modal .kh-modal__bottom > .crmdv-sale-modal { order: 2; margin: 0; }
#kh-modal .kh-modal__bottom > .kh-modal__footer { order: 3; }
