:root {
  --bg: #f4f1ea;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-strong: #ffffff;
  --text: #1f2329;
  --muted: #46515c;
  --line: rgba(31, 35, 41, 0.1);
  --accent: #df2027;
  --accent-dark: #9b0f15;
  --ink-blue: #0f2636;
  --glow: 0 20px 60px rgba(15, 38, 54, 0.14);
  --soft-blue: #e7f2ff;
  --soft-blue-border: #b8d4f7;
  --soft-blue-text: #123a62;
  --soft-green: #e9f8ec;
  --soft-green-border: #b9e2c3;
  --soft-green-text: #1f5b34;
  --soft-sand: #fff7ef;
  --soft-sand-border: #f2d5b4;
  --soft-sand-text: #7a4216;
  --sheet-line: #e5e7eb;
  --sheet-muted: #6b7280;
  --sheet-soft: #f7f8fb;
  --sheet-total: #edfdf4;
  --sheet-total-text: #12a150;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Barlow", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(223, 32, 39, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(15, 38, 54, 0.12), transparent 30%),
    linear-gradient(135deg, #f7f3eb 0%, #ebe6dd 100%);
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 56px;
}

.hero,
.search-panel,
.result-card,
.side-card {
  backdrop-filter: blur(16px);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--glow);
}

.hero {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 24px;
  padding: 28px;
  border-radius: 28px;
}

.eyebrow,
.result-label,
.hero-card-label {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 800;
}

.hero h1 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.4rem, 4vw, 4rem);
  line-height: 0.95;
}

.hero-text,
.side-copy,
.section-note,
.hero-card-note {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.hero-text,
.side-copy,
.section-note {
  font-weight: 500;
}

.hero-card-note {
  color: rgba(255, 255, 255, 0.86);
  font-weight: 500;
}

.hero-card {
  border-radius: 24px;
  padding: 24px;
  background:
    linear-gradient(160deg, rgba(15, 38, 54, 0.95), rgba(24, 49, 67, 0.88)),
    var(--ink-blue);
  color: #fff;
  align-self: stretch;
}

.hero-card-value {
  margin: 0 0 10px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 2.1rem;
  font-weight: 700;
}

.filters-heading-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.filters-heading {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 800;
}

.eyebrow {
  font-size: 1.15rem;
  letter-spacing: 0.18em;
}

.filters-heading-match {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.filters-heading-match strong {
  color: var(--ink-blue);
}

.search-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
  padding: 20px;
  border-radius: 24px;
  align-items: end;
}

.search-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.95rem;
  font-weight: 700;
}

.search-field input,
.search-field select,
.action-row button {
  width: 100%;
  height: 52px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  padding: 0 14px;
  font: inherit;
}

.search-field input:focus,
.search-field select:focus,
.action-row button:focus {
  outline: 2px solid rgba(223, 32, 39, 0.22);
  border-color: rgba(223, 32, 39, 0.36);
}

.action-row button {
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  min-width: 148px;
}

.action-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  justify-self: end;
}

.filters-match-copy {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.filters-match-copy strong {
  color: var(--ink-blue);
}

.is-hidden {
  display: none;
}

.results-layout {
  margin-top: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.9fr);
  gap: 20px;
}

.result-card,
.side-card {
  border-radius: 28px;
  padding: 24px;
}

.quick-quote-line {
  margin: 0 0 18px;
  padding: 0 6px;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.quotation-sheet {
  border-radius: 26px;
  background: #fff;
  border: 1px solid rgba(15, 38, 54, 0.08);
  overflow: hidden;
}

.quotation-header {
  padding: 32px 28px 30px;
  text-align: center;
  border-bottom: 1px solid var(--sheet-line);
}

.quotation-brand {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 700;
  color: #111827;
}

.quotation-subbrand,
.quotation-address,
.quotation-contact,
.quotation-date {
  margin: 12px 0 0;
  color: var(--sheet-muted);
}

.quotation-subbrand {
  font-size: 1.15rem;
  font-weight: 700;
}

.quotation-address,
.quotation-contact,
.quotation-date,
.price-row span,
.price-row strong,
.vehicle-card-meta,
.quotation-note {
  font-size: 1rem;
}

.quotation-contact strong,
.quotation-date span {
  color: #374151;
}

.quotation-body {
  padding: 32px 28px 28px;
}

.quotation-title {
  margin: 0 0 26px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 2.5vw, 2.6rem);
  color: #111827;
}

.vehicle-card {
  padding: 24px 28px;
  border-radius: 20px;
  background: var(--sheet-soft);
  border: 1px solid rgba(15, 38, 54, 0.04);
  box-shadow: 0 10px 28px rgba(15, 38, 54, 0.06);
}

.vehicle-card-label,
.breakdown-title {
  margin: 0 0 16px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #374151;
}

.vehicle-card h3 {
  margin: 0 0 14px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.8rem, 2.6vw, 2.8rem);
  line-height: 1.08;
  color: #374151;
}

.vehicle-card-meta {
  margin: 6px 0 0;
  color: var(--sheet-muted);
}

.vehicle-card-meta span {
  font-weight: 500;
}

.breakdown-section {
  margin-top: 32px;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--sheet-line);
}

.price-row span {
  color: #4b5563;
}

.price-row strong {
  color: #1f2937;
  text-align: right;
}

.price-edit-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.price-input-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.price-prefix {
  font-weight: 700;
  color: #1f2937;
}

.price-input {
  width: 180px;
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: #1f2937;
  text-align: right;
}

.price-input:focus {
  outline: 0;
  border-bottom: 2px solid rgba(223, 32, 39, 0.32);
}

.price-reset-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(15, 38, 54, 0.14);
  border-radius: 10px;
  background: #fff;
  color: var(--ink-blue);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.price-reset-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.total-card {
  margin-top: 30px;
  padding: 26px 20px;
  border-radius: 16px;
  background: #eefcf4;
  text-align: center;
}

.total-label {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #4b5563;
}

.total-card strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 3vw, 3rem);
  color: var(--sheet-total-text);
}

.total-card-value {
  margin-top: 18px;
  background: #eefcf4;
}

.total-card-value strong {
  color: var(--sheet-total-text);
}

.export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.export-button {
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid rgba(15, 38, 54, 0.14);
  border-radius: 14px;
  background: #fff;
  color: var(--ink-blue);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.export-button:hover:not(:disabled),
.export-button:focus-visible:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(223, 32, 39, 0.3);
  box-shadow: 0 12px 28px rgba(15, 38, 54, 0.1);
}

.export-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.export-button-share {
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
  border-color: transparent;
  color: #fff;
}

.quotation-note {
  margin: 28px 0 0;
  text-align: center;
  font-weight: 500;
}

.value-package-panel {
  margin-top: 28px;
}

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

.detail-item {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  border-radius: 18px;
  padding: 14px 16px;
}

.detail-item span {
  display: block;
  margin: 0 0 8px;
  font-weight: 700;
  color: #334150;
}

.detail-item strong {
  display: block;
  font-size: 1.08rem;
  color: var(--text);
}

.value-price-input {
  width: 100%;
  display: block;
  font-size: 1.08rem;
  text-align: left;
}

.value-price-input-wrap {
  justify-content: flex-start;
}

.value-reset-button {
  margin-top: 10px;
}

.value-package-item {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 246, 246, 0.92));
  border-color: rgba(223, 32, 39, 0.16);
  box-shadow: 0 12px 28px rgba(223, 32, 39, 0.06);
}

.value-package-item span {
  color: var(--accent-dark);
}

.value-package-item strong {
  color: var(--ink-blue);
}

.total-price-input {
  width: 100%;
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 3vw, 3rem);
  text-align: center;
}

.total-price-input-wrap {
  justify-content: center;
}

.total-price-prefix {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 3vw, 3rem);
  color: var(--sheet-total-text);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.match-count {
  display: block;
  margin: 4px 0 12px;
  font-size: 3rem;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink-blue);
}

.side-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 440px;
  overflow: auto;
  padding-right: 6px;
}

.side-pill {
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(15, 38, 54, 0.06);
  border: 1px solid rgba(15, 38, 54, 0.08);
}

.side-pill strong,
.side-pill span {
  display: block;
}

.side-pill span {
  color: var(--muted);
  margin-top: 3px;
}

@media (max-width: 960px) {
  .hero,
  .results-layout,
  .search-panel,
  .value-package-grid {
    grid-template-columns: 1fr;
  }

  .action-row button {
    min-width: 100%;
  }

  .action-row {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .filters-heading-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .price-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .price-row strong {
    text-align: left;
  }

  .price-edit-group {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .price-input-wrap {
    width: 100%;
    justify-content: flex-start;
  }

  .price-input {
    width: 100%;
    text-align: left;
  }

  .price-reset-button {
    width: fit-content;
  }
}
