:root {
  --bg: #f5f0e5;
  --surface: rgba(255, 252, 247, 0.92);
  --surface-strong: #fffef9;
  --ink: #183230;
  --muted: #6b827c;
  --line: rgba(24, 50, 48, 0.1);
  --teal: #53b9ae;
  --teal-deep: #15716b;
  --teal-soft: #dff5ef;
  --yellow: #ffd35f;
  --cocoa: #6d4938;
  --rose: #f29b95;
  --amber: #f2a93f;
  --mint: #6cd0bf;
  --cream: #f4ebd3;
  --danger: #e65d59;
  --shadow: 0 28px 80px rgba(21, 54, 49, 0.12);
  --shadow-soft: 0 16px 40px rgba(21, 54, 49, 0.08);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --container: 1460px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 211, 95, 0.3), transparent 28%),
    radial-gradient(circle at top right, rgba(83, 185, 174, 0.18), transparent 24%),
    linear-gradient(180deg, #fbf7ed 0%, #f1ebdf 100%);
  padding-bottom: 108px;
}

body.step-checkout {
  padding-bottom: 36px;
}

body.cart-drawer-open {
  overflow: hidden;
}

body.filters-drawer-open {
  overflow: hidden;
}

body.auth-pending .order-shell,
body.auth-pending .login-shell {
  visibility: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

.order-shell {
  width: min(var(--container), calc(100% - 28px));
  margin: 24px auto 40px;
}

.hero,
.filters-panel,
.catalog-card,
.store-meta-card,
.cart-card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 20px;
  border-radius: var(--radius-xl);
}

.hero-side {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.hero-brand {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.hero-logo {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  object-fit: cover;
  border: 2px solid rgba(83, 185, 174, 0.18);
  box-shadow: 0 12px 26px rgba(83, 185, 174, 0.14);
  background: #fff;
}

.hero-copy h1,
.section-head h2,
.item-name,
.cart-item-name {
  margin: 0;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal-deep);
  font-weight: 800;
}

.hero-copy h1 {
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero-text {
  display: none;
}

.hero-stats {
  display: none;
}

.hero-auth {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(24, 50, 48, 0.08);
}

.hero-auth-meta {
  display: grid;
  gap: 4px;
}

.hero-auth span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.workspace {
  display: grid;
  grid-template-columns: 348px minmax(0, 1fr);
  gap: 20px;
  margin-top: 18px;
  align-items: start;
}

.store-meta-card,
.cart-panel {
  display: none;
}

body.step-checkout .workspace {
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

body.step-checkout .filters-panel,
body.step-checkout .catalog-card {
  display: none;
}

body.step-checkout .store-meta-card,
body.step-checkout .cart-panel {
  display: block;
}

body.step-checkout .catalog-panel {
  display: grid;
  gap: 18px;
  order: 1;
}

body.step-checkout .store-meta-card {
  padding: 20px 22px;
}

body.step-checkout .store-meta-card .section-head {
  align-items: flex-start;
  margin-bottom: 14px;
}

body.step-checkout .store-meta-card .section-head-actions {
  margin-left: 0;
  justify-content: space-between;
  width: 100%;
}

body.step-checkout .store-meta-card .meta-grid {
  gap: 12px;
}

body.step-checkout .cart-card {
  padding: 18px;
}

body.step-checkout .meta-grid label {
  gap: 8px;
  padding: 12px 14px;
  border-radius: 16px;
}

body.step-checkout .meta-grid label span {
  font-size: 11px;
}

body.step-checkout .meta-grid textarea {
  min-height: 72px;
}

body.step-checkout .store-meta-card input,
body.step-checkout .store-meta-card select,
body.step-checkout .store-meta-card textarea {
  font-size: 14px;
}

body.step-checkout .cart-panel {
  position: static;
  order: 2;
}

body.step-checkout .floating-cart-bar {
  display: none;
}

body.step-checkout .history-block {
  display: none;
}

body.step-checkout .toggle-meta-button,
body.step-checkout .section-tip {
  display: none;
}

body.step-checkout .checkout-back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 16px;
  background: rgba(223, 245, 239, 0.88);
  color: var(--teal-deep);
  box-shadow: inset 0 0 0 1px rgba(83, 185, 174, 0.16);
}

body.step-checkout .checkout-back-button:hover {
  background: rgba(223, 245, 239, 1);
}

.filters-panel,
.cart-card {
  position: sticky;
  top: 20px;
}

.filters-panel,
.cart-card {
  border-radius: var(--radius-xl);
  padding: 20px;
}

.cart-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.catalog-panel {
  display: grid;
  gap: 18px;
}

.store-meta-card,
.catalog-card {
  border-radius: var(--radius-xl);
  padding: 24px;
}

.store-meta-card.is-collapsed .meta-grid {
  display: none;
}

.panel-block + .panel-block,
.cart-actions,
.cart-list,
.cart-metrics,
.meta-grid,
.catalog-grid {
  margin-top: 18px;
}

.panel-label {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}

.panel-mobile-head,
.mobile-utility-bar {
  display: none;
}

.panel-row,
.section-head,
.section-head-tight,
.catalog-toolbar,
.cart-line,
.cart-item-meta,
.quantity-controls {
  display: flex;
  align-items: center;
}

.panel-row,
.section-head,
.section-head-tight {
  justify-content: space-between;
  gap: 12px;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: 54px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(24, 50, 48, 0.08);
}

.search-field span {
  font-size: 22px;
  color: var(--muted);
}

.search-field input,
.meta-grid input,
.meta-grid select,
.meta-grid textarea {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  outline: none;
}

.big-tabs,
.group-list,
.preset-list {
  display: grid;
  gap: 10px;
}

.big-tab,
.group-tab,
.preset-button,
.button,
.text-button,
.quantity-button,
.quantity-input {
  transition: 180ms ease;
}

.big-tab,
.group-tab,
.preset-button {
  width: 100%;
  border: 1px solid rgba(24, 50, 48, 0.08);
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  text-align: left;
  border-radius: 16px;
  padding: 12px 14px;
  cursor: pointer;
}

.big-tab strong,
.group-tab strong,
.preset-button strong {
  display: block;
}

.big-tab span,
.group-tab span,
.preset-button span,
.section-tip,
.item-meta,
.item-description,
.metric-card span,
.cart-empty,
.cart-item-subline,
.export-hint {
  color: var(--muted);
}

.big-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.big-tab strong {
  font-size: 15px;
}

.big-tab span {
  font-size: 12px;
  font-weight: 700;
}

.group-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.group-tab {
  width: auto;
  min-width: 0;
  padding: 9px 12px;
  border-radius: 999px;
}

.group-tab strong {
  font-size: 13px;
}

.group-tab span {
  font-size: 11px;
  margin-top: 2px;
}

.big-tab.is-active,
.group-tab.is-active {
  border-color: rgba(21, 113, 107, 0.16);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(223, 245, 239, 0.95));
  box-shadow: 0 12px 30px rgba(83, 185, 174, 0.16);
}

.big-tab:hover,
.group-tab:hover,
.preset-button:hover,
.item-card:hover,
.text-button:hover,
.button:hover,
.quantity-button:hover {
  transform: translateY(-1px);
}

.panel-note {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 245, 217, 0.65);
}

.panel-note ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
  font-size: 14px;
}

.intro-note {
  padding: 18px 20px;
  border-radius: 24px;
  background: rgba(255, 245, 217, 0.55);
  border: 1px solid rgba(255, 211, 95, 0.42);
}

.intro-note h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.intro-note ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.9;
  font-size: 14px;
}

.intro-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
}

.section-head {
  margin-bottom: 18px;
}

.section-head h2 {
  font-size: clamp(24px, 2vw, 34px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.section-head-tight {
  margin-bottom: 14px;
}

.section-tip {
  font-size: 13px;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.meta-grid label {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(24, 50, 48, 0.08);
}

.meta-grid label span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.meta-grid textarea {
  resize: vertical;
  min-height: 88px;
}

.meta-grid-full {
  grid-column: 1 / -1;
}

.catalog-summary {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.summary-chip {
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(223, 245, 239, 0.78);
  color: var(--teal-deep);
  font-size: 13px;
  font-weight: 700;
}

.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.toolbar-field,
.toolbar-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(24, 50, 48, 0.08);
}

.toolbar-field span,
.toolbar-checkbox span {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}

.toolbar-field select {
  border: 0;
  background: transparent;
  outline: none;
  color: var(--ink);
}

.toolbar-checkbox input {
  accent-color: var(--teal-deep);
}

.button-compact {
  min-height: 46px;
  padding: 0 16px;
}

.catalog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.item-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 168px;
  align-items: center;
  gap: 16px;
  border-radius: 20px;
  padding: 14px 16px;
  border: 1px solid rgba(24, 50, 48, 0.08);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 24px rgba(24, 50, 48, 0.05);
}

.item-media {
  width: 112px;
  height: 112px;
  border-radius: 18px;
  overflow: hidden;
  background: #f6f8f7;
  border: 1px solid rgba(24, 50, 48, 0.08);
}

.item-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.item-image-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(83, 185, 174, 0.08), rgba(255, 211, 95, 0.1));
}

.item-content {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.item-submeta {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.item-topline,
.item-bottomline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.item-actions {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.item-side {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.item-side-compact {
  align-self: stretch;
}

.item-selected-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(83, 185, 174, 0.18), rgba(223, 245, 239, 0.9));
  color: var(--teal-deep);
  font-size: 12px;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(83, 185, 174, 0.12);
}

.item-selected-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--teal-deep);
  box-shadow: 0 0 0 4px rgba(83, 185, 174, 0.12);
}

.item-name {
  font-size: 20px;
  line-height: 1.2;
  word-break: break-word;
}

.item-code {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.item-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(83, 185, 174, 0.14), rgba(255, 211, 95, 0.16));
  font-size: 28px;
}

.item-meta {
  display: grid;
  gap: 8px;
  font-size: 14px;
}

.item-meta-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}

.item-meta-compact div {
  display: grid;
  gap: 4px;
}

.item-meta-compact span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.item-meta-compact strong {
  font-size: 14px;
  line-height: 1.4;
}

.item-price strong {
  display: block;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.03em;
}

.item-price span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.item-price-compact {
  text-align: right;
}

.item-detail-button {
  font-size: 13px;
}

.quick-add-button {
  width: 82px;
  min-height: 54px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--teal), #7fdacf);
  color: #fff;
  display: inline-grid;
  gap: 2px;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(83, 185, 174, 0.22);
}

.quick-add-symbol {
  display: block;
  font-size: 26px;
  line-height: 1;
  font-weight: 900;
}

.quick-add-label {
  display: block;
  font-size: 11px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.quantity-controls {
  gap: 8px;
}

.quantity-controls-inline {
  justify-content: flex-end;
}

.quantity-button,
.quantity-input {
  border-radius: 14px;
  border: 1px solid rgba(24, 50, 48, 0.1);
  background: rgba(255, 255, 255, 0.94);
}

.quantity-button {
  width: 40px;
  height: 40px;
  cursor: pointer;
  color: var(--ink);
  font-weight: 900;
}

.quantity-button.is-plus {
  background: var(--teal);
  color: #fff;
  border-color: transparent;
}

.quantity-input {
  width: 76px;
  height: 40px;
  text-align: center;
  outline: none;
}

.quantity-input-inline {
  width: 64px;
  font-weight: 800;
}

.cart-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.cart-breakdown {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.breakdown-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(24, 50, 48, 0.08);
}

.breakdown-line span {
  color: var(--muted);
  font-size: 13px;
}

.breakdown-line strong {
  font-size: 13px;
}

.metric-card {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(24, 50, 48, 0.08);
}

.metric-card strong {
  display: block;
  font-size: 28px;
  line-height: 1;
  margin-bottom: 8px;
}

.metric-card span {
  font-size: 12px;
}

.cart-list {
  display: grid;
  gap: 12px;
  max-height: 46vh;
  overflow: auto;
  padding-right: 4px;
}

.cart-group {
  display: grid;
  gap: 10px;
}

.cart-group-head {
  width: 100%;
  border: 1px solid rgba(24, 50, 48, 0.08);
  background: linear-gradient(135deg, rgba(223, 245, 239, 0.92), rgba(255, 255, 255, 0.96));
  border-radius: 18px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  cursor: pointer;
}

.cart-group-head:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(83, 185, 174, 0.14);
}

.cart-group-title {
  display: block;
  font-size: 15px;
  line-height: 1.2;
}

.cart-group-summary {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.cart-group-caret {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.84);
  color: var(--teal-deep);
  font-size: 22px;
  font-weight: 900;
  flex-shrink: 0;
}

.cart-group-body {
  display: grid;
  gap: 10px;
}

.cart-group.is-collapsed .cart-group-body {
  display: none;
}

.cart-empty {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.8;
}

.cart-item {
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(24, 50, 48, 0.08);
  box-shadow: 0 8px 18px rgba(24, 50, 48, 0.04);
}

.cart-line {
  justify-content: space-between;
  gap: 12px;
}

.cart-item-name {
  font-size: 16px;
  line-height: 1.35;
}

.cart-item-subline {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.65;
}

.cart-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.cart-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(24, 50, 48, 0.06);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.cart-tag-category {
  background: rgba(83, 185, 174, 0.14);
  color: var(--teal-deep);
}

.cart-item-total {
  font-size: 18px;
  font-weight: 800;
  white-space: nowrap;
}

.cart-item-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.cart-remove-button {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  background: rgba(230, 93, 89, 0.08);
  color: var(--danger);
  font-weight: 800;
}

.cart-item-actions .quantity-input {
  width: 66px;
}

.button,
.text-button {
  border: 0;
  cursor: pointer;
}

.button {
  min-height: 52px;
  border-radius: 16px;
  font-weight: 800;
  padding: 0 18px;
}

.button.primary {
  background: linear-gradient(135deg, #1f8f85, #56c3b4);
  color: #fff;
  box-shadow: 0 16px 32px rgba(31, 143, 133, 0.24);
}

.button-submit {
  background: linear-gradient(135deg, #0f6b65, #1ea598);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  border: 1px solid rgba(24, 50, 48, 0.08);
}

.cart-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.drawer-close {
  display: none;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  background: rgba(24, 50, 48, 0.08);
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.toggle-meta-button {
  white-space: nowrap;
  display: none;
}

.checkout-back-button {
  white-space: nowrap;
}

.floating-cart-bar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 80;
  width: min(1180px, calc(100% - 24px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 24px;
  background: rgba(44, 53, 52, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 42px rgba(13, 22, 21, 0.22);
  backdrop-filter: blur(18px);
}

.floating-cart-bar.is-empty {
  opacity: 0.76;
}

.floating-cart-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.floating-cart-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.floating-cart-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.floating-cart-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.floating-cart-copy strong {
  font-size: 24px;
  line-height: 1;
  color: #fff;
}

.floating-cart-copy span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 700;
}

.floating-cart-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.floating-cart-actions .button[hidden] {
  display: none;
}

.floating-cart-actions .button.secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.14);
}

.history-block {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(24, 50, 48, 0.08);
}

.status-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.status-card {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(24, 50, 48, 0.08);
  background: rgba(255, 255, 255, 0.82);
}

.status-card strong {
  display: block;
  font-size: 22px;
  line-height: 1;
  margin-bottom: 8px;
}

.status-card span {
  font-size: 12px;
  font-weight: 700;
}

.status-card.teal {
  background: rgba(223, 245, 239, 0.95);
  color: var(--teal-deep);
}

.status-card.mint {
  background: rgba(226, 248, 243, 0.95);
  color: #15756a;
}

.status-card.amber {
  background: rgba(255, 244, 222, 0.95);
  color: #9a5a00;
}

.status-card.rose {
  background: rgba(253, 236, 234, 0.95);
  color: #a7433d;
}

.status-card.cocoa {
  background: rgba(244, 235, 227, 0.95);
  color: var(--cocoa);
}

.history-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.history-item {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(24, 50, 48, 0.08);
  box-shadow: 0 10px 24px rgba(24, 50, 48, 0.05);
}

.history-topline,
.history-meta,
.history-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.history-topline strong,
.history-total {
  font-size: 15px;
  font-weight: 800;
}

.history-side {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.history-status {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.history-status.teal {
  background: rgba(83, 185, 174, 0.16);
  color: var(--teal-deep);
}

.history-status.mint {
  background: rgba(108, 208, 191, 0.18);
  color: #15756a;
}

.history-status.amber {
  background: rgba(242, 169, 63, 0.18);
  color: #9a5a00;
}

.history-status.rose {
  background: rgba(242, 155, 149, 0.18);
  color: #a7433d;
}

.history-status.cocoa {
  background: rgba(109, 73, 56, 0.12);
  color: var(--cocoa);
}

.history-topline span,
.history-meta span {
  color: var(--muted);
  font-size: 12px;
}

.history-meta {
  margin-top: 10px;
  flex-wrap: wrap;
}

.history-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.history-tag {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(223, 245, 239, 0.78);
  color: var(--teal-deep);
  font-size: 12px;
  font-weight: 700;
}

.history-actions {
  margin-top: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.history-action-button {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 12px;
}

.history-action-primary {
  background: rgba(83, 185, 174, 0.14);
}

.history-action-secondary {
  background: rgba(24, 50, 48, 0.06);
  color: var(--ink);
}

.history-action-danger {
  background: rgba(230, 93, 89, 0.08);
  color: var(--danger);
}

.detail-modal[hidden] {
  display: none;
}

.detail-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 28, 27, 0.54);
  backdrop-filter: blur(6px);
}

.detail-panel {
  position: relative;
  width: min(920px, calc(100% - 24px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  margin: 20px auto;
  padding: 28px;
  border-radius: 32px;
  background: rgba(255, 252, 247, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
}

.detail-close {
  position: sticky;
  top: 0;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(24, 50, 48, 0.08);
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.detail-body {
  display: grid;
  gap: 20px;
}

.export-modal[hidden] {
  display: none;
}

.export-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
}

.export-panel {
  position: relative;
  width: min(760px, calc(100% - 24px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  margin: 20px auto;
  padding: 28px;
  border-radius: 32px;
  background: rgba(255, 252, 247, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
}

.export-body {
  display: grid;
  gap: 18px;
}

.export-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.export-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.export-metric {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(24, 50, 48, 0.08);
}

.export-metric span,
.export-total-card span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.export-metric strong {
  display: block;
  margin-top: 8px;
  font-size: 16px;
  line-height: 1.45;
}

.export-total-card {
  padding: 18px 20px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(24, 143, 133, 0.96), rgba(86, 195, 180, 0.9));
  color: #fff;
  box-shadow: 0 20px 36px rgba(31, 143, 133, 0.18);
}

.export-total-card span {
  color: rgba(255, 255, 255, 0.82);
}

.export-total-card strong {
  display: block;
  margin-top: 10px;
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.export-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.export-tag {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(223, 245, 239, 0.82);
  color: var(--teal-deep);
  font-size: 12px;
  font-weight: 800;
}

.export-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

.detail-media {
  width: 240px;
  height: 240px;
  border-radius: 28px;
  overflow: hidden;
  background: #f6f8f7;
  border: 1px solid rgba(24, 50, 48, 0.08);
}

.detail-media .item-image,
.detail-media .item-image-fallback {
  width: 100%;
  height: 100%;
}

.detail-subtitle,
.detail-note p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.detail-price {
  margin-top: 16px;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
}

.detail-price span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.detail-metric {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(24, 50, 48, 0.08);
}

.detail-metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.detail-metric strong {
  display: block;
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.55;
}

.detail-note {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 245, 217, 0.5);
  border: 1px solid rgba(255, 211, 95, 0.48);
}

.detail-note strong {
  display: block;
  margin-bottom: 10px;
}

.text-button {
  padding: 0;
  background: transparent;
  color: var(--teal-deep);
  font-weight: 800;
}

.preset-button {
  cursor: pointer;
}

.login-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
}

.login-shell {
  width: min(920px, calc(100% - 24px));
}

.login-card {
  padding: 34px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.login-brand h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.login-text {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
  max-width: 520px;
}

.login-form {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.login-form label {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(24, 50, 48, 0.08);
}

.login-form label span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.login-form input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  outline: none;
}

.login-actions {
  margin-top: 8px;
}

.login-error {
  min-height: 20px;
  margin: 0;
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
}

.login-footer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.login-feature {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(24, 50, 48, 0.08);
}

.login-feature strong {
  display: block;
  font-size: 15px;
  margin-bottom: 8px;
}

.login-feature span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.empty-state {
  padding: 34px 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px dashed rgba(24, 50, 48, 0.12);
}

.empty-state strong {
  display: block;
  font-size: 20px;
  margin-bottom: 12px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

@media (max-width: 1220px) {
  .workspace {
    grid-template-columns: 304px minmax(0, 1fr);
  }

  body.step-checkout .workspace {
    grid-template-columns: 1fr;
  }

  .cart-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 95;
    width: min(420px, calc(100vw - 18px));
    padding: 12px;
    transform: translateX(calc(100% + 16px));
    transition: transform 220ms ease;
  }

  .cart-card {
    position: relative;
    top: 0;
    height: 100%;
    max-height: calc(100vh - 24px);
    overflow: auto;
  }

  body.step-checkout .cart-panel {
    position: static;
    width: auto;
    padding: 0;
    transform: none;
  }

  body.step-checkout .cart-card {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .cart-list {
    max-height: none;
  }

  body.cart-drawer-open .cart-panel {
    transform: translateX(0);
  }

  .drawer-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

.cart-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(16, 28, 27, 0.35);
  backdrop-filter: blur(6px);
}

.filters-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(16, 28, 27, 0.28);
  backdrop-filter: blur(5px);
}

.cart-drawer-backdrop[hidden] {
  display: none;
}

.filters-drawer-backdrop[hidden] {
  display: none;
}

@media (max-width: 960px) {
  .order-shell {
    width: min(var(--container), calc(100% - 20px));
    margin: 14px auto 24px;
  }

  .hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 16px;
  }

  .hero-brand {
    align-items: flex-start;
  }

  .section-head-actions {
    align-items: flex-start;
  }

  .meta-grid,
  .cart-metrics,
  .cart-actions,
  .detail-grid,
  .status-board {
    grid-template-columns: 1fr;
  }

  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .item-card {
    grid-template-columns: 88px minmax(0, 1fr);
    align-items: start;
  }

  .item-media {
    width: 88px;
    height: 88px;
  }

  .item-side {
    grid-column: 1 / -1;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
  }

  .item-price-compact {
    text-align: left;
  }

  .item-actions {
    width: 100%;
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  body.step-checkout .workspace {
    grid-template-columns: 1fr;
  }

  .catalog-panel {
    order: 1;
  }

  .filters-panel {
    order: 2;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 95;
    width: min(360px, calc(100vw - 48px));
    padding: 18px;
    transform: translateX(calc(-100% - 16px));
    transition: transform 220ms ease;
    overflow: auto;
    max-height: 100vh;
  }

  .cart-panel {
    order: 3;
  }

  body.step-checkout .cart-panel {
    order: 2;
  }

  body.filters-drawer-open .filters-panel {
    transform: translateX(0);
  }

  .panel-mobile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
  }

  .panel-mobile-head h2 {
    margin: 0;
    font-size: 28px;
  }

  .mobile-utility-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 14px 0;
  }

  .catalog-toolbar,
  .toolbar-left {
    align-items: stretch;
  }

  .export-grid,
  .login-footer {
    grid-template-columns: 1fr;
  }

  .cart-card {
    position: static;
  }

  .login-brand {
    align-items: flex-start;
  }

  .floating-cart-bar {
    width: calc(100% - 18px);
    bottom: 10px;
    padding: 10px 12px;
    border-radius: 20px;
  }

  .floating-cart-copy strong {
    font-size: 18px;
  }
}

@media (max-width: 640px) {
  .hero,
  .filters-panel,
  .store-meta-card,
  .catalog-card,
  .cart-card {
    border-radius: 24px;
  }

  .hero {
    padding: 12px 14px;
  }

  .hero-brand {
    flex-direction: row;
  }

  .login-card {
    padding: 22px;
  }

  .login-brand {
    flex-direction: column;
  }

  .hero-logo {
    width: 46px;
    height: 46px;
  }

  .hero-copy h1 {
    font-size: 22px;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-head-actions {
    width: 100%;
    justify-content: space-between;
  }

  .hero-auth {
    width: 100%;
  }

  .item-topline,
  .item-bottomline,
  .cart-item-actions,
  .history-topline,
  .history-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .history-side {
    justify-items: start;
  }

  .item-side {
    justify-items: start;
    grid-column: 1 / -1;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .item-actions {
    justify-items: stretch;
    width: 100%;
    display: grid;
  }

  .item-name {
    font-size: 18px;
  }

  .item-submeta {
    font-size: 11px;
  }

  .item-price strong,
  .metric-card strong {
    font-size: 28px;
  }

  .item-meta-compact {
    grid-template-columns: 1fr 1fr;
  }

  .detail-panel {
    padding: 20px;
    border-radius: 24px;
  }

  .export-panel {
    padding: 20px;
    border-radius: 24px;
  }

  .detail-hero {
    grid-template-columns: 1fr;
  }

  .detail-media {
    width: 100%;
    height: 220px;
    border-radius: 24px;
  }

  .detail-price {
    font-size: 28px;
  }

  .export-total-card strong {
    font-size: 28px;
  }

  .quick-add-button {
    width: 100%;
    min-height: 48px;
    grid-template-columns: auto auto;
    gap: 6px;
    padding: 0 14px;
  }

  .quick-add-symbol,
  .quick-add-label {
    display: inline-block;
  }

  .quantity-controls-inline {
    width: 100%;
    justify-content: space-between;
  }

  .quantity-button {
    width: 38px;
    height: 38px;
  }

  .quantity-input-inline {
    flex: 1;
    width: auto;
  }

  .floating-cart-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 10px;
  }

  .floating-cart-brand {
    width: 100%;
    gap: 10px;
  }

  .floating-cart-icon {
    display: none;
  }

  .floating-cart-copy strong {
    font-size: 17px;
  }

  .floating-cart-copy span {
    font-size: 12px;
  }

  .floating-cart-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .export-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}
