/* Оптовые цены: блоки карточки, корзины, бейдж, инфо-страница.
   Цвета — через переменные, чтобы тема могла переопределить. */
.wholesalecst-product,
.wholesalecst-cart,
.wholesalecst-info,
.wholesalecst-badge,
.wholesalecst-item-hint {
    --wsc-accent: var(--cheme-color, #1f8a4c);
    --wsc-accent-soft: rgba(31, 138, 76, .1);
    --wsc-accent-soft: color-mix(in srgb, var(--wsc-accent) 12%, transparent);
    --wsc-border: rgba(0, 0, 0, .12);
    --wsc-muted: rgba(0, 0, 0, .55);
    --wsc-bar: rgba(0, 0, 0, .08);
    --wsc-panel: rgba(0, 0, 0, .035);
    --wsc-row: #fff;
    --wsc-border-strong: rgba(0, 0, 0, .35);
}

.wholesalecst-product { margin: 12px 0; font-size: 14px; line-height: 1.4; }
.wholesalecst-sku[hidden] { display: none !important; }

/* Переключатель видов цен (карточка) */
.wholesalecst-box { background: none; padding: 0; }
.wholesalecst-box__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.wholesalecst-box__lowest { font-size: 13px; color: var(--wsc-muted); }
.wholesalecst-box__price { display: flex; align-items: baseline; gap: 6px; line-height: 1.2; overflow: hidden; }
.wholesalecst-box__value { font-size: 26px; font-weight: 700; display: inline-block; font-variant-numeric: tabular-nums; }
.wholesalecst-box__from { font-size: 13px; font-weight: 600; }
.wholesalecst-box__price.is-up .wholesalecst-box__value { animation: wsc-from-below .35s ease-out; }
.wholesalecst-box__price.is-down .wholesalecst-box__value { animation: wsc-from-above .35s ease-out; }
.wholesalecst-box__price.is-up .wholesalecst-box__from,
.wholesalecst-box__price.is-down .wholesalecst-box__from { animation: wsc-fade .35s ease-out; }
@keyframes wsc-from-below { 0% { transform: translateY(70%); opacity: 0; color: var(--wsc-accent); } 60% { opacity: 1; } 100% { transform: none; } }
@keyframes wsc-from-above { 0% { transform: translateY(-70%); opacity: 0; color: var(--wsc-accent); } 60% { opacity: 1; } 100% { transform: none; } }
@keyframes wsc-fade { 0% { opacity: 0; } 100% { opacity: 1; } }
.wsc-theme-price-anim { animation: wsc-fade .35s ease-out; }
.wholesalecst-box__pack { display: flex; align-items: center; gap: 6px; font-size: 12px; line-height: 1.2; color: var(--wsc-muted); white-space: nowrap; }

.wholesalecst-tiers { display: grid; gap: 6px; }
.wholesalecst-tier {
    display: grid; grid-template-columns: 18px auto 1fr; align-items: center; gap: 10px;
    margin: 0; padding: 8px 12px; border-radius: 6px; background: var(--wsc-row); cursor: pointer;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .12); transition: box-shadow .15s, background .15s;
}
.wholesalecst-tier:hover { box-shadow: 0 2px 10px rgba(0, 0, 0, .18); }
.wholesalecst-tiers { padding: 2px; } /* место под тень */
.wholesalecst-tier input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.wholesalecst-tier__radio { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--wsc-border-strong); position: relative; transition: border-color .15s; }
.wholesalecst-tier__radio::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--wsc-accent); transform: scale(0); transition: transform .15s; }
.wholesalecst-tier.is-active .wholesalecst-tier__radio { border-color: var(--wsc-accent); }
.wholesalecst-tier.is-active .wholesalecst-tier__radio::after { transform: scale(1); }
.wholesalecst-tier input:focus-visible + .wholesalecst-tier__radio { outline: 2px solid var(--wsc-accent); outline-offset: 2px; }
.wholesalecst-tier__price { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.wholesalecst-tier__name { font-size: 12px; color: var(--wsc-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wholesalecst-tier__cond { font-size: 13px; font-weight: 600; white-space: nowrap; text-align: right; }

.wholesalecst-box__sum { margin-top: 12px; font-size: 14px; }
.wholesalecst-box__sum[hidden] { display: none; }
.wholesalecst-box__total { color: var(--wsc-accent); }
.wholesalecst-box__profit { color: var(--wsc-muted); }
.wholesalecst-box__note { margin-top: 8px; font-size: 12px; color: var(--wsc-muted); }
.wholesalecst-box__info { display: inline-block; margin-top: 8px; font-size: 12px; }

.wholesalecst-thermo { margin-top: 8px; }
.wholesalecst-thermo__bar { height: 6px; border-radius: 3px; background: var(--wsc-bar); overflow: hidden; }
.wholesalecst-thermo__bar span { display: block; height: 100%; background: var(--wsc-accent); border-radius: 3px; transition: width .3s; }
.wholesalecst-thermo__text { margin-top: 4px; font-size: 13px; }
.wholesalecst-thermo.is-done .wholesalecst-thermo__text,
.is-done > .wholesalecst-thermo .wholesalecst-thermo__text { color: var(--wsc-accent); }

.wholesalecst-cart { margin: 12px 0; font-size: 14px; line-height: 1.4; }
.wholesalecst-cart:empty { display: none; }
.wholesalecst-order { border: 1px solid var(--wsc-border); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
.wholesalecst-order .wholesalecst-thermo { margin-top: 0; }
.wholesalecst-order__levels { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--wsc-muted); }
.wholesalecst-order__levels .is-reached { color: var(--wsc-accent); }
.wholesalecst-order__levels .is-reached::before { content: "✓ "; }
.wholesalecst-items { display: grid; gap: 8px; }
.wholesalecst-item { border-left: 3px solid var(--wsc-accent); padding: 2px 0 2px 10px; }
.wholesalecst-item__name { font-size: 13px; }
.wholesalecst-item__tier { color: var(--wsc-muted); margin-left: 6px; white-space: nowrap; }
.wholesalecst-cart__more { margin-top: 8px; font-size: 12px; }

.wholesalecst-badge {
    display: inline-flex; align-items: center; gap: 6px; margin: 6px 0;
    padding: 3px 10px 3px 4px; border-radius: 999px; font-size: 13px; line-height: 1.4;
    background: var(--wsc-accent-soft, rgba(31, 138, 76, .1)); color: var(--wsc-accent, #1f8a4c); text-decoration: none; font-weight: 600;
}
.wholesalecst-badge:hover { filter: brightness(.95); }
.wholesalecst-badge__icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; border-radius: 50%; background: var(--wsc-accent, #1f8a4c); color: #fff; font-size: 12px;
}

.wholesalecst-info { max-width: 860px; margin: 0 auto; text-align: left; line-height: 1.55; }
/* Заголовок страницы темы — по той же колонке, что и контент */
.page:has(.wholesalecst-info) > h1 { max-width: 860px; margin-left: auto; margin-right: auto; text-align: left; }
.wholesalecst-info h2 { margin-top: 28px; }
.wholesalecst-info__lead { font-size: 17px; }
.wholesalecst-info__cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.wholesalecst-info__card { border: 1px solid var(--wsc-border); border-radius: 10px; padding: 12px 14px; }
.wholesalecst-info__card p { margin: 4px 0 0; }
.wholesalecst-info__card-title { font-weight: 700; color: var(--wsc-accent); }
.wholesalecst-info__steps li { margin-bottom: 8px; }
.wholesalecst-info__note { background: var(--wsc-accent-soft); border-radius: 10px; padding: 12px 14px; margin: 16px 0; }
.wholesalecst-info__table-wrap { overflow-x: auto; }
.wholesalecst-info__table { width: 100%; border-collapse: collapse; }
.wholesalecst-info__table--narrow { max-width: 420px; }
.wholesalecst-info__table th,
.wholesalecst-info__table td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--wsc-border); }
.wholesalecst-info__muted { color: var(--wsc-muted); font-size: 13px; }
.wholesalecst-info__faq details { border-bottom: 1px solid var(--wsc-border); padding: 8px 0; }
.wholesalecst-info__faq summary { cursor: pointer; font-weight: 600; }
.wholesalecst-info__faq p { margin: 6px 0 0; }

/* Ценник темы (integramp_theme: .product__pr-price-new) ведёт плагин */
.wholesalecst-product,
.product__pr-price-new {
    --wsc-accent: var(--cheme-color, #1f8a4c);
}
.wsc-has-theme-price .wholesalecst-box__prices { display: none; }
.wsc-has-theme-price .wholesalecst-box__head { justify-content: flex-end; }
.wsc-has-theme-price .wholesalecst-box__head:not(:has(.wholesalecst-box__pack)) { display: none; }
.wsc-theme-from { margin: 0 10px 0 -4px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.product__pr-price-new { overflow: hidden; }
.wsc-price-down .price,
.wsc-price-up .price { display: inline-block; font-variant-numeric: tabular-nums; }
.wsc-price-down .price { animation: wsc-from-above .35s ease-out; }
.wsc-price-up .price { animation: wsc-from-below .35s ease-out; }
.wsc-price-down + .wsc-theme-from,
.wsc-price-up + .wsc-theme-from { animation: wsc-fade .35s ease-out; }
@media (prefers-reduced-motion: reduce) {
    .wsc-price-down .price, .wsc-price-up .price,
    .wholesalecst-box__price .wholesalecst-box__value { animation: none !important; }
}

/* Применённая скидка от суммы заказа (блок корзины) */
.wholesalecst-applied {
    display: block; position: relative; padding-left: 22px;
    font-size: 14px; font-weight: 600; line-height: 1.35; color: var(--wsc-accent); margin-bottom: 10px;
    white-space: nowrap; /* одной строкой: «Скидка 2% по сумме заказа: −4 660 ₽» */
}
.wholesalecst-applied:last-child { margin-bottom: 0; }
.wholesalecst-applied::before {
    content: "✓"; position: absolute; left: 0; top: 0;
    width: 16px; height: 16px; margin-top: 1px; border-radius: 50%;
    background: var(--wsc-accent); color: #fff; font-size: 11px; line-height: 16px; text-align: center;
}
.wholesalecst-applied b { white-space: nowrap; }

/* Подсказки в строке товара корзины */
.wholesalecst-item-hint:empty { display: none; }
.wholesalecst-item-hint { margin-top: 8px; display: grid; gap: 6px; justify-items: start; max-width: 460px; }
.wsc-hint--ok {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 10px 3px 6px; border-radius: 999px;
    background: var(--wsc-accent-soft); color: var(--wsc-accent); font-size: 13px; font-weight: 600; line-height: 1.4;
}
.wsc-hint--ok::before {
    content: "✓"; display: inline-flex; align-items: center; justify-content: center;
    width: 16px; height: 16px; border-radius: 50%; background: var(--wsc-accent); color: #fff; font-size: 11px;
}
.wsc-hint--next {
    display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px;
    width: 100%; box-sizing: border-box; padding: 8px 10px; border-radius: 6px;
    background: rgba(0, 0, 0, .035); font-size: 13px; line-height: 1.4;
}
.wsc-hint--next b { color: var(--wsc-accent); white-space: nowrap; }
.wsc-hint__add {
    padding: 4px 10px; border: 1px solid var(--wsc-accent); border-radius: 6px;
    background: #fff; color: var(--wsc-accent); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.wsc-hint__add:hover { background: var(--wsc-accent); color: #fff; }
.wsc-hint__add[disabled] { opacity: .5; cursor: default; }
.wsc-hint--next .wholesalecst-thermo__bar { grid-column: 1 / -1; height: 4px; }
