:root {
  --premium-black: #0a0a0a;
  --premium-muted: #71757a;
  --premium-accent: #bb9a67;
}

.price-summary {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.price-summary .price-kicker,
.price-summary strong,
.price-summary #price-caption {
  display: block;
}

.price-summary .price-kicker {
  margin-bottom: 3px;
  color: #2e3337;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.price-summary strong {
  overflow: hidden;
  color: var(--premium-black);
  font-size: clamp(19px, 1.4vw, 25px);
  font-weight: 650;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-summary #price-caption::after {
  content: " ↗";
  color: var(--premium-accent);
}

.price-summary #price-caption {
  overflow: hidden;
  margin-top: 5px;
  color: var(--premium-muted);
  font-size: 10px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-summary::after {
  content: "Полная смета ↗";
  position: absolute;
  right: 154px;
  bottom: 12px;
  color: #33383c;
  font-size: 9px;
}

.price-summary.estimate .price-kicker::after {
  content: " · предварительно";
  color: #9c6f32;
}

.quote-overlay {
  position: fixed;
  z-index: 39;
  inset: 0;
  background: rgba(0, 0, 0, .34);
  backdrop-filter: blur(3px);
}

.quote-drawer {
  position: fixed;
  z-index: 40;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(480px, 100vw);
  padding: 30px 32px 40px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  overflow: hidden;
  color: #f8f8f6;
  background:
    radial-gradient(circle at 90% 0, rgba(187, 154, 103, .17), transparent 34%),
    #111315;
  box-shadow: -24px 0 80px rgba(0, 0, 0, .24);
  transform: translateX(104%);
  transition: transform .32s cubic-bezier(.22, 1, .36, 1);
}

.quote-drawer.open {
  transform: translateX(0);
}

.quote-drawer > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}

.quote-drawer header span {
  color: #aaa;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.quote-drawer h2 {
  margin: 5px 0 0;
  font-size: 30px;
  font-weight: 550;
  letter-spacing: -.03em;
}

.quote-drawer header button {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 50%;
  color: #fff;
  background: transparent;
  cursor: pointer;
  font-size: 25px;
  font-weight: 200;
}

.quote-total {
  padding: 28px 0 24px;
}

.quote-total strong,
.quote-total span,
.quote-total small {
  display: block;
}

.quote-total strong {
  color: #fff;
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 600;
  letter-spacing: -.045em;
}

.quote-total span {
  margin-top: 7px;
  color: #9b9d9f;
  font-size: 12px;
}

.quote-total small {
  max-width: 360px;
  margin-top: 10px;
  color: #c8ad82;
  font-size: 10px;
  font-weight: 450;
  line-height: 1.45;
}

.quote-lines {
  min-height: 0;
  overflow-y: auto;
  padding-right: 8px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  scrollbar-color: rgba(255, 255, 255, .28) transparent;
  scrollbar-width: thin;
}

.quote-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding: 15px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.quote-line strong,
.quote-line span {
  display: block;
}

.quote-line strong {
  color: #e8e8e6;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
}

.quote-line span {
  margin-top: 4px;
  color: #85888b;
  font-size: 10px;
  line-height: 1.35;
}

.quote-line b {
  color: #fff;
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
}

.quote-meta {
  margin-top: 24px;
  padding: 16px;
  border: 1px solid rgba(187, 154, 103, .34);
  color: #a9abad;
  background: rgba(187, 154, 103, .07);
  font-size: 10px;
  line-height: 1.55;
}

.quote-meta p {
  margin: 0;
}

.quote-meta p + p {
  margin-top: 6px;
}

.quote-meta a {
  color: #d7bc93;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.quote-action {
  padding-top: 18px;
}

.quote-action button {
  width: 100%;
  min-height: 54px;
  padding: 0 24px;
  border: 1px solid #d8b47d;
  color: #111315;
  background: #d8b47d;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}

.quote-action button:hover,
.quote-action button:focus-visible {
  border-color: #ecd0a5;
  background: #ecd0a5;
}

.quote-action button:active {
  transform: translateY(1px);
}

.quote-action span {
  display: block;
  margin-top: 9px;
  color: #85888b;
  font-size: 10px;
  line-height: 1.4;
  text-align: center;
}

@media (min-width: 761px) and (max-height: 820px) {
  .quote-drawer {
    width: min(450px, 100vw);
    padding: 18px 24px 20px;
  }
  .quote-drawer > header {
    padding-bottom: 12px;
  }
  .quote-drawer header span {
    font-size: 9px;
  }
  .quote-drawer h2 {
    margin-top: 3px;
    font-size: 25px;
  }
  .quote-drawer header button {
    width: 32px;
    height: 32px;
    font-size: 21px;
  }
  .quote-total {
    padding: 13px 0 11px;
  }
  .quote-total strong {
    font-size: 31px;
  }
  .quote-total span {
    margin-top: 3px;
    font-size: 10px;
  }
  .quote-total small {
    margin-top: 5px;
    font-size: 8px;
  }
  .quote-line {
    gap: 14px;
    padding: 8px 0;
  }
  .quote-line strong,
  .quote-line b {
    font-size: 11px;
  }
  .quote-line span {
    margin-top: 2px;
    font-size: 8px;
  }
  .quote-meta {
    margin-top: 11px;
    padding: 9px 11px;
    font-size: 8px;
    line-height: 1.4;
  }
  .quote-meta p + p {
    margin-top: 3px;
  }
  .quote-action {
    padding-top: 10px;
  }
  .quote-action button {
    min-height: 43px;
    font-size: 12px;
  }
  .quote-action span {
    margin-top: 5px;
    font-size: 8px;
  }
}

@media (max-width: 760px) {
  .price-summary .price-kicker {
    font-size: 8px;
  }

  .price-summary strong {
    font-size: 18px;
  }

  .price-summary #price-caption {
    max-width: 190px;
    font-size: 8px;
  }

  .price-summary::after {
    display: none;
  }

  .quote-drawer {
    top: 8vh;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto auto;
    overflow: hidden;
    padding: 24px 20px 18px;
    border-radius: 20px 20px 0 0;
  }

  .quote-lines {
    overflow-y: auto;
    padding-right: 0;
  }

  .quote-meta {
    margin-top: 12px;
    padding: 10px 12px;
    font-size: 8px;
  }

  .quote-action {
    padding-top: 12px;
    background: #111315;
  }

  .quote-action button { min-height: 48px; }
  .quote-action span { margin-top: 6px; font-size: 8px; }
}
