@layer components {
  .cx-order-adjustment {
    display:grid;
    grid-template-columns:minmax(0,1.45fr) minmax(320px,.75fr);
    gap:var(--cx-space-4);
    min-height:0;
  }

  .cx-adjustment-catalog,
  .cx-adjustment-cart,
  .cx-void-preview {
    min-width:0;
    border:1px solid var(--cx-border);
    border-radius:var(--cx-radius-xl);
    background:var(--cx-surface);
    box-shadow:var(--cx-shadow-soft);
  }

  .cx-adjustment-catalog { display:grid; grid-template-rows:auto auto minmax(0,1fr); overflow:hidden; }
  .cx-adjustment-toolbar { display:grid; gap:.75rem; padding:var(--cx-space-4); border-block-end:1px solid var(--cx-border); background:var(--cx-surface-strong); }
  .cx-adjustment-search { position:relative; }
  .cx-adjustment-search .cx-input { min-height:48px; padding-inline-start:2.6rem; font-weight:850; }
  .cx-adjustment-search::before { content:'⌕'; position:absolute; inset-inline-start:.9rem; inset-block-start:50%; transform:translateY(-50%); color:var(--cx-muted); font-size:1.25rem; pointer-events:none; }
  .cx-adjustment-categories { display:flex; gap:.5rem; overflow:auto; padding-block:.1rem; scrollbar-width:thin; }
  .cx-adjustment-category { flex:0 0 auto; }

  .cx-adjustment-results { min-height:0; overflow:auto; padding:var(--cx-space-4); display:grid; grid-template-columns:repeat(auto-fill,minmax(175px,1fr)); gap:.75rem; align-content:start; }
  .cx-adjustment-product { display:grid; gap:.6rem; min-height:138px; text-align:start; padding:.9rem; border:1px solid var(--cx-border); border-radius:var(--cx-radius-lg); background:linear-gradient(180deg,var(--cx-surface),color-mix(in srgb,var(--cx-brand-soft) 22%,var(--cx-surface))); cursor:pointer; transition:transform var(--cx-transition),border-color var(--cx-transition),box-shadow var(--cx-transition); }
  .cx-adjustment-product:hover { transform:translateY(-2px); border-color:color-mix(in srgb,var(--cx-brand) 38%,var(--cx-border)); box-shadow:var(--cx-shadow-card); }
  .cx-adjustment-product strong { font-size:.98rem; line-height:1.5; }
  .cx-adjustment-product small { color:var(--cx-muted); min-height:1.2em; }
  .cx-adjustment-product-price { margin-block-start:auto; display:flex; justify-content:space-between; align-items:center; gap:.5rem; color:var(--cx-brand-strong); font-weight:1000; }
  .cx-adjustment-product-price span:last-child { inline-size:30px; block-size:30px; display:grid; place-items:center; border-radius:50%; background:var(--cx-brand); color:white; font-size:1.1rem; }

  .cx-adjustment-cart { display:grid; grid-template-rows:auto minmax(0,1fr) auto; overflow:hidden; }
  .cx-adjustment-cart > header { padding:var(--cx-space-4); border-block-end:1px solid var(--cx-border); background:var(--cx-surface-strong); display:flex; align-items:center; justify-content:space-between; gap:.75rem; }
  .cx-adjustment-cart > header h3 { margin:0; }
  .cx-adjustment-cart-lines { min-height:0; overflow:auto; padding:var(--cx-space-3); display:grid; gap:.65rem; align-content:start; }
  .cx-adjustment-line { border:1px solid var(--cx-border); border-radius:var(--cx-radius-lg); padding:.8rem; display:grid; gap:.65rem; background:var(--cx-surface); }
  .cx-adjustment-line-head { display:flex; align-items:flex-start; justify-content:space-between; gap:.75rem; }
  .cx-adjustment-line-head strong { line-height:1.5; }
  .cx-adjustment-line-price { color:var(--cx-brand-strong); font-weight:1000; white-space:nowrap; }
  .cx-adjustment-line-controls { display:flex; align-items:center; gap:.45rem; flex-wrap:wrap; }
  .cx-adjustment-line-controls .cx-input { inline-size:78px; text-align:center; }
  .cx-adjustment-line-note { width:100%; min-height:38px; }
  .cx-adjustment-modifiers { display:flex; flex-wrap:wrap; gap:.35rem; }
  .cx-adjustment-modifier-chip { border:1px solid color-mix(in srgb,var(--cx-brand) 22%,var(--cx-border)); background:var(--cx-brand-soft); color:var(--cx-text); border-radius:999px; padding:.22rem .52rem; font-size:.78rem; font-weight:850; }
  .cx-adjustment-cart-footer { border-block-start:1px solid var(--cx-border); padding:var(--cx-space-4); display:grid; gap:.75rem; background:var(--cx-surface-strong); }

  .cx-adjustment-summary { display:grid; gap:.45rem; }
  .cx-adjustment-summary-row { display:flex; align-items:center; justify-content:space-between; gap:.75rem; padding:.35rem 0; }
  .cx-adjustment-summary-row strong { font-variant-numeric:tabular-nums; }
  .cx-adjustment-summary-row.is-total { border-block-start:1px dashed var(--cx-border); padding-block-start:.75rem; font-size:1.05rem; color:var(--cx-brand-strong); }

  .cx-selection-table th, .cx-selection-table td { vertical-align:middle; }
  .cx-selection-table .cx-input[type="number"] { min-width:88px; text-align:center; font-weight:900; }
  .cx-selection-table .cx-item-cell { display:grid; gap:.2rem; min-width:190px; }
  .cx-selection-table .cx-item-cell small { color:var(--cx-muted); white-space:normal; }
  .cx-selection-table .cx-money-stack { display:grid; gap:.15rem; min-width:112px; }
  .cx-selection-table .cx-money-stack span { color:var(--cx-muted); font-size:.75rem; }
  .cx-selection-table .cx-money-stack strong { font-variant-numeric:tabular-nums; }
  .cx-selection-table tr.is-active-selection { background:color-mix(in srgb,var(--cx-sem-loss-soft) 58%,var(--cx-surface)); }

  .cx-void-preview { margin-block-start:var(--cx-space-4); padding:var(--cx-space-4); display:grid; gap:.45rem; }
  .cx-void-preview h3 { margin:0 0 .25rem; }
  .cx-void-preview-row { display:flex; justify-content:space-between; align-items:center; gap:.75rem; }
  .cx-void-preview-row strong { font-variant-numeric:tabular-nums; }
  .cx-void-preview-row.is-refund { color:var(--cx-sem-loss); font-size:1.04rem; padding-block:.45rem; border-block:1px dashed color-mix(in srgb,var(--cx-sem-loss) 25%,var(--cx-border)); }
  .cx-void-preview-row.is-after { color:var(--cx-brand-strong); font-size:1.04rem; }

  .cx-item-config-modal .cx-modal-body { display:grid; gap:var(--cx-space-4); }
  .cx-item-config-modal .cx-mod-summary { display:grid; grid-template-columns:1fr auto; gap:.45rem .75rem; align-items:center; padding:.9rem; border:1px solid var(--cx-border); border-radius:var(--cx-radius-lg); background:var(--cx-surface-strong); }
  .cx-item-config-modal .cx-mod-summary strong { color:var(--cx-brand-strong); font-variant-numeric:tabular-nums; }

  @media (max-width:980px) {
    .cx-order-adjustment { grid-template-columns:1fr; }
    .cx-adjustment-catalog { min-height:480px; }
    .cx-adjustment-cart { min-height:360px; }
  }

  @media (max-width:640px) {
    .cx-adjustment-results { grid-template-columns:repeat(2,minmax(0,1fr)); padding:.75rem; }
    .cx-adjustment-product { min-height:120px; padding:.75rem; }
  }
}
