.commerce-panel {
  display: grid; align-content: start; gap: 20px; min-width: 0; color: var(--ink);
  font-family: var(--sans); font-size: .95rem; overflow-wrap: anywhere;
}
.commerce-panel button, .commerce-panel input, .commerce-panel select { font: inherit; }
.commerce-panel button:disabled { opacity: .52; cursor: default; }
.cm-trail { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: .8rem; }
.cm-link, .cm-title { border: 0; padding: 0; background: transparent; color: var(--forest); text-align: start; justify-self: start; }
.cm-link { text-decoration: underline; text-underline-offset: .18em; }
.cm-link:hover, .cm-title:hover { color: var(--price); }
.cm-primary, .cm-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 45px;
  border: 1px solid var(--forest); border-radius: 8px; padding: 9px 16px; line-height: 1.3; font-weight: 650;
}
.cm-primary { width: 100%; background: var(--forest); color: var(--surface); }
.cm-primary:hover:not(:disabled) { background: var(--forest-hover); }
.cm-secondary { background: var(--surface); color: var(--forest); }
.cm-secondary:hover { background: var(--paper); }
.cm-center { justify-self: center; }
.cm-full { width: 100%; }
.commerce-panel a.cm-primary, .commerce-panel a.cm-secondary { text-decoration: none; }
.cm-page {
  max-width: var(--site-width); margin-inline: auto; padding: 22px var(--gutter) clamp(46px,7vw,100px);
  gap: clamp(22px,3vw,40px); width: 100%;
}
.cm-page h1 { font: 500 clamp(2.5rem,5vw,4.6rem)/1 var(--serif); letter-spacing: -.045em; margin: 0; }
.cm-cart-layout { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(290px,1fr); gap: clamp(18px,2.5vw,36px); align-items: start; }
.cm-cart-content, .cm-cart-summary, .cm-page > .cm-empty, .cm-page > .cm-checkout {
  display: grid; gap: 20px; align-content: start; padding: clamp(18px,2.2vw,32px);
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); min-width: 0;
}
.cm-page > .cm-empty { justify-self: stretch; justify-items: center; }
.cm-page > .cm-empty .cm-primary { width: fit-content; }
.cm-cart-summary { background: #f1ecdf; }
.cm-cart-content h2, .cm-cart-summary h2 { margin: 0; font: 550 clamp(1.45rem,2.2vw,2rem)/1.15 var(--serif); }
@media (min-width: 1000px) {
  .cm-cart-content .cm-item { grid-template-columns: 90px minmax(0,1fr) auto; }
  .cm-cart-content .cm-item-controls { grid-column: 3; grid-row: 1; flex-direction: column; justify-content: start; align-items: end; }
  .cm-cart-content .cm-item-links { justify-content: start; gap: 22px; }
  .cm-cart-content .cm-thumb { width: 90px; height: 90px; }
}
@media (max-width: 760px) {
  .cm-cart-layout { grid-template-columns: minmax(0,1fr); }
}
.cm-items { display: grid; }
.cm-item { display: grid; grid-template-columns: 80px minmax(0,1fr); gap: 9px 15px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.cm-item:first-child { padding-top: 0; }
.cm-thumb {
  display: grid; place-items: center; align-self: start; width: 80px; height: 80px; padding: 5px;
  background: #fff; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); overflow: hidden;
}
.cm-thumb img { width: 100%; height: 100%; object-fit: contain; }
.cm-meta, .cm-price-unit, .cm-tier, .cm-next { margin: 0 0 5px; }
.cm-meta, .cm-next, .cm-coupon small, .cm-form small, .cm-loading { color: var(--muted); font-size: .8rem; line-height: 1.4; }
.cm-item-copy { min-width: 0; }
.commerce-panel .cm-title { display: block; font-weight: 650; font-size: 1rem; line-height: 1.35; color: var(--ink); margin-bottom: 5px; }
.cm-price-unit { color: var(--price); font-size: .92rem; }
.cm-tier { color: var(--forest); font-size: .8rem; font-weight: 650; }
.cm-item-controls, .cm-item-links { grid-column: 2; display: flex; align-items: center; justify-content: space-between; gap: 11px; flex-wrap: wrap; }
.cm-item-controls strong, .cm-total strong { font-variant-numeric: tabular-nums; }
.cm-step { display: inline-flex; align-items: stretch; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.cm-step button, .cm-step input { height: 34px; min-width: 31px; border: 0; background: transparent; color: var(--ink); text-align: center; padding: 0; }
.cm-step input { width: 3.2em; appearance: textfield; -moz-appearance: textfield; }
.cm-step input::-webkit-inner-spin-button { appearance: none; }
.cm-item-links { font-size: .79rem; color: var(--muted); }
.cm-item-links label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; min-height: 28px; }
.cm-item-links input { accent-color: var(--forest); }
.cm-item-links .cm-remove { color: var(--muted); min-height: 28px; }
.cm-coupon, .cm-field, .cm-form { display: grid; gap: 7px; }
.cm-form { gap: 16px; }
.cm-coupon label, .cm-field span { font-weight: 600; }
.cm-coupon > div { display: flex; align-items: stretch; gap: 8px; }
.cm-coupon input, .cm-field input, .cm-field select {
  min-width: 0; width: 100%; min-height: 45px; padding: 9px 12px;
  border-radius: 7px; border: 1px solid #9d9e90; background: var(--surface); color: var(--ink);
}
.cm-coupon input { flex: 1; }
.cm-coupon .cm-secondary { flex: none; }
.cm-field input:focus, .cm-field select:focus, .cm-coupon input:focus { border-color: var(--forest); }
.cm-password { position: relative; }
.cm-password input { padding-inline-end: 7.1rem; }
.cm-password-toggle { position: absolute; right: .5rem; bottom: 1px; height: 43px; border: 0; background: transparent; color: var(--forest); }
.commerce-panel .cm-password-toggle { font-size: .76rem; text-decoration: underline; text-underline-offset: .2em; }
.cm-summary { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 15px; }
.cm-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: .89rem; }
.cm-row > strong { text-align: end; white-space: nowrap; }
.cm-total { margin-top: 7px; padding-top: 13px; border-top: 1px solid var(--line); font-weight: 700; font-size: 1rem; }
.cm-total > strong { color: var(--forest); font-size: 1.32rem; }
.cm-positive { color: var(--forest); }
.cm-empty { display: grid; justify-items: center; text-align: center; gap: 14px; padding: 20px 0; }
.cm-empty > p, .cm-empty h3, .cm-profile p, .cm-profile h3, .cm-recovery p, .cm-orders h3, .cm-form h3 { margin: 0; }
.commerce-panel h3 { font: 600 1.4rem/1.2 var(--serif); }
.cm-symbol { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--sage); color: var(--forest); }
.cm-note { margin: 0; font-size: .88rem; line-height: 1.5; color: var(--muted); }
.cm-profile, .cm-order { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.cm-profile h3 { margin: 4px 0; }
.cm-recovery, .cm-receipt { background: var(--paper); border: 1px solid var(--line); padding: 16px; border-radius: 10px; }
.cm-recovery code { display: inline-block; padding-top: 9px; font-size: 1rem; letter-spacing: .05em; }
.cm-disclosure { border-block: 1px solid var(--line); padding: 10px 0; }
.cm-disclosure summary { color: var(--forest); cursor: pointer; font-weight: 600; padding: 3px 0; }
.cm-disclosure[open] > :last-child { margin-top: 14px; }
.cm-orders { display: grid; gap: 10px; }
.cm-order { padding: 10px 0; border-bottom: 1px solid var(--line); }
.cm-order small { display: block; color: var(--muted); }
.cm-error-text, .commerce-panel [data-feedback] { color: #8a301f; }
.commerce-panel [data-feedback] { background: #fbebe1; padding: 11px 13px; border-radius: 7px; }
.cm-receipt .cm-row { width: 100%; }
.cm-checkout-review { display: grid; align-content: start; gap: 15px; }
.cm-checkout-review .cm-disclosure { border-top: 0; }
.cm-order-lines { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.cm-order-lines li { display: grid; gap: 3px; font-size: .9rem; }
.cm-order-lines small { color: var(--muted); }
.commerce-panel [data-compare-slot]:empty { display: none; }
@media (min-width: 800px) {
  .cm-checkout { grid-template-columns: 1.05fr .95fr; gap: 28px; align-items: start; }
  .cm-checkout-review { background: var(--paper); padding: 17px; border-radius: 10px; }
}
@media (max-width: 420px) {
  .cm-item { grid-template-columns: 60px minmax(0,1fr); column-gap: 10px; }
  .cm-thumb { width: 60px; height: 60px; }
  .cm-item-controls, .cm-item-links { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: no-preference) {
  .cm-item-controls strong, .cm-total strong { animation: cm-price-in .24s ease-out; }
  @keyframes cm-price-in { from { background-color: var(--sage); } to { background-color: transparent; } }
}
