:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-soft: #fbfbfd;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --line-strong: #86868b;
  --accent: #fdd000;
  --accent-dark: #1d1d1f;
  --accent-hover: #e8bf00;
  --accent-soft: #fff8d8;
  --disabled: #f1f1f3;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

.page-shell {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(420px, 620px);
  gap: 56px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 52px 44px 72px;
}

.sticky-product {
  position: sticky;
  top: 36px;
}

.eyebrow {
  margin: 0 0 10px;
  color: #bf4800;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: 0;
}

h1::after,
h2::after {
  content: "";
  display: block;
  width: 72px;
  height: 8px;
  margin-top: 14px;
  border-radius: 999px;
  background: var(--accent);
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
}

.intro,
.top-copy p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.image-wrap {
  --zoom-x: 50%;
  --zoom-y: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 430px;
  margin: 34px 0 28px;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #eeeeef 100%);
  box-shadow: var(--shadow);
  cursor: zoom-in;
  overflow: hidden;
}

.image-wrap img {
  display: block;
  max-width: 94%;
  max-height: 390px;
  width: auto;
  height: auto;
  transition: opacity 0.18s ease, transform 0.28s ease;
  transform-origin: var(--zoom-x) var(--zoom-y);
}

.image-wrap:hover img {
  transform: scale(2.35);
}

.image-caption {
  margin: -12px 0 22px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.summary-card {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
}

.summary-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.summary-card strong {
  font-size: 22px;
}

.summary-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 15px;
}

.summary-row dd {
  margin: 0;
  color: var(--text);
  font-weight: 600;
  text-align: right;
}

.config-panel {
  padding-top: 20px;
}

.top-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 38px;
}

.top-copy {
  margin-bottom: 0;
}

.quote-button {
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-dark);
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  padding: 15px 22px;
  box-shadow: 0 10px 24px rgba(253, 208, 0, 0.28);
  transition: background 0.18s ease, transform 0.18s ease;
}

.quote-button:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.quote-button--top {
  position: fixed;
  top: 24px;
  right: 32px;
  z-index: 15;
  box-shadow: 0 14px 34px rgba(253, 208, 0, 0.36);
}

.quote-button--wide {
  width: 100%;
}

.config-form {
  display: grid;
  gap: 38px;
}

.config-group {
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  display: grid;
  gap: 7px;
  width: 100%;
  margin-bottom: 16px;
  color: var(--text);
  font-size: 26px;
  font-weight: 700;
}

legend span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

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

.option-grid--models {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.option-card {
  position: relative;
  display: grid;
  min-height: 86px;
  align-content: center;
  gap: 7px;
  padding: 18px 44px 18px 18px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.option-card:hover:not(.is-disabled) {
  border-color: var(--line-strong);
}

.option-card.is-selected {
  border-color: var(--accent);
  background: #fff6bf;
  box-shadow: 0 0 0 5px rgba(253, 208, 0, 0.34), 0 10px 26px rgba(253, 208, 0, 0.18);
}

.option-card.is-selected::after {
  content: "";
  position: absolute;
  top: 16px;
  right: 16px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: inset 0 0 0 4px #ffffff, 0 0 0 2px rgba(29, 29, 31, 0.16);
}

.option-card.is-disabled {
  border-style: dashed;
  background: var(--disabled);
  color: #8a8a8e;
  cursor: not-allowed;
}

.option-card.is-selected.is-disabled {
  border-style: solid;
  border-color: var(--accent);
  background: #fff6bf;
  color: var(--text);
  box-shadow: 0 0 0 5px rgba(253, 208, 0, 0.34), 0 10px 26px rgba(253, 208, 0, 0.18);
}

.option-title {
  font-size: 18px;
  font-weight: 700;
}

.option-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.is-disabled .option-desc {
  color: #8a8a8e;
}

.option-card.is-selected.is-disabled .option-desc {
  color: var(--muted);
}

.rule-note {
  min-height: 20px;
  margin: 12px 0 0;
  color: #bf4800;
  font-size: 14px;
  line-height: 1.45;
}

.bottom-quote {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 42px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.bottom-quote strong {
  display: block;
  margin-bottom: 6px;
  font-size: 20px;
}

.bottom-quote p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal.is-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  width: min(100%, 560px);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  padding: 30px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.28);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #ededf0;
  color: var(--muted);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.modal-intro {
  margin-bottom: 20px;
  color: var(--muted);
  line-height: 1.5;
}

.quote-line-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 190px;
  margin-bottom: 18px;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f0f0f2 100%);
  overflow: hidden;
}

.quote-line-preview img {
  display: block;
  max-width: 94%;
  max-height: 210px;
  width: auto;
  height: auto;
}

.modal-summary {
  margin-bottom: 22px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.modal-summary strong {
  display: block;
  margin-bottom: 10px;
}

.modal-summary dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.modal-summary div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
}

.modal-summary dd {
  margin: 0;
  color: var(--text);
  font-weight: 700;
  text-align: right;
}

.quote-form {
  display: grid;
  gap: 14px;
}

.quote-form label {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.quote-form input,
.quote-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font-size: 16px;
  padding: 13px 14px;
}

.quote-form textarea {
  resize: vertical;
}

.quote-form input:focus,
.quote-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(253, 208, 0, 0.2);
  outline: 0;
}

.form-message {
  min-height: 20px;
  margin: 0;
  color: #0a7a2f;
  font-size: 14px;
  line-height: 1.45;
}

@media (max-width: 980px) {
  .page-shell {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 34px 20px 56px;
  }

  .sticky-product {
    position: static;
  }

  .image-wrap {
    min-height: 300px;
  }

  .top-bar,
  .bottom-quote {
    align-items: stretch;
    flex-direction: column;
  }

  .quote-button--top {
    top: 16px;
    right: 16px;
  }
}

@media (max-width: 620px) {
  .option-grid,
  .option-grid--models {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 40px;
  }

  h2 {
    font-size: 34px;
  }
}
