:root {
  /* Фирменная цветовая схема BLKN — фиксированная, не зависит от темы
     Telegram у пользователя (тёмная/светлая), чтобы бренд не «плыл». */
  --bg: #ffffff;
  --text: #0c1a3a;
  --hint: #6b7280;
  --link: #ec0a72;
  --button: #ec0a72;
  --button-text: #ffffff;
  --secondary-bg: #f4f4f8;
  --section-bg: #ffffff;
  --separator: rgba(12, 26, 58, 0.1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

#app { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  position: sticky;
  top: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--separator);
  z-index: 10;
}

.topbar h1 {
  font-size: 17px;
  font-weight: 600;
  margin: 0;
  flex: 1;
}

.icon-btn {
  border: none;
  background: transparent;
  color: var(--link);
  font-size: 20px;
  line-height: 1;
  padding: 4px 8px;
  cursor: pointer;
  position: relative;
}

.cart-btn { font-size: 20px; }

.cart-badge {
  position: absolute;
  top: -2px;
  right: 0px;
  background: #e05353;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

#content {
  flex: 1;
  padding: 12px 16px 24px;
}

.loading, .error {
  text-align: center;
  color: var(--hint);
  padding: 40px 16px;
}

.card-list { display: flex; flex-direction: column; gap: 10px; }

.card {
  background: var(--section-bg);
  border: 1px solid var(--separator);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-size: 15px;
  color: var(--text);
}

.card:active { opacity: 0.7; }

.card-image-full {
  padding: 0;
  overflow: hidden;
  display: block;
}

.card-img-full {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
}

.card .emoji { font-size: 22px; flex-shrink: 0; }

.card .card-img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--secondary-bg);
}

.card .title { flex: 1; font-weight: 500; }

.card .chev { color: var(--hint); font-size: 18px; }

.subtitle {
  color: var(--hint);
  font-size: 13px;
  margin: 4px 0 14px;
}

.detail-title {
  font-size: 18px;
  font-weight: 600;
  margin: 4px 0 6px;
}

.detail-note {
  color: var(--hint);
  font-size: 13px;
  margin-bottom: 14px;
}

.price-box {
  background: var(--section-bg);
  border: 1px solid var(--separator);
  border-radius: 14px;
  padding: 4px 16px;
  margin-bottom: 18px;
}

.price-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--separator);
  font-size: 14px;
}

.price-line:last-child { border-bottom: none; }

.price-line .label { color: var(--text); }

.price-line .value { color: var(--link); font-weight: 600; white-space: nowrap; }

.price-line.text-only .value { color: var(--hint); font-weight: 400; }

.price-line.selectable {
  cursor: pointer;
  align-items: center;
}

.price-line.selectable .checkbox {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid var(--separator);
  flex-shrink: 0;
  margin-right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: transparent;
  background: var(--secondary-bg);
}

.price-line.selectable .label-wrap {
  display: flex;
  align-items: center;
  flex: 1;
}

.price-line.selectable.selected .checkbox {
  background: var(--button);
  border-color: var(--button);
  color: var(--button-text);
}

.price-line.selectable.selected .label,
.price-line.selectable.selected .value {
  color: var(--text);
}

.price-line.selectable:active { opacity: 0.8; }

.cart-item-line {
  font-size: 12px;
  color: var(--hint);
  margin-top: 2px;
}

.added-list { margin-bottom: 18px; }

.added-item {
  background: var(--section-bg);
  border: 1px solid var(--separator);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 8px;
}

.added-item .cart-item-service {
  font-size: 12px;
  color: var(--hint);
  margin-bottom: 2px;
}

.added-item .cart-item-title {
  font-size: 14px;
  font-weight: 500;
}

.btn {
  display: block;
  width: 100%;
  border: none;
  border-radius: 12px;
  background: var(--button);
  color: var(--button-text);
  font-size: 16px;
  font-weight: 600;
  padding: 14px;
  cursor: pointer;
  margin-top: 6px;
}

.btn:active { opacity: 0.85; }

.btn.secondary {
  background: var(--secondary-bg);
  color: var(--text);
}

.btn.ghost {
  background: transparent;
  color: var(--link);
}

.form-field {
  margin-bottom: 14px;
}

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

.form-field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--separator);
  background: var(--secondary-bg);
  color: var(--text);
  font-size: 15px;
}

.success-box {
  text-align: center;
  padding: 40px 16px;
}

.success-box .big-emoji {
  font-size: 48px;
  margin-bottom: 12px;
}

.consult-note {
  color: var(--hint);
  font-size: 13px;
  text-align: center;
  margin-top: 10px;
}

.cart-list { display: flex; flex-direction: column; gap: 8px; }

.cart-item {
  background: var(--section-bg);
  border: 1px solid var(--separator);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-item-body { flex: 1; }

.cart-item-service {
  font-size: 12px;
  color: var(--hint);
  margin-bottom: 2px;
}

.cart-item-title {
  font-size: 14px;
  font-weight: 500;
}

.cart-remove {
  border: none;
  background: var(--secondary-bg);
  color: var(--hint);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
}

.lead-item {
  font-size: 13px;
  margin-bottom: 4px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(10px);
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 13px;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 100;
  max-width: 85%;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
