
/* ── Outer wrapper ───────────────────────────────────────── */
.amd-add-wrap {
  font-family: Tahoma, Arial, sans-serif;
  box-sizing: border-box;
  overflow: hidden;
}

/* ── Header плашка — identical to .amd-reg-heading ──────── */
.amd-add-plashka {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  background-color: rgba(255, 255, 255, 0.18);
  box-sizing: border-box;
  min-height: 40px;
}
.amd-add-plashka-emoji {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}
.amd-add-plashka-title {
  font-family: Tahoma, Arial, sans-serif;
  font-size: 14px;
  font-weight: bold;
  color: #d8d8d8;
  margin: 0;
  padding: 0;
}
.amd-add-plashka-count {
  font-family: Tahoma, Arial, sans-serif;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}
.amd-add1-sep {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.38);
  padding: 0 1px;
  flex-shrink: 0;
}

/* ── Column headers bar — white 30%, same height as plашка ── */
.amd-add-col-headers-bar {
  background: rgba(255, 255, 255, 0.30);
  display: flex;
  align-items: center;
  padding: 8px 22px;
  box-sizing: border-box;
  min-height: 40px;
}
.amd-add-col-hdr-l,
.amd-add-col-hdr-r {
  flex: 1 1 0;
  font-size: 13px;
  font-weight: bold;
  color: rgba(255, 255, 255, 0.45);
  text-transform: none;
  letter-spacing: 0;
}
.amd-add-col-hdr-l { padding-left: 12px; }
.amd-add-col-hdr-r { padding-left: 10px; }
/* Spacer matches the divider: 1px width + 28px margin each side = 57px */
.amd-add-col-hdr-spacer {
  width: 57px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.amd-add-col-hdr-spacer::after {
  content: '';
  display: block;
  width: 1px;
  height: 18px;
  background: rgba(0, 0, 0, 0.18);
}

/* ── Main body — white 50% transparent background ────────── */
.amd-add-body {
  background: rgba(255, 255, 255, 0.50);
  padding: 18px 22px 28px;
}

/* ── Two-column layout: 50% / 50% ───────────────────────── */
.amd-add-cols {
  display: flex;
  align-items: flex-start;
}
.amd-add-col-l {
  flex: 1 1 0;
  min-width: 0;
}
.amd-add-col-div {
  width: 1px;
  background: rgba(0, 0, 0, 0.10);
  align-self: stretch;
  flex-shrink: 0;
  margin: 0 28px;
}
.amd-add-col-r {
  flex: 1 1 0;
  min-width: 0;
}

/* ── Section cards ───────────────────────────────────────── */
.amd-add-item {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 13px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.amd-add-item:hover {
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transform: translateX(4px);
  text-decoration: none;
  color: inherit;
}

/* Icon box — fixed 100px (widest image), right-aligned, no squishing */
.amd-add-item-ico {
  flex: 0 0 100px;
  width: 100px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  background: none;
}
.amd-add-item-ico img {
  display: block;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
}

/* Text */
.amd-add-item-body {
  flex: 1;
  min-width: 0;
}
.amd-add-item-name {
  font-size: 22px;
  font-weight: 400;
  color: #1a1a2e;
  margin-bottom: 5px;
  line-height: 1.25;
  transition: color 0.15s ease;
}
.amd-add-item:hover .amd-add-item-name {
  font-weight: 400;
  color: #1a1a2e;
  text-decoration: underline;
}
.amd-add-item-desc {
  font-size: 12px;
  color: #666666;
  line-height: 1.55;
}
.amd-add-item-num {
  flex: 0 0 24px;
  width: 24px;
  text-align: center;
  font-size: 14px;
  color: #666;
  font-family: Tahoma, Arial, sans-serif;
}
/* ── Spare parts: count badge on right side of amd-add-item ── */
.amd-sp-count {
  flex: 0 0 auto;
  margin-left: auto;
  min-width: 40px;
  text-align: right;
  font-size: 15px;
  font-weight: bold;
  color: #000;
  padding-right: 14px;
}

/* ── Spare parts page: total count in header ─────────────── */
.amd-sp-total-badge {
  margin-left: 14px;
  font-size: 14px;
  font-weight: normal;
  color: #888;
}

/* ── H1 second plashka (parts + services) ────────────────── */
.amd-add-h1-plashka {
  padding: 8px 18px; min-height: 40px;
  background: rgba(255,255,255,0.24); box-sizing: border-box;
  display: flex; align-items: center;
}
.amd-add-h1-plashka h1 {
  margin: 0 !important; padding: 0 !important; border: 0 !important;
  font-family: Tahoma, Arial, sans-serif !important;
  font-size: 14px !important; font-weight: bold !important; color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5) !important; line-height: 1.3 !important;
}

/* ── Services list ───────────────────────────────────────── */
.amd-svc-list {
  display: flex;
  flex-direction: column;
}
.amd-svc-item {
  display: block;
  padding: 13px 12px;
  font-size: 22px;
  font-weight: 400;
  color: #1a1a2e;
  text-decoration: none;
  border-radius: 8px;
  line-height: 1.25;
  transition: background 0.15s ease, transform 0.15s ease;
}
.amd-svc-item:hover {
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  color: #1a1a2e;
  text-decoration: none;
  transform: translateX(4px);
}
.amd-svc-name {
  display: block;
}
.amd-svc-item:hover .amd-svc-name {
  text-decoration: underline;
}
.amd-svc-desc {
  display: block;
  font-size: 11px;
  color: #666666;
  font-weight: 400;
  margin-top: 3px;
  line-height: 1.4;
  text-decoration: none;
}
/* Separator between services — keep subtle */
.amd-add-sep { display: none; }

/* ── Responsive — tablet ─────────────────────────────────── */
@media (max-width: 720px) {
  .amd-add-col-headers-bar { flex-direction: column; gap: 4px; padding: 8px 16px; }
  .amd-add-col-hdr-spacer { display: none; }
  .amd-add-col-hdr-l,
  .amd-add-col-hdr-r { padding-left: 0; }
  .amd-add-cols { flex-direction: column; }
  .amd-add-col-div { width: 100%; height: 1px; margin: 16px 0; align-self: auto; }
  .amd-add-col-r { flex: 1 1 100%; width: 100%; }
}

/* ── Responsive — phone ──────────────────────────────────── */
@media (max-width: 480px) {
  .amd-add-plashka { padding: 8px 10px 8px 12px; }
  .amd-add-body { padding: 14px 12px 20px; }
  .amd-add-item { gap: 12px; padding: 11px 6px; }
  .amd-add-item-ico { flex: 0 0 56px; width: 56px; height: 44px; }
  .amd-add-item-name { font-size: 18px; }
  .amd-svc-item { font-size: 18px; }
}

/* ══════════════════════════════════════════════════════════ */
/* /add/avto/ page — brand selection                         */
/* ══════════════════════════════════════════════════════════ */

/* ── Breadcrumb links in плашка ──────────────────────────── */
a.amd-add-plashka-emoji { text-decoration: none; }
a.amd-add-plashka-emoji:hover { opacity: 0.75; }
a.amd-add-plashka-title { font-weight: normal; text-decoration: none; }
a.amd-add-plashka-title:hover { text-decoration: underline; }
.amd-add1-crumb {
  font-family: Tahoma, Arial, sans-serif;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  transition: color 0.15s ease;
}
.amd-add1-crumb:hover {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: underline;
}
.amd-add1-sep {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.28);
  flex-shrink: 0;
}

/* ── Brand page body ─────────────────────────────────────── */
.amd-add1-body {
  background: rgba(255, 255, 255, 0.50);
  padding: 18px 22px 28px;
}

/* ── Brand grid — 8 cols desktop, auto-wrap on smaller screens ─ */
.amd-brand-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
}
/* At JS breakpoint (1100px) JS hides sidebar → auto-fill takes over */
@media (max-width: 1100px) {
  .amd-brand-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}
@media (max-width: 960px) {
  .amd-brand-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}

/* ── Brand card ──────────────────────────────────────────── */
.amd-brand-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-height: 108px;
  padding: 10px 8px 8px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.30);
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease;
  box-sizing: border-box;
  overflow: hidden;
}
.amd-brand-card:hover {
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.10);
  transform: translateY(-3px);
  text-decoration: none;
  color: inherit;
}
.amd-brand-card img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: 62px;
  object-fit: contain;
}
.amd-brand-nopic {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 62px;
  width: 62px;
  font-size: 16px;
  color: rgba(0, 0, 0, 0.28);
  flex-shrink: 0;
}
.amd-brand-name {
  display: block;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 13px;
  color: #1a1a2e;
  text-align: center;
  line-height: 1.35;
  word-break: break-word;
}
.amd-brand-card:hover .amd-brand-name { text-decoration: underline; }

/* "Другие марки" card */
.amd-brand-card--other {
  background: rgba(255, 255, 255, 0.18);
  border: 1px dashed rgba(0, 0, 0, 0.15);
}
.amd-brand-card--other .amd-brand-nopic {
  font-size: 22px;
  letter-spacing: 3px;
  color: rgba(0, 0, 0, 0.30);
}
.amd-brand-card--other .amd-brand-name { color: #555; }

/* ── Responsive — brand page tablet ─────────────────────── */
@media (max-width: 720px) {
  .amd-add1-body { padding: 14px 16px 22px; }
  /* auto-fill handles column count, no override needed */
}

/* ── Responsive — brand page phone ──────────────────────── */
@media (max-width: 480px) {
  .amd-add1-body { padding: 12px 10px 18px; }
  .amd-brand-grid { gap: 5px; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }
  .amd-brand-card { padding: 8px 4px 6px; min-height: 80px; }
  .amd-brand-card img { max-height: 50px; max-width: 80px; }
  .amd-brand-nopic { height: 50px; }
  .amd-brand-name { font-size: 11px; }
}

/* ══════════════════════════════════════════════════════════ */
/* /add/avto/brand/ — ad posting form                        */
/* ══════════════════════════════════════════════════════════ */

.amd-form-page { width: 100%; box-sizing: border-box; }

/* ── Brand logo in breadcrumb and form ──────────────────── */
.amd-form-brand-logo {
  max-width: 25px; max-height: 25px; width: auto; height: auto;
  object-fit: contain; vertical-align: middle;
  margin-right: 6px; flex-shrink: 0;
}

/* ── Section header — identical to .amd-add-plashka ──────── */
.amd-form-section-head {
  display: flex; align-items: center;
  padding: 8px 18px;
  background-color: rgba(255,255,255,0.30);
  min-height: 40px; box-sizing: border-box;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 14px; font-weight: bold; color: #d8d8d8;
}

/* ── Section white body — each section its own background ── */
.amd-form-section {
  background: rgba(255,255,255,0.70);
  padding: 4px 0;
}

/* ── Form row ───────────────────────────────────────────── */
.amd-form-row {
  display: flex; align-items: center;
  padding: 7px 22px;
  border-bottom: 1px solid rgba(160,175,190,0.14);
  min-height: 54px; box-sizing: border-box;
}
.amd-form-section > .amd-form-row:last-child { border-bottom: none; }
.amd-form-row-top { align-items: flex-start; padding-top: 12px; }

/* ── Label — right-aligned ──────────────────────────────── */
.amd-form-label {
  flex: 0 0 210px;
  text-align: right;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 13px; font-weight: bold; color: #333;
  padding-right: 20px; box-sizing: border-box;
}

/* ── Value area ─────────────────────────────────────────── */
.amd-form-value { flex: 1; min-width: 0; }
.amd-form-value-static {
  font-family: Tahoma, Arial, sans-serif;
  font-size: 14px; color: #1a2a4a; font-weight: bold;
  display: flex; align-items: center;
}
.amd-form-row-inline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ── Inputs — matching registration page style ──────────── */
.amd-finput {
  height: 42px; padding: 0 14px;
  font-family: Tahoma, Arial, sans-serif; font-size: 14px;
  border: 1.5px solid rgba(0,0,0,0.20); border-radius: 3px;
  background: rgba(255,255,255,0.95); color: #222;
  outline: none; box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%; max-width: 320px;
}
.amd-finput:focus {
  border-color: #cc0000;
  box-shadow: 0 0 0 2px rgba(200,0,0,0.12);
}
.amd-finput-req { border: 2px solid #cc0000 !important; }
.amd-finput-req:focus { box-shadow: 0 0 0 2px rgba(200,0,0,0.18); }
.amd-finput-ok { border: 2px solid #00aa44 !important; }
.amd-finput-ok:focus { box-shadow: 0 0 0 2px rgba(0,170,68,0.18); }
.amd-finput-num   { max-width: 210px; }
.amd-finput-md    { max-width: 210px; }
.amd-finput-phone { max-width: 210px; }
.amd-fselect {
  height: 42px; padding: 0 10px;
  font-family: Tahoma, Arial, sans-serif; font-size: 14px;
  border: 1.5px solid rgba(0,0,0,0.20); border-radius: 3px;
  background: rgba(255,255,255,0.95); color: #222;
  outline: none; box-sizing: border-box;
  transition: border-color 0.15s;
  width: 100%; max-width: 320px;
}
.amd-fselect-md { max-width: 210px; }
.amd-fselect:focus { border-color: #cc0000; box-shadow: 0 0 0 2px rgba(200,0,0,0.12); }

.amd-ftextarea {
  padding: 10px 14px;
  font-family: Tahoma, Arial, sans-serif; font-size: 14px;
  border: 1.5px solid rgba(0,0,0,0.20); border-radius: 3px;
  background: rgba(255,255,255,0.95); color: #222;
  resize: vertical; width: 100%;
  min-height: 220px; box-sizing: border-box;
  outline: none; transition: border-color 0.15s;
}
.amd-ftextarea:focus { border-color: #cc0000; box-shadow: 0 0 0 2px rgba(200,0,0,0.12); }

/* Translate button */
.amd-translate-btn {
  flex-shrink: 0;
  height: 28px; padding: 0 12px;
  font-family: Tahoma, Arial, sans-serif; font-size: 12px;
  background: #f0f0f0; color: #444;
  border: 1px solid #ccc; border-radius: 3px;
  cursor: pointer; white-space: nowrap;
  transition: background 0.15s;
}
.amd-translate-btn:hover { background: #e0e0e0; }
.amd-translate-btn:disabled { opacity: 0.6; cursor: wait; }

/* Override PHP-injected barr/barr4 elements */
.amd-form-section select.barr,
.amd-form-section select.barr3,
.amd-form-section select.barr4 {
  height: 42px; padding: 0 10px;
  font-family: Tahoma, Arial, sans-serif; font-size: 14px;
  border: 1.5px solid rgba(0,0,0,0.20); border-radius: 3px;
  background: rgba(255,255,255,0.95); color: #222;
  outline: none; transition: border-color 0.15s;
  box-sizing: border-box;
}
.amd-form-section select.barr  { width: 100%; max-width: 210px; }
.amd-form-section select.barr3 { max-width: 90px; }
.amd-form-section select.barr4 { width: 100%; max-width: 320px; }
.amd-form-section select.barr:focus,
.amd-form-section select.barr4:focus { border-color: #cc0000; box-shadow: 0 0 0 2px rgba(200,0,0,0.12); }
.amd-form-section input.barr {
  height: 42px; padding: 0 14px; width: 100%; max-width: 210px;
  font-family: Tahoma, Arial, sans-serif; font-size: 14px;
  border: 1.5px solid rgba(0,0,0,0.20); border-radius: 3px;
  background: rgba(255,255,255,0.95); color: #222;
  outline: none; box-sizing: border-box; transition: border-color 0.15s;
}
.amd-form-section input.barr4 {
  height: 42px; padding: 0 14px; width: 100%; max-width: 320px;
  font-family: Tahoma, Arial, sans-serif; font-size: 14px;
  border: 1.5px solid rgba(0,0,0,0.20); border-radius: 3px;
  background: rgba(255,255,255,0.95); color: #222;
  outline: none; box-sizing: border-box; transition: border-color 0.15s;
}

/* ── Hints, units ───────────────────────────────────────── */
.amd-form-hint  { font-family: Tahoma, Arial, sans-serif; font-size: 12px; color: #888; }
.amd-form-unit  { font-family: Tahoma, Arial, sans-serif; font-size: 14px; color: #444; font-weight: bold; }
.amd-form-info-hint {
  font-family: Tahoma, Arial, sans-serif; font-size: 12px; color: #666;
  padding: 8px 22px 4px;
}
.amd-form-link { color: #2255aa; text-decoration: none; }
.amd-form-link:hover { text-decoration: underline; }

/* ── Currency radios ────────────────────────────────────── */
.amd-form-valute {
  display: flex; gap: 12px; align-items: center;
  font-family: Tahoma, Arial, sans-serif; font-size: 13px; color: #444;
}
.amd-form-valute label { display: flex; align-items: center; gap: 4px; cursor: pointer; }

/* ── Checkboxes ─────────────────────────────────────────── */
.amd-form-chklabel {
  display: flex; align-items: center; gap: 6px;
  font-family: Tahoma, Arial, sans-serif; font-size: 13px; color: #444;
  cursor: pointer;
}
.amd-form-checktext { font-family: Tahoma, Arial, sans-serif; font-size: 13px; color: #444; }

/* ── Email / contact value bubble ───────────────────────── */
.amd-form-email-val {
  font-family: Tahoma, Arial, sans-serif; font-size: 14px;
  color: #1a2a4a; font-weight: bold;
  background: rgba(200,0,0,0.07);
  padding: 6px 14px; border-radius: 3px;
  white-space: nowrap; border: 1px solid rgba(200,0,0,0.18);
}

/* ── Комплектация ───────────────────────────────────────── */
.amd-form-comp { padding: 12px 22px 16px; }
.amd-form-comp table {
  font-family: Tahoma, Arial, sans-serif; font-size: 13px; color: #333;
  width: 100%;
}
.amd-form-comp td { padding: 5px 6px; vertical-align: middle; }
.amd-form-comp input[type="checkbox"] {
  width: 17px; height: 17px; cursor: pointer; vertical-align: middle;
}

/* ── Photo grid ─────────────────────────────────────────── */
.amd-form-pics-hint {
  font-family: Tahoma, Arial, sans-serif; font-size: 12px; color: #666;
  padding: 10px 22px 6px;
}
.amd-form-pics-wrap {
  display: flex; gap: 20px;
  padding: 4px 22px 18px;
}
.amd-form-pics-col {
  flex: 1; display: flex; flex-direction: column; gap: 8px;
}
.amd-form-pic-item { box-sizing: border-box; }
.amd-form-pic-label {
  font-family: Tahoma, Arial, sans-serif; font-size: 11px;
  font-weight: bold; color: #666; margin-bottom: 4px;
}

/* ── Submit bar ─────────────────────────────────────────── */
.amd-form-submit-bar {
  display: flex; align-items: center; gap: 18px;
  padding: 14px 22px;
  background-color: rgba(255,255,255,0.18);
  flex-wrap: wrap;
}
/* Use the site's standard amd-btn gradient, override width */
.amd-form-submit-btn {
  width: 300px !important;
  border: none !important; outline: none !important;
  margin-top: 0;
}
.amd-form-submit-btn span { font-size: 18px; font-weight: bold; }

/* ── Checkboxes in contact section and copy row ─────────── */
.amd-form-section .amd-form-chklabel input[type="checkbox"],
.amd-form-chklabel-copy input[type="checkbox"] {
  width: 17px; height: 17px; cursor: pointer;
}

/* ── Responsive ≤900px ──────────────────────────────────── */
@media (max-width: 900px) {
  .amd-form-row { flex-direction: column; align-items: flex-start; padding: 8px 14px; min-height: 0; }
  .amd-form-label { flex: none; text-align: left; padding-right: 0; margin-bottom: 4px; }
  .amd-form-value { width: 100%; }
  .amd-finput, .amd-finput-md, .amd-fselect, .amd-fselect-md { width: 100%; max-width: 100%; }
  .amd-form-submit-btn { width: 100% !important; }
  .amd-form-section select.barr, .amd-form-section select.barr4 { width: 100%; max-width: 100%; }
  .amd-form-section input.barr, .amd-form-section input.barr4 { width: 100%; max-width: 100%; box-sizing: border-box; }
  .amd-form-pics-wrap { flex-direction: column; gap: 6px; }
}
@media (max-width: 480px) {
  .amd-form-section-head { padding: 8px 12px; font-size: 13px; }
  .amd-form-comp { padding: 8px 12px; }
  .amd-form-pics-wrap { padding: 4px 12px 12px; }
  .amd-form-submit-bar { flex-direction: column; align-items: flex-start; gap: 10px; padding: 12px; }
  .amd-form-submit-btn { min-width: 0; width: 100% !important; }
}

/* ── Spare parts category grid ──────────────────────────── */
.amd-sp-cats-section { padding: 16px 22px 22px; }
.amd-sp-cats-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.amd-sp-cat-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 14px 12px 12px;
  background: rgba(255,255,255,0.85);
  border: 1.5px solid rgba(0,0,0,0.10); border-radius: 6px;
  width: 140px; min-height: 90px; text-decoration: none;
  font-family: Tahoma, Arial, sans-serif; font-size: 12px; line-height: 1.3;
  color: #1a2a4a; font-weight: bold; text-align: center; box-sizing: border-box;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.amd-sp-cat-card:hover {
  background: rgba(255,255,255,0.97);
  border-color: rgba(200,0,0,0.40);
  color: #cc0000;
}
.amd-sp-cat-icon { width: 36px; height: 36px; object-fit: contain; }
.amd-sp-cat-icon-ph {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; font-size: 20px; color: #aaa;
}
@media (max-width: 900px) {
  .amd-sp-cats-section { padding: 12px 14px 16px; }
  .amd-sp-cat-card { width: calc(50% - 4px); }
}
@media (max-width: 480px) {
  .amd-sp-cat-card { width: calc(50% - 4px); font-size: 11px; padding: 10px 8px; }
}
