:root {
  --add-bg: #f6f7f8;
  --add-gold: #d1aa00;
  --add-text: #0f1115;
  --add-muted: #747474;
  --add-border: #e7e7e7;
  --add-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
  --add-soft-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}

body { background: var(--add-bg); }
.add-car-page { background: var(--add-bg); min-height: 100vh; padding: 14px 0 42px; }
.add-car-shell { max-width: 1080px; }
.add-car-head h1 { margin: 0 0 28px; font-size: 24px; font-weight: 800; color: var(--add-text); }

.add-car-stepper { display: flex; align-items: center; gap: 18px; margin-bottom: 46px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.add-car-stepper::-webkit-scrollbar { display: none; }
.step-pill { border: 0; background: #fff; height: 42px; min-width: 158px; padding: 0 20px 0 0; border-radius: 999px; box-shadow: var(--add-soft-shadow); display: inline-flex; align-items: center; gap: 20px; color: #111; white-space: nowrap; transition: .2s ease; }
.step-pill span { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 50%; display: grid; place-items: center; background: #a7a7a7; color: #fff; font-size: 22px; font-weight: 800; }
.step-pill em { font-style: normal; font-size: 14px; font-weight: 500; }
.step-pill.active span { background: var(--add-gold); }
.step-pill.active em { color: var(--add-gold); }
.step-pill.done span { background: #009239; }

.add-car-grid { display: grid; grid-template-columns: minmax(0, 1fr) 246px; gap: 18px; align-items: start; }
.add-car-left h2 { font-size: 18px; font-weight: 800; margin: 0 0 8px; }
.add-step-panel { display: none; }
.add-step-panel.active { display: block; animation: addFade .18s ease; }
@keyframes addFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.form-card { background: #fff; border: 1px solid var(--add-border); border-radius: 7px; padding: 24px 12px 24px; min-height: 218px; }
.form-card.tall-card { min-height: 218px; }
.form-grid { display: grid; gap: 20px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-group.full { grid-column: 1 / -1; }
.field-group label { display: block; margin: 0 0 8px; font-size: 14px; line-height: 1; color: #161616; font-weight: 700; }
.field-group input, .field-group textarea, .field-group select { width: 100%; border: 0; background: #f2f2f2; border-radius: 4px; min-height: 36px; padding: 0 14px; font-size: 14px; color: #222; outline: none; }
.field-group textarea { padding-top: 12px; resize: vertical; }
.field-group input::placeholder, .field-group textarea::placeholder { color: #9a9a9a; }
.field-group input:focus, .field-group textarea:focus { box-shadow: 0 0 0 2px rgba(209, 170, 0, .25); background: #fff; }

.add-car-page .select2-container { width: 100% !important; }
.add-car-page .select2-container--default .select2-selection--single { height: 36px; border: 0; background: #f2f2f2; border-radius: 4px; display: flex; align-items: center; }
.add-car-page .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 36px; color: #222; padding-left: 14px; padding-right: 34px; font-size: 14px; }
.add-car-page .select2-container--default .select2-selection--single .select2-selection__placeholder { color: #9a9a9a; }
.add-car-page .select2-container--default .select2-selection--single .select2-selection__arrow { height: 36px; right: 8px; }
.add-car-page .select2-container--default.select2-container--focus .select2-selection--single { box-shadow: 0 0 0 2px rgba(209, 170, 0, .25); background: #fff; }
.add-car-select-dropdown { border: 1px solid #e8e8e8; border-radius: 8px; overflow: hidden; box-shadow: 0 12px 26px rgba(0,0,0,.14); }
.add-car-select-dropdown .select2-search__field { outline: none; border: 1px solid #e6e6e6 !important; border-radius: 6px; min-height: 34px; }
.add-car-select-dropdown .select2-results__option { padding: 9px 12px; font-size: 14px; }
.add-car-select-dropdown .select2-results__option--highlighted { background: var(--add-gold) !important; color: #fff !important; }

.step-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 30px; }
.gold-btn, .ghost-btn { height: 32px; min-width: 110px; border-radius: 8px; border: 0; display: inline-flex; align-items: center; justify-content: center; gap: 18px; font-size: 13px; transition: .2s ease; }
.gold-btn { background: var(--add-gold); color: #fff; box-shadow: 0 5px 10px rgba(0,0,0,.22); }
.ghost-btn { background: #fff; color: #222; border: 1px solid #e4e4e4; }
.ghost-btn:disabled { opacity: .45; cursor: not-allowed; }

.add-car-right { display: flex; flex-direction: column; gap: 14px; }
.sticky-card { position: sticky; top: 92px; }
.tips-offset { top: 388px; }
.preview-card, .tips-card { background: #fff; border-radius: 5px; box-shadow: var(--add-shadow); padding: 13px 13px 16px; }
.preview-card h3, .tips-card h3 { margin: 0 0 14px; font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.preview-card h3 i, .tips-card h3 i { color: var(--add-gold); font-size: 18px; }
.preview-image-wrap { height: 116px; border-radius: 6px; overflow: hidden; margin-bottom: 12px; background: #eee; }
.preview-image-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.preview-card h4 { margin: 0 0 4px; font-size: 14px; line-height: 1.25; font-weight: 800; color: #050505; }
.preview-location { margin: 0 0 8px; font-size: 11px; color: #252525; display: flex; align-items: center; gap: 5px; }
.preview-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-bottom: 7px; font-size: 9px; color: #111; }
.preview-meta span:not(:last-child)::after { content: '|'; margin-left: 8px; color: #999; }
.preview-price { display: block; font-size: 15px; font-weight: 900; color: #050505; }
.preview-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.preview-tags span { background: #f5f0d7; color: #765e00; border-radius: 999px; padding: 4px 7px; font-size: 10px; font-weight: 700; }

.tips-card { padding-bottom: 20px; }
.tips-card h3 { margin-bottom: 22px; }
.tips-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.tips-card li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: 12px; line-height: 1.15; color: #292929; }
.tips-card li i { color: #050505; font-size: 14px; margin-top: 1px; }
.tips-card li b { display: block; font-size: 13px; color: #050505; margin-bottom: 2px; }
.tips-card li em { color: var(--add-gold); font-style: normal; }

.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.feature-grid label { background: #f5f5f5; border-radius: 8px; padding: 11px 12px; font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.feature-grid input { accent-color: var(--add-gold); }
.photo-drop { min-height: 150px; border: 1px dashed #cfcfcf; border-radius: 10px; display: grid; place-items: center; align-content: center; text-align: center; background: #fafafa; padding: 22px; }
.photo-drop button { border: 0; background: var(--add-gold); color: #fff; border-radius: 8px; padding: 10px 18px; font-weight: 700; }
.photo-drop p { margin: 10px 0 0; color: var(--add-muted); font-size: 13px; }

html[dir="rtl"] .step-pill { padding: 0 0 0 20px; }
html[dir="rtl"] .add-car-page .select2-container--default .select2-selection--single .select2-selection__rendered { padding-right: 14px; padding-left: 34px; text-align: right; }
html[dir="rtl"] .add-car-page .select2-container--default .select2-selection--single .select2-selection__arrow { left: 8px; right: auto; }
html[dir="rtl"] .preview-location { flex-direction: row-reverse; justify-content: flex-end; }

@media (max-width: 1199px) {
  .add-car-shell { max-width: 100%; padding-inline: 24px; }
  .add-car-grid { grid-template-columns: minmax(0, 1fr) 260px; }
}
@media (max-width: 991px) {
  .add-car-grid { grid-template-columns: 1fr; }
  .add-car-right { order: -1; display: grid; grid-template-columns: 1fr 1fr; }
  .sticky-card, .tips-offset { position: static; }
  .form-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .add-car-page { padding-top: 18px; }
  .add-car-head h1 { font-size: 22px; margin-bottom: 18px; }
  .step-pill { min-width: 132px; gap: 12px; padding-right: 14px; }
  .step-pill span { width: 38px; height: 38px; flex-basis: 38px; font-size: 19px; }
  .step-pill em { font-size: 12px; }
  .add-car-stepper { gap: 10px; margin-bottom: 26px; }
  .add-car-right { grid-template-columns: 1fr; }
  .form-grid.three, .form-grid.two, .feature-grid { grid-template-columns: 1fr; }
  .form-card { padding: 18px 12px; }
  .preview-image-wrap { height: 180px; }
}
@media (max-width: 480px) {
  .add-car-shell { padding-inline: 14px; }
  .step-actions { justify-content: stretch; }
  .gold-btn, .ghost-btn { flex: 1; }
}

.preview-card.is-empty #previewImage {
  display: none;
}

.preview-card:not(.is-empty) .preview-car-placeholder {
  display: none;
}

.preview-icon-wrap {
  background: #f4f4f4;
  border-radius: 12px;
  overflow: hidden;
}

.preview-car-placeholder {
  width: 100%;
  min-height: 128px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f2f2f2, #e9e9e9);
  border: 1px solid #eeeeee;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b8b8b8;
  font-size: 74px;
}

.preview-card.is-empty #previewTitle,
.preview-card.is-empty .preview-location,
.preview-card.is-empty .preview-price {
  color: #b8b8b8;
}

.preview-card.is-empty .preview-meta span {
  color: #b8b8b8;
}

.preview-card.is-empty .preview-tags {
  display: none;
}
.photo-upload-section {
  border: 1px solid #ececec;
  border-radius: 18px;
  background: #fff;
  padding: 22px;
}

.photo-upload-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.photo-upload-head h3 {
  margin: 0 0 5px;
  color: #151515;
  font-size: 22px;
  font-weight: 900;
}

.photo-upload-head p {
  margin: 0;
  color: #777;
  font-size: 15px;
  font-weight: 500;
}

.photo-add-btn {
  border: 0;
  border-radius: 14px;
  background: #d4af00;
  color: #fff;
  min-height: 48px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(212, 175, 0, 0.25);
  white-space: nowrap;
}

.photo-add-btn:hover {
  background: #bf9d00;
}

.modern-photo-drop {
  min-height: 180px;
  border: 2px dashed #d8d8d8;
  border-radius: 18px;
  background: linear-gradient(135deg, #fbfbfb, #f6f6f6);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  cursor: pointer;
  text-align: center;
  padding: 30px 20px;
  transition: 0.2s ease;
}

.modern-photo-drop:hover,
.modern-photo-drop.is-dragging {
  border-color: #d4af00;
  background: linear-gradient(135deg, rgba(212, 175, 0, 0.08), #fff);
}

.photo-drop-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: #fff;
  color: #d4af00;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.modern-photo-drop strong {
  color: #151515;
  font-size: 18px;
  font-weight: 900;
}

.modern-photo-drop span {
  color: #777;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 500;
}

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.photo-item {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: #f3f3f3;
  border: 2px solid transparent;
  min-height: 145px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

.photo-item.is-main {
  border-color: #d4af00;
}

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

.photo-main-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  border-radius: 999px;
  background: #d4af00;
  color: #fff;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 900;
  display: none;
  align-items: center;
  gap: 5px;
}

.photo-item.is-main .photo-main-badge {
  display: inline-flex;
}

.photo-actions {
  position: absolute;
  inset-inline: 8px;
  bottom: 8px;
  display: flex;
  gap: 7px;
}

.photo-action-btn {
  flex: 1;
  border: 0;
  border-radius: 10px;
  min-height: 34px;
  background: rgba(255, 255, 255, 0.92);
  color: #151515;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  backdrop-filter: blur(8px);
}

.photo-action-btn:hover {
  background: #fff;
}

.photo-action-btn.delete {
  flex: 0 0 38px;
  color: #d72323;
}

.photo-item.is-main .photo-action-btn.main {
  color: #d4af00;
}

@media (max-width: 767px) {
  .photo-upload-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .photo-add-btn {
    width: 100%;
    justify-content: center;
  }

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

.condition-switch-row {
  display: flex;
  align-items: center;
  gap: 58px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.condition-switch-item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #151515;
  font-size: 15px;
  font-weight: 800;
}

.condition-switch-item .switch-label {
  margin-right: 4px;
}

.condition-switch-item .switch-text {
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.modern-switch {
  position: relative;
  width: 62px;
  height: 28px;
  display: inline-flex;
  margin: 0;
  cursor: pointer;
}

.modern-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.modern-switch span {
  width: 62px;
  height: 28px;
  border-radius: 999px;
  background: #d8d8d8;
  position: relative;
  transition: 0.2s ease;
}

.modern-switch span::before {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.18);
  transition: 0.2s ease;
}

.modern-switch input:checked + span {
  background: #d4af00;
}

.modern-switch input:checked + span::before {
  transform: translateX(34px);
}

.feature-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 44px;
  row-gap: 24px;
  margin-top: 24px;
}

.feature-column h3 {
  margin: 0 0 12px;
  color: #151515;
  font-size: 16px;
  font-weight: 900;
}

.feature-check {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 27px;
  color: #151515;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 7px;
}

.feature-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.feature-check span {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: #d8d8d8;
  border: 1px solid #d8d8d8;
  position: relative;
  flex: 0 0 18px;
  transition: 0.18s ease;
}

.feature-check span::after {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
}

.feature-check input:checked + span {
  background: #d4af00;
  border-color: #d4af00;
}

.feature-check input:checked + span::after {
  display: flex;
}

@media (max-width: 991px) {
  .feature-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 28px;
  }

  .condition-switch-row {
    gap: 24px;
  }
}

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

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

  .condition-switch-item {
    width: 100%;
    justify-content: space-between;
  }
}

.review-switch-row {
  margin-top: 16px;
}

.review-checks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.review-check {
  margin: 0;
  color: #151515;
  font-size: 14px;
  font-weight: 500;
}

.review-check a {
  color: #0057ff;
  font-weight: 800;
  text-decoration: none;
}

.review-check a:hover {
  text-decoration: underline;
}

.add-step-panel[data-step="5"] .field-group.full textarea {
  min-height: 68px;
  resize: vertical;
}

.add-step-panel[data-step="5"] .form-card {
  min-height: 500px;
}

@media (max-width: 767px) {
  .review-switch-row .condition-switch-item {
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
  }
}

.step-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.final-action-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.draft-btn {
  border: 0;
  border-radius: 10px;
  min-height: 42px;
  padding: 0 26px;
  background: #aaa;
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.add-car-left.is-final-step .draft-btn {
  display: inline-flex;
}

@media (max-width: 575px) {
  .step-actions,
  .final-action-group {
    width: 100%;
  }

  .step-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .final-action-group {
    flex-direction: column;
  }

  .draft-btn,
  .gold-btn,
  .ghost-btn {
    width: 100%;
  }
}