:root {
  --ink: #1c2430;
  --ink-soft: #4a5564;
  --muted: #7a8796;
  --line: #d8dee6;
  --line-soft: #eaeff4;
  --paper: #e8edf2;
  --panel: #fbfcfd;
  --panel-soft: #f3f6f9;
  --accent: #1f6f8b;
  --accent-hover: #185a70;
  --accent-soft: #e8f3f6;
  --warn: #8a4b2a;
  --warn-bg: #f7efe8;
  --radius: 6px;
  --sidebar-width: min(400px, 38vw);
  --font: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-num: "Barlow", "Noto Sans SC", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

body.quote-page {
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

.bg-stage {
  display: none;
}

.main-shell {
  position: relative;
  z-index: 1;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

.layout-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.layout-hero {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #cfd6de;
}

.layout-side {
  flex: 0 0 var(--sidebar-width);
  width: var(--sidebar-width);
  max-width: var(--sidebar-width);
  min-width: 320px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
  background: var(--panel);
}

@media (min-width: 1400px) {
  :root {
    --sidebar-width: min(440px, 34vw);
  }
}

@media (max-width: 991.98px) {
  body.quote-page {
    height: auto;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .main-shell {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .layout-row {
    flex-direction: column;
    height: auto;
  }

  .layout-side {
    flex: none;
    width: 100%;
    max-width: none;
    min-width: 0;
    border-left: none;
    border-top: 1px solid var(--line);
  }

  .hero-wrap,
  .hero-image-box {
    height: min(46vh, 360px);
    min-height: min(46vh, 360px);
  }

  .hero-caption {
    max-width: 90%;
    bottom: 4.5rem;
  }
}

.glass-panel {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.hero-wrap {
  position: relative;
  overflow: hidden;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
}

.hero-image-box {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  background: #b8c2cc;
  overflow: hidden;
}

.hero-image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    0deg,
    rgba(20, 28, 36, 0.72) 0%,
    rgba(20, 28, 36, 0.2) 42%,
    transparent 70%
  );
  pointer-events: none;
}

.hero-caption {
  position: absolute;
  left: 1.75rem;
  bottom: 5rem;
  max-width: min(420px, 55%);
  z-index: 2;
}

.hero-eyebrow {
  display: none;
}

.hero-caption h1 {
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  font-weight: 650;
  letter-spacing: 0.02em;
  margin: 0 0 0.4rem;
  color: #fff;
  line-height: 1.25;
}

.hero-caption p {
  margin: 0;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.55;
}

.thumb-strip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.7rem 1rem;
  display: flex;
  gap: 0.4rem;
  align-items: center;
  background: rgba(20, 28, 36, 0.55);
  z-index: 2;
  overflow-x: auto;
}

.thumb-btn {
  flex: 0 0 auto;
  width: 68px;
  height: 46px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.2);
  opacity: 0.88;
}

.thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-btn:hover,
.thumb-btn.active {
  opacity: 1;
  border-color: #fff;
}

.config-sidebar {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
  background: var(--panel);
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.sidebar-brand {
  padding: 1.15rem 1.25rem 0.95rem;
  border-bottom: 1px solid var(--line-soft);
}

.brand-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 500;
}

.sidebar-brand h2 {
  font-size: 1.28rem;
  font-weight: 650;
  margin: 0;
  color: var(--ink);
  line-height: 1.25;
}

.brand-desc {
  margin: 0.3rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}

.sidebar-tabs {
  display: flex;
  gap: 0;
  padding: 0 1rem;
  border-bottom: 1px solid var(--line-soft);
  background: var(--panel-soft);
}

.sidebar-tabs button {
  flex: 1;
  background: none;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 500;
  padding: 0.8rem 0.2rem;
  cursor: pointer;
  position: relative;
}

.sidebar-tabs button:hover {
  color: var(--ink);
}

.sidebar-tabs button.active {
  color: var(--accent);
  font-weight: 600;
}

.sidebar-tabs button.active::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 0;
  height: 2px;
  background: var(--accent);
}

.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem 1.15rem 1.2rem;
  min-height: 0;
}

.tab-pane-section {
  display: none;
}

.tab-pane-section.active {
  display: block;
}

.section-lead {
  margin: 0 0 0.9rem;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--muted);
}

.solution-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-bottom: 1.1rem;
}

.solution-switch label {
  margin: 0;
  cursor: pointer;
}

.solution-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.solution-pill {
  display: block;
  text-align: center;
  padding: 0.58rem 0.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.solution-switch input:checked + .solution-pill {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.standard-block {
  margin: 0 0 1rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #f5f8fa 0%, #eef3f6 100%);
}

.standard-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.standard-summary {
  margin: 0 0 0.4rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.standard-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.standard-list li {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.35;
}

.standard-list .std-g {
  display: inline-block;
  min-width: 4.5em;
  margin-right: 0.35rem;
  color: var(--ink-soft);
  font-weight: 500;
}

.section-block {
  margin-bottom: 1.15rem;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.section-head h3 {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}

.exclusive-tag {
  font-size: 0.66rem;
  color: var(--warn);
  white-space: nowrap;
  border: 1px solid #e4d0c2;
  padding: 0.1rem 0.38rem;
  border-radius: 3px;
  background: var(--warn-bg);
}

.option-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.48rem 0.5rem;
  margin-bottom: 0.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  background: #fff;
  cursor: pointer;
}

.option-thumb {
  flex: 0 0 52px;
  width: 52px;
  height: 44px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--panel-soft);
  border: 1px solid var(--line-soft);
}

.option-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 2px;
}

.option-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.option-row:hover {
  border-color: #c5ced8;
}

.option-row.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.option-row .form-check {
  margin: 0;
  min-height: 0;
  padding: 0;
  display: flex;
  align-items: center;
}

.option-row .form-check-input {
  width: 0.95rem;
  height: 0.95rem;
  margin: 0;
  cursor: pointer;
  background-color: #fff;
  border-color: #b8c0cc;
}

.option-row .form-check-input:checked {
  background-color: var(--accent);
  border-color: var(--accent);
}

.option-row .form-check-input:focus {
  box-shadow: 0 0 0 2px rgba(31, 111, 139, 0.16);
}

.option-row[data-type="radio"] .form-check-input {
  border-radius: 50%;
}

.option-label {
  font-size: 0.84rem;
  line-height: 1.35;
  color: var(--ink);
  font-weight: 500;
  user-select: none;
}

.option-qty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
  margin: 0;
  flex: 0 0 auto;
  cursor: default;
}

.option-qty .qty-label {
  font-size: 0.62rem;
  color: var(--muted);
  line-height: 1;
}

.option-qty .qty-input {
  width: 52px;
  height: 28px;
  padding: 0.1rem 0.25rem;
  font-size: 0.8rem;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 4px;
  font-family: var(--font-num);
}

.option-qty .qty-input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 2px rgba(31, 111, 139, 0.12);
}

.option-row.has-note .btn-modify {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-modify {
  font-size: 0.72rem;
  padding: 0.2rem 0.42rem;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  cursor: pointer;
  font-family: inherit;
}

.btn-modify:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.btn-add-row {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.48rem;
  margin-top: 0.1rem;
  border-radius: var(--radius);
  border: 1px dashed #c8d0d8;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-family: inherit;
  cursor: pointer;
}

.btn-add-row:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.subsection-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0.75rem 0 0.45rem;
  padding-left: 0.5rem;
  border-left: 2px solid var(--accent);
}

.hint-multi {
  font-size: 0.66rem;
  color: var(--muted);
  max-width: 170px;
  text-align: right;
  line-height: 1.35;
}

.sidebar-footer {
  border-top: 1px solid var(--line);
  padding: 0.9rem 1.15rem 1rem;
  background: #fff;
}

.footer-note {
  font-size: 0.76rem;
  color: var(--muted);
  margin: 0 0 0.7rem;
  line-height: 1.45;
}

.btn-next {
  width: 100%;
  border: none;
  border-radius: var(--radius);
  padding: 0.72rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
}

.btn-next:hover {
  background: var(--accent-hover);
}

.btn-next:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  --bs-btn-bg: var(--accent);
  --bs-btn-border-color: var(--accent);
  --bs-btn-hover-bg: var(--accent-hover);
  --bs-btn-hover-border-color: var(--accent-hover);
}

.footer-actions {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 0.5rem;
}

.btn-back {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.68rem 0.75rem;
  font-size: 0.86rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--ink-soft);
  background: #fff;
  cursor: pointer;
}

.btn-back:hover {
  border-color: #b7bfca;
  color: var(--ink);
}

.submit-section {
  margin-bottom: 1.25rem;
}

.submit-solution {
  margin: 0 0 0.55rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
}

.selection-review {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.selection-review li {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 0.4rem;
  align-items: start;
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.8rem;
}

.selection-review li:last-child {
  border-bottom: none;
}

.rev-group {
  color: var(--muted);
}

.rev-label {
  color: var(--ink);
  font-weight: 500;
}

.rev-qty {
  color: var(--ink-soft);
  white-space: nowrap;
}

.rev-note {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.72rem;
}

.quote-contact-form .form-label {
  color: var(--ink-soft);
  font-weight: 500;
  margin-bottom: 0.28rem;
}

.quote-contact-form .form-control {
  border-radius: 4px;
  border-color: var(--line);
  font-size: 0.88rem;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
}

.quote-contact-form .form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(31, 111, 139, 0.12);
}

.text-required {
  color: #b42318;
}

.glass-modal {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.glass-modal .modal-header,
.glass-modal .modal-footer {
  border-color: var(--line-soft);
}

.glass-modal .btn-primary {
  background: var(--accent);
  border-color: var(--accent);
}

.glass-modal .btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.glass-modal .btn-close {
  filter: none;
}

.min-h-0 {
  min-height: 0;
}

.step-pane {
  min-height: 0;
}
