/* Публичный конфигуратор: чёрный / белый / золото */
:root {
  --bg-page: #f7f7f6;
  --bg-panel: #ffffff;
  --bg-sidebar: #0d0d0d;
  --bg-sidebar-hover: #1a1a1a;
  --text: #141414;
  --text-muted: #5c5c5c;
  --border: #e8e8e6;
  --border-strong: #cfcfcd;
  --gold: #c9a448;
  --gold-hover: #b8923a;
  --gold-soft: rgba(201, 164, 72, 0.12);
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.06);
  --radius: 14px;
  --radius-sm: 10px;
  --font-ui: "DM Sans", system-ui, sans-serif;
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
}

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

html {
  scroll-behavior: smooth;
}

body.theme-app {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--bg-sidebar);
  color: #f5f5f5;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  border-right: 1px solid #222;
}

.app-brand {
  padding: 0 8px 12px;
  border-bottom: 1px solid #262626;
}

.app-brand-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0;
  color: #fff;
}

.app-brand-sub {
  margin: 6px 0 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.app-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.app-nav-section {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #737373;
  padding: 12px 10px 8px;
}

.app-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  color: #d4d4d4;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.15s ease, color 0.15s ease;
}

.app-nav a:hover {
  background: var(--bg-sidebar-hover);
  color: #fff;
}

.app-nav a.active {
  background: var(--gold-soft);
  color: var(--gold);
  box-shadow: inset 0 0 0 1px rgba(201, 164, 72, 0.35);
}

.app-nav-icon {
  width: 20px;
  height: 20px;
  opacity: 0.85;
}

.app-main {
  flex: 1;
  min-width: 0;
  padding: 32px 40px 48px;
}

@media (max-width: 960px) {
  .app-shell {
    flex-direction: column;
  }
  .app-sidebar {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 16px;
    gap: 12px;
  }
  .app-brand {
    border-bottom: none;
    padding-bottom: 0;
    flex: 1;
    min-width: 180px;
  }
  .app-nav {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
  }
  .app-nav-section {
    width: 100%;
    padding: 8px 10px 4px;
  }
  .app-nav a {
    flex: 1 1 auto;
    justify-content: center;
    min-width: 120px;
  }
  .app-main {
    padding: 20px 18px 40px;
  }
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.page-lead {
  margin: 0 0 28px;
  color: var(--text-muted);
  max-width: 52ch;
}

/* Конфигуратор */
.calc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 28px;
  align-items: start;
}

@media (max-width: 1100px) {
  .calc-layout {
    grid-template-columns: 1fr;
  }
}

.steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.step-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.step-pill.done {
  border-color: rgba(201, 164, 72, 0.45);
  background: var(--gold-soft);
  color: var(--text);
}

.step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  background: #ececea;
  color: var(--text);
}

.step-pill.done .step-num {
  background: var(--gold);
  color: #111;
}

.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}

.panel-title {
  margin: 0 0 16px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

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

@media (max-width: 640px) {
  .field-grid {
    grid-template-columns: 1fr;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 12px;
  font-weight: 600;
  color: #3a3a3a;
}

.field select,
.field input {
  font-family: var(--font-ui);
  font-size: 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: #fafaf9;
  color: var(--text);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, transform 0.12s ease;
  font-weight: 500;
}

.field input::placeholder {
  color: #b6b6b3;
}

/* Премиальный select: золотая «галочка» в правом конце, лёгкая тень при ховере. */
.field select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 38px;
  cursor: pointer;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--gold) 50%),
    linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% + 2px),
    calc(100% - 13px) calc(50% + 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  background-color: #fafaf9;
  letter-spacing: 0.005em;
}

.field select:hover,
.field input:hover {
  border-color: rgba(201, 164, 72, 0.55);
  background-color: #fff;
  box-shadow: 0 6px 16px rgba(28, 28, 28, 0.04);
}

.field select:focus,
.field input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft), 0 8px 22px rgba(201, 164, 72, 0.18);
  background-color: #fff;
  transform: translateY(-1px);
}

.field select:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  background-image: none;
}

.btn-primary {
  position: relative;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: none;
  cursor: pointer;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #e0c168 0%, var(--gold) 38%, var(--gold-hover) 100%);
  background-size: 200% 200%;
  color: #181818;
  box-shadow:
    0 10px 24px rgba(201, 164, 72, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 0 rgba(0, 0, 0, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-position 0.4s ease;
  overflow: hidden;
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
  pointer-events: none;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  background-position: 100% 50%;
  box-shadow:
    0 16px 32px rgba(201, 164, 72, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -1px 0 rgba(0, 0, 0, 0.06);
}

.btn-primary:hover::after {
  transform: translateX(100%);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 6px 12px rgba(201, 164, 72, 0.35);
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.preview-card {
  position: sticky;
  top: 24px;
  background: linear-gradient(165deg, #121212 0%, #1c1c1c 48%, #111 100%);
  color: #f5f5f5;
  border-radius: var(--radius);
  padding: 26px 24px 28px;
  border: 1px solid #2a2a2a;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.preview-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 0%, rgba(201, 164, 72, 0.12), transparent 45%);
  pointer-events: none;
}

.preview-inner {
  position: relative;
  z-index: 1;
}

.preview-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  margin-bottom: 20px;
  border-radius: var(--radius-sm);
  background:
    radial-gradient(circle at 50% 0%, rgba(201, 164, 72, 0.12), transparent 60%),
    linear-gradient(180deg, #0d0d0d 0%, #050505 100%);
  border: 1px solid rgba(201, 164, 72, 0.18);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    inset 0 -40px 60px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  flex-direction: column;
  text-align: center;
  padding: 16px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.preview-visual.has-photo {
  border-color: rgba(201, 164, 72, 0.45);
  box-shadow:
    0 0 0 1px rgba(201, 164, 72, 0.15),
    0 18px 40px rgba(0, 0, 0, 0.5);
  padding: 0;
}

.preview-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, transparent 30%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.015) 0 1px, transparent 1px 8px);
  pointer-events: none;
}

.preview-visual.has-photo::before { display: none; }

.preview-visual .preview-photo {
  width: 100%;
  height: 100%;
  max-height: 360px;
  object-fit: contain;
  display: none;
  border-radius: var(--radius-sm);
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.55));
  animation: previewFadeIn 0.32s ease;
  background: #0a0a0a;
}

.preview-visual.has-photo .preview-photo {
  display: block;
}

.preview-visual.has-photo .preview-fallback-svg {
  display: none;
}

@keyframes previewFadeIn {
  0%   { opacity: 0; transform: translateY(6px) scale(0.985); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.preview-visual.is-loading {
  animation: previewPulse 1.4s ease-in-out infinite;
}

@keyframes previewPulse {
  0%, 100% { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02), inset 0 -40px 60px rgba(0, 0, 0, 0.45); }
  50% { box-shadow: 0 0 0 1px rgba(201, 164, 72, 0.35), inset 0 -40px 60px rgba(0, 0, 0, 0.45); }
}

.preview-visual > svg,
.preview-fallback-svg {
  width: 120px;
  height: 220px;
  opacity: 0.88;
  flex-shrink: 0;
}

.preview-fallback-hint {
  margin: 14px 0 0;
  font-size: 11px;
  color: #6a6a6a;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
  line-height: 1.5;
}

/* Cabinet catalog */
.cabinet-catalog-filters {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
}

.cabinet-catalog-filters label {
  display: block;
}

.cabinet-catalog-filters label span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.cabinet-catalog-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.cabinet-catalog-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.cabinet-catalog-table th,
.cabinet-catalog-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  vertical-align: middle;
  font-size: 14px;
}

.cabinet-catalog-table th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: #fafafa;
}

.cabinet-model-thumb {
  width: 72px;
  height: 96px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e3e3e3;
  background: #f5f5f5;
}

.cabinet-model-thumb--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--muted);
}

.cabinet-price-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.cabinet-price-form input[type="number"] {
  width: 120px;
}

.cabinet-prices-page .cabinet-prices-formula {
  margin: 24px 0;
  padding: 20px;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  background: #fafafa;
}

.cabinet-prices-section-title {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.cabinet-prices-formula-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  margin-top: 12px;
}

.cabinet-prices-formula-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.cabinet-prices-formula-form input {
  width: 120px;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.cabinet-prices-row-form input[type="number"] {
  width: 100px;
}

.cabinet-prices-row--warn {
  background: #fff8e1;
}

.cabinet-prices-pagination {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 16px;
}

.cabinet-prices-pagination a {
  color: var(--accent);
  text-decoration: none;
}

.cabinet-prices-table {
  font-size: 13px;
}

.cabinet-empty-cell {
  color: var(--muted);
  text-align: center;
  padding: 20px;
}

.cabinet-parsers-page .cabinet-parsers-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  margin-bottom: 24px;
}

.cabinet-parsers-toolbar-note {
  color: var(--muted);
  font-size: 14px;
}

.cabinet-parsers-section {
  margin-bottom: 32px;
}

.cabinet-parsers-section-title {
  font-size: 18px;
  margin: 0 0 14px;
}

.cabinet-parsers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.cabinet-parser-card {
  border: 1px solid var(--border, #e5e5e5);
  border-radius: 12px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.cabinet-parser-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.cabinet-parser-card__head h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
}

.cabinet-parser-card__desc,
.cabinet-parser-card__site,
.cabinet-parser-card__last {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--text, #333);
}

.cabinet-parser-card__site a {
  color: var(--accent);
  word-break: break-all;
}

.cabinet-parser-card__muted {
  color: var(--muted);
}

.cabinet-parser-card__error {
  margin: 8px 0 0;
  font-size: 12px;
  color: #b00020;
  white-space: pre-wrap;
}

.cabinet-parser-progress {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: #eceff1;
  overflow: hidden;
  margin-top: 8px;
}

.cabinet-parser-progress--lg {
  height: 12px;
}

.cabinet-parser-progress__bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #1976d2, #42a5f5);
  transition: width 0.35s ease;
}

.cabinet-parser-progress--running .cabinet-parser-progress__bar {
  background: linear-gradient(90deg, #1976d2, #64b5f6, #1976d2);
  background-size: 200% 100%;
  animation: parser-progress-pulse 1.4s ease-in-out infinite;
}

.cabinet-parser-progress--success .cabinet-parser-progress__bar {
  background: #2e7d32;
}

.cabinet-parser-progress--failed .cabinet-parser-progress__bar {
  background: #c62828;
}

.cabinet-parser-progress--pending .cabinet-parser-progress__bar {
  background: #90a4ae;
}

.cabinet-parser-progress__meta {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.cabinet-parsers-footnote {
  font-size: 12px;
  color: var(--muted);
}

.cabinet-parsers-page .btn-sm {
  padding: 6px 12px;
  font-size: 13px;
  white-space: nowrap;
}

@keyframes parser-progress-pulse {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.preview-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8a8a8a;
  margin-bottom: 6px;
}

.price-xl {
  font-family: var(--font-display);
  font-size: 2.35rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 14px;
  line-height: 1.1;
}

.price-note {
  font-size: 13px;
  color: #b0b0b0;
  line-height: 1.5;
}

.preview-kp-hint {
  font-size: 12px;
  color: #939393;
  margin: 6px 0 0;
  min-height: 1.2em;
}

.link-gold {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(201, 164, 72, 0.35);
}

.link-gold:hover {
  color: #e0c97a;
}

.divider-gold {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 164, 72, 0.55), transparent);
  margin: 18px 0;
}

.meta-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 13px;
  color: #c8c8c8;
}

.meta-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #2c2c2c;
}

.meta-list li:last-child {
  border-bottom: none;
}

.meta-list span:first-child {
  color: #8c8c8c;
}

.loading-dots::after {
  content: "";
  animation: dots 1s steps(4, end) infinite;
}

@keyframes dots {
  0% {
    content: "";
  }
  25% {
    content: ".";
  }
  50% {
    content: "..";
  }
  75% {
    content: "...";
  }
}

/* Боковое подменю */
.app-nav-details {
  margin: 0;
  border: none;
  padding: 0;
}

.app-nav-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  color: #d4d4d4;
  cursor: pointer;
  list-style: none;
  font-size: 14px;
}

.app-nav-summary::-webkit-details-marker {
  display: none;
}

.app-nav-details[open] .app-nav-summary {
  color: var(--gold);
}

.app-nav-sub {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0 8px 40px;
}

.app-nav-sub a {
  font-size: 13px;
  padding: 6px 8px;
  border-radius: 8px;
  color: #a3a3a3;
  text-decoration: none;
}

.app-nav-sub a:hover {
  color: #fff;
  background: var(--bg-sidebar-hover);
}

/* Полноэкранный калькулятор */
.calc-page {
  max-width: 1320px;
  margin: 0 auto;
}

.calc-form-stack {
  min-width: 0;
}

.calc-page-head {
  margin-bottom: 28px;
}

.calc-page-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 28px;
  align-items: start;
}

@media (max-width: 1100px) {
  .calc-page-body {
    grid-template-columns: 1fr;
  }
}

.calc-section {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.calc-section-head {
  padding: 14px 20px;
  background: linear-gradient(180deg, #fafafa 0%, #f4f4f3 100%);
  border-bottom: 1px solid var(--border);
}

.calc-section-head h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #4a4a4a;
}

.calc-section-head p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.calc-section-body {
  padding: 20px;
}

.calc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.calc-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.005em;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, #ffffff 0%, #fbfaf7 100%);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03), 0 4px 10px rgba(20, 20, 20, 0.03);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    transform 0.12s ease;
  user-select: none;
}

.calc-tab::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(201, 164, 72, 0.55), rgba(201, 164, 72, 0));
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: -1;
  filter: blur(8px);
}

.calc-tab-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f5f3ee;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
  transition: background 0.18s ease, transform 0.18s ease;
}

.calc-tab-icon svg {
  width: 86%;
  height: 86%;
  display: block;
}

.calc-tab:hover {
  border-color: rgba(201, 164, 72, 0.55);
  box-shadow: 0 4px 14px rgba(201, 164, 72, 0.15);
  transform: translateY(-1px);
  color: #1a1a1a;
}

.calc-tab:hover .calc-tab-icon {
  background: #fff;
  transform: scale(1.04);
}

.calc-tab.is-selected {
  border-color: var(--gold);
  background: linear-gradient(180deg, #fff8e6 0%, var(--gold-soft) 100%);
  color: #1a1a1a;
  box-shadow:
    0 0 0 2px var(--gold-soft),
    0 8px 18px rgba(201, 164, 72, 0.22);
  transform: translateY(-1px);
}

.calc-tab.is-selected::before { opacity: 1; }

.calc-tab.is-selected .calc-tab-icon {
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(201, 164, 72, 0.45), 0 2px 6px rgba(201, 164, 72, 0.18);
}

.calc-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}

.calc-card-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  text-align: left;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.04),
    0 6px 16px rgba(20, 20, 20, 0.05);
  transition:
    border-color 0.2s ease,
    box-shadow 0.25s ease,
    transform 0.18s ease;
}

.calc-card-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 60%, rgba(0, 0, 0, 0.06) 100%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.calc-card-btn:hover {
  border-color: rgba(201, 164, 72, 0.55);
  box-shadow:
    0 0 0 1px rgba(201, 164, 72, 0.15),
    0 14px 28px rgba(20, 20, 20, 0.09);
  transform: translateY(-3px);
}

.calc-card-btn:hover::after { opacity: 1; }

.calc-card-btn.is-selected {
  border-color: var(--gold);
  box-shadow:
    0 0 0 2px var(--gold-soft),
    0 14px 32px rgba(201, 164, 72, 0.25);
  transform: translateY(-3px);
}

.calc-card-btn.is-selected::before {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e6c570, var(--gold-hover));
  box-shadow: 0 4px 10px rgba(201, 164, 72, 0.45);
  background-image:
    linear-gradient(135deg, #e6c570, var(--gold-hover)),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3 6-6.5'/></svg>");
  background-blend-mode: normal;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 2;
  animation: cardCheckIn 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cardCheckIn {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.calc-card-visual {
  aspect-ratio: 4/5;
  background: linear-gradient(160deg, #f3f1ec, #dfd9d2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  box-sizing: border-box;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.calc-card-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.6), transparent 55%);
  pointer-events: none;
}

.calc-card-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.calc-card-btn:hover .calc-card-visual img {
  transform: scale(1.04);
}

.calc-card-visual svg {
  width: 100%;
  height: 100%;
  display: block;
  max-height: 100%;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.05));
}

.calc-card-placeholder {
  font-size: 11px;
  color: #888;
  text-align: center;
  padding: 8px;
}

.calc-card-label {
  padding: 12px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  letter-spacing: 0.005em;
  background: #fff;
}

.calc-card-btn.is-selected .calc-card-label {
  color: #1a1a1a;
  background: linear-gradient(180deg, #fffbf2 0%, #fff7e1 100%);
}

.calc-carousel-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.calc-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 0 12px;
  scrollbar-width: thin;
}

.calc-carousel .calc-card-btn {
  flex: 0 0 160px;
  scroll-snap-align: start;
}

.calc-carousel-nav {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: #fff;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  color: var(--text);
  box-shadow: 0 4px 14px rgba(20, 20, 20, 0.08);
  transition:
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.2s ease,
    transform 0.18s ease;
  font-weight: 400;
}

.calc-carousel-nav:hover {
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 8px 22px rgba(201, 164, 72, 0.28);
  transform: scale(1.06);
}

.calc-carousel-nav:active { transform: scale(0.96); }

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

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

@media (max-width: 900px) {
  .dim-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dim-grid-3 {
    grid-template-columns: 1fr;
  }
}

.dim-subtitle {
  font-size: 12px;
  font-weight: 700;
  margin: 16px 0 12px;
  color: #555;
}

.dim-subtitle:first-child {
  margin-top: 0;
}

.dim-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
}

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

@media (max-width: 700px) {
  .coating-grid {
    grid-template-columns: 1fr;
  }
}

.coating-col h3 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
}

.radio-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.radio-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}

.color-swatch-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.swatch {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 2px solid var(--border);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.room-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.room-toggle {
  flex: 1;
  min-width: 200px;
  padding: 16px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, #ffffff 0%, #faf9f5 100%);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.005em;
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03), 0 4px 10px rgba(20, 20, 20, 0.04);
  transition:
    border-color 0.18s ease,
    box-shadow 0.2s ease,
    background 0.18s ease,
    transform 0.12s ease;
}

.room-toggle:hover {
  border-color: rgba(201, 164, 72, 0.55);
  box-shadow: 0 8px 18px rgba(201, 164, 72, 0.15);
  transform: translateY(-1px);
}

.room-toggle.is-selected {
  border-color: var(--gold);
  background: linear-gradient(180deg, #fffaef 0%, var(--gold-soft) 100%);
  box-shadow:
    0 0 0 2px var(--gold-soft),
    0 8px 18px rgba(201, 164, 72, 0.22);
  color: #1a1a1a;
}

.extras-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.extras-table th,
.extras-table td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
}

.extras-table input {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 8px 10px;
}

.btn-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 16px;
}

.btn-secondary {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, #ffffff 0%, #faf9f5 100%);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03), 0 4px 10px rgba(20, 20, 20, 0.03);
  transition:
    border-color 0.18s ease,
    box-shadow 0.2s ease,
    color 0.18s ease,
    transform 0.12s ease;
}

.btn-secondary:hover {
  border-color: var(--gold);
  color: var(--gold-hover);
  box-shadow: 0 8px 18px rgba(201, 164, 72, 0.18);
  transform: translateY(-1px);
}

.btn-secondary:active { transform: translateY(0); }

.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.link-muted {
  font-size: 13px;
  color: var(--gold-hover);
  cursor: pointer;
  text-decoration: underline;
}

.alert-inline {
  font-size: 13px;
  color: #b45309;
  margin-top: 8px;
}

/* React configurator */
.react-configurator-root {
  min-height: 60vh;
}

.react-configurator-loading,
.premium-empty {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 320px;
  color: var(--text-muted);
  font-weight: 600;
}

.react-configurator-loading span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(201, 164, 72, 0.25);
  border-top-color: var(--gold);
  animation: premiumSpin 0.8s linear infinite;
}

@keyframes premiumSpin {
  to { transform: rotate(360deg); }
}

.premium-configurator {
  max-width: 1440px;
  margin: 0 auto;
}

.premium-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 24px;
}

.premium-hero-copy {
  padding: 30px 0 12px;
}

.premium-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--gold-hover);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.premium-hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2.7rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0;
}

.premium-hero p {
  margin: 14px 0 0;
  max-width: 66ch;
  color: var(--text-muted);
  font-size: 15px;
}

.premium-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  align-self: end;
  border: 1px solid rgba(201, 164, 72, 0.24);
  border-radius: var(--radius);
  background: rgba(201, 164, 72, 0.2);
  box-shadow: 0 18px 44px rgba(22, 18, 10, 0.08);
}

.premium-hero-stats div {
  min-width: 0;
  padding: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(250, 248, 241, 0.96));
}

.premium-hero-stats strong,
.premium-hero-stats span {
  display: block;
  overflow-wrap: anywhere;
}

.premium-hero-stats strong {
  color: var(--text);
  font-size: 18px;
  line-height: 1.2;
}

.premium-hero-stats span {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.premium-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 390px);
  gap: 24px;
  align-items: start;
}

.premium-main {
  min-width: 0;
}

.premium-section {
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid rgba(35, 35, 35, 0.08);
  border-radius: var(--radius);
  background: #fff;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 18px 42px rgba(18, 18, 18, 0.06);
}

.premium-section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(180deg, #fff 0%, #f7f5ef 100%);
}

.premium-section-head h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0;
}

.premium-section-head p {
  margin: 7px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.premium-section-body {
  padding: 20px;
}

.premium-field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.premium-field-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.premium-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.premium-field.is-wide {
  grid-column: span 3;
}

.premium-door-price-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.premium-door-price-row input {
  flex: 1;
  min-width: 0;
}

.premium-door-price-reset {
  flex-shrink: 0;
  white-space: nowrap;
}

.premium-field-hint {
  display: block;
  margin-top: -2px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
}

.premium-field span {
  color: #3c3934;
  font-size: 12px;
  font-weight: 800;
}

.premium-field select,
.premium-field input,
.premium-extra-row input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #d9d5ca;
  border-radius: 8px;
  background: #fcfbf8;
  color: var(--text);
  font: 600 14px/1.3 var(--font-ui);
  letter-spacing: 0;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.premium-field select,
.premium-field input {
  padding: 11px 13px;
}

.premium-field select {
  appearance: none;
  padding-right: 38px;
  cursor: pointer;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--gold) 50%),
    linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% + 2px),
    calc(100% - 13px) calc(50% + 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.premium-field select:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.premium-field select:hover,
.premium-field input:hover,
.premium-extra-row input:hover {
  border-color: rgba(201, 164, 72, 0.65);
  background: #fff;
}

.premium-field select:focus,
.premium-field input:focus,
.premium-extra-row input:focus {
  outline: none;
  border-color: var(--gold);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(201, 164, 72, 0.14);
}

.premium-door-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 14px;
}

.premium-door-type,
.premium-option-card,
.premium-hardware-card {
  position: relative;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.18s ease, box-shadow 0.2s ease, transform 0.18s ease;
}

.premium-door-type {
  display: grid;
  grid-template-rows: 120px minmax(82px, auto);
  overflow: hidden;
  padding: 0;
}

.premium-door-type:hover,
.premium-option-card:hover,
.premium-hardware-card:hover {
  border-color: rgba(201, 164, 72, 0.7);
  box-shadow: 0 14px 28px rgba(28, 24, 16, 0.1);
  transform: translateY(-2px);
}

.premium-door-type.is-selected,
.premium-option-card.is-selected,
.premium-hardware-card.is-selected,
.premium-option-chip.is-selected,
.premium-segmented button.is-selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(201, 164, 72, 0.14), 0 14px 30px rgba(201, 164, 72, 0.16);
}

.premium-door-type.is-selected::after,
.premium-option-card.is-selected::after,
.premium-hardware-card.is-selected::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background:
    linear-gradient(135deg, #e6c570, var(--gold-hover)),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3 6-6.5'/></svg>") center/14px 14px no-repeat;
  background-blend-mode: normal;
  z-index: 2;
}

.premium-door-type-art,
.premium-card-visual,
.premium-hardware-img {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 35% 18%, rgba(255, 255, 255, 0.78), transparent 48%),
    linear-gradient(145deg, #f4efe4, #dfd4c1);
}

.premium-door-type-art {
  padding: 14px;
  border-bottom: 1px solid var(--border);
}

.premium-door-type-copy {
  padding: 13px 14px 15px;
}

.premium-door-type-copy strong,
.premium-door-type-copy span,
.premium-option-title,
.premium-option-price,
.premium-hardware-card strong,
.premium-hardware-card small,
.premium-hardware-brand {
  display: block;
}

.premium-door-type-copy strong,
.premium-option-title,
.premium-hardware-card strong {
  font-size: 13px;
  line-height: 1.25;
  font-weight: 800;
}

.premium-door-type-copy span {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
}

.system-icon {
  width: 100%;
  height: 100%;
  max-width: 118px;
  max-height: 88px;
  filter: drop-shadow(0 7px 10px rgba(24, 20, 12, 0.09));
}

.icon-small-text {
  fill: #5d5031;
  font: 800 9px/1 var(--font-ui);
  letter-spacing: 0;
}

.opening-plan {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 8px 12px rgba(34, 28, 18, 0.08));
}

.opening-plan-text {
  fill: #5b523e;
  font: 800 8px/1 var(--font-ui);
  letter-spacing: 0;
}

.opening-plan-caption {
  fill: #7d5d21;
  font: 800 7px/1 var(--font-ui);
  letter-spacing: 0;
}

.premium-chip-row,
.premium-segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.premium-option-chip,
.premium-segmented button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 9px;
  border: 1px solid #d9d5ca;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #fbf8f0);
  color: var(--text);
  cursor: pointer;
  font: 800 13px/1.25 var(--font-ui);
  padding: 9px 13px;
  text-align: left;
  transition: border-color 0.16s ease, box-shadow 0.18s ease, transform 0.16s ease;
}

.premium-option-chip:hover,
.premium-segmented button:hover {
  border-color: rgba(201, 164, 72, 0.68);
  transform: translateY(-1px);
}

.premium-option-chip small {
  color: var(--gold-hover);
  font-size: 11px;
  font-weight: 900;
}

.premium-chip-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 8px;
  background: #f2eadb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.premium-chip-icon .system-icon {
  max-width: 28px;
  max-height: 24px;
}

.premium-option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

.premium-option-grid.is-carousel {
  display: flex;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
}

.premium-option-grid.is-carousel .premium-option-card {
  flex: 0 0 190px;
  scroll-snap-align: start;
}

.premium-option-card {
  display: grid;
  grid-template-rows: 150px minmax(58px, auto);
  padding: 0;
  overflow: hidden;
}

.premium-card-visual {
  min-height: 150px;
  padding: 10px;
  border-bottom: 1px solid var(--border);
}

.premium-card-visual.is-opening {
  padding: 6px;
}

.premium-card-visual img,
.premium-hardware-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.premium-option-title {
  padding: 12px 13px 4px;
}

.premium-option-price {
  padding: 0 13px 12px;
  color: var(--gold-hover);
  font-size: 12px;
  font-weight: 900;
}

.premium-switch-row,
.premium-room-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.premium-switch-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #3e3b35;
  font-size: 13px;
  font-weight: 700;
}

.premium-switch-row input {
  accent-color: var(--gold);
}

.premium-molding-group + .premium-molding-group {
  margin-top: 18px;
}

.premium-molding-group h3 {
  margin: 0 0 10px;
  color: #3e3b35;
  font-size: 13px;
}

.premium-hardware-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.premium-hardware-steps {
  display: grid;
  gap: 18px;
}

.premium-hardware-step-label {
  display: block;
  margin-bottom: 10px;
  color: #6f6758;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.premium-segmented.is-wrap {
  flex-wrap: wrap;
}

.premium-hardware-hint {
  margin-top: 8px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #f8f5ef;
  border: 1px dashed rgba(201, 164, 72, 0.35);
}

.premium-selected-hardware-block {
  margin: 18px 0;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(201, 164, 72, 0.35);
  background: linear-gradient(180deg, #fffdf7 0%, #f8f2e4 100%);
}

.premium-hardware-selection {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  gap: 18px;
  align-items: center;
}

.premium-hardware-selection-photo {
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: #f0ebe2;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.premium-hardware-selection-photo.has-photo {
  background: #fff;
}

.premium-hardware-selection-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.premium-hardware-selection-empty {
  padding: 16px;
  text-align: center;
  color: #8b8372;
  font-size: 12px;
  line-height: 1.4;
}

.premium-hardware-selection-copy strong {
  display: block;
  margin: 6px 0 8px;
  font-size: 18px;
  color: #1f1d1a;
}

.premium-hardware-selection-copy p,
.premium-hardware-selection-copy em {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  font-style: normal;
}

.premium-hardware-selection-copy small {
  display: inline-block;
  margin-top: 10px;
  color: var(--gold-hover);
  font-weight: 900;
}

.premium-hardware-catalog {
  margin-top: 8px;
}

.premium-hardware-toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.premium-selected-hardware {
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid rgba(201, 164, 72, 0.28);
  border-radius: 8px;
  background: #fffaf0;
}

.premium-selected-hardware-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.premium-selected-hardware-head strong {
  color: #3e3421;
  font-size: 13px;
}

.premium-selected-hardware-head button {
  border: none;
  background: transparent;
  color: var(--gold-hover);
  cursor: pointer;
  font: 900 12px/1 var(--font-ui);
}

.premium-selected-hardware-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.premium-selected-hardware-list span {
  max-width: 100%;
  padding: 7px 9px;
  border-radius: 8px;
  background: #fff;
  color: #3c3934;
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.premium-hardware-card {
  display: grid;
  grid-template-rows: 118px auto auto auto auto;
  gap: 4px;
  padding: 0 0 13px;
  overflow: hidden;
}

.premium-hardware-img {
  min-height: 118px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.premium-hardware-brand {
  padding: 0 12px;
  color: #8b8372;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.premium-hardware-collection,
.premium-hardware-card strong,
.premium-hardware-card small,
.premium-hardware-note,
.premium-hardware-card em {
  padding: 0 12px;
}

.premium-hardware-collection {
  color: var(--gold-hover);
  font-size: 11px;
  font-weight: 900;
}

.premium-hardware-card em {
  color: var(--text-muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.25;
}

.premium-hardware-note {
  margin: 0;
  color: #6c6558;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}

.premium-hardware-card small {
  color: var(--gold-hover);
  font-weight: 900;
}

.premium-hardware-cart {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(201, 164, 72, 0.28);
  border-radius: 10px;
  background: #fffaf0;
}

.premium-hardware-cart--empty {
  background: #faf8f4;
}

.premium-hardware-cart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.premium-hardware-cart-head strong {
  color: #3e3421;
  font-size: 13px;
}

.premium-hardware-cart-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.premium-hardware-cart-line {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--border);
}

.premium-hardware-cart-photo {
  width: 72px;
  height: 72px;
  border-radius: 6px;
  overflow: hidden;
  background: #f3efe6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.premium-hardware-cart-photo.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.premium-hardware-cart-no-photo {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  padding: 4px;
}

.premium-hardware-cart-copy strong {
  display: block;
  font-size: 13px;
  color: #2f2a22;
}

.premium-hardware-cart-copy em {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-style: normal;
  color: var(--text-muted);
}

.premium-hardware-cart-copy small {
  display: inline-block;
  margin-top: 6px;
  color: var(--gold-hover);
  font-weight: 900;
}

.premium-hardware-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.premium-primary-action.is-compact,
.premium-secondary-action.is-compact {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 13px;
}

.premium-hardware-picker {
  margin-top: 8px;
  padding: 16px;
  border: 1px dashed rgba(201, 164, 72, 0.45);
  border-radius: 10px;
  background: #fffdf8;
}

.premium-hardware-search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}

.premium-hardware-search-row .premium-hardware-hint {
  margin: 0;
  flex: 1 1 220px;
}

.premium-hardware-search-box {
  position: relative;
}

.premium-hardware-suggestions {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 320px;
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(201, 164, 72, 0.35);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(30, 26, 19, 0.16);
}

.premium-hardware-suggestions button {
  width: 100%;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.premium-hardware-suggestions button:hover {
  background: #fff7e7;
}

.premium-hardware-suggestions img,
.premium-hardware-suggestion-dot {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: contain;
  background: #f8f4ec;
}

.premium-hardware-suggestions strong,
.premium-hardware-suggestions em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.premium-hardware-suggestions strong {
  color: var(--text-main);
  font: 800 12px/1.25 var(--font-ui);
}

.premium-hardware-suggestions em {
  margin-top: 3px;
  color: var(--text-muted);
  font: 700 11px/1.2 var(--font-ui);
  font-style: normal;
}

.premium-hardware-add-btn {
  margin: 8px 12px 0;
  width: calc(100% - 24px);
  min-height: 36px;
  border: 1px solid rgba(201, 164, 72, 0.55);
  border-radius: 8px;
  background: #fff;
  color: var(--gold-hover);
  font: 900 12px/1 var(--font-ui);
  cursor: pointer;
}

.premium-hardware-add-btn:hover {
  background: #fff6e8;
}

.premium-hardware-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.premium-hardware-pagination span {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.premium-extras {
  display: grid;
  gap: 10px;
}

.premium-extra-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px 42px;
  gap: 10px;
}

.premium-extra-row input {
  padding: 9px 12px;
}

.premium-icon-button {
  width: 42px;
  min-height: 42px;
  border: 1px solid #d9d5ca;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  color: #8a2222;
  font: 900 18px/1 var(--font-ui);
}

.premium-ghost-button,
.premium-primary-action,
.premium-secondary-action {
  min-height: 46px;
  border-radius: 8px;
  cursor: pointer;
  font: 900 13px/1 var(--font-ui);
  letter-spacing: 0;
  transition: transform 0.16s ease, box-shadow 0.18s ease, border-color 0.16s ease;
}

.premium-ghost-button,
.premium-secondary-action {
  border: 1px solid #d9d5ca;
  background: linear-gradient(180deg, #fff, #fbf8f0);
  color: var(--text);
  padding: 0 16px;
}

.premium-primary-action {
  border: none;
  background: linear-gradient(135deg, #ead17b, #c9a448 44%, #ad8428);
  color: #17130a;
  padding: 0 20px;
  box-shadow: 0 12px 24px rgba(201, 164, 72, 0.28);
}

.premium-primary-action:hover:not(:disabled),
.premium-secondary-action:hover:not(:disabled),
.premium-ghost-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(28, 24, 16, 0.1);
}

.premium-primary-action:disabled,
.premium-secondary-action:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  box-shadow: none;
}

.premium-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0 28px;
}

.premium-preview {
  position: sticky;
  top: 24px;
  overflow: hidden;
  border: 1px solid rgba(201, 164, 72, 0.25);
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, #151515, #080808 62%, #15110a);
  color: #f6f3ea;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
  padding: 18px;
}

.premium-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 78% 0%, rgba(201, 164, 72, 0.14), transparent 44%);
  pointer-events: none;
}

.premium-preview > * {
  position: relative;
  z-index: 1;
}

.premium-preview-art {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  border: 1px solid rgba(201, 164, 72, 0.22);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 5%, rgba(201, 164, 72, 0.14), transparent 58%),
    linear-gradient(180deg, #111, #050505);
  overflow: hidden;
}

.premium-preview-art.is-loading {
  animation: previewPulse 1.2s ease-in-out infinite;
}

.premium-preview-art img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  filter: drop-shadow(0 20px 28px rgba(0, 0, 0, 0.55));
}

.premium-preview-total {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: end;
  margin: 18px 0;
}

.premium-preview-total span {
  color: #aaa39a;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.premium-preview-total strong {
  min-width: 0;
  color: #fff;
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
  text-align: right;
  overflow-wrap: anywhere;
}

.premium-price-edit {
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.premium-price-edit-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: #ddd5cb;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.premium-price-edit-label small {
  color: #9f978d;
  font-size: 11px;
  font-weight: 600;
  text-transform: lowercase;
}

.premium-price-edit-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.premium-price-edit-row input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font-size: 16px;
}

.premium-price-reset {
  flex-shrink: 0;
  padding: 10px 12px;
  font-size: 12px;
}

.cabinet-price-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e8f5e9;
  color: #2e7d32;
  font-size: 11px;
  font-weight: 700;
  vertical-align: middle;
}

.cabinet-price-tag--base {
  background: #fff3e0;
  color: #ef6c00;
}

.premium-meta {
  margin: 0;
  display: grid;
  gap: 1px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
}

.premium-meta div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.035);
}

.premium-meta dt,
.premium-meta dd {
  margin: 0;
  font-size: 12px;
}

.premium-meta dt {
  color: #8e887e;
  font-weight: 800;
}

.premium-meta dd {
  color: #efe8da;
  text-align: right;
  overflow-wrap: anywhere;
}

.premium-details {
  min-height: 40px;
  margin: 16px 0;
  color: #bdb5aa;
  font-size: 13px;
  line-height: 1.45;
}

.premium-preview .premium-secondary-action {
  width: 100%;
  border-color: rgba(201, 164, 72, 0.34);
}

.premium-kp-status {
  min-height: 18px;
  margin: 8px 0 0;
  color: #c9a448;
  font-size: 12px;
}

.premium-muted {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

@media (max-width: 1180px) {
  .premium-hero,
  .premium-layout {
    grid-template-columns: 1fr;
  }

  .premium-preview {
    position: static;
  }

  .premium-hardware-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .premium-hero h1 {
    font-size: 2.1rem;
  }

  .premium-hero-stats,
  .premium-field-grid,
  .premium-field-grid.four {
    grid-template-columns: 1fr;
  }

  .premium-field.is-wide {
    grid-column: auto;
  }

  .premium-section-head,
  .premium-section-body {
    padding: 16px;
  }

  .premium-door-grid,
  .premium-option-grid,
  .premium-hardware-grid {
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  }

  .premium-hardware-toolbar {
    grid-template-columns: 1fr;
  }

  .premium-hardware-selection {
    grid-template-columns: 1fr;
  }

  .premium-extra-row {
    grid-template-columns: minmax(0, 1fr) 86px 42px;
  }
}
