:root{
  --bg:#ffffff;
  --text:#0f172a;
  --text2:#334155;
  --muted:#64748b;
  --line:#e7eaf1;
  --card:#f6f7fb;
  --shadow: 0 10px 30px rgba(15, 23, 42, .06);
  --blue:#1d63ff;
  --blue2:#0f4df2;
  --radius:18px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color:var(--text);
  background:var(--bg);
}

/* ===== ШАПКА ===== */
.topbar{
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);

  display:grid;
  grid-template-columns: auto 1fr auto;
  align-items:center;
  gap:16px;
  padding:14px 18px;
}

.topbar__left{ display:flex; align-items:center; gap:10px; 
  }

/* ВАЖНО: кнопка «Назад» должна быть видна везде (и на ПК, и на телефоне) */
#btnBack{ display:inline-flex !important; }

/* Иконку меню (три линии) по ТЗ скрываем, но в DOM оставляем для JS */
#btnMenu{ display:none !important; }
.topbar__center{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  justify-content:center;
  gap:10px;
  min-width:0;
}
.topbar__right{ display:flex; align-items:center; gap:10px; }

.iconbtn{
  width:42px;
  height:42px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#fff;
  box-shadow: 0 6px 20px rgba(15, 23, 42, .05);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.iconbtn:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(15, 23, 42, .08);
  background:#fbfcff;
}
.iconbtn svg{ width:20px; height:20px; fill:#1f2a44; }

/* Уведомления (иконка + бейдж) */
.notifBtn{ position:relative; }
.notifBadge{
  position:absolute;
  top:-4px;
  right:-4px;
  min-width:18px;
  height:18px;
  padding:0 6px;
  border-radius:999px;
  background:#ef4444;
  color:#fff;
  font-size:11px;
  font-weight:900;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-shadow: 0 8px 18px rgba(239, 68, 68, .25);
}

/* если на бейдже стоит атрибут hidden — он должен исчезнуть всегда */
.notifBadge[hidden]{ display:none !important; }

.brand{ display:flex; align-items:center; gap:12px; }
.brand__dots{ display:inline-flex; gap:6px; }
.brand__dots i{ width:8px; height:8px; border-radius:50%; display:inline-block; }
.brand__dots i:nth-child(1){background:#22c55e}
.brand__dots i:nth-child(2){background:#a855f7}
.brand__dots i:nth-child(3){background:#f59e0b}
.brand__dots i:nth-child(4){background:#0ea5e9}
.brand__dots i:nth-child(5){background:#1d4ed8}
.brand__dots i:nth-child(6){background:#3b82f6}
.brand__title{ font-weight:900; font-size:34px; letter-spacing:.2px; white-space:nowrap; }

/* Название бренда как текст (не выглядит кнопкой) */
.brand__title--link{
  border:0;
  background:transparent;
  padding:0;
  margin:0;
  color:inherit;
  font:inherit;
  cursor:pointer;
  line-height:1;
}

.brand__title--fancy{
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  color: inherit;
  text-shadow: none;
}

.brand__dots{ display:none !important; }

/* Поиск + кнопка рядом (чтобы «Найти» не падала вниз) */
.searchbar{
  display:flex;
  align-items:center;
  gap:10px;
  flex: 1 1 auto;
  min-width: 0;
}

.searchrow{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  min-width:0;
  width:100%;
}

.search{
  background:#fff;
  border:1px solid var(--line);
  border-radius:999px;
  padding:8px 14px;
  display:flex;
  align-items:center;
  box-shadow: 0 6px 20px rgba(15, 23, 42, .04);

  width: 100%;
  flex: 1 1 auto;
  max-width: none;
}
.search input{ width:100%; border:0; outline:none; font-size:14px; }

.btn{
  border:1px solid var(--line);
  background:#fff;
  color:var(--text);
  padding:10px 14px;
  border-radius:999px;
  cursor:pointer;
  font-weight:700;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  box-shadow: 0 6px 20px rgba(15, 23, 42, .04);
  white-space:nowrap;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}

/* Иконки внутри кнопок (иначе SVG без размеров становится 300x150 и ломает вёрстку) */
.btnIcon{ width:18px; height:18px; flex:0 0 auto; display:block; }
.notifIcon{ width:20px; height:20px; flex:0 0 auto; display:block; }
.chev{ width:18px; height:18px; flex:0 0 auto; display:block; }
.btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(15, 23, 42, .07);
  background:#fbfcff;
}
.btn.primary{ background:var(--blue); border-color:transparent; color:#fff; }
.btn.primary:hover{ background:var(--blue2); }
.btn.ghost{ background:#fff; }
.btn.small{ padding:8px 12px; font-size:13px; }

.btn-lang{
  padding:10px 12px;
  font-weight:900;
  letter-spacing:.6px;
  min-width:52px;
  text-align:center;
}

.logoDot{
  width:12px;height:12px;border-radius:4px;
  background: conic-gradient(from 180deg, #22c55e, #a855f7, #f59e0b, #0ea5e9, #1d4ed8, #22c55e);
  display:inline-block;
  margin-right:8px;
  vertical-align:middle;
}

/* ===== POPUP ЯЗЫКА ===== */
.langpop{
  position:absolute;
  top:62px;
  right:18px;
  width:240px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow: var(--shadow);
  padding:10px;
  z-index:120;
}
.langpop__title{
  font-weight:900;
  font-size:11px;
  color:var(--muted);
  padding:4px 8px 8px;
}
.langpop__item{
  width:100%;
  border:0;
  background:transparent;
  cursor:pointer;
  border-radius:14px;
  padding:10px 10px;
  display:grid;
  grid-template-columns: 28px 1fr auto;
  align-items:center;
  gap:10px;
  font-weight:900;
}
.langpop__item:hover{ background:#f3f6ff; }
.langpop__flag{ font-size:18px; line-height:1; }
.langpop__name{ font-size:14px; text-align:left; }
.langpop__code{
  font-size:11px;
  color:#1146d9;
  background: rgba(29, 99, 255, .12);
  padding:6px 10px;
  border-radius:999px;
  font-weight:900;
}

/* ===== ОСНОВНОЕ ===== */
.page{ padding:22px 0 40px; }
.container{ max-width:1080px; margin:0 auto; padding:0 18px; }
.section{ margin-top:22px; }
.section__head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; gap:10px; }
h2{ margin:0; font-size:20px; letter-spacing:.2px; }

/* ===== КАТЕГОРИИ ===== */
.grid{ display:grid; grid-template-columns: repeat(4, 1fr); gap:14px; }

.card{
  position:relative;
  border:1px solid var(--line);
  border-radius:22px;
  overflow:hidden;
  cursor:pointer;
  min-height:132px;
  background:var(--card);
  box-shadow: 0 10px 28px rgba(15, 23, 42, .04);
  transition: transform .12s ease, box-shadow .12s ease;
}
.card:hover{
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
}

.card__icon{
  position:absolute;
  inset:0;
  pointer-events:none;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  padding:16px;
  z-index:1;
}

.card__iconBox{
  width:96px;
  height:96px;
  border-radius:22px;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(255,255,255,.70);
  border: 1px solid rgba(15,23,42,.06);
  box-shadow: 0 14px 30px rgba(15,23,42,.08);
}

.card__iconBox img{
  width:84%;
  height:84%;
  object-fit:contain;
  object-position:center;
  display:block;
}

/* Для 3D-иконок (у которых уже есть свой фон) убираем «рамку» у контейнера */
.card__iconBox.iconBox--clear{
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
}

/* 3D иконки: убираем лишние белые поля (zoom + cover) */
.card__iconBox img.icon--cover{
  width:100%;
  height:100%;
  object-fit:contain;
  transform:none;
}

/* «Электроника» иногда выглядит чуть меньше из-за внутренних полей PNG */
.card__iconBox img.icon--electronicsBoost{
  transform: scale(1.10);
  transform-origin: center;
}

/* Beauty/Health icon needs a bit more scale */
.card__iconBox img.icon--beautyBoost{
  transform: scale(1.14);
  transform-origin: center;
}

.card::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  background:
    linear-gradient(to right,
      rgba(255,255,255,.92) 0%,
      rgba(255,255,255,.78) 42%,
      rgba(255,255,255,.10) 68%,
      rgba(255,255,255,0) 90%);
  pointer-events:none;
}

.card__top{
  position:relative;
  z-index:2;
  padding:16px;
  max-width:72%;
}

.card__title{
  font-weight:900;
  margin:0 0 6px 0;
  font-size:16px;
  letter-spacing:.2px;
}
.card__desc{
  margin:0;
  color: rgba(15, 23, 42, .65);
  font-size:11px;
  font-weight:700;
  line-height:1.25;
  display:-webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow:hidden;
}

/* ===== ПОДКАТЕГОРИИ ===== */
.tile{
  background:#fff;
  border:1px solid var(--line);
  border-radius:16px;
  padding:14px;
  min-height:72px;
  cursor:pointer;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .04);
  transition: transform .12s ease, box-shadow .12s ease;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.tile:hover{ transform: translateY(-2px); box-shadow: 0 14px 34px rgba(15, 23, 42, .08); }
.tile__name{ font-weight:800; }
.tile__badge{
  font-size:11px;
  color:#1146d9;
  background: rgba(29, 99, 255, .12);
  padding:6px 10px;
  border-radius:999px;
  font-weight:700;
}

/* ===== ТУРИЗМ: ПОПУЛЯРНЫЕ МЕСТА ===== */
.grid.grid--places{ grid-template-columns: repeat(3, 1fr); gap:18px; }

.placeCard{
  position:relative;
  border-radius:20px;
  overflow:hidden;
  min-height:170px;
  background-size:cover;
  background-position:center;
  box-shadow: 0 14px 38px rgba(15, 23, 42, .10);
  cursor:pointer;
  transform: translateZ(0);
  transition: transform .16s ease, box-shadow .16s ease;
}

.placeCard__overlay{
  position:absolute;
  inset:0;
  display:flex;
  align-items:flex-end;
  padding:16px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.72) 100%);
}

.placeCard__title{
  color:#fff;
  font-weight:900;
  font-size:22px;
  letter-spacing:.2px;
  text-shadow: 0 4px 12px rgba(0,0,0,.35);
}

.placeCard:hover{
  transform: scale(1.04);
  box-shadow: 0 22px 60px rgba(15, 23, 42, .18);
  z-index:2;
}

/* ===== ОБЪЯВЛЕНИЯ ===== */
.ads{
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:16px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .04);
}

/* ===== Выбор подкатегории в шапке категории (кнопка-"селект") ===== */
.catTabHead{ margin: 0 0 14px; }
.catTabBtn{
  width:100%;
  border:1px solid var(--line);
  background:#fff;
  border-radius:18px;
  padding:12px 14px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, .04);
}
.catTabBtn:hover{ background:#fbfcff; }
.catTabBtn__label{ display:flex; flex-direction:column; align-items:flex-start; gap:2px; min-width:0; }
.catTabBtn__label > span:first-child{ font-weight:900; color:var(--text); }
.catTabBtn__sub{ font-weight:800; font-size:12px; color:var(--muted); }

@media (max-width: 680px){
  /*
    ВАЖНО: на телефоне шапка должна быть в 1 колонку.
    Иначе центр иногда попадает в auto-колонку и поле поиска становится «узким».
  */
  .topbar{
    padding:10px 10px;
    grid-template-columns: 1fr !important;
  }

  /* левая часть нужна JS-у, но по дизайну скрываем */
  .topbar__left{ display:flex !important; position:absolute; left:10px; top:10px; z-index:80; }
  #btnMenu{ display:none !important; }

  /* центр шапки растягиваем во всю ширину */
  .topbar__center{ grid-column: 1 / -1; width:100%; }
  .catTabBtn{ border-radius:16px; padding:10px 12px; }
  .catTabBtn__sub{ font-size:11px; }
}

.empty{ display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }
.empty__text{ font-weight:800; }
.empty__sub{ margin-top:6px; color:var(--muted); font-weight:600; font-size:13px; }

.adlist{ display:grid; grid-template-columns: repeat(3, 1fr); gap:12px; }

.ad{
  border:1px solid var(--line);
  border-radius:16px;
  overflow:hidden;
  background:#fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .03);
  display:flex;
  flex-direction:column;
  cursor:pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.ad:hover{
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
}

.ad__img{
  width:100%;
  height:140px;
  background:#f2f4f8;
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--muted);
  font-weight:700;
}
.ad__img img{ width:100%; height:100%; object-fit:cover; }

.ad__body{ padding:12px; display:flex; flex-direction:column; gap:8px; }
.ad__title{ margin:0; font-weight:900; }
.ad__meta{ margin:0; color:var(--muted); font-size:12.5px; line-height:1.35; }
.ad__price{ font-weight:900; font-size:16px; }
.ad__actions{ display:flex; gap:8px; margin-top:4px; flex-wrap:wrap; }

/* ===== ДЕТАЛЬНАЯ ВКЛАДКА ОБЪЯВЛЕНИЯ ===== */
.adview{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:14px;
}
.adview__img{
  border:1px solid var(--line);
  border-radius:18px;
  overflow:hidden;
  background:#f2f4f8;
  height:360px;
}
.adview__img img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.adview__imgFallback{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--muted);
  font-weight:800;
}
.adview__side{
  border:1px solid var(--line);
  border-radius:18px;
  padding:14px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .03);
  background:#fff;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.adview__title{
  margin:0;
  font-weight:950;
  font-size:18px;
  line-height:1.2;
}
.adview__price{
  font-weight:950;
  font-size:22px;
}
.adview__meta{
  color:var(--muted);
  font-size:12.5px;
  font-weight:700;
  line-height:1.4;
}
.adview__desc{
  border-top:1px dashed var(--line);
  padding-top:10px;
  color: rgba(15, 23, 42, .82);
  font-weight:700;
  line-height:1.45;
  white-space:pre-wrap;
}
.adview__buttons{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:6px;
}
.btn.favActive{
  border-color: rgba(29, 99, 255, .30);
  background: rgba(29, 99, 255, .08);
  color:#1146d9;
}

/* ===== РЕКОМЕНДАЦИИ ===== */
.recGroup{
  margin-top:14px;
  padding-top:12px;
  border-top:1px dashed var(--line);
}
.recGroup:first-child{
  margin-top:0;
  padding-top:0;
  border-top:none;
}
.recGroup__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.recGroup__title{ font-weight:900; font-size:14px; }
.recGroup__hint{ color:var(--muted); font-size:11px; font-weight:700; }

.footnote{ margin-top:14px; color:var(--muted); font-size:11px; }

/* ===== МЕНЮ ===== */
.menu{
  position:fixed;
  top:76px;
  left:18px;
  width:220px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow: var(--shadow);
  padding:8px;
  z-index:100;
}
.menu__item{
  width:100%;
  text-align:left;
  border:0;
  background:transparent;
  padding:12px 12px;
  border-radius:14px;
  cursor:pointer;
  font-weight:800;
}
.menu__item:hover{ background:#f3f6ff; }

/* ===== МОДАЛКИ ===== */
.modal{ position:fixed; inset:0; z-index:200; }
.modal__backdrop{ position:absolute; inset:0; background: rgba(15, 23, 42, .45); }

.modal__panel{
  position:relative;
  width:min(720px, calc(100% - 24px));
  margin: 70px auto;
  background:#fff;
  border-radius:22px;
  border:1px solid var(--line);
  box-shadow: var(--shadow);
  overflow:auto;
  max-height: calc(100vh - 120px);
  -webkit-overflow-scrolling: touch;
}

.modal__panel--map{
  width:min(860px, calc(100% - 24px));
  max-height: calc(100vh - 90px);
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

.modal__top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 14px 10px;
  border-bottom:1px solid var(--line);
}
.modal__title{ font-weight:900; font-size:18px; padding-left:8px; }

.modal__body{
  padding:14px;
  min-height: 220px;
}


.form{ padding:14px; }
.form__row{
  display:grid;
  grid-template-columns: 1fr;
  gap:12px;
  margin-bottom:12px;
}
@media (min-width: 720px){
  .form__row:nth-child(2),
  .form__row:nth-child(3),
  .form__row:nth-child(5){ grid-template-columns: 1fr 1fr; }
}
.field{ display:flex; flex-direction:column; gap:6px; }
.field__label{ font-size:11px; color:var(--muted); font-weight:800; }
.field__hint{ font-size:11px; color: var(--muted); font-weight:700; line-height:1.35; }
.field input, .field select, .field textarea{
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px 12px;
  outline:none;
  font-size:14px;
  resize:vertical;
}
.field textarea{ min-height:110px; }
.field input:focus, .field select:focus, .field textarea:focus{
  border-color: rgba(29, 99, 255, .5);
  box-shadow: 0 0 0 4px rgba(29, 99, 255, .12);
}
.form__actions{ display:flex; justify-content:flex-end; gap:10px; padding:14px; padding-top:6px; }

.field__inline{
  display:flex;
  gap:10px;
  align-items:center;
}
.field__inline input{ flex:1; }
.field__inline .btn{ flex:0 0 auto; }

/* ===== КАРТА ВЫБОРА ТОЧКИ ===== */
.mapTools{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:12px 14px;
  border-bottom:1px solid var(--line);
}
.mapHint{
  color:var(--muted);
  font-size:11px;
  font-weight:800;
}
.leafletMap{
  flex:1;
  min-height: 340px;
}
.mapActions{
  border-top:1px solid var(--line);
  padding:12px 14px;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 1100px){
  .grid{ grid-template-columns: repeat(3, 1fr); }
  .grid.grid--places{ grid-template-columns: repeat(3, 1fr); }
  .brand__title{ font-size:28px; }
  .search{ width: 100%; }
}
@media (max-width: 860px){
  .grid{ grid-template-columns: repeat(2, 1fr); }
  .grid.grid--places{ grid-template-columns: repeat(2, 1fr); }
  .topbar{ grid-template-columns: auto 1fr; grid-template-rows: auto auto; }
  .topbar__right{ grid-column: 1 / -1; justify-content:flex-end; }
  .searchrow{ flex-wrap: wrap; }
  .search{ width: 100%; }
  .adlist{ grid-template-columns: repeat(2, 1fr); }

  .card__top{ max-width:85%; }

  .adview{ grid-template-columns: 1fr; }
  .adview__img{ height:280px; }
  .modal__panel{ margin: 54px auto; max-height: calc(100vh - 90px); }

  .langpop{ right:12px; top:116px; } /* из-за переноса шапки */
}
@media (max-width: 520px){
  /* На телефоне категории удобнее в 2 колонки, чтобы не было "простыни" */
  .grid{ grid-template-columns: repeat(2, 1fr); }
  .grid.grid--places{ grid-template-columns: 1fr; }
  .adlist{ grid-template-columns: 1fr; }
  .adview__img{ height:240px; }
}


/* ===== Мобильная нижняя навигация (телефон) ===== */
.mnav{ display:none; }

@media (max-width: 680px){
  .mnav{
    display:flex;
    position:fixed;
    left:0;
    right:0;
    bottom:0;
    height:76px;
    padding:10px 10px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(12px);
    border-top:1px solid var(--line);
    z-index:80;
    align-items:center;
    justify-content:space-between;
    gap:6px;
  }

  .mnav__item{
    flex:1;
    border:0;
    background:transparent;
    cursor:pointer;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:6px;
    padding:6px 0;
    color:#334155;
    font-weight:900;
    font-size:11px;
    letter-spacing:.2px;
    user-select:none;
    -webkit-tap-highlight-color: transparent;
  }
  .mnav__item svg{ width:22px; height:22px; transition: transform .12s ease; }
  .mnav__iconWrap{ position:relative; display:inline-flex; }

  .mnav__item:hover svg{ transform: scale(1.08); }
  .mnav__item:active svg{ transform: scale(0.96); }
  .mnav__item.is-active{ color: var(--text); }

  .mnav__add{
    position:absolute;
    left:50%;
    top:-22px;
    transform: translateX(-50%);
    width:56px;
    height:56px;
    border-radius:999px;
    border:0;
    background:#111827;
    box-shadow: 0 16px 36px rgba(0,0,0,.28);
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform .12s ease;
  }
  .mnav__add:hover{ transform: translateX(-50%) translateY(-1px); }

  /* чтобы контент не уходил под нижнюю панель */
  .page{ padding-bottom: 118px; }

  /* шапка без "каши" */
  .topbar{ padding:12px 12px; gap:10px; }
  #brandTitle{ align-self:center; }
  .topbar__right{ display:none; }
  .brand--inline{ display:none; }
  #btnSearch{ display:none; }

  .searchrow{ width:100%; justify-content:flex-start; }
  .search{ width:100%; flex: 1 1 auto; }
  #btnFilter{ padding:10px 12px; }

  .iconbtn{ width:40px; height:40px; }
  .container{ padding:0 12px; }

  /* карточки категорий чуть компактнее */
  .card{ min-height:116px; border-radius:20px; }
  .card__top{ padding:14px; max-width:88%; }
  .card__title{ font-size:15px; }
  .card__desc{ font-size:10px; }


  /* FIX (телефон): поиск от края до края + фильтр снизу */
  .searchrow{ display:flex; flex-direction:column; align-items:stretch; gap:10px; }
  .searchbar{ width:100%; }
  .searchbar .search{ width:100%; }
  #btnFilter{ width:100%; justify-content:center; align-self:stretch; border-radius:16px; padding:12px 14px; }
  .btnFilter .btnText{ display:inline; }

  /* FIX (телефон): категории — текст слева, иконка справа */
  .card{ display:flex; align-items:center; gap:12px; padding:14px; min-height:116px; border-radius:20px; }
  .card__top{ padding:0; max-width:none; flex:1 1 auto; }
  .card__icon{ position:relative; inset:auto; padding:0; margin-left:auto; display:flex; align-items:center; justify-content:flex-end; pointer-events:none; z-index:1; }
  .card__iconBox{ width:86px; height:86px; border-radius:20px; }
  .card__title{ font-size:15px; line-height:1.15; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow-wrap:anywhere; word-break:break-word; hyphens:auto; }
  .card__desc{ font-size:10px; overflow-wrap:anywhere; word-break:break-word; }
}


/* ===== Доп: плашка внутри карточки ===== */
.card__chip{
  position:absolute;
  top:12px;
  right:12px;
  z-index:2;
  font-size:11px;
  font-weight:800;
  padding:4px 10px;
  border-radius:999px;
  background:#22c55e;
  color:#fff;
  box-shadow: 0 8px 18px rgba(34, 197, 94, .18);
  pointer-events:none;
}


/* ===== Подкатегории (модалка) ===== */
.subcatList{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:12px 14px 16px;
}
.subcatItem{
  width:100%;
  border:1px solid var(--line);
  background:#fff;
  border-radius:16px;
  padding:14px 14px;
  cursor:pointer;
  font-weight:900;
  font-size:15px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  box-shadow: 0 6px 20px rgba(15, 23, 42, .04);
}
.subcatItem:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(15, 23, 42, .07);
  background:#fbfcff;
}
.subcatItem.is-active{
  border-color: rgba(29, 99, 255, .35);
  background: rgba(29, 99, 255, .06);
}
.subcatItem__muted{
  color: var(--muted);
  font-weight:900;
}

/* ===== Доп: контент модалок ===== */
.modal__content{ padding:14px; }

/* ===== RTL для арабского ===== */
[dir="rtl"] body{ direction: rtl; }
[dir="rtl"] .menu{ left:auto; right:18px; }
[dir="rtl"] .menu__item{ text-align:right; }
[dir="rtl"] .field__inline{ flex-direction: row-reverse; }
[dir="rtl"] .modal__title{ padding-left:0; padding-right:8px; }
[dir="rtl"] .langpop{ right:auto; left:18px; }
[dir="rtl"] .langpop__name{ text-align:right; }


/* ===== AUTH MODAL ===== */
.authPanel{
  width: min(560px, calc(100vw - 28px));
  margin: 64px auto;
  border-radius: 22px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 18px 60px rgba(0,0,0,.35);
  background: #ffffff;
}
.authPanel__bg{
  display:none;
}
.authPanel__content{
  position:relative;
  padding: 18px;
}
.authTop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.authTitle{
  color: rgba(18,18,18,.95);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: .2px;
}
.authForm{
  display:flex;
  flex-direction:column;
  gap: 12px;
}
.authLang{
  display:flex;
  justify-content:center;
  gap: 6px;
  margin: 8px 0 12px;
}
.authLang__btn{
  appearance:none;
  border: 1px solid var(--line);
  background: #fff;
  color: #1a1a1a;
  border-radius: 12px;
  padding: 8px 12px;
  font-weight: 800;
  font-size: 13px;
  cursor:pointer;
}
.authLang__btn.isOn{
  border-color: #2c6bff;
  background: rgba(44,107,255,.12);
  color: #1b4edb;
}
.field--auth .field__label{ color: rgba(20,20,20,.92); }
.field--auth input{
  background: #ffffff;
  border-color: #2c6bff;
  color: rgba(18,18,18,.96);
}
.field--auth input::placeholder{ color: rgba(18,18,18,.55); }
.field--auth input:focus{
  box-shadow: 0 0 0 3px rgba(44,107,255,.18);
}
.authActions{
  display:flex;
  gap: 10px;
  margin-top: 6px;
}
.authActions .btn{ flex: 1; }
.authError{
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 82, 82, .18);
  color: rgba(20,20,20,.95);
  border: 1px solid rgba(255, 82, 82, .35);
  font-size: 14px;
}
.authNote{
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

/* ===== REVIEWS & STARS ===== */
.reviews{
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.reviews__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.reviews__title{
  font-weight: 800;
  font-size: 16px;
}
.ratingSummary{
  display:flex;
  align-items:center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}
.stars{
  display:flex;
  align-items:center;
  gap: 4px;
}
.starBtn{
  appearance:none;
  border:none;
  background: transparent;
  padding: 2px;
  cursor:pointer;
  font-size: 22px;
  line-height: 1;
  color: #ffcc00;
  opacity: .35;
  transform: translateY(-1px);
}
.starBtn.isOn{ opacity: 1; }
.starBtn:disabled{ cursor: default; opacity: .35; }

.reviewForm{
  display:flex;
  flex-direction:column;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.02);
  border-radius: 18px;
}
.reviewForm textarea{
  width: 100%;
  min-height: 84px;
  resize: vertical;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  outline: none;
}
.reviewForm textarea::placeholder{ color: var(--muted); }

.reviewList{
  display:flex;
  flex-direction:column;
  gap: 10px;
  margin-top: 12px;
}
.reviewItem{
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px 12px;
  background: rgba(255,255,255,.02);
}
.reviewItem__meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}
.reviewItem__text{
  white-space: pre-wrap;
}


.btn.wa{ background:#25D366; color:#fff; }


/* ===== ФИЛЬТРЫ ===== */
.form--filter{ padding:0; }
.form__actions--filter{ padding:0; justify-content:space-between; }
.filterActions{
  display:flex;
  gap:10px;
  justify-content:space-between;
  align-items:center;
  margin-top:10px;
}
.filterHint{
  font-size:11px;
  opacity:.75;
  margin-top:4px;
}
.btn.filterActive{
  position:relative;
}
.btn.filterActive::after{
  content:"";
  position:absolute;
  top:6px;
  right:6px;
  width:8px;
  height:8px;
  border-radius:50%;
  background: var(--blue);
}

.adextra{ margin-top:8px; font-size:13px; opacity:.85; }


/* ===== Туризм: центрированный заголовок ===== */
#catsSection.is-tourism .section__head{
  justify-content:center;
}
#catsSection.is-tourism #btnShowAllCats{ display:none !important; }
#catsSection.is-tourism #sectionTitle{
  width:100%;
  text-align:center;
  font-size:34px;
  font-weight:900;
}



/* ===== Туризм: страница раздела ===== */
.tourismPage{
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:18px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .04);
}

/* ===== Туризм: страница места (по ТЗ: описание по центру + фото слева, текст справа) ===== */
.tourismDetail{
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:18px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .04);
}

.tourismDetail__intro{
  max-width:760px;
  margin:0 auto 16px;
  text-align:center;
  color:var(--text2);
  line-height:1.6;
  font-size:15px;
}

/* ===== Туризм: галерея как на примере (большое фото + миниатюры) ===== */
.tourismGalleryA{ display:flex; flex-direction:column; gap:12px; }

.tga__frame{
  position:relative;
  width:100%;
  border-radius:22px;
  overflow:hidden;
  background:#f2f4f8;
  border:1px solid var(--line);
  box-shadow: 0 18px 46px rgba(15, 23, 42, .12);
}

.tga__img{
  width:100%;
  height:460px;
  object-fit:cover;
  display:block;
}

.tga__arrow{
  position:absolute;
  top:50%;
  transform: translateY(-50%);
  width:46px;
  height:46px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.45);
  background: rgba(15, 23, 42, .32);
  color:#fff;
  font-size:26px;
  font-weight:900;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  backdrop-filter: blur(10px);
  transition: transform .12s ease, background .12s ease;
}
.tga__arrow:hover{ transform: translateY(-50%) scale(1.04); background: rgba(15, 23, 42, .40); }
.tga__arrow--left{ left:14px; }
.tga__arrow--right{ right:14px; }

.tga__caption{
  position:absolute;
  left:0; right:0; bottom:0;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  padding:14px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 20%, rgba(0,0,0,.72) 100%);
}
.tga__capText{ min-width:0; }
.tga__capTitle{ color:#fff; font-weight:900; font-size:18px; text-shadow: 0 4px 12px rgba(0,0,0,.35); }
.tga__capDesc{ color:rgba(255,255,255,.92); margin-top:6px; font-size:13px; line-height:1.35; max-width:760px; }

.tga__more{
  border:0;
  border-radius:999px;
  padding:10px 14px;
  font-weight:900;
  cursor:pointer;
  background: rgba(255,255,255,.92);
  color: var(--text);
  box-shadow: 0 10px 26px rgba(15, 23, 42, .18);
  white-space:nowrap;
}
.tga__more:hover{ background:#fff; }

.tga__thumbs{
  display:flex;
  gap:10px;
  overflow-x:auto;
  padding:2px 2px 6px;
  scroll-snap-type:x mandatory;
}
.tga__thumbs::-webkit-scrollbar{ height:8px; }
.tga__thumbs::-webkit-scrollbar-thumb{ background:#d9deea; border-radius:999px; }

.tga__thumb{
  flex:0 0 auto;
  width:140px;
  height:92px;
  border-radius:16px;
  border:1px solid var(--line);
  background-size:cover;
  background-position:center;
  cursor:pointer;
  scroll-snap-align:start;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .06);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.tga__thumb:hover{ transform: translateY(-1px); box-shadow: 0 14px 34px rgba(15, 23, 42, .10); }
.tga__thumb.is-active{ border-color: var(--blue); box-shadow: 0 16px 40px rgba(29, 99, 255, .20); }

.tga__actions{ display:flex; justify-content:center; }

@media (max-width: 680px){
  .tga__img{ height:260px; }
  .tga__arrow{ width:42px; height:42px; }
  .tga__thumb{ width:120px; height:78px; }
  .tga__capTitle{ font-size:16px; }
}

.tourismDetail__row{
  display:grid;
  grid-template-columns: 360px 1fr;
  gap:14px;
  align-items:start;
}

.tourismDetail__photo{
  width:360px;
  height:240px;
  border-radius:20px;
  background-size:cover;
  background-position:center;
  border:1px solid var(--line);
  box-shadow: 0 14px 38px rgba(15, 23, 42, .10);
  cursor:pointer;
}

.tourismDetail__info{
  background:#fff;
  border:1px solid var(--line);
  border-radius:20px;
  padding:16px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .04);
  display:flex;
  flex-direction:column;
  gap:10px;
  min-height:240px;
}

.tourismDetail__name{
  font-weight:900;
  font-size:20px;
  color:var(--text);
}

.tourismDetail__text{
  color:var(--text2);
  line-height:1.55;
}

.tourismDetail__coords{
  color:var(--muted);
  font-size:13px;
  font-weight:800;
}

@media (max-width: 680px){
  .tourismDetail__row{ grid-template-columns: 1fr; }
  .tourismDetail__photo{ width:100%; height:220px; }
  .tourismDetail__info{ min-height:auto; }
  .tourismDetail__intro{ text-align:left; }
}

/* В туризме (страница места) нам нужен НЕ многоколонный грид, а один центрированный столбец */
.grid.grid--one{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:16px;
}
.grid.grid--one > *{
  width:100%;
  max-width:880px;
}
.tourismPage__intro{
  margin:0 0 14px;
  color:var(--text2);
  line-height:1.55;
  font-size:15px;
}

.tourismSpot{
  display:grid;
  grid-template-columns: 1.05fr .95fr;
  gap:14px;
  align-items:stretch;
  border:1px solid var(--line);
  border-radius:18px;
  overflow:hidden;
}
.tourismSpot__photo{
  min-height:170px;
  background-size:cover;
  background-position:center;
}
.tourismSpot__body{
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.tourismSpot__name{
  font-weight:900;
  font-size:18px;
  color:var(--text);
}
.tourismSpot__text{
  color:var(--text2);
  line-height:1.5;
}
.tourismSpot__coords{
  color:var(--muted);
  font-size:13px;
  font-weight:700;
}

@media (max-width: 680px){
  .tourismSpot{ grid-template-columns: 1fr; }
  .tourismSpot__photo{ min-height:160px; }
}
/* ===== Туризм: страница места ===== */
.placePage{
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:18px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .04);
}
.placePage__kicker{
  color:var(--muted);
  font-weight:700;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.08em;
  margin-bottom:8px;
}
.placePage__title{
  margin:0 0 10px;
  font-size:22px;
  font-weight:900;
  color:var(--text);
}
.placePage__text{
  margin:0;
  color:var(--text2);
  line-height:1.55;
}
.placePage__bottom{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap:14px;
  margin-top:16px;
  align-items:stretch;
}
.placePage__photo{
  border-radius:18px;
  min-height:160px;
  background-size:cover;
  background-position:center;
  border:1px solid var(--line);
}
.placePage__side{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.placePage__coords{
  font-weight:800;
  color:var(--text);
}
.placePage__hint{
  color:var(--muted);
  font-size:12px;
  line-height:1.4;
}

/* Инфо-блок над объявлениями */
.infobox{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  background: #f6f7ff;
  border:1px solid #e7e9ff;
  border-radius:16px;
  padding:12px 12px;
  margin-bottom:14px;
}
.infobox__text{
  color:var(--text2);
  line-height:1.4;
}

/* Мобайл */
@media (max-width: 680px){
  #catsSection.is-tourism #sectionTitle{ font-size:26px; }
  .grid.grid--places{ grid-template-columns: 1fr; }
  .placePage__bottom{ grid-template-columns: 1fr; }
  .infobox{ flex-direction:column; align-items:flex-start; }
}



/* ===== Мобильная шапка: поиск во всю ширину, фильтр ниже ===== */
@media (max-width: 680px){
  /* Поиск на телефоне — от края до края */
  .topbar{ padding:10px 0; grid-template-columns: 1fr !important; }
  .topbar__left{ display:flex !important; position:absolute; left:10px; top:10px; z-index:80; }
  #btnMenu{ display:none !important; }
  .topbar__center{ grid-column: 1 / -1; width:100%; }
  /* сверху оставляем только нижнюю навигацию для уведомлений, поэтому верхнюю иконку прячем */
  #btnNotif{ display:none; }

  /* центр шапки должен тянуться по ширине, иначе поиск будет "узким" */
  .topbar__center{ align-items:stretch; width:100%; }

  /* центр шапки: в 1 колонку */
  .searchrow{
    display:grid;
    grid-template-columns: 1fr;
    gap:10px;
    align-items:stretch;
    width:100%;
  }

  /* заголовок AVAZU — отдельной строкой и по центру */
  #brandTitle{
    font-size:24px;
    font-weight:900;
    justify-self:center;
    text-align:center;
  }

  /* убираем большой логотип в строке поиска (точки остаются сверху) */
  .brand--inline{ display:none; }

  .searchbar{
    display:flex;
    width:100%;
    gap:10px;
  }
  .search{ width:100% !important; }
  .search input{ width:100% !important; }

  /* кнопка "Найти" на телефоне скрыта — чтобы поле было от бока до бока */
  #btnSearch{ display:none; }

  /* фильтр отдельной строкой, на всю ширину */
  #btnFilter{
    width:100% !important;
    justify-content:center;
    height:44px;
    padding:0 14px;
  }

  #btnFilter .btnIcon{ width:18px; height:18px; }
}

/* ===== Мобильные карточки категорий: текст слева, иконка справа ===== */
@media (max-width: 680px){
  .card{
    min-height:110px;
    display:flex;
    align-items:center;
    justify-content:space-between;
  }

  /* убираем абсолютное позиционирование, чтобы не было "текст над иконкой" */
  .card__icon{
    position:static;
    inset:auto;
    padding:12px 12px 12px 0;
    display:flex;
    align-items:center;
    justify-content:flex-end;
  }

  .card__top{
    padding:12px;
    max-width:none;
    flex:1;
  }

  .card__iconBox{
    width:74px;
    height:74px;
    border-radius:18px;
  }

  .card__title{ font-size:14px; }
  .card__desc{ font-size:10px; }


  /* FIX (телефон): поиск от края до края + фильтр снизу */
  .searchrow{ display:flex; flex-direction:column; align-items:stretch; gap:10px; }
  .searchbar{ width:100%; }
  .searchbar .search{ width:100%; }
  #btnFilter{ width:100%; justify-content:center; align-self:stretch; border-radius:16px; padding:12px 14px; }
  .btnFilter .btnText{ display:inline; }

  /* FIX (телефон): категории — текст слева, иконка справа */
  .card{ display:flex; align-items:center; gap:12px; padding:14px; min-height:116px; border-radius:20px; }
  .card__top{ padding:0; max-width:none; flex:1 1 auto; }
  .card__icon{ position:relative; inset:auto; padding:0; margin-left:auto; display:flex; align-items:center; justify-content:flex-end; pointer-events:none; z-index:1; }
  .card__iconBox{ width:86px; height:86px; border-radius:20px; }
  .card__title{ font-size:15px; line-height:1.15; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow-wrap:anywhere; word-break:break-word; hyphens:auto; }
  .card__desc{ font-size:10px; overflow-wrap:anywhere; word-break:break-word; }

  /* градиент можно оставить, но он иногда мешает на маленьких карточках */
  .card::after{ opacity:.85; }
}


/* ===== Главная: плитки категорий (только иконка + заголовок снизу) ===== */
.catItem{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  cursor:pointer;
  user-select:none;
}
.catItem:focus{ outline: none; }
.catItem__tile{
  width: 220px;
  height: 160px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(0,0,0,.08);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.catItem__icon{
  width: 88%;
  height: 88%;
  display:flex;
  align-items:center;
  justify-content:center;
}
.catItem__icon img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display:block;
}
.catItem__label{
  font-weight: 800;
  text-align:center;
  line-height: 1.15;
  font-size: 16px;
  color: #0b1220;
  max-width: 240px;
}

@media (max-width: 980px){
  .catItem__tile{ width: 180px; height: 140px; border-radius: 22px; }
  .catItem__label{ font-size: 15px; max-width: 200px; }
}

@media (max-width: 520px){
  .catItem__tile{ width: 150px; height: 120px; border-radius: 18px; }
  .catItem__label{ font-size: 14px; max-width: 160px; }
}
