/* =============================================
   ГЛАВНЫЕ ПЕРЕМЕННЫЕ (ЦВЕТА, ТЕНИ, РАДИУСЫ)
   ============================================= */
:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --text: #181410;
  --muted: #6b7280;
  --line: #7b94c7;
  --blue: #2c15c4;
  --blue2: #0ea5e9;
  --shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
  --radius: 20px;
}

/* =============================================
   БАЗОВЫЕ НАСТРОЙКИ
   ============================================= */
* { box-sizing: border-box; }

body {
  margin: 0;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

body.no-scroll { overflow: hidden; }

.app {
  max-width: 1550px;
  margin: 0 auto;
  padding: 14px 18px 24px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hidden { display: none !important; }

/* =============================================
   ШАПКА (ХЕДЕР)
   ============================================= */
.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 12px 14px;
  position: sticky;
  top: 10px;
  z-index: 80;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 22px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  padding: 4px 8px;
  margin: -4px -8px;
  transition: transform 0.2s ease, text-shadow 0.2s ease;
}
.logo:hover {
  transform: scale(1.03);
  text-shadow: 0 0 12px rgba(29, 155, 240, 0.6);
}
.logo::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.4) 40%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0.4) 60%, transparent 100%);
  transition: left 0.6s ease;
  pointer-events: none;
}
.logo:hover::after { left: 100%; }

.logo-img { height: 50px; width: auto; cursor: pointer; vertical-align: middle; }

.topbar-center {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.category-btn {
  border: 0;
  background: #1d9bf0;
  color: #fff;
  padding: 14px 18px;
  border-radius: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow);
  white-space: nowrap;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mini-link { font-weight: 600; white-space: nowrap; }

/* =============================================
   ВЫБОР ГОРОДА
   ============================================= */
.location-wrap {
  position: relative;
  min-width: 180px;
  max-width: 280px;
  flex: 0 0 260px;
}

.geo-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: #e53e3e;
  pointer-events: none;
  z-index: 2;
}

.location-input {
  width: 100%;
  border: 2px solid #1d9bf0;
  border-radius: 18px;
  padding: 14px 40px 14px 34px;
  outline: none;
}

.detect-location-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #1d9bf0;
  background: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 2;
  padding: 0;
}
.detect-location-btn:hover {
  background: #e8f4fd;
  transform: translateY(-50%) scale(1.1);
}
.detect-location-btn.loading {
  animation: spin 1s linear infinite;
  border-color: #ccc;
}
@keyframes spin {
  from { transform: translateY(-50%) rotate(0deg); }
  to { transform: translateY(-50%) rotate(360deg); }
}

.dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: 58px;
  z-index: 300;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.12);
  overflow: hidden;
  max-height: 320px;
  overflow-y: auto;
}

.dropdown-item {
  padding: 12px 14px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
}
.dropdown-item:hover, .dropdown-item.active { background: #f3f4f6; }
.dropdown-item .sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

/* =============================================
   ПОИСК
   ============================================= */
.search-hero {
  margin-bottom: 20px;
  display: block;
  max-width: 100%;
}

.search-wrap-hero {
  display: flex;
  background: #fff;
  border: 2px solid #1d9bf0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  position: relative;
}

.search-input-hero {
  flex: 1;
  border: 0;
  outline: none;
  padding: 15px 20px;
  font-size: 16px;
  min-width: 0;
}

.search-btn-hero {
  border-radius: 0;
  box-shadow: none;
  padding: 0 24px;
  background: #1d9bf0;
  color: #fff;
  border: 0;
  font-weight: 700;
  cursor: pointer;
}
.search-btn-hero:hover { background: #0ea5e9; }

.search-suggestions {
  position: absolute;
  background: #fff;
  border: 1px solid #ccc;
  width: 100%;
  max-height: 200px;
  overflow-y: auto;
  display: none;
  z-index: 100;
  top: 100%;
  left: 0;
}
.search-suggestions.active { display: block; }
.suggestion-item { padding: 8px; cursor: pointer; }
.suggestion-item:hover { background: #f0f0f0; }
.suggestion-highlight { font-weight: bold; color: #e00; }

/* =============================================
   КНОПКИ
   ============================================= */
.btn {
  border: 0;
  background: var(--blue);
  color: #fff;
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}
.btn:hover { background: var(--blue2); transform: translateY(-1px); }
.btn.ghost { background: #fff; color: var(--text); border: 1px solid var(--line); }
.btn.wide { width: 100%; margin-top: 16px; padding: 13px 16px; }

/* =============================================
   ПРОФИЛЬНОЕ МЕНЮ
   ============================================= */
.profile-dropdown-wrapper { position: relative; display: inline-block; }
.profile-dropdown-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text);
  padding: 8px 12px;
  border-radius: 12px;
  transition: background 0.15s;
}
.profile-dropdown-btn:hover { background: #f3f4f6; }
.profile-dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
  z-index: 200;
  min-width: 220px;
  overflow: hidden;
}
.profile-dropdown-item {
  padding: 12px 16px;
  cursor: pointer;
  font-size: 15px;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s;
}
.profile-dropdown-item:hover { background: #f3f4f6; }
.profile-dropdown-item:last-child { border-bottom: none; }

/* =============================================
   МЕГА-МЕНЮ
   ============================================= */
.mega-menu {
  position: fixed;
  left: 18px;
  right: 18px;
  top: 80px;
  z-index: 120;
  display: grid;
  grid-template-columns: 320px 1fr 290px;
  gap: 24px;
  background: #fff;
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 16px 50px rgba(0,0,0,0.12);
  border: 1px solid #e5e7eb;
}

.mega-left {
  max-height: 520px;
  overflow: auto;
  padding-right: 8px;
  display: grid;
  gap: 8px;
}

.mega-item {
  border: 0;
  background: transparent;
  padding: 14px 16px;
  border-radius: 14px;
  text-align: left;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.15s ease;
}
.mega-item:hover { background: #f3f4f6; }
.mega-item.active { background: #f3f4f6; font-weight: 700; }
.mega-item::after { content: "›"; font-size: 24px; color: #111827; }

.mega-right { min-height: 520px; padding: 12px 8px; }

.mega-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 22px;
}

.mega-col h4 { margin: 0 0 10px; font-size: 22px; }
.mega-col a {
  display: block;
  color: #111827;
  text-decoration: none;
  margin: 10px 0;
  font-size: 16px;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.15s ease;
}
.mega-col a:hover { background: #f3f4f6; }

.mega-side {
  background: #d8ecff;
  border-radius: 24px;
  padding: 20px;
}
.mega-side h3 { margin-top: 0; font-size: 22px; }
.mega-side a {
  display: block;
  margin: 12px 0;
  text-decoration: none;
  color: #111827;
}

/* =============================================
   ОСНОВНОЙ КОНТЕНТ
   ============================================= */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}

.content { min-width: 0; }

.categories-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  margin-bottom: 26px;
}

.cat-card {
  background: #f4f4f4;
  border-radius: 18px;
  min-height: 94px;
  padding: 14px 14px 10px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.cat-card:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 20px rgba(29,155,240,0.25);
  background: #eef2ff;
}
.cat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.5) 40%, rgba(255,255,255,0.6) 50%, rgba(255,255,255,0.5) 60%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}
.cat-card:hover::after { left: 100%; transition: left 0.5s ease; }

.cat-card-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-color: #333;
  z-index: 0;
}

.cat-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.02) 100%);
  z-index: 1;
}

.cat-title {
  position: relative;
  z-index: 2;
  font-size: 16px;
  font-weight: 700;
  color: #111;
  text-shadow: 0 1px 3px rgba(255,255,255,0.6);
  line-height: 1.2;
  max-width: 90%;
  padding-top: 4px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 22px 0 16px;
}

.section-head h2 {
  margin: 0;
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.03em;
}

#siteCounter {
  grid-column: 1/-1;
  text-align: right;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: 0.4px;
}

/* =============================================
   КАРТОЧКИ ОБЪЯВЛЕНИЙ
   ============================================= */
.grid-products {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.navento-card {
  background: #fff;
  border-radius: 9px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.navento-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,0.15); }

.navento-img {
  position: relative;
  width: 100%;
  height: 180px;
  min-height: 180px;
  max-height: 180px;
  overflow: hidden;
  background: #f9f9f9;
}
.navento-img img {
  width: 100%;
  height: 100%;
  object-fit: cover !important;
  object-position: center !important;
}
.navento-no-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #999;
  font-size: 14px;
}

.navento-fav {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255,255,255,0.9);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  padding: 0;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: transform 0.2s;
  z-index: 10;
}
.navento-fav:hover { transform: scale(1.1); }
.navento-fav.active { color: #e53e3e; }

.navento-body {
  flex: 1;
  padding: 12px 14px 14px !important;
}

.navento-price {
  font-size: 17px;
  font-weight: 600;
  color: #111;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.navento-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  line-height: 1.3;
}

.navento-meta {
  font-size: 13px;
  color: #8c8c8c;
  margin-bottom: 8px;
}

.navento-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.navento-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 12px;
  background: #f0f0f0;
  color: #666;
}
.navento-badge.ok { background: #e6f7e6; color: #2e7d32; }
.navento-badge.safe { background: #e3f2fd; color: #1565c0; }
.navento-badge.delivery { background: #fff3e0; color: #e65100; }

/* Подсветка цветом из фото */
.navento-img.color-bg {
  position: relative;
  background: #f0f0f0;
  transition: background 0.3s ease;
  overflow: hidden;
}

.navento-img .navento-blur-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(20px) saturate(1.3);
  transform: scale(1.2);
  opacity: 0.6;
  z-index: 0;
}

.navento-img .navento-photo {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover !important;
  object-position: center !important;
  display: block;
}

.navento-arrow {
  display: none !important;
}

/* =============================================
   КНОПКИ В ШАПКЕ (ИЗБРАННОЕ И СООБЩЕНИЯ)
   ============================================= */
.navento-fav-header,
.navento-msg-header {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  font-size: 20px !important;
  padding: 0 4px !important;
  cursor: pointer !important;
  position: relative;
  transition: transform 0.2s ease;
}

.navento-fav-header:hover,
.navento-msg-header:hover {
  transform: translateY(-2px) scale(1.1);
}

.navento-msg-header .unread-badge {
  position: absolute !important;
  top: -6px !important;
  right: -6px !important;
  background: none !important;
  color: #e53e3e !important;
  border-radius: 0 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  min-width: auto !important;
  height: auto !important;
  display: inline !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* =============================================
   СТРАНИЦА ОБЪЯВЛЕНИЯ
   ============================================= */
.product-main {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 30px;
}

.product-left { min-width: 0; }

.product-right {
  display: flex;
  flex-direction: column;
  gap: 15px;
  position: sticky;
  top: 100px;
  align-self: start;
}

.product-title {
  width: fit-content;
  margin-left: 40px;
  margin-top: 0;
  margin-bottom: 20px;
}

.product-gallery {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-left: 40px;
}

.main-photo-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 500px;
}

.photo-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.85);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 20px;
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.photo-arrow-left { left: 10px; }
.photo-arrow-right { right: 10px; }
.main-photo-wrapper:hover .photo-arrow {
  opacity: 1;
  pointer-events: auto;
}

.product-thumbnails {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.product-thumb {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  object-fit: contain;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}
.product-thumb:hover,
.product-thumb.active { border-color: var(--blue); }

.product-city {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  width: fit-content;
  margin-left: 40px;
}

  .product-description {
    margin-top: 20px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    margin-left: 40px;
  }
.product-description h3 { margin-top: 0; }

.product-price {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}

.product-phone {
  font-size: 18px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
}

.product-message-btn { width: 100%; }

.show-phone-btn {
  background: none;
  border: none;
  color: var(--blue);
  font-size: 18px;
  cursor: pointer;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius);
  transition: background 0.2s;
}
.show-phone-btn:hover { background: #f0f0f0; }

.product-breadcrumbs {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 14px;
}
.product-breadcrumbs a { color: var(--blue); text-decoration: none; }

/* =============================================
   ФОРМЫ
   ============================================= */
.create-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 10px 0 40px;
}

.create-page-header { margin-bottom: 24px; }
.create-page-header h1 { font-size: 28px; margin: 0 0 8px; font-weight: 700; }
.create-page-header p { color: var(--muted); font-size: 15px; margin: 0; }

.create-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
}

.form-section-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-section-title .icon { font-size: 22px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-row.full { grid-template-columns: 1fr; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s;
  background: #fff;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(44, 21, 196, 0.08);
}
.form-group textarea { min-height: 140px; resize: vertical; }
.form-group .help-text { font-size: 12px; color: var(--muted); margin-top: 2px; }
.form-group .char-counter { font-size: 12px; color: var(--muted); text-align: right; margin-top: 2px; }

.form-grid { display: grid; gap: 10px; }
.form-grid input,
.form-grid select,
.form-grid textarea,
.search-field {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 15px;
  margin: 12px 0 8px;
  padding: 6px 0;
}
.check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}
.checkbox-group input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--blue);
  cursor: pointer;
}
.checkbox-group label {
  font-size: 15px;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
}

.city-input-wrap { position: relative; }
.city-input-wrap input { padding-left: 34px !important; }
.city-input-wrap .geo-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: #e53e3e;
  pointer-events: none;
  z-index: 2;
}

.city-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 300;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
  overflow: hidden;
  max-height: 260px;
  overflow-y: auto;
  margin-top: 4px;
}

.photo-upload-area {
  border: 2px dashed var(--line);
  border-radius: 16px;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #fafbfc;
}
.photo-upload-area:hover {
  border-color: var(--blue);
  background: #f5f7ff;
}
.photo-upload-area .upload-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 8px;
}
.photo-upload-area .upload-text { font-size: 15px; color: var(--muted); }
.photo-upload-area .upload-text b { color: var(--blue); }
.photo-upload-area input { display: none; }

.photos-preview-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.photo-preview-item {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #f8fafc;
  aspect-ratio: 1;
}
.photo-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-preview-item .remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.photo-preview-item .remove-btn:hover { background: #e53e3e; }
.photo-preview-item .main-photo-badge {
  position: absolute;
  bottom: 4px;
  left: 4px;
  right: 4px;
  background: rgba(76, 175, 80, 0.9);
  color: #fff;
  font-size: 11px;
  text-align: center;
  padding: 2px 0;
  border-radius: 6px;
  font-weight: 600;
}

.hashtags-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.hashtag-tag {
  background: #eef2ff;
  color: var(--blue);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}
.hashtag-tag .remove-tag {
  cursor: pointer;
  font-size: 14px;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.hashtag-tag .remove-tag:hover { opacity: 1; }

.form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-top: 8px;
}
.form-actions .btn {
  padding: 14px 28px;
  font-size: 16px;
}

/* =============================================
   ПРЕВЬЮ ФОТО
   ============================================= */
.preview-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.preview-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #f8fafc;
  position: relative;
}
.preview-item img {
  width: 100%;
  height: 90px;
  object-fit: contain;
  display: block;
}
.preview-item .remove-photo {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.7);
  color: #fff;
  cursor: pointer;
}
.upload-hint { font-size: 13px; color: var(--muted); line-height: 1.4; }

/* =============================================
   ПРОФИЛЬ
   ============================================= */
.profile-grid { display: grid; grid-template-columns: 280px 1fr; gap: 20px; align-items: start; }
.profile-sidebar {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow);
  position: sticky;
  top: 100px;
}
.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #e8e8e8;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  margin: 0 auto 12px;
  overflow: hidden;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-name { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.profile-email { color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.profile-rating { font-size: 14px; color: #e6a817; margin-bottom: 15px; }
.profile-btn { width: 100%; margin-top: 6px; }
.profile-main { display: flex; flex-direction: column; gap: 16px; }
.profile-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.profile-tab {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
}
.profile-tab.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.profile-listing-card {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 14px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s;
}
.profile-listing-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.08); }
.profile-listing-img {
  width: 100px;
  height: 75px;
  border-radius: 10px;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 28px;
  color: #999;
}
.profile-listing-img img { width: 100%; height: 100%; object-fit: cover; }
.profile-listing-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.profile-listing-title { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-listing-meta { font-size: 13px; color: var(--muted); }
.profile-listing-status {
  display: inline-block;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 10px;
  background: #e0e0e0;
  color: #555;
  width: fit-content;
}
.profile-listing-status.approved { background: #e6f7e6; color: #2e7d32; }
.profile-listing-status.pending { background: #fff3e0; color: #e65100; }
.profile-listing-status.blocked { background: #ffebee; color: #c62828; }
.profile-listing-actions { display: flex; gap: 6px; }
.profile-listing-actions button {
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s;
}
.profile-listing-actions button:hover { background: #f3f4f6; }
.profile-bio { margin-top: 12px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.empty-state { text-align: center; padding: 40px; color: var(--muted); font-size: 15px; }

/* =============================================
   ОВЕРЛЕЙ И МОДАЛКА
   ============================================= */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 100;
  padding: 18px;
  overflow-y: auto;
}

.modal {
  max-width: 650px;
  width: 100%;
  margin: 40px auto;
  position: relative;
  padding: 18px;
  max-height: 85vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-size: 22px;
}

/* =============================================
   АВТОРИЗАЦИЯ
   ============================================= */
.auth-tabs { display: flex; gap: 10px; margin-bottom: 16px; border-bottom: 2px solid #eee; padding-bottom: 0; }
.auth-tab {
  background: none;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}
.auth-tab.active { color: var(--blue); border-bottom-color: var(--blue); }

/* =============================================
   АДМИНКА
   ============================================= */
.admin-tabs { display: flex; gap: 10px; margin-bottom: 15px; flex-wrap: wrap; }
.admin-tabs button {
  padding: 8px 16px;
  border: 1px solid #ccc;
  background: #f5f5f5;
  cursor: pointer;
  border-radius: 4px;
  font-size: 14px;
  white-space: nowrap;
}
.admin-tabs button.active { background: #4CAF50; color: #fff; border-color: #4CAF50; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { border-bottom: 1px solid #eee; padding: 8px; text-align: left; }
.admin-table th { background: #fafafa; }
.admin-table td button { margin-right: 5px; }
.admin-filters { display: flex; gap: 10px; margin-bottom: 10px; align-items: center; flex-wrap: wrap; }
.admin-filters select, .admin-filters input { padding: 6px; border: 1px solid #ccc; border-radius: 4px; }
.btn-small { padding: 2px 6px; font-size: 12px; cursor: pointer; }
.create-page-btn {
  margin-top: 15px;
  width: 100%;
  background: #4CAF50;
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}
.create-page-btn:hover { background: #388E3C; }

.stopwords-panel { background: #fff; border: 1px solid #e0e0e0; border-radius: 12px; padding: 16px; }
.stopwords-panel h3 { margin: 0 0 12px; font-size: 18px; }
.stopword-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #f0f0f0; }
.stopword-item span { color: #c62828; font-weight: 500; }
.stopword-form { display: flex; gap: 8px; margin-bottom: 12px; }
.stopword-form input { flex: 1; padding: 8px; border: 1px solid #ccc; border-radius: 6px; }
.stopword-scroll { max-height: 500px; overflow-y: auto; }

/* =============================================
   СООБЩЕНИЯ И ПОДДЕРЖКА
   ============================================= */
.messages-container { max-width: 700px; margin-left: 20px; margin-right: auto; }
.unread-badge {
  background: #e53e3e;
  color: #fff;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 12px;
  font-weight: 700;
  margin-left: 6px;
  display: inline-block;
  min-width: 20px;
  text-align: center;
}
.message-edited { font-size: 11px; color: #888; margin-left: 6px; }
.message-actions { margin-top: 4px; display: flex; gap: 8px; font-size: 12px; }
.message-actions button { background: none; border: none; color: #4CAF50; cursor: pointer; padding: 2px 4px; border-radius: 4px; }
.message-actions button:hover { background: #f0f0f0; }
.message-actions button.danger { color: #e53e3e; }
.chat-header-buttons { display: flex; gap: 8px; margin-bottom: 10px; }
.chat-header-buttons button { font-size: 13px; padding: 4px 10px; }
.message-listing-note { font-size: 11px; color: #888; margin-top: 2px; }

.support-msg { margin-bottom: 10px; display: flex; }
.support-msg.user { justify-content: flex-end; }
.support-msg .bubble { max-width: 75%; padding: 10px 14px; border-radius: 12px; font-size: 14px; }
.support-msg.user .bubble { background: #dcf8c6; }
.support-msg.admin .bubble { background: #f1f0f0; }
.support-dialog-item { padding: 12px; border-bottom: 1px solid #eee; cursor: pointer; transition: background 0.15s; }
.support-dialog-item:hover { background: #f9f9f9; }
.support-dialog-item.active { background: #e3f2fd; }

/* =============================================
   БАННЕР ДЛЯ ЗАБАНЕННЫХ
   ============================================= */
.banned-banner {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  background: #fff0f0;
  border: 3px solid #e53e3e;
  border-radius: 16px;
  padding: 30px 40px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(229,62,62,0.3);
  max-width: 500px;
  width: 90%;
}
.banned-banner h2 { color: #c62828; margin: 0 0 12px; }
.banned-banner p { color: #e53e3e; font-size: 16px; font-weight: 600; margin: 0 0 8px; }
.banned-banner .reason { color: #888; font-size: 14px; margin: 0 0 16px; }
.banned-banner .help-text { color: #666; font-size: 14px; margin: 0 0 20px; }
.banned-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 9998;
}

/* =============================================
   ЛАЙТБОКС
   ============================================= */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox-content img {
  max-width: 450px;
  max-height: 450px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 16px;
  background: #fff;
}
.lightbox-close {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  z-index: 2;
}
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 30px;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(0,0,0,0.9); }
.lightbox-prev { left: -20px; }
.lightbox-next { right: -20px; }
.lightbox-actions { margin-top: 15px; }
.set-avatar-btn { padding: 8px 16px; font-size: 14px; }
.lightbox-counter { margin-top: 8px; color: #fff; font-size: 14px; }

/* =============================================
   DRAG-AND-DROP
   ============================================= */
.sortable-photo {
  cursor: grab;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.sortable-photo:active { cursor: grabbing; }
.sortable-photo.drag-over {
  transform: scale(1.05);
  border-color: var(--blue) !important;
  box-shadow: 0 0 0 3px rgba(44, 21, 196, 0.2);
}

/* =============================================
   АНИМАЦИИ
   ============================================= */
@keyframes blink {
  0%, 100% { background: #ffebee; }
  50% { background: #ffcdd2; }
}
.blocked-row { animation: blink 1s infinite; }
.banned-row { animation: blink 0.8s infinite; }

/* =============================================
   ПРОФИЛЬ ПОЛЬЗОВАТЕЛЯ (ПУБЛИЧНЫЙ)
   ============================================= */
.nv-profile-cover {
  width: 100%;
  height: 280px;
  background: #d0d8e0;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  position: relative;
  margin-bottom: 60px;
}
.nv-profile-cover img { width: 100%; height: 100%; object-fit: cover; }
.nv-profile-cover .cover-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(transparent, rgba(0,0,0,0.3));
}
.nv-profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid #fff;
  overflow: hidden;
  position: absolute;
  bottom: -60px;
  left: 30px;
  z-index: 2;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.nv-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.nv-profile-info { margin-left: 170px; margin-top: -10px; margin-bottom: 20px; }
.nv-profile-name { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.nv-profile-status { color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.nv-profile-counters { display: flex; gap: 24px; margin-bottom: 16px; }
.nv-counter-item { text-align: center; }
.nv-counter-num { font-size: 20px; font-weight: 700; color: var(--blue); }
.nv-counter-label { font-size: 13px; color: var(--muted); }
.nv-profile-actions { display: flex; gap: 10px; margin-bottom: 16px; }
.nv-profile-actions .btn { padding: 10px 20px; border-radius: 12px; }

/* =============================================
   Leaflet
   ============================================= */
#createMap { z-index: 1; }
.leaflet-container { z-index: 1; }
.leaflet-control-attribution { display: none !important; }

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: #f8f8f8;
  border-top: 1px solid #e0e0e0;
  padding: 20px;
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  font-size: 14px;
}
.site-footer a { color: #333; text-decoration: none; white-space: nowrap; }
.site-footer a:hover { text-decoration: underline; }
.footer-location-wrap { display: flex; align-items: center; gap: 5px; position: relative; }
.footer-location-input {
  padding: 6px 6px 6px 28px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  width: 180px;
}

/* =============================================
   АДАПТИВНОСТЬ
   ============================================= */

/* Планшеты и небольшие ноутбуки */
@media (max-width: 1100px) {
  .topbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
  }
  .topbar-left { flex: 0 0 auto; order: 1; }
  .topbar-center { order: 2; width: 100%; flex-wrap: nowrap; display: flex; }
  .topbar-right { order: 3; width: 100%; justify-content: space-between; flex-wrap: nowrap; }
  .location-wrap { flex: 1; max-width: 200px; }
  .categories-row { grid-template-columns: repeat(3, 1fr); }
  .mega-menu { left: 12px; right: 12px; top: 100px; grid-template-columns: 1fr; }
  .mega-side { display: none; }
  .preview-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Мобильные устройства */
@media (max-width: 768px) {
  .grid-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .navento-img { height: 140px; min-height: 140px; max-height: 140px; }

  .product-main { grid-template-columns: 1fr; }
  .product-right {
    order: -1;
    position: static;
  }
  .product-title,
  .product-main-photo,
  .product-thumbnails,
  .product-city,
  .product-description {
    margin-left: 10px;
  }

  .form-row { grid-template-columns: 1fr; }
  .photos-preview-grid { grid-template-columns: repeat(3, 1fr); }
  .create-page { padding: 0 10px 30px; }

  /* Шапка на мобильных */
  .topbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    align-items: center;
  }
  .topbar-left { flex: 0 0 auto; order: 1; }
  .topbar-center { flex: 1 1 auto; order: 2; display: flex; align-items: center; gap: 4px; min-width: 0; }
  .topbar-right { flex: 1 1 100%; order: 3; display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
  #categoriesToggle { display: none; }
  .location-wrap { display: flex; align-items: center; flex: 1 1 auto; min-width: 0; position: relative; }
  .location-wrap .geo-icon { display: none; }
  .location-input {
    width: 100%;
    font-size: 13px;
    padding: 8px 32px 8px 8px;
    border-radius: 16px;
    max-width: 110px;
    height: 36px;
  }
  .detect-location-btn, .profile-dropdown-btn, #openCreate {
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .detect-location-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    font-size: 13px;
    border: none;
    background: none;
  }
  .profile-dropdown-wrapper { display: inline-block !important; }
  .profile-dropdown-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-size: 0;
    padding: 0 8px;
    background: none;
    border: none;
  }
  .profile-dropdown-btn::before { content: '👤'; font-size: 20px; }
  #openCreate {
    font-size: 0;
    padding: 0 8px;
    background: transparent !important;
    border: none;
    box-shadow: none;
  }
  #openCreate::after { content: '+'; font-size: 28px; font-weight: 900; color: var(--blue); }

  .profile-grid { grid-template-columns: 1fr; }
  .profile-sidebar { position: static; }
  .profile-listing-card { grid-template-columns: 60px 1fr; }
  .profile-listing-actions { grid-column: 1 / -1; justify-content: flex-end; }

  .app { background: #ffffff; padding: 10px; }
  body { background: #ffffff; }
  .profile-dropdown { right: 0; left: auto; min-width: 180px; max-width: 80vw; }

  .categories-row {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }
  .categories-row .cat-card { flex: 0 0 auto; width: 120px; min-height: 80px; scroll-snap-align: start; }

  .search-btn-hero { padding: 0 12px; font-size: 14px; }
  .search-hero { display: block !important; margin-bottom: 0; }
  .search-wrap-hero { display: flex !important; border-radius: 14px; border-width: 1px; }
  .search-input-hero { font-size: 14px; padding: 10px 12px; min-width: 0; }
}

/* Горизонтальная ориентация телефонов */
@media (max-width: 900px) and (orientation: landscape) {
  .topbar { flex-wrap: nowrap; }
  .topbar-center { flex: 1 1 auto; order: 2; }
  .topbar-right { order: 3; flex: 0 0 auto; }
  .search-hero { display: block !important; }
  .search-wrap-hero { display: flex !important; }
  .search-input-hero { font-size: 14px; padding: 10px 15px; }
  .search-btn-hero { padding: 0 16px; }
}

/* Очень узкие экраны */
@media (max-width: 640px) {
  .grid-products { grid-template-columns: 1fr; }
  .app { padding: 10px; }
  .categories-row { grid-template-columns: repeat(2, 1fr); }
  .category-btn { display: none; }
  .preview-grid { grid-template-columns: repeat(2, 1fr); }
  .photos-preview-grid { grid-template-columns: repeat(2, 1fr); }
}
/* =============================================
   НИЖНЯЯ МОБИЛЬНАЯ НАВИГАЦИЯ (только мобильные)
   ============================================= */
@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    padding: 6px 0 8px;
    justify-content: space-around;
    align-items: flex-start;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
  }

  .mob-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 11px;
    color: #666;
    min-width: 55px;
  }

  .mob-nav-item .mob-nav-icon {
    font-size: 22px;
    line-height: 1;
  }

  .mob-nav-item .mob-nav-label {
    font-size: 10px;
    white-space: nowrap;
  }

  .mob-nav-item.mob-nav-add .mob-nav-icon {
    font-size: 26px;
    color: var(--blue);
    font-weight: 900;
  }

  /* Отступ снизу, чтобы контент не перекрывался навигацией */
  .app {
    padding-bottom: 70px;
  }
}

/* На десктопе скрываем */
@media (min-width: 769px) {
  .mobile-bottom-nav {
    display: none !important;
  }
}
/* =============================================
   МОБИЛЬНАЯ ШАПКА (только мобильные)
   ============================================= */
@media (max-width: 768px) {
  .desktop-topbar {
    display: none !important;
  }

  .mobile-topbar {
    display: block;
    position: sticky;
    top: 0;
    z-index: 90;
    background: #fff;
    padding: 8px 10px;
    border-bottom: 1px solid #e0e0e0;
  }

  .mobile-topbar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
  }

  .mobile-filter-btn {
    background: #f0f0f0;
    border: none;
    padding: 8px 12px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
  }

  .mobile-search-row {
    width: 100%;
  }

  .mobile-search-row .search-wrap-hero {
    display: flex;
    border: 1px solid #1d9bf0;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
  }

  .mobile-search-row .search-input-hero {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px 12px;
    font-size: 14px;
    min-width: 0;
  }

  .mobile-search-row .search-btn-hero {
    border: none;
    background: #1d9bf0;
    color: #fff;
    padding: 0 16px;
    font-weight: 600;
    cursor: pointer;
  }
}

/* На десктопе скрываем мобильную шапку */
@media (min-width: 769px) {
  .mobile-topbar {
    display: none !important;
  }
}
@media (max-width: 768px) {
  #homeContent .desktop-search,
  .layout .desktop-search,
  main .desktop-search {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .desktop-search {
    display: block;
  }
}
@media (max-width: 768px) {
  .layout {
    display: block;
    width: 100%;
  }
  .content {
    width: 100%;
    min-width: 0;
  }
  #homeContent {
    width: 100%;
  }
  .categories-row {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 8px;
    width: 100%;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }
  .categories-row .cat-card {
    flex: 0 0 auto;
    width: 120px;
    min-height: 80px;
    scroll-snap-align: start;
  }
}
/* Скрываем поиск из homeContent на мобильных */
@media (max-width: 768px) {
  #homeContent .search-hero {
    display: none !important;
  }
}
/* Отступы от краев экрана мобильного телефона */
@media (max-width: 768px) {
  .app {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  .content {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}
/* Скрываем шапку на странице объявления в мобильной версии */
@media (max-width: 768px) {
  body.inner-page .mobile-topbar {
    display: none !important;
  }
}
/* Скрываем хлебные крошки на мобильной странице объявления */
@media (max-width: 768px) {
  body.inner-page .product-breadcrumbs {
    display: none !important;
  }
}
/* Мобильная страница объявления */
@media (max-width: 768px) {
  .product-main {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  .product-gallery {
    margin: 0;
    width: 100%;
  }

  .main-photo-wrapper {
    width: 100%;
    max-width: 100%;
    position: relative;
  }

  .product-main-photo {
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    border: none;
  }

  .product-thumbnails {
    padding: 8px;
    gap: 6px;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .product-thumb {
    width: 56px;
    height: 56px;
    flex: 0 0 auto;
  }

  .photo-counter {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    z-index: 5;
  }

  .product-title {
    margin: 12px;
    font-size: 17px;
    font-weight: 600;
    width: auto;
  }

  .product-price {
    font-size: 24px;
    font-weight: 700;
    margin: 0 12px;
  }

  .product-actions-row {
    display: flex;
    gap: 8px;
    margin: 12px;
  }

  .product-actions-row .btn {
    flex: 1;
    padding: 12px;
    font-size: 15px;
  }

  .product-city {
    margin: 0 12px;
    font-size: 14px;
    color: var(--muted);
  }

  .product-city .show-map-link {
    color: var(--blue);
    text-decoration: none;
  }

  .product-description {
    margin: 12px;
    padding: 14px;
    border-radius: 12px;
  }

  .product-seller-block {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px;
    padding: 12px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
  }

  .product-seller-block .seller-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    overflow: hidden;
  }

  .product-seller-block .seller-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .product-seller-block .seller-name {
    font-size: 15px;
    font-weight: 600;
  }

  .product-phone {
    margin: 12px;
  }

  #productMap {
    margin: 12px;
    width: calc(100% - 24px);
  }
}
@media (max-width: 768px) {
  .product-thumbnails {
    display: none !important;
  }
}
@media (max-width: 768px) {
  .product-main {
    display: flex !important;
    flex-direction: column !important;
  }

  .product-gallery,
  .product-price,
  .product-title,
  .product-actions-row,
  .product-description,
  .product-seller-block {
    width: 100% !important;
    flex: 1 1 auto !important;
  }
}
  /* Фото на всю ширину */
  .product-main-photo {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    display: block !important;
  }

  /* Убираем горизонтальную прокрутку */
  body.inner-page {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  body.inner-page .app {
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  #pageContent {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  #pageContent * {
    box-sizing: border-box !important;
  }
}