/* Skladex marketplace price stack — drop / RRP / selling / margin */
:root {
  --sx-price-drop: #0b6e99;
  --sx-price-rrp: #b45309;
  --sx-price-selling: #0f766e;
  --sx-price-margin: #15803d;
  --sx-price-ink: #1e293b;
  --sx-price-muted: #64748b;
  --sx-price-line: #e2e8f0;
}

.sx-prices {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

.sx-prices--row {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
}

.sx-price {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  line-height: 1.25;
}

.sx-price__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--sx-price-muted);
}

.sx-price__value {
  font-size: 18px;
  font-weight: 700;
  color: var(--sx-price-ink);
}

.sx-price__value .currency,
.sx-price .currency {
  font-size: 12px;
  font-weight: 600;
  position: static !important;
  top: auto !important;
  margin-left: 2px;
}

.sx-price--drop .sx-price__value,
.sx-price--drop .sx-price__value .fn_price,
.sx-price--drop .sx-price__value .currency,
.sx-price--drop .fn_price {
  color: var(--sx-price-drop) !important;
}

.sx-price--rrp .sx-price__value,
.sx-price--rrp .sx-price__value .fn_rrp,
.sx-price--rrp .sx-price__value .currency,
.sx-price--rrp .fn_rrp {
  color: var(--sx-price-rrp) !important;
}

.sx-price--selling .sx-price__value,
.sx-price--selling .sx-price__value .currency {
  color: var(--sx-price-selling) !important;
}

.sx-price--margin .sx-price__value,
.sx-price--margin .sx-price__value .currency {
  color: var(--sx-price-margin) !important;
}

.sx-price--drop .sx-price__label { color: var(--sx-price-drop); }
.sx-price--rrp .sx-price__label { color: var(--sx-price-rrp); }
.sx-price--selling .sx-price__label { color: var(--sx-price-selling); }
.sx-price--margin .sx-price__label { color: var(--sx-price-margin); }

/* Card stack: label above value, shared left edge */
.details_boxed__prices.sx-prices {
  gap: 10px;
  padding: 4px 0 8px;
}

.details_boxed__prices .sx-price {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 140px;
}

.sx-price--compact .sx-price__value {
  font-size: 15px;
}

.sx-price--compact .sx-price__label {
  font-size: 10px;
}

/* Product card / preview */
.product_preview__prices.sx-prices,
.details_boxed__prices.sx-prices {
  width: 100%;
}

/* Тема фиксирует height:28px — стек цен вылезал на кнопки («0 грн»/РРЦ наезжало) */
.product_preview__prices.sx-prices {
  height: auto;
  min-height: 36px;
  max-height: none;
  overflow: hidden;
  margin-top: 6px;
  margin-bottom: 2px;
  flex-wrap: nowrap;
}

.product_preview__prices .sx-price--preview {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  max-width: 100%;
}

.product_preview__prices .sx-price__value {
  font-size: 16px;
  line-height: 1.2;
}

.product_preview__prices .old_price,
.product_preview__prices .fn_rrp_wrap {
  display: none !important;
}

.details_boxed__prices .sx-price--drop .sx-price__value {
  font-size: 22px;
}

.details_boxed__prices .sx-price--rrp .sx-price__value {
  font-size: 16px;
}

/* Cart row: controls on one baseline; meta chips below */
.purchase__item.sx-purchase {
  align-items: center;
}

.sx-purchase .purchase__content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.sx-purchase .purchase__group {
  align-items: flex-end;
  flex-wrap: nowrap;
  gap: 12px 20px;
  justify-content: flex-start;
}

.sx-purchase .purchase__group_title {
  margin-bottom: 6px;
  min-height: 14px;
  text-align: center;
  width: 100%;
}

.sx-purchase .purchase__price,
.sx-purchase .purchase__amount,
.sx-purchase .purchase__price_total {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding-right: 0;
}

.sx-purchase .purchase__group_content {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.sx-purchase .purchase__price .currency,
.sx-purchase .purchase__price_total .currency {
  position: static;
  top: auto;
  font-size: 12px;
}

.sx-purchase .sx-selling-input {
  box-sizing: border-box;
  min-width: 9ch;
  width: 11ch;
  max-width: 14ch;
  height: 36px;
  border: 1px solid var(--sx-price-line);
  border-radius: 4px;
  padding: 0 10px;
  font-weight: 600;
  color: var(--sx-price-selling);
  -moz-appearance: textfield;
  appearance: textfield;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.sx-purchase .purchase__amount .amount {
  max-width: 120px;
  height: 36px;
}

.sx-purchase .purchase__amount .amount__plus,
.sx-purchase .purchase__amount .amount__minus {
  height: 36px;
  width: 28px;
  line-height: 34px;
}

.sx-purchase .purchase__amount .amount__input {
  box-sizing: border-box;
  min-width: 3.5ch;
  width: 4.5ch;
  max-width: 6ch;
  height: 36px;
  padding: 0 4px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.sx-selling-input::-webkit-outer-spin-button,
.sx-selling-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Слот внизу корзины — не прыгает блок товара */
.sx-cart-notices {
  margin-top: 12px;
  min-height: 0;
}
.sx-cart-notices.has-notice {
  min-height: 40px;
}
.sx-selling-notice {
  display: block;
  width: 100%;
  margin: 0;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  box-sizing: border-box;
}
.sx-selling-notice.is-warn {
  color: var(--sx-price-rrp);
  background: #fff7ed;
  border: 1px solid #fdba74;
}
.sx-selling-notice.is-error {
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fca5a5;
}

.sx-margin-total-row .purchase_detail__name,
.sx-margin-total-row .purchase_detail__price {
  color: var(--sx-price-margin);
  font-weight: 700;
}

.sx-purchase .purchase__price_total .purchase__group_content {
  color: var(--sx-price-selling);
  font-size: 16px;
  font-weight: 700;
}

.sx-price-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding-top: 2px;
  border-top: 1px solid var(--sx-price-line);
  width: 100%;
}

.sx-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.sx-chip__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  opacity: 0.9;
}

.sx-chip--drop { color: var(--sx-price-drop); }
.sx-chip--rrp { color: var(--sx-price-rrp); }
.sx-chip--margin { color: var(--sx-price-margin); }
.sx-chip--selling { color: var(--sx-price-selling); }

.sx-margin-total-row .purchase_detail__name,
.sx-margin-total-row .purchase_detail__price {
  color: var(--sx-price-margin);
  font-weight: 700;
}

@media (max-width: 767px) {
  .sx-purchase .purchase__group {
    align-items: stretch;
  }

  .sx-purchase .purchase__price,
  .sx-purchase .purchase__amount,
  .sx-purchase .purchase__price_total {
    width: 100%;
  }
}
