:root {
  --bg: #f4f1ec;
  --surface: #fbfaf8;
  --panel: #ffffff;
  --line: #e6e1d9;
  --line-soft: #f0ece6;
  --text: #1f2520;
  --muted: #77786f;
  --muted-2: #9c9b91;
  --accent: #5d6b55;
  --accent-dark: #46513f;
  --accent-soft: #edf1e8;
  --danger: #b44b45;
  --shadow: 0 22px 70px rgba(38, 35, 30, 0.14);
  --small-shadow: 0 12px 30px rgba(38, 35, 30, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 30% 10%, rgba(255, 255, 255, 0.9), transparent 34%),
    linear-gradient(180deg, #f8f6f2 0%, var(--bg) 100%);
  color: var(--text);
  min-height: 100vh;
}

.market-body {
  background:
    radial-gradient(circle at 22% 8%, rgba(255, 255, 255, 0.9), transparent 32%),
    linear-gradient(180deg, #fbfaf8 0%, #f4f1ec 100%);
}

.market-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.market-layout>main {
  flex: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.editor-page {
  min-height: 100%;
  background: transparent;
  /* min-height: 100vh; */
  /* padding: 18px; */
  /* display: flex; */
  /* align-items: center; */
  /* justify-content: center; */
}

.editor-window {
  width: min(1820px, 100%);
  /* background: rgba(255, 255, 255, 0.78); */
  /* border: 1px solid rgba(210, 205, 197, 0.85); */
  /* border-radius: 18px; */
  /* box-shadow: var(--shadow); */
  overflow: hidden;
  /* backdrop-filter: blur(18px); */
}

body.modal-open {
  overflow: hidden;
}

body.modal-open .editor-grid {
  max-height: 85vh;
  max-height: 85dvh;
}

body.is-voice-modal-open {
  overflow-y: auto;
}

@media (max-width: 520px) {
  body.is-voice-modal-open {
    overflow: hidden;
  }

  body.is-voice-modal-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    z-index: 70;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(6px);
    background: rgba(31, 37, 32, 0.34);
  }
}

.editor-topbar {
  min-height: 74px;
  display: grid;
  grid-template-columns: 1fr;
  /* grid-template-columns: 120px 1fr auto; */
  align-items: center;
  gap: 18px;
  padding: 0 32px;
  /* border-bottom: 1px solid var(--line-soft); */
  position: relative;
  /* background: rgba(255, 255, 255, 0.82); */
}

.window-dots {
  position: absolute;
  left: 44px;
  top: 14px;
  display: flex;
  gap: 8px;
}

.window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: block;
}

.window-dots span:nth-child(1) {
  background: #ef6f64;
}

.window-dots span:nth-child(2) {
  background: #e4bf54;
}

.window-dots span:nth-child(3) {
  background: #69b46b;
}

.brand-link {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.07em;
}

.brand-link.standalone {
  display: inline-flex;
  margin-bottom: 26px;
}

.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 38px;
  color: var(--muted-2);
  font-size: 13px;
  font-weight: 600;
}

.step {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
  white-space: nowrap;
}

.step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  width: 24px;
  height: 1px;
  background: var(--line);
}

.step span {
  width: 27px;
  height: 27px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f0ede7;
  color: #6f6f66;
}

.step.active {
  color: var(--text);
}

.step.active span {
  background: var(--accent);
  color: #fff;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 13px;
}

.save-status {
  white-space: nowrap;
}

.editor-grid {
  display: grid;
  grid-template-columns: 360px minmax(520px, 1fr) 420px;
  gap: 14px;
  padding: 14px;
}

@media (max-width: 1400px) {
  .editor-grid {
    grid-template-columns: minmax(260px, 1fr) 1fr minmax(260px, 1fr);
  }
}

.panel-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.photo-panel {
  padding: 26px;
  min-height: 635px;
}

.photo-panel h2,
.ai-title h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1;
  letter-spacing: -0.02em;
}

.photo-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.photo-thumb,
.upload-tile {
  /* aspect-ratio: 1.08 / 1; */
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: #ece7df;
  border: 1px solid var(--line);
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.upload-tile {
  grid-column: span 2;
  aspect-ratio: 16 / 9;
  min-height: 150px;
  border: 1.5px dashed #c9c3ba;
  background: #fffdfa;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
}

.upload-tile:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.upload-tile strong {
  font-size: 36px;
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
}

.upload-tile span {
  font-weight: 700;
  color: var(--text);
}

.upload-tile small,
.muted-note {
  color: var(--muted-2);
  font-size: 12px;
}

.file-input {
  display: none;
}

.muted-note {
  margin: 14px 0 0;
}

.form-panel {
  padding: 26px;
  min-height: 635px;
}

.form-row {
  display: grid;
  gap: 20px;
  margin-bottom: 20px;
}

.form-row.two {
  grid-template-columns: 1fr 1fr;
}

.form-row.wide {
  grid-template-columns: 1fr;
}

.price-row {
  max-width: 540px;
}

.dynamic-group {
  margin-bottom: 20px;
}

.group-title {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

.field-block>span {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #32362f;
  font-size: 13px;
  font-weight: 700;
}

.field-block b {
  color: var(--danger);
  font-weight: 700;
}

.field-block em {
  color: var(--muted-2);
  font-style: normal;
  font-weight: 500;
}

.kupio-input,
.kupio-textarea,
.field-block select {
  appearance: none;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  padding: 13px 14px;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

.field-block select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ctitle%3EBxs Chevron Down SVG Icon%3C/title%3E%3Cpath d='M16.939 7.939L12 12.879l-4.939-4.94l-2.122 2.122L12 17.121l7.061-7.06z' fill='%2377786f'/%3E%3C/svg%3E");
  background-repeat: no-repeat, repeat;
  background-position: right .7em top 50%, 0 0;
  background-size: 1.25em auto, 100%;
}

.field-block select::-ms-expand {
  display: none;
}

.kupio-textarea {
  resize: vertical;
  line-height: 1.55;
  min-height: 128px;
}

.kupio-input:focus,
.kupio-textarea:focus,
.field-block select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(93, 107, 85, 0.12);
}


.category-picker {
  position: relative;
}

.category-trigger {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  padding: 0 14px 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

.category-trigger span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-trigger i {
  color: var(--muted);
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  transform: rotate(90deg);
  transition: transform 0.18s;
}

.category-picker.open .category-trigger,
.category-trigger:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(93, 107, 85, 0.12);
  outline: none;
}

.category-picker.open .category-trigger i {
  transform: rotate(-90deg);
}

.category-menu {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.category-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.category-menu-header strong {
  font-size: 14px;
}

.category-menu-header small {
  color: var(--muted);
  font-size: 12px;
}

.category-columns {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(210px, 1fr);
  max-height: 360px;
  overflow-x: auto;
  overflow-y: hidden;
}

.category-column {
  min-width: 210px;
  padding: 10px;
  border-right: 1px solid var(--line-soft);
  overflow-y: auto;
  max-height: 360px;
}

.category-column:last-child {
  border-right: 0;
}

.category-column-title {
  padding: 6px 8px 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.category-option {
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 11px 10px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  transition: background 0.16s, color 0.16s;
}

.category-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-option i {
  color: var(--muted-2);
  font-style: normal;
  font-weight: 800;
}

.category-option:hover,
.category-option.selected {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.category-option.selected i {
  color: var(--accent-dark);
}


.category-empty-state {
  min-width: 280px;
  padding: 24px;
  color: var(--muted);
  display: grid;
  gap: 6px;
}

.category-empty-state strong {
  color: var(--text);
  font-size: 14px;
}

.category-empty-state span {
  font-size: 12px;
  line-height: 1.45;
}

.compact-radio ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.compact-radio li label {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 600;
}

.compact-radio input {
  accent-color: var(--accent);
}

.kupio-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.field-error,
.form-error {
  color: var(--danger);
  font-size: 12px;
  line-height: 1.4;
}

.field-help {
  color: var(--muted-2);
  font-size: 12px;
}

.product-age-field {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #fffdfa;
  padding: 16px;
}

.product-age-control {
  display: grid;
  grid-template-columns: 1fr 132px;
  align-items: center;
  gap: 16px;
}

.product-age-control input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

.product-age-number {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.product-age-number input {
  width: 74px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  padding: 11px 10px;
  text-align: center;
  outline: none;
}

.product-age-number input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(93, 107, 85, 0.12);
}

.product-age-number span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}


.divider {
  height: 1px;
  background: var(--line-soft);
  margin: 24px 0;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 18px;
}

.primary-button,
.secondary-button,
.ghost-button {
  border: 0;
  border-radius: 11px;
  min-height: 42px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 700;
  text-align: center;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.primary-button {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 22px rgba(70, 81, 63, 0.16);
}

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

.secondary-button {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
}

.ghost-button {
  background: #fff;
  color: #55594f;
  border: 1px solid var(--line);
}

.full {
  width: 100%;
}

.assistant-panel {
  display: grid;
  gap: 14px;
  align-content: start;
}

.ai-card,
.price-card,
.tip-card {
  padding: 24px;
}

.ai-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}

.ai-title span {
  font-size: 11px;
  font-weight: 800;
  color: #66715f;
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 4px 8px;
}

.ai-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 18px;
}

.ai-steps li {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #333830;
  position: relative;
}

.ai-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 28px;
  width: 2px;
  height: 19px;
  background: var(--line);
}

.ai-steps i {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-size: 13px;
  font-weight: 800;
}

.ai-steps .done i {
  background: var(--accent);
  color: #fff;
}

.ai-steps .muted i {
  background: #eeeae4;
  color: var(--muted-2);
}

.ai-steps b {
  color: var(--muted);
  font-size: 12px;
}

.ai-steps .muted {
  color: var(--muted);
}

.price-card small {
  display: block;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 10px;
}

.price-card strong {
  display: block;
  font-size: 32px;
  letter-spacing: -0.05em;
  margin-bottom: 7px;
}

.price-card p,
.tip-card p {
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
  font-size: 13px;
}


.price-choice-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 16px;
}

.price-choice-grid[hidden] {
  display: none;
}

.price-choice-grid button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.price-choice-grid button:hover,
.price-choice-grid button.active {
  border-color: rgba(93, 107, 85, 0.45);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.price-choice-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.price-choice-grid b {
  color: var(--text);
  font-size: 14px;
}

.price-card.ai-price-ready {
  animation: kupioAiPriceReady 1.2s ease-out;
}

.price-scale {
  margin-top: 20px;
  position: relative;
  height: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.price-scale span {
  border-radius: 999px;
  background: #dcd9d1;
}

.price-scale i {
  position: absolute;
  left: 50%;
  top: -6px;
  width: 20px;
  height: 20px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: var(--accent);
  border: 3px solid #fff;
  box-shadow: var(--small-shadow);
}

.scale-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
}

.scale-labels em {
  font-style: normal;
  font-size: 11px;
  color: var(--muted-2);
}

.tip-card h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.message-stack {
  padding: 12px 20px 0;
}

.message {
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  padding: 12px 14px;
  font-size: 13px;
}

.auth-shell,
.saved-page {
  min-height: calc(100vh - 160px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 30px;
}

.auth-card,
.saved-card {
  width: min(460px, 100%);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 34px;
}

.auth-brand {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.08em;
}

.auth-subtitle,
.auth-switch,
.saved-subtitle {
  color: var(--muted);
  line-height: 1.5;
}

.auth-form {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.auth-switch {
  text-align: center;
  margin: 22px 0 0;
  font-size: 14px;
}

.auth-switch a {
  color: var(--accent-dark);
  font-weight: 800;
}

.saved-card {
  width: min(780px, 100%);
}

.saved-badge {
  display: inline-flex;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
}

.saved-card h1 {
  font-size: 34px;
  letter-spacing: -0.05em;
  margin: 16px 0 8px;
}

.saved-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 26px 0;
}

.saved-summary div,
.attribute-preview-group dl div {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 15px;
}

.saved-summary span,
.attribute-preview-group dt {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.saved-summary strong,
.attribute-preview-group dd {
  margin: 0;
  font-weight: 800;
}

.attribute-preview-group h2 {
  font-size: 16px;
}

.attribute-preview-group dl {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 0;
}

.saved-actions {
  margin-top: 28px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

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

  .photo-panel,
  .form-panel {
    min-height: auto;
  }

  .stepper {
    /* display: none; */
    justify-content: flex-start;
    width: 100%;
    max-width: fit-content;
    margin: 0 auto;
    overflow-x: auto;
  }

  /* .editor-topbar {
    grid-template-columns: 1fr auto;
  } */

  .brand-link {
    grid-column: 1;
  }
}

@media (max-width: 720px) {
  .editor-page {
    padding: 0;
    align-items: stretch;
  }

  .editor-window {
    border-radius: 0;
    min-height: 100vh;
  }

  .editor-topbar {
    /* padding: 18px; */
    padding: 18px 0;
    min-height: 68px;
  }

  .editor-grid {
    /* padding: 10px; */
    padding: 0;
  }

  .form-row.two,
  .saved-summary,
  .attribute-preview-group dl {
    grid-template-columns: 1fr;
  }

  .topbar-actions .save-status {
    display: none;
  }

  .photo-panel,
  .form-panel,
  .ai-card,
  .price-card,
  .tip-card {
    padding: 18px;
  }

  .product-age-control {
    grid-template-columns: 1fr;
  }

  .product-age-number {
    justify-content: flex-end;
  }
}

.category-option.disabled {
  color: var(--muted-2);
  cursor: not-allowed;
  opacity: 0.72;
}

.category-option.disabled:hover,
.category-option.disabled.selected {
  background: #f7f5f1;
  color: var(--muted-2);
}

.dynamic-empty-state {
  margin-bottom: 20px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: #fbfaf8;
  color: var(--muted);
  padding: 16px;
  font-size: 13px;
  line-height: 1.45;
}

.dynamic-empty-state.loading {
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-color: rgba(93, 107, 85, 0.22);
}

.dynamic-empty-state.error {
  color: var(--danger);
  background: #fff7f6;
  border-color: rgba(180, 75, 69, 0.24);
}

.category-option.loading {
  opacity: 0.72;
  pointer-events: none;
}

.boolean-field,
.choice-item {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

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

.choice-item {
  cursor: pointer;
}

.choice-item:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

@media (max-width: 720px) {
  .choice-list {
    grid-template-columns: 1fr;
  }
}

.photo-gate {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  width: 100%;
  height: 100%;
  margin: auto;
  /* align-items: center; */
  /* justify-content: center; */
  padding: 24px;
  background: rgba(31, 37, 32, 0.34);
  backdrop-filter: blur(6px);
  overflow-y: auto;
}

.photo-gate[hidden],
.photo-gate.hidden {
  display: none;
}

.photo-gate-card {
  width: min(360px, 100%);
  height: fit-content;
  margin: auto;
  padding: 26px;
  box-shadow: var(--shadow);
  background: rgba(255, 255, 255, 0.96);
}

.photo-gate-card h2 {
  margin: 0 0 22px;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.photo-gate-upload {
  min-height: 280px;
  width: 100%;
}

.photo-gate-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.upload-tile.drag-over {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.product-page {
  padding: 24px 0 44px;
}

.product-window {
  width: min(1820px, 100%);
  min-height: calc(100vh - 36px);
  background: rgba(255, 255, 255, 0.78);
  /* border: 1px solid rgba(210, 205, 197, 0.85); */
  /* border-radius: 18px; */
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(18px);
}

.product-topbar {
  min-height: 74px;
  display: grid;
  grid-template-columns: 160px 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 0 44px;
  border-bottom: 1px solid var(--line-soft);
  position: relative;
  background: rgba(255, 255, 255, 0.84);
}

.product-search {
  height: 38px;
  border-left: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
}

.product-top-actions {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  color: #5b6058;
  font-size: 25px;
  line-height: 1;
}

.product-top-actions a,
.product-top-actions span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
}

.product-content {
  width: min(1740px, calc(100% - 64px));
  margin: 0 auto;
  padding: 0;
}

.product-breadcrumbs {
  min-height: 26px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--muted-2);
  font-size: 13px;
  font-weight: 600;
}

.product-breadcrumbs a:hover {
  color: var(--accent-dark);
}

.product-hero-grid {
  display: grid;
  /* grid-template-columns: 124px minmax(520px, 640px) minmax(390px, 1fr); */
  grid-template-columns: minmax(520px, 640px) minmax(340px, 550px) minmax(300px, 1fr);
  gap: 30px;
  align-items: start;
}

.product-gallery {
  display: grid;
  grid-template-columns: 124px 1fr;
  gap: 12px;
}

.product-thumbnails {
  display: grid;
  gap: 12px;
}

.product-thumb {
  width: 100%;
  aspect-ratio: 1.08 / 1;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #ece7df;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

.product-thumb.active {
  border-color: rgba(93, 107, 85, 0.6);
  box-shadow: 0 0 0 3px rgba(93, 107, 85, 0.1);
}

.product-thumb img,
.product-gallery-card>img,
.similar-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-more-thumb {
  min-height: 58px;
  color: #fff;
  background: rgba(93, 107, 85, 0.62);
  border-color: rgba(93, 107, 85, 0.15);
  font-size: 18px;
}

.product-gallery-card {
  position: relative;
  max-width: 100%;
  aspect-ratio: 1.38 / 1;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #eee9e2;
}

.product-photo-placeholder {
  height: 100%;
  /* min-height: 390px; */
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-weight: 800;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #62675f;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  box-shadow: var(--small-shadow);
}

.gallery-arrow.left {
  left: 24px;
}

.gallery-arrow.right {
  right: 24px;
}

.product-buy-card {
  padding: 10px 0 0;
}

.product-title-line {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}

.product-title-line h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.05em;
}

.product-title-line span {
  margin-top: 2px;
  border-radius: 999px;
  background: #dfe4d7;
  color: #5d6858;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.product-inline-actions {
  margin: 20px 0 22px;
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--muted-2);
  font-size: 14px;
  font-weight: 700;
}

.product-price {
  font-size: 42px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.06em;
}

.product-trade-note {
  margin: 10px 0 18px;
  color: var(--muted-2);
  font-size: 13px;
  font-weight: 700;
}

.product-action-buttons {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.product-contact-button,
.product-phone-button {
  /* width: min(480px, 100%); */
  white-space: nowrap;
  flex: 1;
}

.product-security-list {
  margin-top: 0;
  padding-left: 20px;
  display: grid;
  gap: 12px;
}

.product-security-list p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.product-delivery-list {
  margin-top: 22px;
  display: grid;
  gap: 18px;
}

.product-delivery-list div {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 14px;
  align-items: start;
}

.product-delivery-list i {
  width: 26px;
  height: 26px;
  border: 1px solid #cfcac1;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #62695f;
  font-style: normal;
  font-size: 13px;
}

.product-delivery-list p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.product-delivery-list strong {
  color: var(--text);
}

.product-info-grid {
  display: grid;
  /* grid-template-columns: 1fr 360px; */
  grid-template-columns: 2.6fr minmax(300px, 1fr);
  gap: 30px;
  margin-top: 18px;
}

.product-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.product-spec-card,
.product-meta-card,
.similar-products,
.product-user-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.product-user-header {
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: center;
  gap: 12px;
}

.product-user-avatar {
  width: 64px;
  height: 64px;
  border-radius: 1000px;
  overflow: hidden;
  background: linear-gradient(135deg, #3b403b, #7d6d5d);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.product-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.rate-stars {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 16px;
  color: var(--accent-dark);
}

.rate-number,
.rate-items {
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.45;
}

.product-user-card .rate {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 4px;
  max-width: fit-content;
  margin: 0 auto;
}

.product-user-name,
.product-user-date {
  color: var(--text);
}

.product-spec-card {
  padding: 24px 38px;
}

.product-spec-card h2,
.similar-products h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -0.04em;
}

.product-spec-list {
  margin: 18px 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  column-gap: 80px;
  row-gap: 10px;
}

.product-spec-list div {
  display: grid;
  grid-template-columns: minmax(130px, 0.76fr) minmax(120px, 1fr);
  gap: 18px;
  align-items: start;
}

.product-spec-list dt,
.product-spec-list dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}

.product-spec-list dt {
  color: var(--muted);
  font-weight: 600;
}

.product-spec-list dd {
  color: var(--text);
  font-weight: 800;
}

.product-description {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
}

.product-description p {
  margin: 14px 0 0;
  color: #484d45;
  line-height: 1.65;
}

.product-meta-card,
.product-user-card {
  min-height: 138px;
  padding: 26px;
  align-self: start;
  display: grid;
  gap: 24px;
  color: var(--muted);
  font-size: 14px;
}

.product-meta-card a {
  font-weight: 800;
}

.product-meta-card span {
  display: block;
  line-height: 1.55;
}

.similar-products {
  margin-top: 16px;
  padding: 22px 36px 28px;
}

.section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.section-heading-row a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.similar-products-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 24px;
}

.similar-product-card {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.similar-photo {
  aspect-ratio: 1.25 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: #e6e1d9;
  border: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

.similar-product-card strong {
  min-height: 36px;
  font-size: 14px;
  line-height: 1.3;
}

.similar-product-card>span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 1280px) {
  .product-hero-grid {
    /* grid-template-columns: 92px minmax(420px, 1fr) minmax(330px, 0.9fr); */
    grid-template-columns: minmax(420px, 1fr) minmax(330px, 0.9fr);
    gap: 18px;
  }

  .product-info-grid {
    grid-template-columns: minmax(420px, 1fr) minmax(330px, 0.9fr);
    gap: 18px;
  }

  .product-meta {
    gap: 18px;
  }

  .product-gallery {
    grid-template-columns: 1fr;
  }

  .product-thumbnails {
    grid-template-columns: repeat(5, minmax(70px, 1fr));
    order: 2;
  }

  .product-content {
    padding-left: 28px;
    padding-right: 28px;
  }

  .product-spec-list {
    column-gap: 34px;
  }

  .similar-products-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .product-page {
    padding: 16px 0 32px;
  }

  .product-content {
    width: calc(100% - 28px);
  }

  .product-hero-grid,
  .product-info-grid {
    grid-template-columns: 1fr;
  }

  .product-thumbnails {
    grid-template-columns: repeat(5, minmax(70px, 1fr));
    order: 2;
  }

  .product-gallery-card {
    order: 1;
  }

  .product-user-card {
    order: 4;
  }

  .product-buy-card {
    order: 3;
    padding: 4px 0 0;
  }

  .product-meta-card {
    min-height: auto;
  }

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

@media (max-width: 720px) {
  .product-title-line h1 {
    font-size: 25px;
  }

  .product-price {
    font-size: 36px;
  }

  .product-spec-card,
  .similar-products,
  .product-meta-card {
    padding: 18px;
  }

  .product-thumbnails {
    grid-template-columns: repeat(4, minmax(70px, 1fr));
  }

  .product-spec-list,
  .product-spec-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .similar-products-grid {
    grid-template-columns: 1fr;
  }
}

.market-page {
  min-height: 100%;
  background: transparent;
}

.market-header {
  min-height: 72px;
  padding: 0 34px;
  display: grid;
  grid-template-columns: 160px 1fr auto;
  align-items: center;
  gap: 26px;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 28px rgba(38, 35, 30, 0.05);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
}

.market-brand {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.08em;
}

.market-nav,
.market-actions {
  display: flex;
  align-items: center;
}

.market-nav {
  justify-content: center;
  gap: 54px;
  color: #55594f;
  font-size: 14px;
  font-weight: 700;
}

.market-nav a:hover,
.market-actions a:hover {
  color: var(--accent-dark);
}

.market-actions {
  justify-content: flex-end;
  gap: 22px;
  color: #3c423b;
  font-size: 25px;
  line-height: 1;
}

.market-actions>a:not(.market-post-button) {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.market-post-button {
  min-height: 42px;
  padding: 0 28px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff !important;
  box-shadow: 0 10px 20px rgba(70, 81, 63, 0.16);
  font-size: 14px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.market-post-button:hover {
  background: var(--accent-dark);
}

.market-shell,
.editor-window {
  width: min(1740px, calc(100% - 64px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.market-search-row {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) 260px 300px;
  gap: 8px;
}

.market-search-field,
.market-filter-field,
.market-category-chip {
  min-height: 58px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 10px;
  box-shadow: 0 5px 18px rgba(38, 35, 30, 0.04);
}

.market-search-field,
.market-filter-field {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 22px;
  color: #70756d;
}

.market-search-field span,
.market-filter-field span {
  font-size: 21px;
  color: #767b73;
}

.market-search-field input,
.market-filter-field input,
.market-filter-field select {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  min-width: 0;
}

.market-search-field input::placeholder {
  color: #a2a097;
}

.market-filter-field i {
  color: #8f9289;
  font-style: normal;
  font-weight: 800;
}

.market-filter-field select {
  appearance: none;
}

.market-category-row {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 18px;
}

.market-category-chip {
  min-width: 0;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #3f443d;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  transition: transform 0.16s, border-color 0.16s, background 0.16s, color 0.16s;
}

.market-category-chip span {
  width: 24px;
  height: 24px;
  border: 1px solid #cfcac1;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #70756d;
  font-size: 13px;
  line-height: 1;
}

.market-category-chip:hover,
.market-category-chip.active {
  transform: translateY(-1px);
  border-color: rgba(93, 107, 85, 0.35);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.market-hero {
  min-height: 240px;
  margin-top: 18px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.82) 28%, rgba(239, 234, 225, 0.32) 52%, rgba(203, 190, 174, 0.26) 100%),
    radial-gradient(circle at 72% 38%, rgba(126, 112, 91, 0.2), transparent 26%),
    #eee9e2;
  box-shadow: var(--small-shadow);
}

.market-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(122, 111, 94, 0.07) 0 2px, transparent 2px 18px);
  opacity: 0.48;
  mask-image: linear-gradient(90deg, #000 0%, transparent 48%);
}

.market-hero-copy {
  position: relative;
  z-index: 2;
  width: 380px;
  padding: 34px 0 0 42px;
}

.market-hero-copy h1 {
  margin: 0;
  color: #161a17;
  font-size: 31px;
  line-height: 1.1;
  letter-spacing: -0.055em;
}

.market-hero-copy p {
  margin: 18px 0 22px;
  color: #55594f;
  line-height: 1.45;
  font-size: 15px;
  font-weight: 600;
}

.market-hero-copy a {
  min-height: 44px;
  padding: 0 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: #3d423b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  box-shadow: 0 10px 26px rgba(38, 35, 30, 0.08);
}

.market-hero-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #74786f;
  box-shadow: var(--small-shadow);
  cursor: pointer;
  font-size: 40px;
  line-height: 1;
  transform: translateY(-50%);
}

.market-hero-arrow.left {
  left: 44%;
}

.market-hero-arrow.right {
  right: 116px;
}

.market-hero-visual {
  position: absolute;
  inset: 0 0 0 36%;
  overflow: hidden;
}

.hero-sofa,
.hero-chair,
.hero-table,
.hero-plant {
  position: absolute;
  bottom: 34px;
}

.hero-sofa {
  right: 110px;
  width: 360px;
  height: 112px;
  border-radius: 20px 22px 16px 16px;
  background: linear-gradient(180deg, #b9aa96 0%, #9f917f 100%);
  box-shadow: 0 28px 45px rgba(61, 52, 43, 0.18);
}

.hero-sofa::before,
.hero-sofa::after {
  content: "";
  position: absolute;
  top: -46px;
  height: 82px;
  border: 5px solid #a98f6c;
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
}

.hero-sofa::before {
  left: 30px;
  width: 130px;
  background: #c3b4a0;
}

.hero-sofa::after {
  right: 30px;
  width: 130px;
  background: #c9baa6;
}

.hero-chair {
  left: 170px;
  width: 170px;
  height: 86px;
  border-radius: 18px;
  background: linear-gradient(180deg, #c3ad8f, #a98f70);
  box-shadow: 0 20px 36px rgba(61, 52, 43, 0.16);
}

.hero-chair::before {
  content: "";
  position: absolute;
  left: 18px;
  top: -54px;
  width: 112px;
  height: 82px;
  border: 5px solid #a07d56;
  border-bottom: 0;
  border-radius: 20px 20px 0 0;
  background: #cbb89c;
  transform: rotate(-5deg);
}

.hero-table {
  left: 385px;
  width: 116px;
  height: 18px;
  bottom: 78px;
  border-radius: 999px;
  background: #a77854;
  box-shadow: 0 28px 0 -4px rgba(114, 78, 52, 0.75);
}

.hero-table::after {
  content: "";
  position: absolute;
  left: 52px;
  top: 14px;
  width: 9px;
  height: 62px;
  background: #8d6345;
  border-radius: 999px;
}

.hero-plant {
  right: 480px;
  bottom: 84px;
  width: 48px;
  height: 72px;
  border-radius: 0 0 14px 14px;
  background: #b78f5e;
}

.hero-plant::before {
  content: "✦";
  position: absolute;
  left: -34px;
  top: -112px;
  color: #6f8063;
  font-size: 150px;
  line-height: 1;
  transform: rotate(-15deg);
}

.market-section {
  margin-top: 26px;
}

.market-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.market-section-title h2 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -0.05em;
}

.market-section-title a {
  color: #60655d;
  font-size: 14px;
  font-weight: 800;
}

.market-card-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px;
}

.market-product-card {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 22px rgba(38, 35, 30, 0.05);
  transition: transform 0.16s, box-shadow 0.16s;
}

.market-product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(38, 35, 30, 0.1);
}

.market-favorite {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #70756d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: var(--small-shadow);
}

.market-card-photo {
  aspect-ratio: 1.52 / 1;
  background:
    linear-gradient(135deg, #ded9d0 0%, #cfc8bd 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.market-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.market-card-placeholder,
.market-demo-icon {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.35);
  color: rgba(31, 37, 32, 0.56);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 58px;
  font-weight: 800;
}

.market-card-body {
  padding: 13px 15px 17px;
}

.market-card-body h3 {
  min-height: 38px;
  margin: 0 0 7px;
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.market-card-body strong {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 1;
  letter-spacing: -0.03em;
}

.market-card-body p,
.market-card-body small {
  display: block;
  color: #60655d;
  line-height: 1.35;
  font-size: 13px;
  font-weight: 600;
}

.market-card-body p {
  margin: 0 0 4px;
}

@media (max-width: 1320px) {
  .market-nav {
    gap: 28px;
  }

  .market-category-row {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
  }

  .market-card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  .market-header {
    grid-template-columns: 1fr auto;
  }

  .market-nav {
    display: none;
  }

  .market-search-row {
    grid-template-columns: 1fr 220px;
  }

  .market-currency-field {
    grid-column: span 2;
  }

  .market-hero-visual {
    opacity: 0.62;
    left: 28%;
  }

  .market-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .market-header {
    min-height: auto;
    padding: 16px;
    /* grid-template-columns: 1fr; */
    gap: 14px;
    position: static;
  }

  .market-actions {
    justify-content: space-between;
  }

  .market-actions>a:not(.market-user-avatar, .market-post-button) {
    display: none;
  }

  .market-shell,
  .editor-window {
    width: calc(100% - 24px);
    padding-top: 14px;
  }

  .market-search-row,
  .market-category-row,
  .market-card-grid {
    grid-template-columns: 1fr;
  }

  .market-currency-field {
    grid-column: auto;
  }

  .market-category-row {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .market-category-chip {
    flex: 0 0 auto;
  }

  .market-hero {
    min-height: 300px;
  }

  .market-hero-copy {
    width: auto;
    padding: 28px 24px 0;
  }

  .market-hero-copy h1 {
    font-size: 27px;
  }

  .market-hero-arrow,
  .market-hero-visual {
    display: none;
  }
}

/* Поток AI-заполнения объявления */
.ai-steps li.running i {
  animation: kupioPulse 1s ease-in-out infinite;
  background: var(--accent-soft, #edf1e8);
  color: var(--accent, #5d6b55);
}

.ai-steps li.running b {
  color: var(--accent, #5d6b55);
}

.ai-steps li.error i {
  background: #f7e7e4;
  color: #b44b45;
}

.ai-steps li.error b {
  color: #b44b45;
}

.field-block.ai-field-filled,
.choice-item.ai-field-filled {
  animation: kupioAiFieldFill 1.4s ease-out;
}

.ai-tip-pulse {
  animation: kupioAiTipPulse 1.2s ease-out;
}

@keyframes kupioPulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.75;
  }

  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

@keyframes kupioAiFieldFill {
  0% {
    box-shadow: 0 0 0 0 rgba(93, 107, 85, 0.0);
    background: transparent;
  }

  20% {
    box-shadow: 0 0 0 4px rgba(93, 107, 85, 0.11);
    background: rgba(237, 241, 232, 0.72);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(93, 107, 85, 0.0);
    background: transparent;
  }
}

@keyframes kupioAiTipPulse {
  0% {
    opacity: 0.5;
    transform: translateY(2px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes kupioAiPriceReady {
  0% {
    box-shadow: 0 0 0 0 rgba(93, 107, 85, 0.0);
  }

  35% {
    box-shadow: 0 0 0 8px rgba(93, 107, 85, 0.10);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(93, 107, 85, 0.0);
  }
}

/* Страница продавца */
.seller-page {
  min-height: 100vh;
}

.seller-shell {
  padding-top: 24px;
}

.seller-page .market-header {
  grid-template-columns: 160px 1fr auto;
}

.market-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3b403b, #7d6d5d);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  box-shadow: 0 10px 24px rgba(38, 35, 30, 0.15);
}

.market-login-link {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #4d534c;
  font-size: 13px;
  font-weight: 800;
}

.seller-breadcrumbs {
  min-height: 25px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 11px;
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 700;
}

.seller-breadcrumbs a:hover {
  color: var(--accent-dark);
}

.seller-hero-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 410px;
  gap: 24px;
}

.seller-profile-card,
.seller-trust-card,
.seller-stats-grid article,
.seller-listings-panel,
.seller-reviews-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.86) inset;
}

.seller-profile-card {
  min-height: 210px;
  padding: 24px 30px 24px 22px;
  display: grid;
  grid-template-columns: 154px minmax(280px, 0.8fr) minmax(360px, 1fr);
  gap: 26px;
  align-items: center;
}

.seller-avatar-wrap {
  position: relative;
  width: 128px;
  height: 128px;
}

.seller-avatar {
  width: 128px;
  height: 128px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 22%, #e2c4a2 0 20%, transparent 21%),
    linear-gradient(180deg, #d7c6b5 0%, #8b6f5d 100%);
  color: #fff;
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.08em;
  box-shadow: 0 16px 34px rgba(38, 35, 30, 0.12);
}

.seller-avatar-check {
  position: absolute;
  right: 8px;
  bottom: 12px;
  width: 30px;
  height: 30px;
  border: 4px solid #fff;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 900;
}

.seller-name-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.seller-name-row h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.06em;
}

.seller-name-row span {
  border-radius: 999px;
  background: #dfe9d8;
  color: #66715f;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 800;
}

.seller-rating-line {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.seller-rating-line strong {
  font-size: 22px;
  letter-spacing: -0.04em;
}

.seller-rating-line span {
  color: #111;
  letter-spacing: 2px;
  font-size: 18px;
}

.seller-rating-line small,
.seller-profile-main p,
.seller-profile-about p {
  color: #656a61;
  font-size: 13px;
  font-weight: 700;
}

.seller-profile-main p {
  margin: 16px 0 0;
}

.seller-profile-main p+p {
  margin-top: 10px;
}

.seller-profile-main p span {
  margin: 0 12px;
  color: #a09e95;
}

.seller-profile-about {
  min-height: 130px;
  padding-left: 30px;
  border-left: 1px solid var(--line-soft);
  display: grid;
  align-content: center;
  gap: 22px;
}

.seller-profile-about p {
  margin: 0;
  max-width: 540px;
  color: #3d423b;
  line-height: 1.45;
}

.seller-profile-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
}

.seller-profile-buttons .primary-button,
.seller-profile-buttons .secondary-button {
  min-width: 122px;
  min-height: 42px;
  border-radius: 8px;
}

.seller-icon-button {
  width: 58px;
  height: 42px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: #555a52;
  cursor: pointer;
  font-size: 20px;
  font-weight: 800;
}

.seller-trust-card {
  padding: 26px 24px;
}

.seller-trust-card h2,
.seller-panel-title h2 {
  margin: 0;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.seller-trust-card ul {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.seller-trust-card li {
  display: grid;
  grid-template-columns: 25px 1fr;
  gap: 11px;
  align-items: start;
}

.seller-trust-card li>span {
  width: 19px;
  height: 19px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.seller-trust-card strong {
  display: block;
  color: #51564e;
  font-size: 13px;
  line-height: 1.25;
}

.seller-trust-card small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
  font-weight: 700;
}

.seller-stats-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.seller-stats-grid article {
  min-height: 82px;
  padding: 17px 18px;
  display: grid;
  grid-template-columns: 38px auto 1fr;
  gap: 12px;
  align-items: center;
}

.seller-stats-grid article>span {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #f0ece6;
  color: #697067;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.seller-stats-grid strong {
  font-size: 20px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.seller-stats-grid p {
  margin: 0;
  color: #60655d;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
}

.seller-body-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  gap: 28px;
  align-items: start;
}

.seller-listings-panel {
  padding: 0 0 14px;
}

.seller-tabs {
  height: 55px;
  display: flex;
  align-items: end;
  gap: 36px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line-soft);
}

.seller-tabs a {
  height: 41px;
  color: #555a52;
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-bottom: 3px solid transparent;
}

.seller-tabs a.active {
  color: #20251f;
  border-color: var(--accent);
}

.seller-tabs span,
.seller-panel-title span {
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 800;
}

.seller-listing-grid {
  padding: 18px 14px 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.seller-product-card {
  min-width: 0;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  transition: transform 0.16s, box-shadow 0.16s;
}

.seller-product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 28px rgba(38, 35, 30, 0.1);
}

.seller-card-heart {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 2;
  width: 31px;
  height: 31px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #6f746c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  box-shadow: 0 8px 18px rgba(38, 35, 30, 0.08);
}

.seller-card-photo {
  aspect-ratio: 1.52 / 1;
  overflow: hidden;
  background:
    linear-gradient(135deg, #e5e0d8 0%, #cfc7ba 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.seller-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.seller-card-photo>span {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.38);
  color: rgba(31, 37, 32, 0.56);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  font-weight: 800;
}

.seller-card-body {
  padding: 10px 12px 13px;
}

.seller-card-body h3 {
  min-height: 34px;
  margin: 0 0 7px;
  font-size: 13px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.seller-card-body strong {
  display: block;
  margin-bottom: 7px;
  font-size: 14px;
  line-height: 1;
  letter-spacing: -0.03em;
}

.seller-card-body p,
.seller-card-body small {
  display: block;
  margin: 0;
  color: #60655d;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 700;
}

.seller-card-body p {
  margin-bottom: 4px;
}

.seller-more-button {
  width: calc(100% - 28px);
  min-height: 37px;
  margin: 14px 14px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #4e534c;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.seller-more-button span {
  margin-left: 8px;
}

.seller-reviews-panel {
  padding: 20px;
}

.seller-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.seller-panel-title a {
  color: #657164;
  font-size: 11px;
  font-weight: 800;
}

.seller-review-list {
  display: grid;
  gap: 0;
}

.seller-review-card {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  padding: 13px 0 15px;
  border-bottom: 1px solid var(--line-soft);
}

.seller-review-card:first-child {
  padding-top: 0;
}

.seller-review-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #cbb39a, #57483d);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.seller-review-head {
  display: grid;
  grid-template-columns: auto auto auto 1fr;
  gap: 10px;
  align-items: center;
}

.seller-review-head strong {
  font-size: 13px;
}

.seller-review-head span {
  color: #111;
  font-size: 12px;
  letter-spacing: 2px;
}

.seller-review-head small {
  color: #62675f;
  font-size: 12px;
  font-weight: 700;
}

.seller-review-head time {
  justify-self: end;
  color: #8f9289;
  font-size: 11px;
  font-weight: 700;
}

.seller-review-card p {
  margin: 8px 0 9px;
  color: #434841;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
}

.seller-review-card em {
  display: inline-flex;
  border-radius: 999px;
  background: #f0ece6;
  color: #666a62;
  padding: 4px 10px;
  font-size: 11px;
  line-height: 1;
  font-style: normal;
  font-weight: 800;
}

.seller-read-all {
  min-height: 38px;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4d524a;
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 1500px) {
  .seller-hero-grid {
    grid-template-columns: minmax(0, 1fr) 380px;
  }

  .seller-profile-card {
    grid-template-columns: 150px minmax(240px, 0.74fr) minmax(320px, 1fr);
    gap: 22px;
  }

  .seller-body-grid {
    grid-template-columns: minmax(0, 1fr) 420px;
  }
}

@media (max-width: 1320px) {
  .seller-page .market-header {
    grid-template-columns: 150px 1fr auto;
  }

  .seller-hero-grid,
  .seller-body-grid {
    grid-template-columns: 1fr;
  }

  .seller-profile-card {
    grid-template-columns: 150px minmax(230px, 0.75fr) minmax(320px, 1fr);
  }

  .seller-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  .seller-page .market-header {
    grid-template-columns: 1fr auto;
  }
}

@media (max-width: 920px) {
  .seller-profile-card {
    grid-template-columns: 128px 1fr;
    align-items: start;
  }

  .seller-profile-about {
    grid-column: 1 / -1;
    padding-left: 0;
    border-left: 0;
  }

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

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

@media (max-width: 720px) {
  .seller-page .market-header {
    grid-template-columns: 1fr;
  }

  .seller-shell {
    width: min(100% - 28px, 1740px);
    padding-top: 16px;
  }

  .seller-profile-card,
  .seller-trust-card,
  .seller-reviews-panel {
    padding: 18px;
  }

  .seller-profile-card,
  .seller-stats-grid,
  .seller-listing-grid {
    grid-template-columns: 1fr;
  }

  .seller-avatar-wrap {
    width: 110px;
    height: 110px;
  }

  .seller-avatar {
    width: 110px;
    height: 110px;
    font-size: 33px;
  }

  .seller-tabs {
    padding: 0 16px;
    gap: 18px;
    overflow-x: auto;
  }

  .seller-profile-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .seller-icon-button {
    width: 100%;
  }

  .seller-review-head {
    grid-template-columns: 1fr auto;
  }

  .seller-review-head span,
  .seller-review-head small {
    display: none;
  }
}


.market-nav a.active {
  color: var(--accent-dark);
  position: relative;
}

.market-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -25px;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: var(--accent);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.site-footer-inner {
  width: min(1740px, calc(100% - 64px));
  min-height: 88px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
  font-size: 13px;
}

.site-footer-brand {
  color: var(--text);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.08em;
}

.site-footer-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  font-weight: 700;
}

.site-footer-nav form {
  margin: 0;
}

.site-footer-nav button {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: 700;
  cursor: pointer;
}

.site-footer-nav a:hover,
.site-footer-nav button:hover {
  color: var(--accent-dark);
}

.site-footer p {
  margin: 0;
}

@media (max-width: 760px) {
  .site-footer-inner {
    width: calc(100% - 32px);
    min-height: auto;
    padding: 22px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer-nav {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

.photo-thumb {
  position: relative;
}

.photo-thumb.compact {
  min-height: 92px;
}

.photo-remove-button {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(31, 37, 32, 0.78);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(31, 37, 32, 0.2);
  transition: transform 0.16s, background 0.16s;
}

.photo-remove-button:hover {
  transform: scale(1.05);
  background: rgba(31, 37, 32, 0.92);
}

.photo-gate-preview {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: auto;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  overflow-x: auto;
}

.photo-gate-preview>.photo-thumb {
  /* min-width: 100px; */
  width: 92px;
  height: 92px;
}

.photo-gate-preview:empty {
  display: none;
}

.photo-gate-actions {
  margin-top: 16px;
  display: flex;
  justify-content: stretch;
}

.analyze-button {
  width: 100%;
  justify-content: center;
}

.analyze-button[hidden] {
  display: none;
}

.analyze-button.is-loading {
  opacity: 0.78;
  cursor: wait;
}

.photo-panel-analyze {
  margin-top: 14px;
}

/* @media (max-width: 720px) {
  .photo-gate-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
} */

.ai-loading-overlay,
.ai-review-overlay {
  position: fixed;
  inset: 0;
  z-index: 92;
  width: 100%;
  height: 100%;
  display: flex;
  margin: auto;
  padding: 24px;
  background: rgba(31, 37, 32, 0.38);
  backdrop-filter: blur(8px);
  overflow-y: auto;
}

.ai-loading-overlay[hidden],
.ai-review-overlay[hidden] {
  display: none;
}

.ai-loading-card,
.ai-review-card {
  width: min(600px, 100%);
  height: fit-content;
  margin: auto;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow);
  position: relative;
}

.ai-loading-card {
  padding: 34px 30px 30px;
  text-align: center;
}

.ai-spinner {
  width: 58px;
  height: 58px;
  margin: 0 auto 20px;
  border-radius: 999px;
  border: 4px solid #e8e3db;
  border-top-color: var(--accent);
  animation: kupioAiSpin 0.88s linear infinite;
}

.ai-loading-card small,
.ai-review-card>small {
  display: inline-flex;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ai-loading-card h2,
.ai-review-card h2 {
  margin: 14px 0 8px;
  color: var(--text);
  font-size: 24px;
  letter-spacing: -0.055em;
}

.ai-loading-card p,
.ai-review-intro,
.ai-review-help,
.ai-review-price p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.ai-loading-track {
  height: 8px;
  margin-top: 24px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7e1d8;
}

.ai-loading-track span {
  display: block;
  width: 8%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  transition: width 0.34s ease;
}

.ai-review-card {
  padding: 28px;
  text-align: left;
}

.ai-review-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.ai-review-close:hover {
  color: var(--text);
  border-color: var(--accent);
}

.ai-review-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.ai-review-label {
  display: block;
  margin-bottom: 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.ai-offer-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ai-offer-switch button {
  border: 1px solid var(--line);
  border-radius: 13px;
  min-height: 46px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.ai-offer-switch .state-radio {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ai-offer-switch .state-radio label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  font-weight: 700;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  min-height: 46px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.ai-offer-switch .state-radio label input[type="checkbox"],
.ai-offer-switch .state-radio label input[type="radio"] {
  display: none;
}

.ai-offer-switch .state-radio label:has(input[type="checkbox"]:checked),
.ai-offer-switch .state-radio label:has(input[type="radio"]:checked) {
  background: var(--accent-soft);
  border-color: rgba(93, 107, 85, 0.5);
  transform: translateY(-1px);
}

.ai-offer-switch button:hover,
.ai-offer-switch button.active,
.ai-offer-switch .state-radio label:hover,
.ai-offer-switch .state-radio label.active {
  background: var(--accent-soft);
  border-color: rgba(93, 107, 85, 0.5);
  transform: translateY(-1px);
}

.ai-review-age {
  display: grid;
  grid-template-columns: 1fr 124px;
  align-items: center;
  gap: 14px;
}

.ai-review-age input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.ai-review-age label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-review-age input[type="number"] {
  width: 70px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 10px;
  text-align: center;
  outline: none;
}

.ai-review-age input[type="number"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(93, 107, 85, 0.12);
}

.ai-review-age span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.ai-review-price {
  padding: 18px;
  border: 1px solid rgba(93, 107, 85, 0.18);
  border-radius: 16px;
  background: var(--accent-soft);
}

.ai-review-price strong {
  display: block;
  margin-bottom: 8px;
  font-size: 28px;
  letter-spacing: -0.055em;
  color: var(--text);
}

.review-price-choice-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 14px 0 12px;
}

.review-price-choice-grid button {
  min-height: 72px;
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.review-price-choice-grid span {
  line-height: 1.2;
}

.review-price-choice-grid b {
  font-size: 16px;
}

.ai-review-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

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

@media (max-width: 620px) {

  .ai-offer-switch,
  .ai-review-age {
    grid-template-columns: 1fr;
  }

  .ai-review-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

.local-price-card {
  padding: 18px;
  border: 1px solid rgba(45, 57, 63, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.local-price-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 24px;
  letter-spacing: -0.045em;
  color: var(--text);
}

.local-price-card>small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  margin-bottom: 10px;
}

.local-price-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.local-price-card.loading {
  background: linear-gradient(90deg, rgba(255, 255, 255, .74), rgba(237, 241, 232, .74), rgba(255, 255, 255, .74));
  background-size: 220% 100%;
  animation: kupioLocalPriceLoading 1.2s ease-in-out infinite;
}

.local-price-card.ready {
  border-color: rgba(93, 107, 85, 0.28);
  box-shadow: 0 0 0 4px rgba(93, 107, 85, 0.08);
}

@keyframes kupioLocalPriceLoading {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 220% 50%;
  }
}

.sidebar-local-price-card {
  padding: 22px 24px;
}

.sidebar-local-price-card .ai-review-label {
  display: block;
  margin-bottom: 10px;
}

.sidebar-local-price-card .price-choice-grid {
  margin-top: 16px;
}

.listing-ai-improve {
  margin: 12px 0 22px;
  overflow: hidden;
  border: 1px solid rgba(93, 107, 85, 0.34);
  border-radius: 14px;
  background:
    radial-gradient(circle at 8% 0%, rgba(237, 241, 232, 0.92), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(250, 248, 244, 0.86));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.listing-ai-improve-header {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  padding: 16px 16px 12px;
}

.listing-ai-improve-icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-dark);
  background: rgba(237, 241, 232, 0.9);
  font-size: 14px;
  line-height: 1;
}

.listing-ai-improve h3 {
  margin: 0 0 5px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.listing-ai-improve p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.listing-ai-improve-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0 16px 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.78);
}

.listing-ai-improve-tabs button {
  min-height: 36px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: #4d534b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  transition: background 0.16s ease, color 0.16s ease;
}

.listing-ai-improve-tabs button:last-child {
  border-right: 0;
}

.listing-ai-improve-tabs button:hover,
.listing-ai-improve-tabs button.active {
  background: rgba(237, 241, 232, 0.92);
  color: var(--accent-dark);
}

.listing-ai-instruction-field {
  position: relative;
  margin: 0 16px;
}

.listing-ai-instruction-field textarea {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  outline: none;
  padding: 13px 74px 13px 14px;
  line-height: 1.45;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

.listing-ai-instruction-field textarea:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(93, 107, 85, 0.12);
}

.listing-ai-instruction-field em {
  position: absolute;
  right: 14px;
  top: 12px;
  color: var(--muted-2);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.listing-ai-improve-actions {
  display: flex;
  justify-content: flex-start;
  padding: 10px 16px 16px;
}

.listing-ai-improve-button {
  min-height: 38px;
  padding-inline: 22px;
}

.listing-ai-suggestion-bar {
  min-height: 45px;
  border-top: 1px solid var(--line-soft);
  background: rgba(237, 241, 232, 0.68);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 16px;
}

.listing-ai-suggestion-bar[hidden] {
  display: none;
}

.listing-ai-suggestion-bar span,
.listing-ai-suggestion-bar button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #5d6858;
  font-size: 12px;
  font-weight: 800;
}

.listing-ai-suggestion-bar i {
  font-style: normal;
  line-height: 1;
}

.listing-ai-suggestion-bar button {
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  cursor: pointer;
  white-space: nowrap;
}

.listing-ai-suggestion-bar button:hover {
  color: var(--text);
}

@media (max-width: 720px) {
  .listing-ai-improve {
    margin-bottom: 20px;
  }

  .listing-ai-improve-header {
    padding: 15px 14px 11px;
  }

  .listing-ai-improve-tabs,
  .listing-ai-instruction-field {
    margin-left: 14px;
    margin-right: 14px;
  }

  .listing-ai-improve-actions {
    padding: 10px 14px 14px;
  }

  .listing-ai-improve-button {
    width: 100%;
  }

  .listing-ai-suggestion-bar {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 14px;
  }
}

/* Встроенный прогресс AI-улучшения текста */
.listing-ai-improve.is-loading {
  border-color: rgba(93, 107, 85, 0.5);
  box-shadow: 0 14px 36px rgba(38, 35, 30, 0.08), 0 1px 0 rgba(255, 255, 255, 0.92) inset;
}

.listing-ai-progress {
  margin: 0 12px 12px;
  border: 1px solid rgba(93, 107, 85, 0.24);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
  padding: 16px;
}

.listing-ai-progress[hidden] {
  display: none;
}

.listing-ai-progress-header {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.listing-ai-progress-body {
  display: grid;
  grid-template-columns: minmax(180px, 0.82fr) minmax(240px, 1.18fr);
  gap: 18px;
  align-items: stretch;
}

.listing-ai-progress-steps {
  list-style: none;
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
}

.listing-ai-progress-steps li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 9px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.listing-ai-progress-steps i {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted-2);
}

.listing-ai-progress-steps .done {
  color: #344131;
}

.listing-ai-progress-steps .done i {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.listing-ai-progress-steps .running {
  color: #263024;
}

.listing-ai-progress-steps .running i {
  border-color: var(--accent);
  background: #fff;
  color: var(--accent-dark);
  animation: kupioPulse 1s ease-in-out infinite;
}

.listing-ai-progress-steps .error {
  color: var(--danger);
}

.listing-ai-progress-steps .error i {
  border-color: rgba(180, 75, 69, 0.38);
  background: #fff7f6;
  color: var(--danger);
}

.listing-ai-live-preview {
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.82);
  padding: 16px 18px;
}

.listing-ai-live-preview strong {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.listing-ai-live-preview span {
  display: block;
  height: 8px;
  margin-top: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ece9e3 0%, #dfdbd4 48%, #f0ede8 100%);
  background-size: 220% 100%;
  animation: kupioAiSkeleton 1.2s ease-in-out infinite;
}

.listing-ai-live-preview span:nth-child(2) {
  width: 74%;
}

.listing-ai-live-preview span:nth-child(3) {
  width: 28%;
}

.listing-ai-live-preview span:nth-child(4) {
  width: 94%;
}

.listing-ai-live-preview span:nth-child(5) {
  width: 62%;
}

.listing-ai-progress-track {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
}

.listing-ai-progress-track::before {
  content: "";
  grid-column: 1;
  grid-row: 1;
  height: 8px;
  border-radius: 999px;
  background: #e3dfd7;
}

.listing-ai-progress-track span {
  grid-column: 1;
  grid-row: 1;
  display: block;
  width: 0;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  transition: width 0.34s ease;
}

.listing-ai-progress-track em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.listing-ai-progress>small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

@keyframes kupioAiSkeleton {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 220% 50%;
  }
}

@media (max-width: 720px) {
  .listing-ai-progress {
    margin-left: 10px;
    margin-right: 10px;
    padding: 14px;
  }

  .listing-ai-progress-body {
    grid-template-columns: 1fr;
  }
}

/* Модалка голосового AI-улучшения */
.listing-ai-improve.is-voice-mode .listing-ai-instruction-field textarea {
  cursor: not-allowed;
  background: rgba(245, 243, 238, 0.86);
  color: var(--muted);
}

.listing-ai-improve-tabs button:disabled,
.listing-ai-improve-button:disabled,
.listing-ai-voice-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.66;
}

.listing-ai-voice-card {
  position: fixed;
  z-index: 80;
  width: 310px;
  min-height: 378px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 70px rgba(38, 35, 30, 0.2), 0 1px 0 rgba(255, 255, 255, 0.95) inset;
  padding: 18px;
  user-select: none;
}

.listing-ai-voice-card[hidden] {
  display: none;
}

.listing-ai-voice-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 26px;
  cursor: grab;
  touch-action: none;
}

@media (max-width: 520px) {
  .listing-ai-voice-card.isOpen {
    top: 50% !important;
    transform: translateY(-50%) !important;
  }

  .listing-ai-voice-card-header {
    cursor: default;
    touch-action: manipulation;
    pointer-events: none;
  }

  .listing-ai-voice-card-header button {
    pointer-events: all;
  }
}

.listing-ai-voice-card-header:active {
  cursor: grabbing;
}

.listing-ai-voice-card-header strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.025em;
}

.listing-ai-voice-card-header button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.listing-ai-voice-card-header button:hover {
  background: var(--line-soft);
  color: var(--text);
}

.listing-ai-voice-mic {
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  border: 1px solid rgba(93, 107, 85, 0.28);
  border-radius: 999px;
  background: radial-gradient(circle, #fff 0%, #fff 46%, rgba(237, 241, 232, 0.72) 47%, rgba(237, 241, 232, 0.4) 100%);
  color: var(--accent-dark);
  cursor: pointer;
  box-shadow: 0 0 0 8px rgba(237, 241, 232, 0.72), 0 0 0 16px rgba(237, 241, 232, 0.34);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.listing-ai-voice-mic:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 8px rgba(237, 241, 232, 0.9), 0 0 0 18px rgba(237, 241, 232, 0.42);
}

.listing-ai-voice-mic span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 24px;
  line-height: 1;
}

.listing-ai-improve.is-voice-recording .listing-ai-voice-mic {
  animation: kupioVoicePulse 1.25s ease-in-out infinite;
}

.listing-ai-voice-card p,
.listing-ai-voice-card small,
.listing-ai-voice-timer {
  display: block;
  text-align: center;
}

.listing-ai-voice-card p {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.listing-ai-voice-card small {
  min-height: 34px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.listing-ai-voice-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 30px;
  margin: 14px 0 10px;
  border-bottom: 1px solid var(--line-soft);
}

.listing-ai-voice-wave i {
  display: block;
  width: 2px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0.55;
  transform-origin: center;
}

.listing-ai-improve.is-voice-recording .listing-ai-voice-wave i {
  animation: kupioVoiceWave 0.8s ease-in-out infinite;
}

.listing-ai-improve.is-voice-meter-active .listing-ai-voice-wave i {
  animation: none;
  transition: height 0.08s linear, opacity 0.08s linear;
}

.listing-ai-voice-wave i:nth-child(2) {
  animation-delay: 0.08s;
}

.listing-ai-voice-wave i:nth-child(3) {
  animation-delay: 0.16s;
}

.listing-ai-voice-wave i:nth-child(4) {
  animation-delay: 0.24s;
}

.listing-ai-voice-wave i:nth-child(5) {
  animation-delay: 0.32s;
}

.listing-ai-voice-wave i:nth-child(6) {
  animation-delay: 0.4s;
}

.listing-ai-voice-wave i:nth-child(7) {
  animation-delay: 0.48s;
}

.listing-ai-voice-wave i:nth-child(8) {
  animation-delay: 0.56s;
}

.listing-ai-voice-wave i:nth-child(9) {
  animation-delay: 0.64s;
}

.listing-ai-voice-timer {
  min-height: 18px;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.listing-ai-voice-actions {
  display: grid;
  grid-template-columns: 1fr 1.45fr;
  gap: 10px;
  margin-top: 18px;
}

.listing-ai-voice-actions button {
  min-height: 40px;
  padding-inline: 12px;
}

@keyframes kupioVoicePulse {

  0%,
  100% {
    box-shadow: 0 0 0 8px rgba(237, 241, 232, 0.82), 0 0 0 16px rgba(237, 241, 232, 0.34);
  }

  50% {
    box-shadow: 0 0 0 11px rgba(237, 241, 232, 0.94), 0 0 0 24px rgba(237, 241, 232, 0.18);
  }
}

@keyframes kupioVoiceWave {

  0%,
  100% {
    height: 5px;
    opacity: 0.45;
  }

  50% {
    height: 18px;
    opacity: 0.9;
  }
}

@media (max-width: 520px) {
  .listing-ai-voice-card {
    left: 12px !important;
    right: 12px;
    width: calc(100vw - 24px) !important;
  }
}