/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
textarea { resize: vertical; }

:root {
  --gold:       #8B6914;
  --gold-light: #C4973A;
  --gold-pale:  #F5EFD8;
  --dark:       #1A1208;
  --text:       #3A2E1A;
  --text-muted: #7A6A50;
  --bg:         #FDFBF6;
  --bg-alt:     #F5F0E8;
  --border:     #E2D9C8;
  --card-bg:    #FFFFFF;
  --radius:     12px;
  --shadow:     0 2px 16px rgba(139,105,20,.10);
  --shadow-lg:  0 8px 40px rgba(139,105,20,.15);
  --transition: .2s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); }
img { max-width: 100%; display: block; }

/* ── LAYOUT ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.main-content { flex: 1; padding-bottom: 60px; }

/* ── NAVBAR ── */
.navbar {
  background: var(--dark);
  position: sticky; top: 0; z-index: 210; /* выше mobile-menu(200) чтобы бургер был поверх */
  box-shadow: 0 2px 20px rgba(0,0,0,.3);
}

.navbar-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px; height: 64px;
}

.brand {
  font-family: 'Playfair Display', serif;
  font-size: 22px; font-weight: 700;
  color: var(--gold-light) !important;
  white-space: nowrap;
  display: flex; align-items: center; gap: 8px;
}

.nav-search {
  flex: 1 1 200px; min-width: 0; display: flex;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 8px; overflow: hidden;
}
.nav-search input {
  flex: 1; background: transparent; border: none; outline: none;
  color: #fff; padding: 0 16px; font-size: 15px; height: 40px;
}
.nav-search input::placeholder { color: rgba(255,255,255,.5); }
.nav-search button {
  background: var(--gold); border: none; color: #fff;
  padding: 0 16px; cursor: pointer; transition: background var(--transition);
}
.nav-search button:hover { background: var(--gold-light); }

.nav-links {
  display: flex; align-items: center; gap: 12px; flex-shrink: 0;
}
.nav-links a { color: rgba(255,255,255,.85); font-size: 14px; }
.nav-links a:hover { color: #fff; }
.rel { position: relative; }

.badge {
  position: absolute; top: -6px; right: -8px;
  background: #e53e3e; color: #fff;
  border-radius: 50%; width: 16px; height: 16px;
  font-size: 10px; display: flex; align-items: center; justify-content: center;
}

/* Avatar dropdown */
.nav-avatar-wrap { position: relative; cursor: pointer; }
.nav-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--gold);
  transition: border-color .15s;
}
.nav-avatar-wrap:hover .nav-avatar,
.nav-avatar-wrap.open .nav-avatar { border-color: var(--gold-light); }

.nav-dropdown {
  display: none; position: absolute; right: 0; top: 100%;
  /* Невидимый padding сверху — мост между аватаром и меню, мышь не проваливается */
  padding-top: 10px;
  background: transparent;
  min-width: 200px;
  z-index: 9999;
}
/* Видимая часть меню — отдельный псевдоэлемент через внутренний div */
.nav-dropdown-inner {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: 0 8px 32px rgba(0,0,0,.18);
  overflow: hidden;
}
/* Открыт по ховеру ИЛИ по клику */
.nav-avatar-wrap:hover .nav-dropdown,
.nav-avatar-wrap.open .nav-dropdown { display: block; }
.nav-dropdown-inner a {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; color: var(--text); font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.nav-dropdown-inner a:hover { background: var(--bg-alt); color: var(--gold); }
.nav-dropdown-inner form:last-child button { border-bottom: none !important; }
.nav-dropdown-inner form button:hover { background: rgba(229,62,62,.08) !important; color: #ff6b6b !important; }

/* Category bar */
.cat-bar {
  background: rgba(255,255,255,.05); border-top: 1px solid rgba(255,255,255,.08);
  overflow-x: auto; overflow-y: visible;
  scrollbar-width: none;
}
.cat-bar::-webkit-scrollbar { display: none; }
.cat-bar-inner {
  min-width: max-content; width: 100%; max-width: 1200px;
  margin: 0 auto; padding: 0 20px;
  display: flex; gap: 4px; justify-content: center;
}
.cat-bar-inner::-webkit-scrollbar { display: none; }
.cat-bar-inner a {
  color: rgba(255,255,255,.7); font-size: 13px;
  padding: 8px 12px; white-space: nowrap;
  border-radius: 6px; transition: all var(--transition);
  display: flex; align-items: center; gap: 5px;
}
.cat-bar-inner a:hover { color: var(--gold-light); background: rgba(255,255,255,.06); }

/* ── BUTTONS ── */
.btn-primary-sm {
  background: var(--gold); color: #fff !important; font-size: 13px; font-weight: 500;
  padding: 9px 14px; border-radius: 8px; display: inline-flex; align-items: center; gap: 5px;
  transition: background var(--transition);
}
.btn-primary-sm:hover { background: var(--gold-light); }

.btn-ghost-sm {
  border: 1px solid rgba(255,255,255,.45); color: rgba(255,255,255,.9) !important; font-size: 13px;
  padding: 7px 14px; border-radius: 8px; display: inline-flex; align-items: center; gap: 5px;
  transition: all var(--transition);
}
.btn-ghost-sm:hover { border-color: #fff; color: #fff !important; background: rgba(255,255,255,.1); }
.btn-edit-sm {
  border: 1px solid var(--gold); color: var(--gold) !important; font-size: 13px;
  padding: 7px 14px; border-radius: 8px; display: inline-flex; align-items: center; gap: 5px;
  background: none; text-decoration: none; transition: all var(--transition);
}
.btn-edit-sm:hover { background: var(--gold); color: #000 !important; }

.btn-ghost-light {
  border: 1px solid var(--border); color: var(--text) !important; font-size: 13px;
  padding: 7px 14px; border-radius: 8px; display: inline-flex; align-items: center; gap: 5px;
  transition: all var(--transition); background: var(--card-bg);
}
.btn-ghost-light:hover { border-color: var(--gold); color: var(--gold) !important; }

.btn-primary-full {
  width: 100%; background: var(--gold); color: #fff; border: none;
  padding: 13px; border-radius: 10px; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: background var(--transition);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primary-full:hover { background: var(--gold-light); }

.btn-ghost-full {
  width: 100%; background: transparent; color: var(--text-muted); border: 1px solid var(--border);
  padding: 12px; border-radius: 10px; font-size: 14px;
  cursor: pointer; transition: all var(--transition); display: block; text-align: center; margin-top: 8px;
}
.btn-ghost-full:hover { border-color: var(--gold); color: var(--gold); }

/* Кнопка сброса фильтров */
.btn-reset-full {
  width: 100%; background: transparent; color: var(--text-muted);
  border: 1px dashed var(--border);
  padding: 11px 12px; border-radius: 10px; font-size: 14px;
  cursor: pointer; transition: all var(--transition);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 8px; text-decoration: none;
}
.btn-reset-full:hover { border-color: #e53e3e; color: #e53e3e; background: rgba(229,62,62,.04); }
/* Когда фильтры активны — более заметная */
.btn-reset-full.btn-reset-active {
  color: #c0392b; border-color: #e88; border-style: solid;
  background: rgba(229,62,62,.06);
}
.btn-reset-full.btn-reset-active:hover { background: rgba(229,62,62,.12); color: #e53e3e; }
.reset-badge {
  background: #e53e3e; color: #fff;
  font-size: 11px; font-weight: 700; border-radius: 20px;
  padding: 1px 7px; min-width: 20px; text-align: center;
}

.btn-primary-lg {
  background: var(--gold); color: #fff !important; font-size: 16px; font-weight: 600;
  padding: 13px 28px; border-radius: 10px; border: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; transition: background var(--transition);
}
.btn-primary-lg:hover { background: var(--gold-light); }

.btn-ghost-lg {
  background: transparent; color: var(--text-muted) !important; font-size: 15px;
  padding: 12px 24px; border-radius: 10px; border: 1px solid var(--border);
  display: inline-flex; align-items: center; gap: 8px; transition: all var(--transition);
}
.btn-ghost-lg:hover { border-color: var(--gold); color: var(--gold) !important; }

.btn-danger-full {
  width: 100%; background: #e53e3e; color: #fff; border: none;
  padding: 12px; border-radius: 10px; font-size: 14px; cursor: pointer;
  transition: background var(--transition); display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-danger-full:hover { background: #c53030; }

/* ── FLASH ── */
.flash-wrap { max-width: 1200px; margin: 16px auto; padding: 0 20px; }
.flash {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 10px; margin-bottom: 8px; font-size: 14px;
}
.flash-success { background: #f0fff4; border: 1px solid #68d391; color: #276749; }
.flash-danger  { background: #fff5f5; border: 1px solid #fc8181; color: #822727; }
.flash-warning { background: #fffbeb; border: 1px solid #f6e05e; color: #744210; }
.flash-info    { background: #ebf8ff; border: 1px solid #63b3ed; color: #2c5282; }
.flash-close   { margin-left: auto; background: none; border: none; cursor: pointer; font-size: 18px; opacity: .6; }
.flash-close:hover { opacity: 1; }

/* ── HERO ── */
.hero {
  background: linear-gradient(135deg, var(--dark) 0%, #2D1F06 60%, #3D2C0A 100%);
  padding: 80px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%238B6914' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; max-width: 680px; margin: 0 auto; }
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(32px, 5vw, 54px);
  color: #fff; margin-bottom: 16px; line-height: 1.2;
}
.hero p { color: rgba(255,255,255,.75); font-size: 17px; margin-bottom: 32px; line-height: 1.6; }

.hero-search {
  display: flex; background: #fff; border-radius: 12px;
  overflow: hidden; box-shadow: 0 4px 30px rgba(0,0,0,.3);
  margin-bottom: 20px;
}
.hero-search input {
  flex: 1; padding: 16px 20px; border: none; outline: none;
  font-size: 16px; color: var(--text);
}
.hero-search button {
  background: var(--gold); color: #fff; border: none; padding: 0 28px;
  font-size: 15px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; gap: 8px; transition: background var(--transition);
}
.hero-search button:hover { background: var(--gold-light); }

.hero-tags { display: flex; align-items: center; gap: 10px; justify-content: center; flex-wrap: wrap; }
.hero-tags span { color: rgba(255,255,255,.5); font-size: 14px; }
.hero-tags a {
  background: rgba(255,255,255,.1); color: rgba(255,255,255,.85);
  padding: 5px 12px; border-radius: 20px; font-size: 13px;
  transition: background var(--transition);
}
.hero-tags a:hover { background: rgba(255,255,255,.2); }

/* ── SECTIONS ── */
.section { padding: 60px 0; }
.section-alt { background: var(--bg-alt); }
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px;
}
.section-head h2 {
  font-family: 'Playfair Display', serif; font-size: 26px; color: var(--dark);
}
.section-head a { font-size: 14px; color: var(--gold); }

/* ── CATEGORY GRID ── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
}
.cat-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 20px 12px; background: var(--card-bg);
  border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text) !important; font-size: 13px; text-align: center;
  transition: all var(--transition);
}
.cat-card:hover { border-color: var(--gold); box-shadow: var(--shadow); transform: translateY(-2px); color: var(--gold) !important; }
.cat-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--gold-pale); display: flex; align-items: center; justify-content: center;
  color: var(--gold); font-size: 20px;
}

/* ── LISTING CARD ── */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.listing-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: all var(--transition);
  display: flex; flex-direction: column;
}
.listing-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: var(--gold); }

.card-img-wrap {
  display: block; position: relative; overflow: hidden;
  aspect-ratio: 4/3;
}
.card-img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.listing-card:hover .card-img-wrap img { transform: scale(1.05); }

.card-no-photo {
  width: 100%; height: 100%; background: var(--bg-alt);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; color: var(--text-muted);
}
.card-no-photo i { font-size: 36px; color: var(--border); }
.card-no-photo span { font-size: 12px; }

.card-type {
  position: absolute; top: 10px; left: 10px;
  font-size: 11px; font-weight: 600; padding: 3px 10px;
  border-radius: 20px; backdrop-filter: blur(6px);
}
.card-type-sale     { background: rgba(16,185,129,.85); color: #fff; }
.card-type-exchange { background: rgba(59,130,246,.85);  color: #fff; }
.card-type-both     { background: rgba(139,105,20,.85);  color: #fff; }
.card-type-sold     { background: rgba(100,100,100,.85); color: #fff; }

/* Проданная карточка */
.listing-card-sold { opacity: .85; }
.listing-card-sold:hover { transform: none; box-shadow: none; border-color: var(--border); }
.card-img-wrap-sold { position: relative; }
.card-sold-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,.25); pointer-events: none;
}
.card-title-sold { color: var(--text-muted) !important; }
.card-price-sold { color: var(--text-muted); text-decoration: line-through; }

/* Кнопка «Продано» на карточке активного товара */
.btn-mark-sold {
  background: none; border: 1px solid var(--border); cursor: pointer;
  padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600;
  color: var(--text-muted); transition: all var(--transition); white-space: nowrap;
}
.btn-mark-sold:hover { border-color: #10b981; color: #10b981; background: rgba(16,185,129,.08); }

/* Кнопка «Возобновить» на проданной карточке */
.btn-unsell {
  background: none; border: 1px solid var(--border); cursor: pointer;
  padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600;
  color: var(--text-muted); transition: all var(--transition); white-space: nowrap;
}
.btn-unsell:hover { border-color: var(--gold); color: var(--gold); background: rgba(139,105,20,.08); }

/* Кнопка «Запросить отзыв» в чате */
.btn-request-review {
  background: var(--bg-alt); border: 1px solid var(--border); cursor: pointer;
  padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 500;
  color: var(--text-muted); transition: all var(--transition); display: flex;
  align-items: center; gap: 6px; white-space: nowrap;
}
.btn-request-review:hover { border-color: var(--gold); color: var(--gold); background: rgba(139,105,20,.08); }

.card-body { padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.card-brand { font-size: 11px; color: var(--gold); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-title {
  font-weight: 600; color: var(--dark) !important; font-size: 14px; line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-title:hover { color: var(--gold) !important; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.card-meta span { font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }

.card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding-top: 8px; border-top: 1px solid var(--border);
}
.card-price { font-weight: 700; font-size: 16px; color: var(--dark); }
.negotiable { font-size: 11px; color: var(--gold); font-weight: 400; margin-left: 4px; }
.price-free { color: #27ae60; font-weight: 700; }
.price-free-lg { color: #27ae60; font-weight: 700; }
.card-actions { display: flex; align-items: center; gap: 8px; }
.card-views { font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 3px; }

.fav-btn {
  background: none; border: none; cursor: pointer; color: var(--text-muted);
  font-size: 16px; padding: 4px; transition: color var(--transition);
}
.fav-btn:hover, .fav-btn.active { color: #e53e3e; }

/* ── BRANDS ── */
.brands-row { display: flex; flex-wrap: wrap; gap: 12px; }
.brand-chip {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 18px;
  display: flex; flex-direction: column;
  transition: all var(--transition); color: var(--text) !important;
}
.brand-chip:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.brand-chip-name { font-weight: 600; font-size: 14px; color: var(--dark); }
.brand-chip-country { font-size: 11px; color: var(--text-muted); }

/* ── CTA ── */
.cta-section { padding: 60px 0; }
.cta-box {
  background: linear-gradient(135deg, var(--dark), #2D1F06);
  border-radius: 20px; padding: 60px 40px; text-align: center;
}
.cta-box h2 {
  font-family: 'Playfair Display', serif; font-size: 32px; color: #fff; margin-bottom: 12px;
}
.cta-box p { color: rgba(255,255,255,.7); font-size: 16px; margin-bottom: 28px; }

/* ── PAGE HEADER ── */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 32px 0 24px;
}
.page-header h1 {
  font-family: 'Playfair Display', serif; font-size: 30px; color: var(--dark);
  display: flex; align-items: center; gap: 10px;
}
.page-desc { color: var(--text-muted); margin-top: 6px; }
.results-count { color: var(--text-muted); font-size: 14px; margin-bottom: 20px; }
.results-count strong { color: var(--dark); }

/* ── SEARCH PAGE ── */
.search-page { display: flex; gap: 28px; padding-top: 32px; align-items: flex-start; }
.search-sidebar { width: 260px; flex-shrink: 0; position: sticky; top: 120px; }
.search-results { flex: 1; }
.results-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; }
.results-head h1 { font-family: 'Playfair Display', serif; font-size: 24px; color: var(--dark); }

/* Единая страница поиска (два столбца) */
.search-unified-page { padding-top: 32px; }
.search-unified-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 28px; flex-wrap: wrap; gap: 8px;
}
.search-unified-head h1 { font-family: 'Playfair Display', serif; font-size: 26px; color: var(--dark); }
.search-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: flex-start; }
.search-col-head { margin-bottom: 16px; }
.search-col-head h2 {
  font-family: 'Playfair Display', serif; font-size: 20px; color: var(--dark);
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 12px; border-bottom: 2px solid var(--gold);
}
.col-count {
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 600;
  background: var(--gold); color: #fff; border-radius: 20px;
  padding: 2px 9px; margin-left: auto;
}
/* Фильтр внутри колонки — поля в ряд */
.filter-row-inline { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.filter-actions-row { display: flex; gap: 10px; margin-top: 12px; }
.filter-actions-row .btn-primary-full,
.filter-actions-row .btn-reset-full { flex: 1; }

@media (max-width: 900px) {
  .search-two-col { grid-template-columns: 1fr; }
}

.filter-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.filter-card h3 {
  font-size: 16px; font-weight: 600; color: var(--dark);
  display: flex; align-items: center; gap: 8px; margin-bottom: 18px;
}
.filter-group { margin-bottom: 16px; }
.filter-group label { display: block; font-size: 13px; font-weight: 500; color: var(--text-muted); margin-bottom: 6px; }
.filter-group select,
.filter-group input[type=text],
.filter-group input[type=number] {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--bg); color: var(--text); font-size: 14px;
  outline: none; transition: border-color var(--transition);
}
.filter-group select:focus,
.filter-group input:focus { border-color: var(--gold); }
.price-range { display: flex; align-items: center; gap: 8px; }
.price-range input { flex: 1; }
.price-range span { color: var(--text-muted); flex-shrink: 0; }

/* ── DETAIL PAGE ── */
.detail-page { padding: 24px 0 60px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); margin-bottom: 28px; flex-wrap: wrap; }
.breadcrumb-back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.breadcrumb-back:hover { color: var(--gold); }
.breadcrumb span { color: var(--text-muted); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--gold); }

.detail-grid { display: grid; grid-template-columns: 1fr 420px; gap: 40px; align-items: start; }

.main-img-wrap {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); aspect-ratio: 4/3;
}
.main-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.no-photo {
  aspect-ratio: 4/3; background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: var(--radius); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px; color: var(--text-muted); font-size: 40px;
}
.no-photo span { font-size: 15px; }
.thumbs { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.thumb {
  width: 72px; height: 56px; object-fit: cover; border-radius: 8px;
  border: 2px solid var(--border); cursor: pointer; transition: border-color var(--transition);
}
.thumb:hover, .thumb.active { border-color: var(--gold); }

.detail-brand { font-size: 13px; color: var(--gold); font-weight: 600; display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.detail-title { font-family: 'Playfair Display', serif; font-size: 26px; color: var(--dark); line-height: 1.3; margin-bottom: 14px; }
.detail-badges { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; font-size: 13px; color: var(--text-muted); }

.badge-type, .badge-status {
  padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600;
}
.badge-type-sale     { background: #d1fae5; color: #065f46; }
.badge-type-exchange { background: #dbeafe; color: #1e40af; }
.badge-type-both     { background: var(--gold-pale); color: var(--gold); }
.badge-status-active   { background: #d1fae5; color: #065f46; }
.badge-status-sold     { background: #fee2e2; color: #991b1b; }
.badge-status-archived { background: var(--bg-alt); color: var(--text-muted); }

.detail-price {
  font-size: 30px; font-weight: 700; color: var(--dark);
  margin-bottom: 20px; display: flex; align-items: center; gap: 10px;
}
.negotiable-lg { font-size: 14px; color: var(--gold); font-weight: 400; }

.detail-attrs { margin-bottom: 20px; background: var(--bg-alt); border-radius: 10px; overflow: hidden; }
.attr { display: flex; padding: 11px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
.attr:last-child { border-bottom: none; }
.attr-label { width: 160px; flex-shrink: 0; color: var(--text-muted); font-weight: 500; }

.seller-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-alt); border-radius: 12px; padding: 14px;
  margin-bottom: 16px;
}
.seller-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); }
.seller-name { font-weight: 600; color: var(--dark) !important; font-size: 15px; }
.seller-rating { display: flex; align-items: center; gap: 3px; font-size: 13px; color: var(--gold); margin-top: 2px; }
.seller-rating span { color: var(--text-muted); font-size: 12px; margin-left: 4px; }

.msg-form textarea {
  width: 100%; padding: 12px; border: 1px solid var(--border);
  border-radius: 10px; resize: vertical; font-family: inherit;
  font-size: 14px; outline: none; margin-bottom: 10px; color: var(--text);
  transition: border-color var(--transition); background: var(--bg);
}
.msg-form textarea:focus { border-color: var(--gold); }

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

.suggest-collection-banner {
  display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap;
  background: #3a2a00; border: 1px solid var(--gold);
  border-radius: 10px; padding: 12px 16px; margin-bottom: 12px;
  font-size: 13px; color: var(--gold-light); line-height: 1.5;
  animation: banner-pulse 2s ease-in-out infinite;
}
@keyframes banner-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(196,151,58,.0); }
  50%       { box-shadow: 0 0 0 6px rgba(196,151,58,.25); }
}

.fav-btn-lg {
  width: 100%; background: none; border: 1px solid var(--border);
  color: var(--text-muted); padding: 11px; border-radius: 10px;
  font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all var(--transition); margin-top: 8px;
}
.fav-btn-lg:hover, .fav-btn-lg.active {
  border-color: #e53e3e; color: #e53e3e; background: #fff5f5;
}

.detail-desc {
  margin-top: 40px; background: var(--card-bg);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
}
.detail-desc h3 { font-size: 18px; font-weight: 600; margin-bottom: 12px; color: var(--dark); }
.detail-desc p { line-height: 1.8; color: var(--text); white-space: pre-line; }

.similar-section { margin-top: 48px; }

/* Обсуждения на форуме на странице товара */
.detail-forum-section { margin-top: 40px; }
.detail-forum-list {
  border: 1px solid var(--border); border-radius: 12px; overflow-y: auto; overflow-x: hidden;
  max-height: 320px;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) var(--border);
}
.detail-forum-list::-webkit-scrollbar { width: 5px; }
.detail-forum-list::-webkit-scrollbar-track { background: var(--border); border-radius: 4px; }
.detail-forum-list::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 4px; }
.dfl-row {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  text-decoration: none; color: inherit; transition: background var(--transition);
}
.dfl-row + .dfl-row { border-top: 1px solid var(--border); }
.dfl-row:hover { background: var(--bg-alt); }
.dfl-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.dfl-body { flex: 1; min-width: 0; }
.dfl-title { font-weight: 600; font-size: 14px; color: var(--dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dfl-meta { display: flex; align-items: center; gap: 12px; margin-top: 4px; font-size: 12px; color: var(--text-muted); flex-wrap: wrap; }
.dfl-date { margin-left: auto; }
.dfl-arrow { color: var(--text-muted); font-size: 12px; flex-shrink: 0; }

/* ── FORMS ── */
.form-page { padding: 40px 0; max-width: 760px; }
.form-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 16px; padding: 36px;
}
.form-header { margin-bottom: 28px; }
.form-header h1 {
  font-family: 'Playfair Display', serif; font-size: 26px; color: var(--dark);
  display: flex; align-items: center; gap: 10px; margin-bottom: 6px;
}
.form-header p { color: var(--text-muted); font-size: 14px; }

.form-section { margin-bottom: 28px; }
.form-section h3 {
  font-size: 15px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .5px;
  border-bottom: 1px solid var(--border); padding-bottom: 8px; margin-bottom: 18px;
}

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 6px; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border);
  border-radius: 10px; font-family: inherit; font-size: 14px;
  color: var(--text); background: var(--bg); outline: none;
  transition: border-color var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--gold); background: #fff; }
.form-static-value { padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; color: var(--text-muted); background: var(--bg); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Поле цены + выбор валюты */
.price-input-wrap {
  display: flex; gap: 0; border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; background: var(--bg);
  transition: border-color var(--transition);
}
.price-input-wrap:focus-within { border-color: var(--gold); background: #fff; }
.price-input-wrap input {
  flex: 1; border: none !important; background: transparent !important;
  border-radius: 0 !important; outline: none;
  padding: 11px 14px; font-size: 14px; color: var(--text);
  min-width: 0;
}
.currency-select {
  border: none !important; border-left: 1px solid var(--border) !important;
  background: var(--bg-alt) !important; border-radius: 0 !important;
  padding: 0 12px !important; font-size: 13px; font-weight: 600;
  color: var(--text) !important; cursor: pointer; width: auto !important;
  flex-shrink: 0;
}
.currency-select:focus { outline: none; }

/* Бейдж «Бесплатно» в лейбле */
.price-free-badge {
  background: #d4edda; color: #27ae60;
  font-size: 11px; font-weight: 600; border-radius: 20px;
  padding: 2px 8px; margin-left: 4px; vertical-align: middle;
}
.form-check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; margin-bottom: 12px; }
.form-check input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--gold); }
.form-actions { display: flex; align-items: center; gap: 12px; padding-top: 8px; }

/* Image upload */
.upload-area {
  border: 2px dashed var(--border); border-radius: 12px;
  padding: 40px; text-align: center; position: relative; cursor: pointer;
  transition: all var(--transition); color: var(--text-muted);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.upload-area:hover { border-color: var(--gold); background: var(--gold-pale); }
.upload-area i { font-size: 36px; color: var(--gold); }
.upload-area span { font-size: 12px; }
.upload-area input[type=file] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
  width: 100%; height: 100%; border: none; padding: 0;
}
.preview-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.preview-grid img { width: 80px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.preview-item { position: relative; display: inline-block; }
.preview-item img { width: 80px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); display: block; }
.preview-remove {
  position: absolute; top: -6px; right: -6px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #c0392b; color: #fff; border: none; cursor: pointer;
  font-size: 14px; line-height: 1; display: flex; align-items: center; justify-content: center;
  padding: 0;
}
.preview-remove:hover { background: #e74c3c; }

/* ── AUTH ── */
.auth-page { display: flex; justify-content: center; padding: 60px 20px; }
.auth-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 16px; padding: 44px 40px; width: 100%; max-width: 420px;
  text-align: center;
}
.auth-logo { font-size: 40px; color: var(--gold); margin-bottom: 16px; }
.auth-card h1 { font-family: 'Playfair Display', serif; font-size: 26px; color: var(--dark); margin-bottom: 6px; }
.auth-card > p { color: var(--text-muted); font-size: 14px; margin-bottom: 28px; }
.auth-card .form-group { text-align: left; }
.auth-switch { margin-top: 20px; font-size: 14px; color: var(--text-muted); }

/* ── BRANDS GRID ── */
.brands-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; padding: 8px 0 40px; }
.brand-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; color: var(--text) !important;
  transition: all var(--transition);
}
.brand-card:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.brand-card-inner { display: flex; gap: 16px; align-items: flex-start; }
.brand-initial {
  width: 52px; height: 52px; border-radius: 12px;
  background: var(--gold-pale); color: var(--gold);
  font-family: 'Playfair Display', serif; font-size: 24px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.brand-card-info h3 { font-size: 16px; font-weight: 600; color: var(--dark); margin-bottom: 4px; }
.brand-country, .brand-year { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; margin-bottom: 2px; }
.brand-card-info p { font-size: 13px; color: var(--text-muted); margin: 6px 0; line-height: 1.5; }
.brand-count { font-size: 12px; color: var(--gold); font-weight: 500; }

/* Brand hero */
/* Hero баннер категории */
.cat-hero {
  background: linear-gradient(135deg, var(--dark), #2D1F06);
  border-radius: 16px; padding: 28px 32px; margin-bottom: 24px;
  display: flex; align-items: center; gap: 20px; width: 100%;
}
.cat-hero-icon {
  width: 64px; height: 64px; border-radius: 14px; flex-shrink: 0;
  background: rgba(255,255,255,.1); color: var(--gold-light);
  font-size: 28px; display: flex; align-items: center; justify-content: center;
}
.cat-hero-info { flex: 1; min-width: 0; }
.cat-hero-info h1 { font-family: 'Playfair Display', serif; font-size: 26px; color: #fff; margin-bottom: 4px; }
.cat-hero-info p { color: rgba(255,255,255,.65); font-size: 14px; margin-bottom: 8px; }
.cat-hero-meta span { font-size: 13px; color: rgba(255,255,255,.5); display: flex; align-items: center; gap: 5px; }
.cat-hero-btn { margin-left: auto; white-space: nowrap; flex-shrink: 0; }

.brand-hero {
  background: linear-gradient(135deg, var(--dark), #2D1F06);
  border-radius: 16px; padding: 36px; margin-bottom: 24px;
  display: flex; align-items: center; gap: 28px; width: 100%;
}
.brand-hero-initial {
  width: 80px; height: 80px; border-radius: 16px;
  background: rgba(255,255,255,.1); color: var(--gold-light);
  font-family: 'Playfair Display', serif; font-size: 40px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.brand-hero-info { min-width: 0; flex: 1; }
.brand-hero-info h1 { font-family: 'Playfair Display', serif; font-size: 30px; color: #fff; margin-bottom: 8px; word-break: break-word; overflow-wrap: break-word; }
.brand-hero-meta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.brand-hero-meta span { font-size: 14px; color: rgba(255,255,255,.65); display: flex; align-items: center; gap: 5px; word-break: break-word; overflow-wrap: break-word; }
.brand-hero-info p { color: rgba(255,255,255,.7); font-size: 14px; word-break: break-word; overflow-wrap: break-word; }
.brand-hero .btn-primary-sm { margin-left: auto; white-space: nowrap; }
.brand-hero-actions { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; margin-left: auto; }
.brand-hero-actions .btn-primary-sm { width: 100%; justify-content: center; }

/* ── PROFILE ── */
.profile-page { padding: 32px 0; }
.profile-header {
  display: flex; align-items: flex-start; gap: 24px;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 16px; padding: 28px; margin-bottom: 28px;
}
.profile-avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold); flex-shrink: 0; }
.profile-meta { flex: 1; min-width: 0; overflow-wrap: break-word; word-break: break-word; }
.profile-meta h1 { font-family: 'Playfair Display', serif; font-size: 28px; color: var(--dark); margin-bottom: 4px; overflow-wrap: break-word; word-break: break-word; }
.profile-uid { font-family: monospace; font-size: 13px; color: var(--gold); opacity: .7; margin-bottom: 4px; }
.profile-bio { color: var(--text-muted); font-size: 14px; margin: 8px 0; overflow-wrap: break-word; word-break: break-word; }
.profile-stats { display: flex; gap: 28px; margin-top: 12px; }
.stat { display: flex; flex-direction: column; align-items: flex-start; }
.stat span { font-size: 18px; font-weight: 700; color: var(--dark); }
.stat small { font-size: 12px; color: var(--text-muted); }
.profile-actions { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.star-sm { font-size: 12px; }

/* Tabs */
.profile-tabs, .inbox-tabs {
  display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 24px;
}
.tab-btn {
  background: none; border: none; padding: 10px 20px; cursor: pointer;
  font-size: 14px; font-weight: 500; color: var(--text-muted);
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: all var(--transition);
}
.tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); }
.tab-btn:hover { color: var(--gold); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Reviews */
.review-form-wrap {
  background: var(--bg-alt); border-radius: 12px; padding: 20px; margin-bottom: 20px;
}
.review-form-wrap h3 { font-size: 16px; margin-bottom: 12px; color: var(--dark); }
.star-picker { display: flex; gap: 6px; font-size: 24px; color: var(--border); cursor: pointer; margin-bottom: 12px; }
.star-picker .fa-star { transition: color var(--transition); }
.star-picker .filled { color: var(--gold); }
.review-form textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 8px; font-family: inherit; font-size: 14px;
  resize: vertical; outline: none; margin-bottom: 10px; color: var(--text); background: var(--bg);
}
.review-form textarea:focus { border-color: var(--gold); }

.review-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px; margin-bottom: 12px;
}
.review-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.review-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.review-date { font-size: 12px; color: var(--text-muted); flex-shrink: 0; }
.review-body { font-size: 14px; color: var(--text); line-height: 1.6; }
.review-delete-btn {
  background: none; border: none; cursor: pointer; padding: 4px 8px;
  color: var(--text-muted); border-radius: 6px; transition: all var(--transition);
  flex-shrink: 0;
}
.review-delete-btn:hover { color: #e74c3c; background: rgba(231,76,60,.1); }

/* Avatar upload */
.avatar-upload { display: flex; align-items: center; gap: 16px; }
.avatar-preview { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold); }
.avatar-upload input[type=file] { display: none; }

/* ── INBOX ── */
/* Старые стили сообщений (оставляем для совместимости) */
.msg-item {
  display: flex; gap: 14px; padding: 16px;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 12px; margin-bottom: 10px;
}
.msg-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.msg-body { flex: 1; }
.msg-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.msg-head strong { font-size: 14px; }
.msg-head strong a { color: var(--dark) !important; }
.msg-date { margin-left: auto; font-size: 12px; color: var(--text-muted); }
.msg-body p { font-size: 14px; color: var(--text); line-height: 1.5; margin-bottom: 6px; }
.msg-listing-link { font-size: 12px; color: var(--gold); display: flex; align-items: center; gap: 5px; }

/* ── INBOX (список диалогов) ── */
.dialogs-list { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.dialog-row {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px;
  text-decoration: none; color: inherit; background: var(--card-bg);
  transition: background var(--transition); position: relative;
}
.dialog-row + .dialog-row { border-top: 1px solid var(--border); }
.dialog-row:hover { background: var(--bg-alt); }
.dialog-unread { background: color-mix(in srgb, var(--gold) 5%, var(--card-bg)); }
.dialog-avatar-wrap { position: relative; flex-shrink: 0; }
.dialog-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.dialog-unread-dot {
  position: absolute; bottom: 1px; right: 1px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--gold); border: 2px solid var(--card-bg);
}
.dialog-body { flex: 1; min-width: 0; }
.dialog-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.dialog-name { font-weight: 600; font-size: 15px; color: var(--dark); }
.dialog-date { font-size: 11px; color: var(--text-muted); flex-shrink: 0; }
.dialog-listing { font-size: 12px; color: var(--gold); margin-bottom: 3px; display: flex; align-items: center; gap: 4px; }
.dialog-preview { font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dialog-you { color: var(--text); font-weight: 500; }
.dialog-badge {
  background: var(--gold); color: #fff; border-radius: 20px;
  font-size: 11px; font-weight: 700; padding: 2px 7px; flex-shrink: 0;
}

/* ── CONVERSATION (диалог) ── */
.conv-page { display: flex; flex-direction: column; height: calc(100vh - 130px); padding-top: 20px; max-width: 760px; }
.conv-header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: var(--card-bg);
  border: 1px solid var(--border); border-radius: 14px 14px 0 0;
  flex-shrink: 0;
}
.conv-back {
  color: var(--text-muted); font-size: 16px; padding: 6px;
  border-radius: 8px; transition: color var(--transition);
  text-decoration: none; flex-shrink: 0;
}
.conv-back:hover { color: var(--gold); }
.conv-header-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.conv-header-info { flex: 1; min-width: 0; }
.conv-header-name { font-weight: 600; font-size: 15px; color: var(--dark); text-decoration: none; display: block; }
.conv-header-name:hover { color: var(--gold); }
.conv-header-listing { font-size: 12px; color: var(--gold); text-decoration: none; display: flex; align-items: center; gap: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-listing-thumb { flex-shrink: 0; }
.conv-listing-thumb img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }

.conv-messages {
  flex: 1; overflow-y: auto; padding: 20px 16px;
  background: var(--bg); border-left: 1px solid var(--border); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 6px;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.conv-messages::-webkit-scrollbar { width: 4px; }
.conv-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.conv-date-sep { text-align: center; margin: 10px 0; }
.conv-date-sep span { font-size: 11px; color: var(--text-muted); background: var(--bg); padding: 2px 10px; border-radius: 20px; border: 1px solid var(--border); }

.conv-msg { display: flex; align-items: flex-end; gap: 8px; }
.conv-msg-in { justify-content: flex-start; }
.conv-msg-out { justify-content: flex-end; }
.conv-msg-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.conv-msg-bubble {
  max-width: 70%; padding: 10px 14px; border-radius: 18px;
  font-size: 14px; line-height: 1.5; position: relative;
}
.conv-msg-in .conv-msg-bubble {
  background: var(--card-bg); border: 1px solid var(--border);
  border-bottom-left-radius: 4px; color: var(--text);
}
.conv-msg-out .conv-msg-bubble {
  background: var(--gold); color: #fff;
  border-bottom-right-radius: 4px;
}
.conv-msg-bubble p { margin: 0 0 4px; white-space: pre-wrap; word-break: break-word; }
.conv-msg-time { font-size: 10px; opacity: .65; display: block; text-align: right; }

.conv-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text-muted); gap: 8px; }
.conv-empty i { font-size: 40px; color: var(--border); }

.deal-confirm-panel {
  flex-shrink: 0; border-left: 1px solid var(--border); border-right: 1px solid var(--border);
  background: var(--card-bg); padding: 10px 14px;
}
.deal-status-line {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 13px;
}
.deal-done { color: #10b981; }
.deal-pending { color: var(--text-muted); }
.deal-none { color: var(--text-muted); }
.confirm-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 500;
  border: 1px solid var(--border); color: var(--text-muted); background: var(--bg);
}
.confirm-badge.badge-done { border-color: #10b981; color: #10b981; background: rgba(16,185,129,.07); }
.btn-confirm-deal {
  padding: 6px 16px; border-radius: 20px; border: 1px solid var(--gold);
  background: transparent; color: var(--gold); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all var(--transition); white-space: nowrap;
}
.btn-confirm-deal:hover { background: var(--gold); color: #fff; }
.btn-leave-review {
  padding: 6px 16px; border-radius: 20px; background: var(--gold); color: #fff;
  font-size: 13px; font-weight: 600; text-decoration: none;
  transition: background var(--transition); white-space: nowrap;
}
.btn-leave-review:hover { background: var(--gold-light); color: #fff; }

.conv-input-wrap {
  flex-shrink: 0; border: 1px solid var(--border); border-top: none;
  border-radius: 0 0 14px 14px; background: var(--card-bg); padding: 12px;
}
.conv-form { display: flex; align-items: flex-end; gap: 10px; }
.conv-form textarea {
  flex: 1; resize: none; border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 14px; font-size: 14px; font-family: inherit; color: var(--text);
  background: var(--bg); outline: none; transition: border-color var(--transition);
  min-height: 42px; max-height: 120px; line-height: 1.5;
}
.conv-form textarea:focus { border-color: var(--gold); }
.conv-send-btn {
  background: var(--gold); color: #fff; border: none; border-radius: 50%;
  width: 42px; height: 42px; flex-shrink: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
  transition: background var(--transition);
}
.conv-send-btn:hover { background: var(--gold-light); }

@media (max-width: 768px) {
  .conv-page { height: calc(100vh - 100px); padding-top: 12px; }
  .conv-msg-bubble { max-width: 85%; }
}

@media (max-width: 600px) {
  .conv-page { height: calc(100vh - 64px); padding-top: 8px; }
  .conv-msg-bubble { max-width: 92%; font-size: 13px; }
  .conv-header { padding: 10px 12px; gap: 10px; }
  .conv-listing-thumb img { width: 36px; height: 36px; }
  .deal-status-line { font-size: 12px; gap: 8px; }
  .btn-confirm-deal { font-size: 12px; padding: 5px 12px; }
}

/* ── NEWS (главная) ── */
.news-preview-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.news-preview-card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 14px;
  padding: 20px; display: flex; flex-direction: column; gap: 10px;
  transition: border-color var(--transition);
}
.news-preview-card:hover { border-color: var(--gold); }
.news-preview-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.news-preview-head h3 { font-size: 15px; font-weight: 600; color: var(--dark); margin: 0; }
.news-preview-date { font-size: 11px; color: var(--text-muted); flex-shrink: 0; margin-top: 2px; }
.news-preview-card p { font-size: 13px; color: var(--text); line-height: 1.6; flex: 1; }
.news-preview-more { font-size: 12px; color: var(--gold); text-decoration: none; font-weight: 500; align-self: flex-start; }
.news-preview-more:hover { text-decoration: underline; }

/* ── NEWS (страница) ── */
.news-list { display: flex; flex-direction: column; gap: 20px; max-width: 800px; margin: 0 auto; }
.news-card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 14px; padding: 24px;
}
.news-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.news-card-head h2 { font-size: 18px; font-weight: 700; color: var(--dark); margin: 0; }
.news-date { font-size: 12px; color: var(--text-muted); flex-shrink: 0; display: flex; align-items: center; gap: 5px; }
.news-card-body { font-size: 14px; color: var(--text); line-height: 1.8; white-space: pre-wrap; }

/* ── BRAND COLLECTIONS (card style) ── */
.brand-collections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.brand-col-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow .2s, border-color .2s, transform .2s;
}
.brand-col-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: var(--gold); }

.brand-col-img-wrap {
  position: relative; aspect-ratio: 4/3;
  overflow: hidden; cursor: pointer;
}
.brand-col-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.brand-col-card:hover .brand-col-img-wrap img { transform: scale(1.05); }
.brand-col-no-photo {
  width: 100%; height: 100%; background: #1a1208;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #3a2e1a; font-size: 40px;
}
.brand-col-year {
  position: absolute; top: 10px; left: 10px;
  font-size: 11px; font-weight: 600; background: rgba(15,10,4,.85); color: var(--gold-light);
  padding: 3px 10px; border-radius: 20px; backdrop-filter: blur(4px);
}

.brand-col-body { padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.brand-col-name { font-size: 15px; font-weight: 600; color: var(--gold); line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-col-desc { font-size: 13px; color: var(--text); line-height: 1.6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-col-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border);
}
.brand-col-count { font-size: 12px; color: #888; display: flex; align-items: center; gap: 5px; }
.brand-col-toggle {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--gold); background: none; border: none;
  cursor: pointer; font-weight: 600; padding: 0;
}
.brand-col-toggle i { transition: transform .2s; }

.brand-col-items-panel {
  border-top: 1px solid var(--border);
  background: #0f0a04;
}

/* Сетка вещей (используется и внутри коллекции, и для "без коллекции") */
.brand-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  padding: 16px 20px;
}

.brand-item-card {
  background: #1a1208; border: 1px solid #2a1f00; border-radius: 10px;
  overflow: hidden; display: flex; flex-direction: column;
  transition: border-color .15s, box-shadow .15s;
}
.brand-item-card:hover { border-color: var(--gold); box-shadow: 0 4px 18px rgba(0,0,0,.4); }

.brand-item-img-wrap {
  position: relative; aspect-ratio: 1/1; overflow: hidden; cursor: pointer;
}
.brand-item-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.brand-item-card:hover .brand-item-img-wrap img { transform: scale(1.06); }
.brand-item-no-photo {
  width: 100%; height: 100%; background: #100c04;
  display: flex; align-items: center; justify-content: center;
  color: #2a1f00; font-size: 28px;
}
.brand-item-sale-badge {
  position: absolute; bottom: 8px; left: 8px;
  font-size: 10px; font-weight: 600; background: rgba(20,46,20,.92); color: #2ecc71;
  padding: 2px 8px; border-radius: 20px;
}

.brand-item-body { padding: 10px 12px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.brand-item-name { font-size: 13px; font-weight: 600; color: var(--gold); line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-item-desc { font-size: 12px; color: var(--text); line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-item-card .brand-item-name { color: var(--gold-light); }
.brand-item-card .brand-item-desc { color: #ccc; }
.brand-item-toggle {
  margin-top: auto; padding-top: 8px;
  font-size: 12px; color: var(--gold); background: none; border: none;
  cursor: pointer; font-weight: 600; text-align: left; padding-left: 0;
  display: flex; align-items: center; gap: 5px;
}
.brand-item-toggle i { transition: transform .2s; }

.brand-item-listings-panel { border-top: 1px solid #2a1f00; padding: 8px 12px 10px; }
.brand-item-listing-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 0; text-decoration: none; border-bottom: 1px solid #1a1208;
  transition: color .15s;
}
.brand-item-listing-row:last-child { border-bottom: none; }
.brand-item-listing-row:hover span { color: var(--gold-light); }
.brand-item-listing-row span:first-child { font-size: 12px; color: #ccc; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-item-listing-price { font-size: 12px; color: var(--gold-light); font-weight: 600; flex-shrink: 0; }

/* ── FEEDBACK CTA (главная) ── */
.feedback-cta-section { padding: 0 0 32px; }
.feedback-cta {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px;
  padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.feedback-cta-text { display: flex; align-items: center; gap: 16px; }
.feedback-cta-text > i { font-size: 28px; color: var(--gold); flex-shrink: 0; }
.feedback-cta-text h3 { font-size: 16px; font-weight: 600; color: var(--dark); margin: 0 0 4px; }
.feedback-cta-text p { font-size: 13px; color: var(--text-muted); margin: 0; }

/* ── FEEDBACK PAGE ── */
.feedback-page { max-width: 900px; margin: 0 auto 60px; }
.feedback-grid { display: grid; grid-template-columns: 1fr 320px; gap: 28px; }
.feedback-form-wrap {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 14px; padding: 28px;
}
.feedback-info { display: flex; flex-direction: column; gap: 16px; }
.feedback-info-card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 14px; padding: 20px;
}
.feedback-info-card > i { font-size: 24px; color: var(--gold); margin-bottom: 10px; display: block; }
.feedback-info-card h3 { font-size: 14px; font-weight: 700; color: var(--dark); margin-bottom: 10px; }
.feedback-info-card ul { padding-left: 16px; display: flex; flex-direction: column; gap: 6px; }
.feedback-info-card ul li { font-size: 13px; color: var(--text); line-height: 1.5; }
.feedback-info-card p { font-size: 13px; color: var(--text); line-height: 1.6; }
.feedback-warning-card { border-color: color-mix(in srgb, #e67e22 30%, var(--border)); }
.feedback-warning-card > i { color: #e67e22; }
.feedback-terms-link { font-size: 12px; color: var(--gold); text-decoration: none; margin-top: 8px; display: inline-block; }
.feedback-terms-link:hover { text-decoration: underline; }

/* ── YEAR PICKER ── */
/* Сброс глобальных .form-group переопределений для элементов внутри пикера */
.form-group .year-picker-wrap .year-picker-era,
.filter-group .year-picker-wrap .year-picker-era {
  width: 80px !important; border-radius: var(--radius-sm,8px) 0 0 var(--radius-sm,8px) !important;
  border-right: none !important; padding: 0 6px !important; height: 42px !important;
}
.form-group .year-picker-wrap .year-picker-num,
.filter-group .year-picker-wrap .year-picker-num {
  width: auto !important; border-radius: 0 var(--radius-sm,8px) var(--radius-sm,8px) 0 !important;
  padding: 0 10px !important; height: 42px !important; margin: 0 !important;
}

.year-picker-wrap {
  display: flex; align-items: stretch; gap: 0; width: 100%;
}
.year-picker-era {
  flex-shrink: 0; width: 80px;
  border-radius: var(--radius-sm, 8px) 0 0 var(--radius-sm, 8px);
  border-right: none !important;
  font-size: 13px; padding: 0 6px;
  height: 42px; box-sizing: border-box;
}
.year-picker-num {
  flex: 1; min-width: 0;
  border-radius: 0 var(--radius-sm, 8px) var(--radius-sm, 8px) 0 !important;
  margin: 0 !important;
  height: 42px; box-sizing: border-box; padding: 0 10px;
}

/* Два year-picker рядом (форма предложения коллекции) */
.year-range-wrap {
  display: flex; align-items: center; gap: 8px;
}
.year-range-item {
  flex: 1; min-width: 0;
}
.year-range-sep {
  flex-shrink: 0; color: var(--text-muted); line-height: 1;
}
.year-range-error {
  color: #e74c3c; font-size: 13px; margin-top: 6px;
  padding: 6px 10px; background: rgba(231,76,60,.08);
  border-radius: 6px; border-left: 3px solid #e74c3c;
}
.year-picker-err {
  color: #e74c3c; font-size: 12px; margin-top: 4px; min-height: 0;
}

/* Зона загрузки фото в форме обратной связи */
.feedback-upload-area {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 20px; border: 2px dashed var(--border); border-radius: 10px;
  cursor: pointer; transition: border-color var(--transition), background var(--transition);
  text-align: center;
}
.feedback-upload-area:hover, .feedback-upload-area.drag-over {
  border-color: var(--gold); background: color-mix(in srgb, var(--gold) 4%, var(--bg));
}
.feedback-upload-area i { font-size: 28px; color: var(--text-muted); }
.feedback-upload-area span { font-size: 13px; color: var(--text-muted); }
.feedback-upload-sub { font-size: 11px !important; color: var(--border) !important; }
.feedback-preview-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.feedback-preview-item { position: relative; display: inline-block; }
.feedback-preview-item img {
  width: 72px; height: 72px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--border); display: block;
}

@media (max-width: 768px) {
  .feedback-grid { grid-template-columns: 1fr; }
  .feedback-cta { flex-direction: column; align-items: flex-start; }
  .news-preview-list { grid-template-columns: 1fr; }
}

/* ── TERMS CHECKBOX ── */
.terms-checkbox-wrap { margin-bottom: 4px; }
.terms-checkbox-label {
  display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
  font-size: 13px; color: var(--text-muted); line-height: 1.5;
}
.terms-checkbox-label input[type="checkbox"] {
  width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; cursor: pointer;
  accent-color: var(--gold);
}
.terms-checkbox-label a { color: var(--gold); text-decoration: underline; }
.terms-checkbox-label a:hover { color: var(--gold-light); }

/* ── TERMS PAGE ── */
.terms-page { max-width: 800px; margin: 40px auto 60px; }
.terms-header {
  text-align: center; padding: 40px 20px 32px; margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.terms-header i { font-size: 40px; color: var(--gold); margin-bottom: 16px; display: block; }
.terms-header h1 { font-size: 28px; color: var(--dark); margin-bottom: 8px; }
.terms-header p { font-size: 13px; color: var(--text-muted); }

.terms-body { display: flex; flex-direction: column; gap: 0; }
.terms-section {
  padding: 24px 0; border-bottom: 1px solid var(--border);
}
.terms-section:last-child { border-bottom: none; }
.terms-section h2 {
  font-size: 17px; font-weight: 700; color: var(--dark); margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.terms-section h2 i { color: var(--gold); }
.terms-section p { font-size: 14px; color: var(--text); line-height: 1.7; margin-bottom: 10px; }
.terms-section p:last-child { margin-bottom: 0; }
.terms-section ul {
  margin: 8px 0 12px 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px;
}
.terms-section ul li { font-size: 14px; color: var(--text); line-height: 1.6; }
.terms-section-warning {
  background: color-mix(in srgb, #e67e22 6%, var(--bg));
  border-radius: 12px; padding: 20px 24px; margin: 4px 0;
  border: 1px solid color-mix(in srgb, #e67e22 25%, var(--border));
  border-bottom: 1px solid color-mix(in srgb, #e67e22 25%, var(--border)) !important;
}
.terms-section-warning h2 { color: #c0392b; }
.terms-section-warning h2 i { color: #e67e22; }

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center; padding: 60px 20px; color: var(--text-muted);
}
.empty-state i { font-size: 48px; color: var(--border); margin-bottom: 16px; display: block; }
.empty-state h2 { font-size: 20px; color: var(--dark); margin-bottom: 8px; }
.empty-state p { font-size: 14px; margin-bottom: 20px; }

/* ── ERROR PAGES ── */
.error-page {
  display: flex; justify-content: center; align-items: center;
  min-height: 60vh; padding: 60px 20px;
}
.error-box {
  text-align: center; max-width: 480px;
}
.error-num {
  font-family: 'Playfair Display', serif;
  font-size: 120px; font-weight: 700; line-height: 1;
  color: var(--border); letter-spacing: -4px; margin-bottom: -10px;
}
.error-icon {
  font-size: 48px; color: var(--gold); margin-bottom: 20px;
}
.error-box h1 {
  font-family: 'Playfair Display', serif; font-size: 26px;
  color: var(--dark); margin-bottom: 12px;
}
.error-box p {
  color: var(--text-muted); font-size: 15px; line-height: 1.6; margin-bottom: 28px;
}
.error-actions {
  display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 28px;
}
.error-suggestions {
  display: flex; align-items: center; gap: 12px; justify-content: center;
  flex-wrap: wrap; font-size: 13px; color: var(--text-muted);
  border-top: 1px solid var(--border); padding-top: 20px;
}
.error-suggestions a {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--text-muted); padding: 5px 10px; border-radius: 6px;
  transition: all var(--transition);
}
.error-suggestions a:hover { color: var(--gold); background: var(--gold-pale); }

/* ── FOOTER ── */
.footer { background: var(--dark); color: rgba(255,255,255,.65); margin-top: auto; }
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 48px 20px 32px;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px;
}
.footer-brand a {
  font-family: 'Playfair Display', serif; font-size: 20px;
  color: var(--gold-light) !important; display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.footer-brand p { font-size: 13px; }
.footer-links h4 { color: #fff; font-size: 14px; margin-bottom: 12px; }
.footer-links a { display: block; font-size: 13px; margin-bottom: 7px; color: rgba(255,255,255,.6) !important; }
.footer-links a:hover { color: var(--gold-light) !important; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 16px 20px; max-width: 1200px; margin: 0 auto;
  font-size: 12px; color: rgba(255,255,255,.4);
}

/* ══════════════════════════════════════════
   BURGER / MOBILE MENU
══════════════════════════════════════════ */
/* ── Бургер-кнопка ── */
.nav-burger {
  display: none; /* показывается только на мобильных через media query */
  flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 40px; height: 40px; padding: 4px;
  background: none; border: none; cursor: pointer; flex-shrink: 0; z-index: 201;
  margin-left: auto; /* прижимаем к правому краю */
}
.nav-burger span {
  display: block; width: 22px; height: 2px;
  background: rgba(255,255,255,.9); border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease, width .25s ease;
  transform-origin: center;
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; width: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Мобильное меню ── */
/* Всегда в DOM, прячется через transform + visibility (НЕ display:none — иначе анимация не работает) */
.mobile-menu {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: var(--dark); z-index: 200;
  overflow-y: auto;
  /* Шапка navbar высотой 64px + cat-bar ~38px = ~102px */
  padding: 102px 0 40px;
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform .25s ease, opacity .25s ease, visibility .25s;
}
.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
body.menu-open { overflow: hidden; }

/* ── Поиск внутри мобильного меню ── */
.mobile-search {
  display: flex; margin: 0 16px 12px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2);
  border-radius: 10px; overflow: hidden;
}
.mobile-search input {
  flex: 1; background: transparent; border: none; outline: none;
  color: #fff; padding: 13px 16px; font-size: 15px;
}
.mobile-search input::placeholder { color: rgba(255,255,255,.4); }
.mobile-search button {
  background: var(--gold); border: none; color: #fff;
  padding: 0 18px; cursor: pointer; font-size: 15px; flex-shrink: 0;
}
.mobile-search button:active { background: var(--gold-light); }

/* ── Ссылки внутри мобильного меню ── */
.mobile-nav-links { display: flex; flex-direction: column; }
.mobile-nav-links a {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 20px; color: rgba(255,255,255,.85) !important;
  font-size: 16px; font-weight: 400;
  border-bottom: 1px solid rgba(255,255,255,.07);
  transition: background .15s, color .15s;
  text-decoration: none;
}
.mobile-nav-links a:active { background: rgba(255,255,255,.08); }
.mobile-nav-links a i {
  width: 22px; text-align: center;
  color: var(--gold); font-size: 15px; flex-shrink: 0;
}
.mobile-divider { height: 1px; background: rgba(255,255,255,.15); margin: 6px 0; }

/* Подпункты (разделы форума) в мобильном меню */
.mobile-sub-link {
  padding-left: 36px !important;
  font-size: 14px !important;
  color: rgba(255,255,255,.65) !important;
  border-bottom-color: rgba(255,255,255,.04) !important;
}
.mobile-sub-link i { color: rgba(200,160,60,.75) !important; }

/* Заголовок-раздел (кликабелен, но визуально выделен) */
.mobile-section-header { font-weight: 600 !important; }
.mobile-badge {
  margin-left: auto; background: #e53e3e; color: #fff;
  border-radius: 20px; font-size: 11px; font-weight: 700;
  padding: 2px 8px; min-width: 22px; text-align: center; flex-shrink: 0;
}

/* ══════════════════════════════════════════
   TABLET  ≤ 1024px
══════════════════════════════════════════ */
@media (max-width: 1024px) {
  .detail-grid { grid-template-columns: 1fr 360px; gap: 28px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; }
  .forum-layout { grid-template-columns: 1fr 240px; }
}

/* ══════════════════════════════════════════
   NAVBAR BURGER  ≤ 1058px — полный переход на бургер
   (cat-bar начинает обрезаться именно здесь)
══════════════════════════════════════════ */
@media (max-width: 1058px) {
  .nav-burger  { display: flex; }
  .nav-search  { display: none; }
  .nav-links   { display: none; }
  .navbar-inner { padding: 0 16px; }
  .cat-bar { display: none; }
}

/* ══════════════════════════════════════════
   TABLET/PHABLET  ≤ 900px
══════════════════════════════════════════ */
@media (max-width: 900px) {
  /* Layout */
  .detail-grid { grid-template-columns: 1fr; gap: 24px; }
  .search-page { flex-direction: column; }
  .search-sidebar { width: 100%; position: static; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 24px; }

  /* Brand & Category hero */
  .brand-hero { flex-direction: column; gap: 16px; }
  .brand-hero .btn-primary-sm { margin-left: 0; align-self: flex-start; }
  .cat-hero { flex-direction: column; gap: 14px; padding: 20px; }
  .cat-hero-btn { margin-left: 0; align-self: flex-start; }

  /* Forum */
  .forum-layout { grid-template-columns: 1fr; }
  .forum-layout:has(.forum-filter-sidebar) { grid-template-columns: 1fr; }
  .forum-filter-sidebar { width: 100%; position: static; }
  .forum-sidebar { position: static; }
  .fs-last { display: none; }

  /* Profile */
  .profile-header { gap: 20px; }
  .profile-actions { flex-direction: row; flex-wrap: wrap; }

  /* CTA */
  .cta-box { padding: 40px 24px; }

  /* Market header на планшете */
  .market-header h1 { font-size: 24px; }
}

/* ══════════════════════════════════════════
   MOBILE  ≤ 600px
══════════════════════════════════════════ */
@media (max-width: 600px) {
  /* Navbar уже переключён на бургер-режим с 760px, здесь только уточнения */

  /* Container padding */
  .container { padding: 0 12px; }

  /* Hero */
  .hero { padding: 40px 16px; }
  .hero p { font-size: 15px; }
  .hero-search { flex-direction: column; border-radius: 12px; }
  .hero-search input { border-radius: 10px 10px 0 0; padding: 14px 16px; }
  .hero-search button { border-radius: 0 0 10px 10px; padding: 13px; justify-content: center; }

  /* Section headings */
  .section { padding: 36px 0; }
  .section-head h2 { font-size: 20px; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 12px; padding: 20px 0 16px; }
  .page-header h1 { font-size: 22px; }

  /* Category grid */
  .cat-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .cat-card { padding: 14px 8px; font-size: 12px; }
  .cat-icon { width: 40px; height: 40px; font-size: 17px; }

  /* Listings */
  .listings-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card-body { padding: 10px; }
  .card-price { font-size: 14px; }
  .card-title { font-size: 13px; }

  /* Brand collections */
  .brand-collections-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .brand-items-grid { grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px 14px; }

  /* Detail page */
  .detail-title { font-size: 20px; }
  .detail-price { font-size: 24px; }
  .attr-label { width: 120px; }
  .thumb { width: 60px; height: 46px; }

  /* Forms */
  .form-page { padding: 20px 0; }
  .form-card { padding: 20px 16px; border-radius: 12px; }
  .form-row { grid-template-columns: 1fr; }
  .form-actions { flex-direction: column; }
  .form-actions .btn-primary-full,
  .form-actions .btn-ghost-full { width: 100%; }
  .form-header h1 { font-size: 20px; }

  /* Auth */
  .auth-page { padding: 32px 16px; }
  .auth-card { padding: 28px 20px; }
  .auth-card h1 { font-size: 22px; }

  /* Profile */
  .profile-header { flex-direction: column; align-items: center; text-align: center; padding: 20px; }
  .profile-meta h1 { font-size: 22px; }
  .profile-stats { justify-content: center; gap: 20px; }
  .profile-actions { flex-direction: row; justify-content: center; flex-wrap: wrap; }
  .tab-btn { padding: 10px 14px; font-size: 13px; }

  /* Inbox */
  .msg-item { gap: 10px; padding: 12px; }
  .msg-avatar { width: 36px; height: 36px; }
  .msg-date { display: none; }

  /* Forum post rows */
  .post-row { gap: 10px; padding: 12px; }
  .post-row-img, .post-row-no-img { width: 60px; height: 46px; }
  .post-row-body h4 { font-size: 14px; }
  .post-row-meta { display: none; }
  .section-page-head { flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px; }
  .section-page-head .btn-primary-sm { margin-left: 0; }
  .sp-icon { width: 44px; height: 44px; font-size: 20px; }
  .posts-toolbar { flex-direction: column; align-items: flex-start; gap: 8px; }
  .sort-links { flex-wrap: wrap; }

  /* Forum post detail */
  .forum-post-card { padding: 16px; }
  .fpc-title { font-size: 20px; }
  .fpc-body { font-size: 15px; }
  .fpc-section-tag { display: none; }
  .fpc-actions { flex-wrap: wrap; gap: 10px; }
  .comment-form { flex-direction: column; }
  .comment-avatar { display: none; }

  /* Brands */
  .brands-grid { grid-template-columns: 1fr; }
  .brand-hero { padding: 20px 16px; }
  .brand-hero-initial { width: 60px; height: 60px; font-size: 28px; }
  .brand-hero-info h1 { font-size: 22px; }

  /* Search results */
  .results-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .results-head h1 { font-size: 20px; }

  /* CTA */
  .cta-box { padding: 32px 16px; border-radius: 12px; }
  .cta-box h2 { font-size: 22px; }

  /* Footer */
  .footer-inner { grid-template-columns: 1fr; gap: 20px; padding: 32px 16px 24px; }
  .footer-bottom { padding: 14px 16px; }

  /* Error pages */
  .error-num { font-size: 80px; }
  .error-box h1 { font-size: 20px; }

  /* Flash */
  .flash-wrap { margin: 10px 0; padding: 0 12px; }
  .flash { font-size: 13px; padding: 10px 12px; }

  /* Market header */
  .market-header { flex-direction: column; align-items: flex-start; gap: 12px; padding: 20px 0 16px; }
  .market-header .btn-primary-lg { align-self: stretch; justify-content: center; font-size: 14px; padding: 11px 20px; }

  /* Forum header */
  .forum-header { flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 20px; }
  .forum-header .btn-primary-sm { align-self: flex-start; }

  /* Brand hero buttons — растягиваем на всю ширину на мобильном */
  .brand-hero .btn-primary-sm,
  .brand-hero .btn-ghost-sm { width: 100%; justify-content: center; }
}

/* ══════════════════════════════════════════
   SMALL MOBILE  ≤ 400px
══════════════════════════════════════════ */
@media (max-width: 400px) {
  .listings-grid { grid-template-columns: 1fr; }
  .brand-collections-grid { grid-template-columns: 1fr; }
  .brand-items-grid { grid-template-columns: 1fr 1fr; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .profile-stats { gap: 14px; }
  .hero-search { gap: 0; }
  .brand-hero-meta { flex-direction: column; gap: 6px; }
  .market-header h1 { font-size: 20px; }
  .market-header .btn-primary-lg { font-size: 13px; padding: 10px 16px; }
  .attr-label { width: 100px; font-size: 12px; }
  .deal-status-line { font-size: 11px; }
  .confirm-badge { font-size: 11px; padding: 2px 8px; }
  .fpc-title { font-size: 18px; }
}

/* ── FORUM ── */
.forum-page { padding: 24px 0 60px; }

.forum-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px;
}
.forum-header h1 {
  font-family: 'Playfair Display', serif; font-size: 30px; color: var(--dark);
  display: flex; align-items: center; gap: 10px; word-break: break-word; overflow-wrap: break-word;
}
.forum-header p { color: var(--text-muted); font-size: 14px; margin-top: 4px; }

.forum-layout { display: grid; grid-template-columns: 1fr 280px; gap: 28px; align-items: flex-start; }
.forum-main { min-width: 0; }

/* Section blocks on forum index */
.forum-section-block {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 16px; overflow: hidden;
  transition: box-shadow var(--transition);
}
.forum-section-block:hover { box-shadow: var(--shadow); }
.fsb-head {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px; border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}
.fsb-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--gold-pale); color: var(--gold); font-size: 20px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.fsb-title { flex: 1; }
.fsb-title a { font-size: 16px; font-weight: 600; color: var(--dark) !important; }
.fsb-title a:hover { color: var(--gold) !important; }
.fsb-title p { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.fsb-stats { font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.fsb-post-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px; border-bottom: 1px solid var(--border);
  color: var(--text) !important; transition: background var(--transition);
}
.fsb-post-row:hover { background: var(--bg-alt); }
.fsb-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.fsb-post-info { flex: 1; min-width: 0; }
.fsb-post-title { font-size: 14px; font-weight: 500; color: var(--dark); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fsb-post-meta { font-size: 12px; color: var(--text-muted); }
.fsb-post-counts { display: flex; gap: 10px; font-size: 12px; color: var(--text-muted); flex-shrink: 0; }
.fsb-empty { padding: 14px 20px; font-size: 13px; color: var(--text-muted); font-style: italic; }
.fsb-more {
  display: block; padding: 10px 20px; font-size: 13px; color: var(--gold);
  border-top: 1px solid var(--border); background: none;
}
.fsb-more:hover { background: var(--bg-alt); }

/* Post rows (used in section page and homepage) */
.posts-list { display: flex; flex-direction: column; gap: 12px; }
.post-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px;
  color: var(--text) !important; transition: all var(--transition);
  position: relative;
}
.post-row:hover { box-shadow: var(--shadow); border-color: var(--gold); }
.post-row-img {
  width: 80px; height: 60px; object-fit: cover; border-radius: 8px; flex-shrink: 0;
}
.post-row-no-img {
  width: 80px; height: 60px; border-radius: 8px; flex-shrink: 0;
  background: var(--bg-alt); display: flex; align-items: center; justify-content: center;
  color: var(--border); font-size: 22px;
}
.post-row-body { flex: 1; min-width: 0; }
.post-row-section { font-size: 11px; color: var(--gold); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.post-row-body h4 {
  font-size: 15px; font-weight: 600; color: var(--dark);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin: 3px 0;
}
.post-row-body p { font-size: 13px; color: var(--text-muted); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-row-meta {
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
  font-size: 12px; color: var(--text-muted); flex-shrink: 0; white-space: nowrap;
}
.post-row-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.post-date { font-size: 11px; color: var(--border); }
.pin-badge {
  position: absolute; top: 10px; right: 10px;
  color: var(--gold); font-size: 12px;
}

/* Section page header */
.section-page-head {
  display: flex; align-items: center; gap: 16px;
  background: linear-gradient(135deg, var(--dark), #2D1F06);
  border-radius: 14px; padding: 24px; margin-bottom: 24px;
}
.sp-icon {
  width: 56px; height: 56px; border-radius: 12px;
  background: rgba(255,255,255,.1); color: var(--gold-light); font-size: 26px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.section-page-head h1 { font-family: 'Playfair Display', serif; font-size: 24px; color: #fff; word-break: break-word; overflow-wrap: break-word; }
.section-page-head p { font-size: 13px; color: rgba(255,255,255,.65); margin-top: 4px; word-break: break-word; overflow-wrap: break-word; }
.section-page-head .btn-primary-sm { margin-left: auto; flex-shrink: 0; }

.posts-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; font-size: 14px; color: var(--text-muted);
}
.sort-links { display: flex; gap: 4px; }
.sort-links a {
  padding: 5px 12px; border-radius: 6px; font-size: 13px; color: var(--text-muted);
  transition: all var(--transition);
}
.sort-links a:hover, .sort-links a.active {
  background: var(--gold-pale); color: var(--gold);
}

/* Forum post detail */
.forum-post-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; margin-bottom: 24px;
}
.fpc-author {
  display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
}
.fpc-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); }
.fpc-username { font-weight: 600; color: var(--dark) !important; font-size: 15px; display: block; }
.fpc-date { font-size: 12px; color: var(--text-muted); }
.fpc-section-tag {
  margin-left: auto; background: var(--gold-pale); color: var(--gold);
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 20px;
}
.fpc-title { font-family: 'Playfair Display', serif; font-size: 26px; color: var(--dark); margin-bottom: 20px; line-height: 1.3; word-break: break-word; overflow-wrap: break-word; }
.fpc-gallery { margin-bottom: 20px; }
.fpc-main-img { width: 100%; max-height: 500px; object-fit: contain; border-radius: 10px; background: var(--bg-alt); }
.fpc-body { font-size: 16px; line-height: 1.8; color: var(--text); white-space: pre-line; }

/* Прикреплённый товар в посте */
.fpc-linked-listing {
  margin-top: 24px; border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden; background: var(--bg-alt);
}
.fll-label {
  padding: 8px 14px; font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .5px; color: var(--text-muted); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 6px;
}
.fll-card {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px;
  text-decoration: none; color: inherit; transition: background var(--transition);
}
.fll-card:hover { background: var(--bg); }
.fll-img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.fll-info { flex: 1; min-width: 0; }
.fll-title { font-weight: 600; font-size: 15px; color: var(--dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fll-meta { margin-top: 4px; font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.fll-sep { color: var(--border); }
.fll-sold { background: #f8d7da; color: #c0392b; border-radius: 20px; padding: 1px 8px; font-size: 11px; font-weight: 600; }
.fll-arrow { color: var(--text-muted); flex-shrink: 0; }

/* Кнопка «Обсудить» на странице товара */
.btn-discuss-full {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 12px; margin-top: 10px;
  background: transparent; border: 1px solid var(--gold);
  color: var(--gold); border-radius: 10px; font-size: 15px; font-weight: 500;
  text-decoration: none; transition: background var(--transition), color var(--transition);
}
.btn-discuss-full:hover { background: var(--gold); color: #fff; }

/* Сетка своих лотов в форме нового поста */
.my-listings-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px;
  max-height: 280px; overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) var(--border);
}
.my-listings-grid::-webkit-scrollbar { width: 5px; }
.my-listings-grid::-webkit-scrollbar-track { background: var(--border); border-radius: 4px; }
.my-listings-grid::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 4px; }
.my-listing-option { cursor: pointer; }
.my-listing-option .lot-radio { display: none; }
.mlo-img-wrap {
  position: relative; border-radius: 10px; overflow: hidden;
  border: 2px solid var(--border); transition: border-color var(--transition);
}
.my-listing-option:hover .mlo-img-wrap { border-color: var(--gold); }
.lot-radio:checked + .mlo-img-wrap { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(184,134,11,.25); }
.mlo-img { width: 100%; height: 110px; object-fit: cover; display: block; }
.mlo-no-img {
  height: 110px; display: flex; align-items: center; justify-content: center;
  background: var(--bg-alt); color: var(--text-muted); font-size: 22px;
}
.mlo-check {
  position: absolute; top: 6px; right: 6px;
  background: var(--gold); color: #fff; border-radius: 50%;
  width: 22px; height: 22px; display: none;
  align-items: center; justify-content: center; font-size: 11px;
}
.lot-radio:checked + .mlo-img-wrap .mlo-check { display: flex; }
.mlo-info { padding: 6px 2px 2px; }
.mlo-title { font-size: 13px; font-weight: 600; color: var(--dark); line-height: 1.3; }
.mlo-price { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

/* Карточка обсуждаемого (чужого) товара в форме */
.discuss-listing-card {
  border: 1px solid var(--gold); border-radius: 12px; overflow: hidden; background: var(--bg-alt);
}

/* Подсказка «нет лотов» */
.no-lots-hint { font-size: 14px; color: var(--text-muted); }
.no-lots-hint a { color: var(--gold); }

/* Поиск товара в форме нового поста (старые стили, оставляем для совместимости) */
.listing-attach-wrap { position: relative; }
.listing-search-row {
  display: flex; gap: 0; border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; background: var(--bg);
  transition: border-color var(--transition);
}
.listing-search-row:focus-within { border-color: var(--gold); }
.listing-search-row input {
  flex: 1; border: none !important; background: transparent !important;
  border-radius: 0 !important; outline: none;
  padding: 11px 14px; font-size: 14px; color: var(--text); min-width: 0;
}
.listing-clear-btn {
  border: none; background: transparent; cursor: pointer; padding: 0 14px;
  color: var(--text-muted); display: flex; align-items: center; font-size: 16px;
  border-left: 1px solid var(--border);
  transition: color var(--transition);
}
.listing-clear-btn:hover { color: #e53e3e; }

.listing-search-results {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.10); z-index: 200; overflow: hidden;
}
.lsr-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  cursor: pointer; transition: background var(--transition);
}
.lsr-item:hover { background: var(--bg-alt); }
.lsr-item + .lsr-item { border-top: 1px solid var(--border); }
.lsr-img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.lsr-title { font-weight: 600; font-size: 14px; color: var(--dark); }
.lsr-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.lsr-empty { padding: 14px; text-align: center; font-size: 14px; color: var(--text-muted); }

.listing-attached { margin-top: 10px; border: 1px solid var(--gold); border-radius: 10px; overflow: hidden; background: var(--bg-alt); }
.listing-attached-card {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
}
.lac-img { width: 52px; height: 52px; object-fit: cover; border-radius: 7px; flex-shrink: 0; }
.lac-title { font-weight: 600; font-size: 14px; color: var(--dark); }
.lac-meta { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

.fpc-actions {
  display: flex; align-items: center; gap: 16px;
  margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border);
}
.fpc-stat { font-size: 14px; color: var(--text-muted); display: flex; align-items: center; gap: 5px; }

.like-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 16px; font-size: 14px; cursor: pointer;
  color: var(--text-muted); transition: all var(--transition);
}
.like-btn:hover, .like-btn.active { background: #fff0f0; border-color: #e53e3e; color: #e53e3e; }
.btn-danger-sm {
  background: none; border: 1px solid #e53e3e; color: #e53e3e;
  border-radius: 8px; padding: 7px 14px; font-size: 13px; cursor: pointer;
  display: flex; align-items: center; gap: 5px; transition: all var(--transition);
}
.btn-danger-sm:hover { background: #e53e3e; color: #fff; }

/* Comments */
.comments-section { margin-top: 8px; }
.comments-section h3 { font-size: 18px; font-weight: 600; color: var(--dark); margin-bottom: 18px; }
.comment-card {
  display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border);
}
.comment-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.comment-body { flex: 1; }
.comment-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.comment-head a { font-weight: 600; font-size: 14px; color: var(--dark) !important; }
.comment-head span { font-size: 12px; color: var(--text-muted); }
.comment-body p { font-size: 14px; line-height: 1.6; color: var(--text); white-space: pre-line; }
.no-comments { padding: 20px 0; font-size: 14px; color: var(--text-muted); text-align: center; }
.comment-form {
  display: flex; gap: 12px; margin-top: 20px; align-items: flex-start;
}
.comment-input-wrap { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.comment-input-wrap textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 10px; font-family: inherit; font-size: 14px; resize: vertical;
  outline: none; color: var(--text); background: var(--bg); min-height: 80px;
}
.comment-input-wrap textarea:focus { border-color: var(--gold); }
.comment-input-wrap .btn-primary-sm { align-self: flex-end; }
.login-prompt {
  margin-top: 20px; padding: 16px; background: var(--bg-alt);
  border-radius: 10px; text-align: center; font-size: 14px; color: var(--text-muted);
}

/* ── COMMENT REPLIES ── */
.reply-toggle-btn {
  margin-left: auto; background: none; border: none; cursor: pointer;
  font-size: 12px; color: var(--gold); padding: 2px 6px; border-radius: 6px;
  transition: background var(--transition); display: flex; align-items: center; gap: 4px;
}
.reply-toggle-btn:hover { background: color-mix(in srgb, var(--gold) 10%, transparent); }

.reply-form-wrap { margin-top: 10px; }
.reply-form {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--bg-alt); border-radius: 10px; padding: 10px;
}
.reply-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; margin-top: 2px; }
.reply-input-wrap { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.reply-input-wrap textarea {
  width: 100%; padding: 8px 12px; border: 1px solid var(--border);
  border-radius: 8px; font-family: inherit; font-size: 13px; resize: none;
  outline: none; color: var(--text); background: var(--bg); min-height: 60px;
}
.reply-input-wrap textarea:focus { border-color: var(--gold); }
.reply-actions { display: flex; justify-content: flex-end; gap: 8px; align-items: center; }
.btn-cancel-reply {
  background: none; border: 1px solid var(--border); border-radius: 8px;
  padding: 5px 12px; font-size: 13px; color: var(--text-muted); cursor: pointer;
  transition: border-color var(--transition);
}
.btn-cancel-reply:hover { border-color: var(--gold); color: var(--gold); }

.replies-wrap { margin-top: 10px; }
.replies-toggle-btn {
  background: none; border: none; cursor: pointer; font-size: 12px;
  color: var(--text-muted); padding: 4px 0; display: flex; align-items: center;
  gap: 6px; transition: color var(--transition);
}
.replies-toggle-btn:hover { color: var(--gold); }
.replies-toggle-btn .replies-icon { font-size: 11px; }

.replies-list {
  margin-top: 8px;
  border-left: 2px solid var(--border);
  padding-left: 14px;
  display: flex; flex-direction: column;
}
.reply-card {
  display: flex; gap: 10px; padding: 10px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
}
.reply-card:last-child { border-bottom: none; }
.reply-card .comment-head span { font-size: 11px; }

.reply-mention { color: var(--gold); font-weight: 600; text-decoration: none; }
.reply-mention:hover { text-decoration: underline; }

.reply-to-label { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; display: none; }
.reply-to-label span { color: var(--gold); font-weight: 500; }

/* ── COMMENT ACTIONS (edit / delete) ── */
.comment-actions-wrap { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.comment-action-btn {
  background: none; border: none; cursor: pointer; padding: 3px 7px;
  border-radius: 6px; font-size: 12px; color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
  display: flex; align-items: center; gap: 4px;
}
.comment-action-btn:hover { background: var(--bg-alt); color: var(--dark); }
.comment-delete-btn:hover { color: #e74c3c; background: rgba(231,76,60,.08); }
.inline-form { display: inline; margin: 0; padding: 0; }

.comment-edited { font-size: 11px; color: var(--text-muted); font-style: italic; }

.edit-form-wrap { margin-top: 8px; }

.comment-deleted-label {
  font-size: 13px; color: var(--text-muted); font-style: italic;
  display: flex; align-items: center; gap: 6px; padding: 4px 0;
}
.comment-deleted-label i { color: var(--border); }
.comment-card-deleted { opacity: .7; }

/* Sidebar */
.forum-sidebar { position: sticky; top: 120px; display: flex; flex-direction: column; gap: 16px; }
.sidebar-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
}
.sidebar-card h3 { font-size: 15px; font-weight: 600; color: var(--dark); margin-bottom: 14px; }
.sidebar-card p { font-size: 13px; color: var(--text-muted); }
.sidebar-post {
  display: flex; flex-direction: column; padding: 8px 0;
  border-bottom: 1px solid var(--border); color: var(--text) !important;
}
.sidebar-post:last-child { border-bottom: none; }
.sidebar-post:hover .sidebar-post-title { color: var(--gold); }
.sidebar-post-title { font-size: 13px; font-weight: 500; color: var(--dark); }
.sidebar-post-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.sidebar-section-link {
  display: flex; align-items: center; gap: 8px; padding: 8px 0;
  font-size: 13px; color: var(--text) !important; border-bottom: 1px solid var(--border);
  transition: color var(--transition);
}
.sidebar-section-link:last-child { border-bottom: none; }
.sidebar-section-link:hover, .sidebar-section-link.active { color: var(--gold) !important; }
.sidebar-section-link span { margin-left: auto; font-size: 12px; color: var(--text-muted); }

/* Homepage forum sections grid */
.forum-sections-grid { display: flex; flex-direction: column; gap: 12px; }
.forum-section-card {
  display: flex; align-items: flex-start; gap: 16px;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; color: var(--text) !important;
  transition: all var(--transition);
}
.forum-section-card:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.fs-icon {
  width: 48px; height: 48px; border-radius: 10px;
  background: var(--gold-pale); color: var(--gold); font-size: 22px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.fs-info { flex: 1; }
.fs-info h3 { font-size: 16px; font-weight: 600; color: var(--dark); margin-bottom: 4px; }
.fs-info p { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.fs-count { font-size: 12px; color: var(--gold); margin-top: 6px; display: block; }
.fs-last { font-size: 12px; color: var(--text-muted); text-align: right; flex-shrink: 0; max-width: 180px; }
.fs-last span { display: block; margin-bottom: 2px; }
.fs-last strong { display: block; color: var(--dark); font-size: 13px; }
.fs-last small { color: var(--gold); }

.section-sub { color: var(--text-muted); font-size: 14px; margin-bottom: 20px; margin-top: -12px; }

/* Hero buttons */
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-outline-lg {
  background: transparent; color: rgba(255,255,255,.9) !important; font-size: 16px; font-weight: 500;
  padding: 13px 28px; border-radius: 10px; border: 1px solid rgba(255,255,255,.4);
  display: inline-flex; align-items: center; gap: 8px; transition: all var(--transition);
}
.btn-outline-lg:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.7); }

/* Navbar secondary links */
.nav-link-main { color: rgba(255,255,255,.85) !important; font-size: 14px; white-space: nowrap; }
.nav-link-main:hover { color: #fff !important; }
.cat-bar-sep { color: rgba(255,255,255,.2); padding: 0 4px; }
.cat-bar-section { color: var(--gold-light) !important; font-weight: 500; }
.cat-bar-active {
  color: #fff !important;
  background: rgba(255,255,255,.1);
  border-bottom: 2px solid var(--gold-light);
  font-weight: 500;
}

.preset-section-label {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gold-pale); color: var(--gold);
  font-size: 14px; font-weight: 600;
  padding: 8px 16px; border-radius: 8px; margin-bottom: 20px;
}

/* Market page */
.market-header {
  display: flex; align-items: center; justify-content: space-between; padding: 32px 0 20px;
}
.market-header h1 {
  font-family: 'Playfair Display', serif; font-size: 30px; color: var(--dark);
  display: flex; align-items: center; gap: 10px;
}
.market-header p { color: var(--text-muted); font-size: 14px; margin-top: 4px; }
.market-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 12px; margin-bottom: 8px; }
.market-search-bar {
  display: flex; align-items: center; gap: 12px;
  margin-top: 4px; margin-bottom: 24px;
}
.market-search-full {
  width: 100%; margin-top: 4px; margin-bottom: 24px;
}
.market-search-form {
  flex: 1; display: flex; background: var(--card-bg);
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.market-search-form input {
  flex: 1; padding: 13px 18px; border: none; outline: none;
  font-size: 15px; color: var(--text); background: transparent;
}
.market-search-form button {
  background: var(--gold); color: #fff; border: none; padding: 0 24px;
  font-size: 14px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 6px;
  transition: background var(--transition); white-space: nowrap;
}
.market-search-form button:hover { background: var(--gold-light); }

/* ── FORUM FILTER SIDEBAR ── */
.forum-filter-sidebar {
  width: 260px; flex-shrink: 0; position: sticky; top: 120px;
  display: flex; flex-direction: column; gap: 0;
}

/* Override forum-layout for section page: filter on left, posts on right */
.forum-layout:has(.forum-filter-sidebar) {
  grid-template-columns: 260px 1fr;
}

.filter-card-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px;
  user-select: none;
}
.filter-card-head h3 {
  font-size: 15px; font-weight: 600; color: var(--dark);
  display: flex; align-items: center; gap: 8px; margin: 0;
}
.filter-toggle-icon {
  color: var(--text-muted); font-size: 13px;
  /* скрыт на десктопе — там фильтр всегда открыт */
  display: none;
}
@media (max-width: 1058px) {
  .filter-toggle-icon { display: flex; align-items: center; }
  .filter-card-head { cursor: pointer; margin-bottom: 0; padding-bottom: 0; }
  .filter-card-head[aria-expanded="true"] { margin-bottom: 16px; }
}
.filter-badge {
  background: var(--gold); color: #fff;
  font-size: 11px; font-weight: 700; border-radius: 20px;
  padding: 2px 8px; min-width: 20px; text-align: center;
}
.filter-active-hint { color: var(--gold); font-size: 12px; }

/* Строка ввода: инпут + кнопка-галочка */
.keyword-input-row {
  display: flex; align-items: center; gap: 6px;
}
.keyword-input-row input {
  flex: 1; border: 1px solid var(--border); border-radius: 10px;
  padding: 8px 12px; background: var(--bg);
  font-size: 14px; color: var(--text); outline: none;
  transition: border-color var(--transition), background var(--transition);
}
.keyword-input-row input:focus { border-color: var(--gold); background: #fff; }

/* Теги под полем */
.keyword-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 8px; min-height: 0;
}
.keyword-tags:empty { margin-top: 0; }
.keyword-tag {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--gold-pale); color: var(--gold);
  border: 1px solid var(--gold); border-radius: 20px;
  font-size: 12px; font-weight: 500; padding: 2px 8px;
  white-space: nowrap;
}
.keyword-tag button {
  background: none; border: none; color: var(--gold);
  font-size: 14px; line-height: 1; cursor: pointer; padding: 0;
  opacity: .7; transition: opacity var(--transition);
}
.keyword-tag button:hover { opacity: 1; }

/* Кнопка-галочка подтверждения ключевого слова */
.keyword-confirm {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%; border: none;
  background: var(--gold); color: #fff;
  font-size: 11px; cursor: pointer; flex-shrink: 0;
  transition: background var(--transition), opacity var(--transition), transform .1s;
  margin-left: 2px;
}
.keyword-confirm:disabled {
  background: var(--border); color: var(--text-muted);
  cursor: default; opacity: .55;
}
.keyword-confirm:not(:disabled):hover {
  background: var(--gold-light); transform: scale(1.1);
}
.keyword-confirm:not(:disabled):active { transform: scale(.95); }

.year-range {
  display: flex; align-items: center; gap: 6px;
}
.year-range input { flex: 1; }
.year-range span { color: var(--text-muted); flex-shrink: 0; }

/* Post tags */
.post-row-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.ptag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; padding: 3px 8px; border-radius: 20px;
  background: var(--bg-alt); color: var(--text-muted); border: 1px solid var(--border);
}
.ptag-brand { background: var(--gold-pale); color: var(--gold); border-color: var(--gold); }
.ptag-cat   { background: #ebf8ff; color: #2b6cb0; border-color: #bee3f8; }

/* Optional hint in form labels */
.optional-hint { font-size: 12px; font-weight: 400; color: var(--text-muted); }

@media (max-width: 900px) {
  .forum-layout { grid-template-columns: 1fr; }
  .forum-layout:has(.forum-filter-sidebar) { grid-template-columns: 1fr; }
  .forum-filter-sidebar { width: 100%; position: static; }
  .forum-sidebar { position: static; }
  .fs-last { display: none; }
}
@media (max-width: 600px) {
  .post-row-meta { display: none; }
  .section-page-head { flex-direction: column; align-items: flex-start; }
  .section-page-head .btn-primary-sm { margin-left: 0; }
}

/* ── Admin panel ── */
/* ── Admin panel —— responsive ── */
@media (max-width: 768px) {
  /* Скрываем сайдбар, делаем горизонтальное меню */
  .admin-sidebar-wrap { display: none; }
  .admin-top-bar {
    display: flex !important; overflow-x: auto; gap: 4px;
    padding: 8px 0; margin-bottom: 16px;
    border-bottom: 1px solid #3a2e1a; scrollbar-width: none;
  }
  .admin-top-bar::-webkit-scrollbar { display: none; }
  .admin-top-bar a {
    white-space: nowrap; padding: 7px 12px; border-radius: 8px;
    color: #ccc; text-decoration: none; font-size: .85rem; flex-shrink: 0;
    display: flex; align-items: center; gap: 6px;
  }
  .admin-top-bar a.active { background: #3a2a00; color: var(--gold); }
  .admin-top-bar a:hover { background: #2a1f00; }

  /* Таблицы — горизонтальный скролл */
  .admin-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ── Admin top bar — скрыт на десктопе ── */
.admin-top-bar { display: none; }

/* ── Admin nav links ── */
.admin-nav-link {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 8px; color: #ccc;
  text-decoration: none; font-size: .9rem; transition: background .15s, color .15s;
  margin-bottom: 2px;
}
.admin-nav-link:hover { background: #2a1f00; color: var(--gold-light); }
.admin-nav-link.active { background: #3a2a00; color: var(--gold); font-weight: 600; }

/* ── Мобильное меню — пользователь-бар ── */
.mobile-user-bar {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px 12px; border-bottom: 1px solid rgba(255,255,255,.1);
  margin-bottom: 4px;
}
.mobile-user-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--gold); flex-shrink: 0;
}
.mobile-user-name { color: #fff; font-weight: 600; font-size: 15px; line-height: 1.2; }

/* ── Цветные ссылки в мобильном меню ── */
.mobile-admin-link { color: var(--gold) !important; }
.mobile-admin-link i { color: var(--gold) !important; }
.mobile-logout-link { color: #e53e3e !important; }
.mobile-logout-link i { color: #e53e3e !important; }
.mobile-register-link { color: var(--gold-light) !important; }
.mobile-register-link i { color: var(--gold-light) !important; }

/* ── Admin mute button ── */
.admin-mute-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 8px; font-size: 13px; cursor: pointer;
  border: 1px solid #e74c3c; background: none; color: #e74c3c;
  transition: all var(--transition);
}
.admin-mute-btn:hover { background: #e74c3c; color: #fff; }
.admin-mute-btn-active { border-color: #27ae60; color: #27ae60; }
.admin-mute-btn-active:hover { background: #27ae60; color: #fff; }

/* ── Admin thread in inbox ── */
.dialog-admin-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, #2a1f00, #3d2e00);
  border: 1px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); font-size: 20px;
  flex-shrink: 0;
}
.admin-thread-name { color: var(--gold) !important; }

/* ── Admin conversation: sender label ── */
.conv-admin-label {
  font-size: 11px; font-weight: 600; color: #000;
  display: block; margin-bottom: 3px;
}
