/*
Theme Name: Crimeaguide
Theme URI: http://crimeaarenda.ru/
Description: Тема доски объявлений об аренде жилья в Крыму. Рассчитана на связку с плагином cg-core.
Author: Миграция crimeaguide.ru
Version: 0.4.11
Text Domain: crimeaguide
*/

/* ==========================================================================
   1. Основы
   ========================================================================== */

:root {
	--cg-blue: #14507e;
	--cg-blue-dark: #0f3c60;
	--cg-blue-light: #e8f1f9;
	--cg-accent: #e07b2a;
	--cg-accent-dark: #c2651b;
	--cg-green: #1e8b4d;
	--cg-text: #1d2530;
	--cg-muted: #67717f;
	--cg-line: #e3e8ee;
	--cg-bg: #f5f7fa;
	--cg-white: #fff;
	--cg-radius: 10px;
	--cg-shadow: 0 1px 2px rgba(16, 32, 51, .06), 0 6px 18px rgba(16, 32, 51, .06);
	--cg-shadow-hover: 0 2px 4px rgba(16, 32, 51, .08), 0 14px 34px rgba(16, 32, 51, .13);
}

* { box-sizing: border-box; }

body {
	margin: 0;
	background: var(--cg-bg);
	color: var(--cg-text);
	font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}

body.cg-no-scroll { overflow: hidden; }

img { max-width: 100%; height: auto; }
a { color: var(--cg-blue); text-decoration: none; }
a:hover { color: var(--cg-accent-dark); }

h1, h2, h3 { line-height: 1.25; margin: 0 0 .6em; color: var(--cg-text); }
h1 { font-size: 30px; font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 23px; font-weight: 700; }
h3 { font-size: 18px; }

.cg-wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Кнопки ------------------------------------------------------------------ */

.cg-btn {
	display: inline-block;
	padding: 12px 24px;
	border: 0;
	border-radius: 8px;
	background: var(--cg-accent);
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: background .15s ease, transform .15s ease;
}

.cg-btn:hover { background: var(--cg-accent-dark); color: #fff; transform: translateY(-1px); }
.cg-btn--ghost { background: var(--cg-blue-light); color: var(--cg-blue); }
.cg-btn--ghost:hover { background: #d8e6f4; color: var(--cg-blue-dark); }
.cg-btn--wide { display: block; width: 100%; text-align: center; }

/* ==========================================================================
   2. Шапка
   ========================================================================== */

.cg-header {
	background: var(--cg-white);
	border-bottom: 1px solid var(--cg-line);
	position: relative;
	z-index: 20;
}

.cg-header__top {
	display: flex;
	align-items: center;
	gap: 20px;
	padding-top: 14px;
	padding-bottom: 14px;
}

.cg-logo {
	font-size: 23px;
	font-weight: 800;
	color: var(--cg-blue);
	letter-spacing: -.02em;
	white-space: nowrap;
}

.cg-logo span { color: var(--cg-accent); }

.cg-footer .cg-logo span, .cg-footer h3 span { color: var(--cg-accent); }

.cg-tagline {
	flex: 1;
	color: var(--cg-muted);
	font-size: 14px;
	border-left: 1px solid var(--cg-line);
	padding-left: 20px;
}

.cg-header__search { width: 260px; flex: none; }
.cg-header__search .search-form { display: flex; gap: 6px; }
.cg-header__search input[type="search"] { min-width: 0; }

.cg-header__cta { flex: none; }

.cg-nav { background: var(--cg-blue); }

.cg-nav__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
}

.cg-nav__menu { min-width: 0; }

/* Кнопка подачи живёт в синей полосе, справа от меню. */
.cg-nav__cta {
	flex: 0 0 auto;
	margin-left: auto;
	padding: 8px 18px;
	font-size: 14px;
	white-space: nowrap;
	background: var(--cg-accent);
	color: #fff;
	font-weight: 600;
}

.cg-nav__cta:hover { background: var(--cg-accent-dark); color: #fff; }

.cg-nav ul { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }

.cg-nav a {
	display: block;
	padding: 12px 16px;
	color: rgba(255, 255, 255, .92);
	font-size: 15px;
	font-weight: 500;
}

.cg-nav a:hover { background: rgba(255, 255, 255, .12); color: #fff; }

.cg-nav .current-menu-item > a { background: rgba(255, 255, 255, .18); color: #fff; }

/* Кнопка — не пункт меню: снимаем «менюшные» отступы и подсветку. */
.cg-nav .cg-nav__cta {
	padding: 8px 18px;
	color: #fff;
	background: var(--cg-accent);
}

.cg-nav .cg-nav__cta:hover { background: var(--cg-accent-dark); color: #fff; }

@media (max-width: 640px) {
	.cg-nav__row { flex-wrap: wrap; }
	.cg-nav__cta { margin: 8px 0 10px; }
}

main.cg-wrap { padding-top: 26px; padding-bottom: 50px; }

/* ==========================================================================
   3. Поля ввода
   ========================================================================== */

input[type="text"], input[type="search"], input[type="email"], input[type="number"],
input[type="tel"], input[type="url"], input[type="password"], select, textarea {
	width: 100%;
	padding: 11px 13px;
	border: 1px solid #ccd4de;
	border-radius: 8px;
	background: #fff;
	color: var(--cg-text);
	font: inherit;
	font-size: 15px;
}

/* Поле пароля в окне входа: без этого правила браузер рисует его по-своему. */
input[type="password"] { letter-spacing: 1px; }

input[type="password"]::-ms-reveal { display: none; }

input:focus, select:focus, textarea:focus {
	outline: 2px solid var(--cg-blue);
	outline-offset: -1px;
	border-color: var(--cg-blue);
}

select { appearance: none; background-image: none; padding-right: 30px; cursor: pointer; }

/* ==========================================================================
   4. Главная: первый экран
   ========================================================================== */

.cg-hero {
	background: linear-gradient(135deg, #123f63 0%, #1c6396 55%, #2b7fb8 100%);
	color: #fff;
	padding: 54px 0 46px;
	/* Небольшой отступ от меню: верхний отступ main уменьшаем не полностью. */
	margin: -6px 0 34px;
	border-radius: 12px;
}

.cg-hero h1 { color: #fff; font-size: 38px; max-width: 760px; margin-bottom: 12px; }

.cg-hero__lead {
	font-size: 17px;
	color: rgba(255, 255, 255, .88);
	max-width: 640px;
	margin: 0 0 26px;
}

.cg-hero__form {
	display: grid;
	grid-template-columns: 1.6fr 1fr auto;
	gap: 10px;
	background: rgba(255, 255, 255, .13);
	padding: 12px;
	border-radius: 14px;
	backdrop-filter: blur(3px);
}

.cg-hero__form input,
.cg-hero__form select {
	border: 0;
	border-radius: 8px;
	padding: 14px 14px;
	font-size: 16px;
}

.cg-hero__stats {
	display: flex;
	flex-wrap: wrap;
	gap: 26px;
	margin-top: 24px;
	font-size: 15px;
	color: rgba(255, 255, 255, .85);
}

.cg-hero__stats b { color: #fff; font-size: 19px; display: block; }

/* ==========================================================================
   5. Главная: города плиткой и лента
   ========================================================================== */

.cg-section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin: 34px 0 16px;
}

.cg-section-head h2 { margin: 0; }
.cg-section-head a { font-size: 15px; font-weight: 600; }

.cg-tiles {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 16px;
}

.cg-tile {
	position: relative;
	display: block;
	border-radius: var(--cg-radius);
	overflow: hidden;
	background: #dfe6ee;
	aspect-ratio: 4 / 3;
	box-shadow: var(--cg-shadow);
}

.cg-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.cg-tile:hover img { transform: scale(1.06); }

.cg-tile__label {
	position: absolute;
	inset: auto 0 0 0;
	padding: 26px 14px 12px;
	background: linear-gradient(to top, rgba(8, 22, 36, .85), rgba(8, 22, 36, 0));
	color: #fff;
}

.cg-tile__name { display: block; font-size: 18px; font-weight: 700; }
.cg-tile__count { font-size: 13px; color: rgba(255, 255, 255, .8); }

/* Лента объявлений — горизонтальная прокрутка, как на старом сайте */
.cg-strip {
	display: flex;
	gap: 14px;
	overflow-x: auto;
	padding: 4px 4px 14px;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
}

.cg-strip__item {
	flex: 0 0 190px;
	scroll-snap-align: start;
	border-radius: var(--cg-radius);
	overflow: hidden;
	background: #dfe6ee;
	box-shadow: var(--cg-shadow);
}

.cg-strip__item img { width: 100%; height: 142px; object-fit: cover; display: block; }
.cg-strip__title { display: block; padding: 9px 11px; font-size: 14px; font-weight: 600; color: var(--cg-text); line-height: 1.35; }
.cg-strip__price { display: block; padding: 0 11px 10px; font-size: 14px; font-weight: 700; color: var(--cg-accent-dark); }

/* ==========================================================================
   6. Сетка и карточка объявления
   ========================================================================== */

.cg-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 20px;
}

.cg-card {
	display: flex;
	flex-direction: column;
	background: var(--cg-white);
	border-radius: var(--cg-radius);
	overflow: hidden;
	box-shadow: var(--cg-shadow);
	transition: box-shadow .2s ease, transform .2s ease;
}

.cg-card:hover { box-shadow: var(--cg-shadow-hover); transform: translateY(-2px); }
.cg-card.is-promoted { outline: 2px solid var(--cg-accent); outline-offset: -2px; }

.cg-card__thumb {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	background: #e7ecf2;
	overflow: hidden;
}

.cg-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.cg-card__nophoto {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: #9aa6b4;
	font-size: 14px;
	background: repeating-linear-gradient(45deg, #eef2f7, #eef2f7 12px, #e6ebf2 12px, #e6ebf2 24px);
}

.cg-card__price {
	position: absolute;
	left: 10px;
	bottom: 10px;
	padding: 6px 11px;
	border-radius: 20px;
	background: rgba(255, 255, 255, .95);
	color: var(--cg-text);
	font-size: 15px;
	font-weight: 700;
	box-shadow: 0 2px 8px rgba(10, 24, 40, .18);
}

.cg-price__unit { font-size: 12px; font-weight: 500; color: var(--cg-muted); }

.cg-card__body { display: flex; flex-direction: column; flex: 1; padding: 13px 15px 15px; }

.cg-card__title { margin: 0 0 6px; font-size: 16px; font-weight: 700; line-height: 1.35; }
.cg-card__title a { color: var(--cg-text); }
.cg-card__title a:hover { color: var(--cg-blue); }

.cg-card__excerpt {
	margin: 0 0 12px;
	color: var(--cg-muted);
	font-size: 14px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.cg-card__meta {
	margin-top: auto;
	display: flex;
	flex-wrap: wrap;
	gap: 6px 12px;
	color: var(--cg-muted);
	font-size: 13px;
}

.cg-card__meta span::before { content: "· "; color: #b6c0cb; }
.cg-card__meta span:first-child::before { content: ""; }

/* Значки ------------------------------------------------------------------ */

.cg-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }

.cg-badge {
	display: inline-block;
	padding: 3px 9px;
	border-radius: 20px;
	background: var(--cg-blue-light);
	color: var(--cg-blue);
	font-size: 12px;
	font-weight: 600;
}

.cg-badge--stale { background: #f3f4f6; color: #8b95a1; }
.cg-card__thumb .cg-badges { position: absolute; left: 10px; top: 10px; margin: 0; }
.cg-card__thumb .cg-badge { background: rgba(255, 255, 255, .94); }

/* ==========================================================================
   7. Каталог: фильтры
   ========================================================================== */

.cg-catalog-head { margin-bottom: 18px; }
.cg-catalog-head h1 { margin-bottom: 6px; }
.cg-catalog-head__found { color: var(--cg-muted); font-size: 15px; margin: 0; }

.cg-filterbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 16px;
	background: var(--cg-white);
	border: 1px solid var(--cg-line);
	border-radius: var(--cg-radius);
	padding: 13px 16px;
	margin-bottom: 20px;
}

.cg-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cg-filterbar__label { color: var(--cg-muted); font-size: 14px; }

.cg-chip {
	display: inline-block;
	padding: 7px 15px;
	border-radius: 20px;
	background: #eff3f8;
	color: var(--cg-text);
	font-size: 14px;
	font-weight: 500;
	transition: background .15s ease;
}

.cg-chip:hover { background: #e2e9f2; color: var(--cg-text); }
.cg-chip.is-active { background: var(--cg-blue); color: #fff; }

.cg-filterbar__right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cg-filterbar__right label { color: var(--cg-muted); font-size: 14px; white-space: nowrap; }
.cg-filterbar select { width: auto; min-width: 170px; padding: 8px 30px 8px 11px; font-size: 14px; }
.cg-sortform { display: flex; align-items: center; gap: 10px; margin: 0; }

.cg-row { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; align-items: start; }
.cg-side { position: sticky; top: 20px; }

.cg-pagination { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0; }

.cg-pagination .page-numbers {
	display: inline-block;
	min-width: 40px;
	padding: 9px 12px;
	border: 1px solid var(--cg-line);
	border-radius: 8px;
	background: #fff;
	text-align: center;
	font-weight: 500;
}

.cg-pagination .page-numbers.current { background: var(--cg-blue); border-color: var(--cg-blue); color: #fff; }

.cg-empty {
	background: #fff;
	border: 1px solid var(--cg-line);
	border-radius: var(--cg-radius);
	padding: 32px;
	text-align: center;
}

/* ==========================================================================
   8. Карточка объявления (страница)
   ========================================================================== */

.cg-breadcrumbs { font-size: 14px; color: var(--cg-muted); margin-bottom: 16px; }
.cg-breadcrumbs a { color: var(--cg-muted); }
.cg-breadcrumbs a:hover { color: var(--cg-blue); }
.cg-breadcrumbs__sep { margin: 0 7px; color: #c3ccd6; }

.cg-single__title { margin: 8px 0 10px; }

.cg-single__price {
	display: inline-block;
	margin: 0 0 16px;
	padding: 9px 16px;
	border-radius: 8px;
	background: #fff5ec;
	color: var(--cg-accent-dark);
	font-size: 21px;
	font-weight: 800;
}

.cg-single__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 22px;
	color: var(--cg-muted);
	font-size: 14px;
	margin-bottom: 20px;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--cg-line);
}

.cg-single__layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 30px; align-items: start; }
.cg-single__aside { position: sticky; top: 20px; }

.cg-stale {
	background: #fff8e6;
	border-left: 4px solid #e0a800;
	border-radius: 4px;
	padding: 13px 16px;
	margin-bottom: 18px;
	font-size: 15px;
}

.cg-text { background: #fff; border-radius: var(--cg-radius); padding: 22px 24px; box-shadow: var(--cg-shadow); }
.cg-text p:first-child { margin-top: 0; }
.cg-text p:last-child { margin-bottom: 0; }

/* Галерея ----------------------------------------------------------------- */

.cg-gallery { margin-bottom: 24px; }

.cg-gallery__main {
	display: block;
	position: relative;
	border-radius: var(--cg-radius);
	overflow: hidden;
	background: #e7ecf2;
	cursor: zoom-in;
	box-shadow: var(--cg-shadow);
}

.cg-gallery__main img { display: block; width: 100%; max-height: 560px; object-fit: cover; }

.cg-gallery__hint {
	position: absolute;
	right: 12px;
	bottom: 12px;
	padding: 5px 11px;
	border-radius: 20px;
	background: rgba(10, 24, 40, .6);
	color: #fff;
	font-size: 12px;
}

.cg-gallery__thumbs { display: flex; gap: 9px; overflow-x: auto; padding: 10px 2px 4px; }

.cg-gallery__thumb {
	flex: 0 0 104px;
	height: 78px;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 7px;
	overflow: hidden;
	background: #e7ecf2;
	cursor: pointer;
}

.cg-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cg-gallery__thumb.is-active { border-color: var(--cg-accent); }

.cg-lightbox {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(8, 16, 26, .93);
	padding: 30px;
}

.cg-lightbox[hidden] { display: none; }
.cg-lightbox img { max-width: 100%; max-height: 92vh; object-fit: contain; border-radius: 6px; }

.cg-lightbox button {
	position: absolute;
	border: 0;
	background: rgba(255, 255, 255, .12);
	color: #fff;
	font-size: 30px;
	line-height: 1;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	cursor: pointer;
}

.cg-lightbox button:hover { background: rgba(255, 255, 255, .24); }
.cg-lightbox__close { top: 22px; right: 22px; }
.cg-lightbox__prev { left: 22px; top: 50%; margin-top: -26px; }
.cg-lightbox__next { right: 22px; top: 50%; margin-top: -26px; }

/* Контакты ---------------------------------------------------------------- */

.cg-contacts {
	background: #fff;
	border-radius: var(--cg-radius);
	padding: 20px 22px;
	box-shadow: var(--cg-shadow);
	margin-bottom: 18px;
}

.cg-contacts h2 { margin-top: 0; font-size: 19px; }
.cg-contacts dl { margin: 0; }
.cg-contacts dt { color: var(--cg-muted); font-size: 13px; margin-top: 12px; }
.cg-contacts dt:first-child { margin-top: 0; }
.cg-contacts dd { margin: 2px 0 0; font-size: 16px; }

.cg-phone { font-size: 21px; font-weight: 800; color: var(--cg-text); white-space: nowrap; }
.cg-phone:hover { color: var(--cg-accent-dark); }

.cg-promo { background: #fff; border-radius: var(--cg-radius); padding: 20px 22px; box-shadow: var(--cg-shadow); }
.cg-promo__buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.cg-promo__buttons .cg-btn { padding: 10px 16px; font-size: 15px; }

/* ==========================================================================
   9. Формы, кабинет, уведомления
   ========================================================================== */

.cg-form { background: #fff; border-radius: var(--cg-radius); padding: 26px 28px; box-shadow: var(--cg-shadow); }
.cg-register, .cg-reset { max-width: 560px; margin-left: auto; margin-right: auto; }
.cg-form__row { margin: 0 0 16px; }
.cg-form__row label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 15px; }
.cg-form__hint { display: block; color: var(--cg-muted); font-size: 13px; margin-top: 5px; }
.cg-form__trap { position: absolute; left: -9999px; }
.cg-form__note { display: block; color: var(--cg-muted); font-size: 13px; margin-top: 4px; }
.cg-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
.cg-price-row { display: flex; align-items: center; gap: 8px; }
.cg-price-row input { width: 50%; }
.cg-price-row__sep { color: var(--cg-muted); font-size: 14px; }
.cg-features-form { margin: 8px 0 22px; padding: 18px 20px; border: 1px solid var(--cg-line); border-radius: 10px; background: #f9fbfd; }
.cg-features-form__title { margin: 0 0 4px; font-size: 20px; }
.cg-check-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 14px; }
.cg-check-grid .cg-check { font-size: 14px; }
.cg-card__features { margin: 0 0 8px; color: #4f5d6d; font-size: 13px; line-height: 1.4; }
.cg-features { margin: 26px 0 0; padding: 18px 0 0; border-top: 1px solid var(--cg-line); }
.cg-features h2 { margin: 0 0 12px; font-size: 21px; }
.cg-features__row { display: flex; gap: 18px; padding: 5px 0; font-size: 14px; }
.cg-features__row dt { width: 180px; flex: 0 0 180px; color: var(--cg-muted); }
.cg-features__row dd { margin: 0; }
.cg-features__note { margin: 12px 0 0; color: var(--cg-muted); font-size: 13px; }
.cg-map { height: 340px; border-radius: 10px; overflow: hidden; background: #e9eef4; }
.cg-listing-map { margin: 26px 0 0; padding-top: 18px; border-top: 1px solid var(--cg-line); }
.cg-listing-map h2 { margin: 0 0 12px; font-size: 21px; }
.cg-map__note { margin: 8px 0 0; color: var(--cg-muted); font-size: 13px; }
.cg-map__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.cg-map__actions [hidden] { display: none; }
.cg-map__status { color: var(--cg-muted); font-size: 13px; }
.cg-owner { padding: 4px 0 10px; }
.cg-owner__head { display: flex; align-items: center; gap: 20px; padding: 22px; background: #fff; border-radius: var(--cg-radius); box-shadow: var(--cg-shadow); }
.cg-owner__avatar img { width: 96px; height: 96px; border-radius: 50%; display: block; }
.cg-owner__info h1 { margin: 0 0 8px; font-size: 28px; }
.cg-owner__badges { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.cg-owner-badge { display: inline-block; padding: 3px 9px; border-radius: 999px; background: var(--cg-blue-light); color: var(--cg-blue-dark); font-size: 12px; font-weight: 600; vertical-align: middle; }
.cg-owner__count { color: var(--cg-muted); font-size: 13px; }
.cg-owner__note { margin: 8px 0 0; color: var(--cg-muted); font-size: 13px; }
.cg-owner__actions { margin: 12px 0 0; }
.cg-owner-edit { max-width: 640px; margin: 0 auto; }
.cg-owner-edit__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.cg-owner-edit__head h1 { margin: 0; font-size: 26px; }
.cg-owner__back { font-size: 14px; }
.cg-owner-edit__avatar { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 20px; }
.cg-owner-edit__current img { width: 96px; height: 96px; border-radius: 50%; display: block; }
.cg-owner-edit__avatar label[for="cg_avatar"] { display: block; font-weight: 600; margin-bottom: 6px; font-size: 15px; }
.cg-owner-edit__avatar input[type="file"] { display: block; max-width: 100%; margin-bottom: 6px; }
.cg-owner-edit__avatar .cg-check { margin-top: 8px; }
.cg-owner__title { margin: 28px 0 16px; font-size: 23px; }
.cg-text .wpcf7-form p { margin: 0 0 16px; }
.cg-text .wpcf7-form input[type="text"],
.cg-text .wpcf7-form input[type="email"],
.cg-text .wpcf7-form input[type="tel"],
.cg-text .wpcf7-form textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	border: 1px solid var(--cg-line);
	border-radius: 8px;
	font: inherit;
	background: #fff;
}
.cg-text .wpcf7-form textarea { resize: vertical; }
.cg-text .wpcf7-form .wpcf7-submit {
	display: inline-block;
	padding: 12px 22px;
	border: 0;
	border-radius: 8px;
	background: var(--cg-blue);
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.cg-text .wpcf7-form .wpcf7-submit:hover { background: var(--cg-blue-dark); }
.cg-text .wpcf7-form .wpcf7-checkbox .wpcf7-list-item { margin-left: 0; }
.cg-text .wpcf7-form .wpcf7-response-output { margin: 16px 0 0; }
.cg-contact-form {
	max-width: 560px;
	margin: 20px auto 0;
	padding: 26px 28px;
	background: #fff;
	border-radius: var(--cg-radius);
	box-shadow: var(--cg-shadow);
}
.cg-contact-form .wpcf7-form p { margin: 0 0 14px; }
.cg-contact-form .wpcf7-form br { display: none; }
.cg-contact-form .wpcf7-form label { display: block; margin-bottom: 6px; font-weight: 600; }
.cg-contact-form .wpcf7-form .wpcf7-submit {
	display: block;
	width: 100%;
	margin-top: 4px;
}
.cg-contact-form .wpcf7-form .wpcf7-checkbox .wpcf7-list-item { margin: 0; }
.cg-contact-form .wpcf7-form .wpcf7-list-item-label { font-weight: 400; }
.cg-contact-form__privacy { display: inline-block; margin-top: 6px; font-size: 13px; }
.cg-owner-link { font-weight: 600; }
.cg-form__photos { border: 1px dashed #ccd4de; border-radius: 8px; padding: 16px; margin: 0 0 16px; }
.cg-form__photos legend { font-weight: 600; padding: 0 6px; }
.cg-form__photos input[type="file"] { display: block; width: 100%; margin-bottom: 7px; font-size: 14px; }
.cg-req { color: #c0392b; }

.cg-notice { border-radius: 8px; padding: 13px 17px; margin-bottom: 20px; }
.cg-notice--error { background: #fdecea; color: #8f2c22; border-left: 4px solid #c0392b; }
.cg-notice--ok { background: #e8f6ee; color: #14663a; border-left: 4px solid var(--cg-green); }
.cg-notice--info { background: var(--cg-blue-light); color: var(--cg-blue-dark); border-left: 4px solid var(--cg-blue); }
.cg-notice ul { margin: 0; padding-left: 18px; }

.cg-cabinet { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--cg-radius); overflow: hidden; }
.cg-cabinet th, .cg-cabinet td { padding: 11px 13px; text-align: left; border-bottom: 1px solid var(--cg-line); font-size: 14px; }
.cg-cabinet th { background: #f7f9fc; font-size: 13px; color: var(--cg-muted); }
.cg-cabinet__actions { white-space: nowrap; }
.cg-inline { display: inline-block; margin: 0 4px 4px 0; }

/* ==========================================================================
   10. Боковая колонка, подвал, служебное
   ========================================================================== */

.cg-widget { background: #fff; border-radius: var(--cg-radius); padding: 18px 20px; box-shadow: var(--cg-shadow); margin-bottom: 18px; }
.cg-widget__title { font-size: 17px; margin-top: 0; }
.cg-widget ul { list-style: none; margin: 0; padding: 0; }
.cg-widget li { padding: 7px 0; border-bottom: 1px solid #f0f3f7; font-size: 15px; }
.cg-widget li:last-child { border-bottom: 0; }

.cg-footer { background: #16303f; color: rgba(255, 255, 255, .72); padding: 34px 0; margin-top: 40px; font-size: 14px; }
.cg-footer a { color: rgba(255, 255, 255, .9); }
.cg-footer a:hover { color: #fff; }
.cg-footer__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 26px; }
.cg-footer h3 { color: #fff; font-size: 16px; margin-bottom: 10px; }

.cg-cities { background: #fff; border-radius: var(--cg-radius); padding: 20px 22px; margin: 34px 0 18px; box-shadow: var(--cg-shadow); }
.cg-cities__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 18px; list-style: none; margin: 0; padding: 0; }
.cg-cities__list li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid #f0f3f7; }
.cg-cities__count { color: var(--cg-muted); }

.cg-page-head { margin-bottom: 22px; }

.cg-seo-text { background: #fff; border-radius: var(--cg-radius); padding: 24px 26px; margin-top: 34px; box-shadow: var(--cg-shadow); color: #33404f; }
.cg-seo-text h2 { font-size: 20px; }

/* ==========================================================================
   12. Живой поиск: подсказки по мере ввода
   ========================================================================== */

.cg-suggest { position: relative; display: block; min-width: 0; }
.cg-suggest input { width: 100%; }
.cg-header__search .cg-search { display: flex; gap: 6px; align-items: stretch; }
.cg-header__search .cg-suggest { flex: 1 1 auto; }
.cg-hero__form .cg-suggest { min-width: 0; }

.cg-suggest__box {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	z-index: 200;
	min-width: 280px;
	max-height: 60vh;
	overflow-y: auto;
	padding: 6px;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 12px 44px rgba(10, 24, 40, .2);
	text-align: left;
}

.cg-suggest__box[hidden] { display: none; }

.cg-suggest__item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px;
	border-radius: 8px;
	color: var(--cg-text);
}

.cg-suggest__item:hover,
.cg-suggest__item.is-active { background: var(--cg-blue-light); color: var(--cg-text); }

.cg-suggest__item img,
.cg-suggest__ph {
	flex: none;
	width: 56px;
	height: 42px;
	border-radius: 6px;
	object-fit: cover;
	background: #e7ecf2;
}

.cg-suggest__text { min-width: 0; }

.cg-suggest__title {
	display: block;
	font-size: 15px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cg-suggest__meta { display: block; font-size: 13px; color: var(--cg-muted); }

.cg-suggest__empty { margin: 0; padding: 12px; color: var(--cg-muted); font-size: 14px; }

.cg-suggest__more {
	display: block;
	margin-top: 4px;
	padding: 11px 12px;
	border-top: 1px solid var(--cg-line);
	font-size: 14px;
	font-weight: 600;
}

.cg-suggest.is-loading .cg-suggest__box::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: 2px;
	background: linear-gradient(90deg, transparent, var(--cg-blue), transparent);
	animation: cg-slide 1s linear infinite;
}

@keyframes cg-slide {
	from { transform: translateX(-100%); }
	to { transform: translateX(100%); }
}

/* ==========================================================================
   13. Загрузка фотографий
   ========================================================================== */

.cg-drop { position: relative; }

.cg-drop input[type="file"] {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

.cg-drop__label {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 5px;
	padding: 26px 18px;
	border: 2px dashed #ccd4de;
	border-radius: 12px;
	background: #fafcfe;
	cursor: pointer;
	text-align: center;
	transition: border-color .15s ease, background .15s ease;
}

.cg-drop__label:hover,
.cg-drop.is-over .cg-drop__label {
	border-color: var(--cg-blue);
	background: var(--cg-blue-light);
}

.cg-drop__icon { font-size: 26px; line-height: 1; color: var(--cg-blue); }
.cg-drop__title { font-weight: 700; font-size: 16px; }
.cg-drop__sub { font-size: 14px; color: var(--cg-text); }
.cg-drop__note { font-size: 13px; color: var(--cg-muted); }

.cg-drop__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
	gap: 10px;
	margin-top: 14px;
}

.cg-drop__list[hidden] { display: none; }

.cg-drop__item {
	position: relative;
	aspect-ratio: 4 / 3;
	border-radius: 10px;
	overflow: hidden;
	background: #e7ecf2;
	box-shadow: var(--cg-shadow);
	cursor: grab;
}

.cg-drop__item img { display: block; width: 100%; height: 100%; object-fit: cover; user-select: none; }
.cg-drop__item.is-dragging { opacity: .35; }
.cg-drop__item.is-over { outline: 3px solid var(--cg-blue); outline-offset: -3px; }

.cg-drop__main {
	position: absolute;
	left: 6px;
	top: 6px;
	padding: 2px 9px;
	border-radius: 20px;
	background: var(--cg-accent);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
}

.cg-drop__remove {
	position: absolute;
	right: 6px;
	top: 6px;
	width: 26px;
	height: 26px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(10, 24, 40, .66);
	color: #fff;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
}

.cg-drop__remove:hover { background: #c0392b; }

.cg-drop__star {
	position: absolute;
	right: 6px;
	bottom: 6px;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(10, 24, 40, .66);
	color: #ffd166;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
}

.cg-drop__star:hover { background: var(--cg-blue); color: #fff; }

.cg-drop__main[hidden] { display: none; }

.cg-drop__name {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 16px 8px 5px;
	background: linear-gradient(to top, rgba(8, 22, 36, .78), rgba(8, 22, 36, 0));
	color: #fff;
	font-size: 10px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cg-drop__status { margin: 10px 0 0; font-size: 14px; color: var(--cg-muted); }
.cg-drop__status.is-error { color: #c0392b; font-weight: 600; }
.cg-drop__status[hidden] { display: none; }

.cg-drop__list--saved { margin-top: 8px; }

.cg-thumb-saved {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	border-radius: 10px;
	overflow: hidden;
	background: #e7ecf2;
	box-shadow: var(--cg-shadow);
	opacity: .92;
}

.cg-thumb-saved img { display: block; width: 100%; height: 100%; object-fit: cover; }

.cg-thumb-saved__main {
	position: absolute;
	left: 6px;
	top: 6px;
	padding: 2px 9px;
	border-radius: 20px;
	background: var(--cg-blue);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
}

@media (max-width: 760px) {
	.cg-suggest__box { min-width: 0; }
	.cg-suggest__item img,
	.cg-suggest__ph { width: 46px; height: 35px; }
	.cg-drop__list { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
}

/* ==========================================================================
   14. Адаптивность
   ========================================================================== */

@media (max-width: 1000px) {
	.cg-row, .cg-single__layout { grid-template-columns: minmax(0, 1fr); }
	.cg-side, .cg-single__aside { position: static; }
	.cg-hero__form { grid-template-columns: 1fr 1fr; }
	.cg-hero h1 { font-size: 30px; }
}

@media (max-width: 760px) {
	.cg-header__top { flex-wrap: wrap; gap: 12px; }
	.cg-tagline { display: none; }
	.cg-header__search { width: 100%; order: 3; }
	.cg-header__cta { margin-left: auto; }
	.cg-header__cta .cg-btn { padding: 10px 16px; font-size: 15px; }
	.cg-hero { padding: 36px 0 30px; }
	.cg-hero h1 { font-size: 25px; }
	.cg-hero__form { grid-template-columns: 1fr; }
	.cg-hero__stats { gap: 18px; font-size: 14px; }
	.cg-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
	.cg-card__excerpt { display: none; }
	.cg-tiles { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
	.cg-filterbar__right { margin-left: 0; width: 100%; }
	.cg-filterbar select { flex: 1; min-width: 0; }
	.cg-form { padding: 20px 18px; }
	.cg-form__grid { grid-template-columns: 1fr; gap: 0; }
	.cg-check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.cg-features-form { padding: 14px; }
	.cg-features__row { display: block; padding: 7px 0; }
	.cg-features__row dt { width: auto; margin-bottom: 2px; font-size: 13px; }
	.cg-map { height: 260px; }
	.cg-owner__head { align-items: flex-start; gap: 14px; padding: 16px; }
	.cg-owner__avatar img { width: 72px; height: 72px; }
	.cg-owner__info h1 { font-size: 22px; }
	.cg-owner-edit__avatar { flex-direction: column; }
	.cg-contact-form { padding: 20px 18px; margin-top: 16px; }
	.cg-cabinet { display: block; overflow-x: auto; white-space: nowrap; }
	h1 { font-size: 24px; }
	h2 { font-size: 20px; }
}

/* ==========================================================================
   15. Аккаунт, избранное, жалобы, модальные окна
   ========================================================================== */

.cg-account { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.cg-account a[hidden] { display: none; }
.cg-account__register { font-weight: 600; white-space: nowrap; }

.cg-account__name {
	max-width: 150px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-weight: 600;
}

.cg-account a { color: var(--cg-blue); font-weight: 500; white-space: nowrap; }
.cg-account a:hover { color: var(--cg-accent-dark); }

.cg-account__count {
	display: inline-block;
	min-width: 18px;
	padding: 0 5px;
	border-radius: 10px;
	background: var(--cg-accent);
	color: #fff;
	font-size: 11px;
	line-height: 18px;
	text-align: center;
}

.cg-account__count[hidden] { display: none; }

.cg-account__login {
	padding: 9px 18px;
	border: 1px solid var(--cg-line);
	border-radius: 8px;
	background: #fff;
	color: var(--cg-blue);
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}

.cg-account__login:hover { background: var(--cg-blue-light); border-color: #c9dbec; }

/* Сердечко в карточке ------------------------------------------------------ */

.cg-card { position: relative; }

.cg-card > .cg-fav {
	position: absolute;
	right: 8px;
	top: 8px;
	z-index: 3;
	width: 34px;
	height: 34px;
	justify-content: center;
	border-radius: 50%;
	background: rgba(255, 255, 255, .93);
	box-shadow: 0 2px 8px rgba(10, 24, 40, .18);
	color: #b6c0cb;
}

.cg-card > .cg-fav:hover { color: #e0455a; background: #fff; }
.cg-card > .cg-fav.is-active { color: #e0455a; }
.cg-fav.is-busy { opacity: .55; }

/* Кнопки на странице объявления -------------------------------------------- */

.cg-single__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 20px; }

.cg-fav {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 9px 16px;
	border-radius: 24px;
	background: #fff;
	border: 1px solid var(--cg-line);
	color: var(--cg-muted);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	transition: color .15s ease, border-color .15s ease, background .15s ease;
}

.cg-fav:hover { color: #e0455a; border-color: #f2c3cb; background: #fff7f8; }
.cg-fav.is-active { color: #e0455a; border-color: #f2c3cb; background: #fff2f4; }
.cg-fav__icon { font-size: 17px; line-height: 1; }

.cg-report-open {
	padding: 9px 4px;
	border: 0;
	background: none;
	color: var(--cg-muted);
	font: inherit;
	font-size: 14px;
	text-decoration: underline;
	cursor: pointer;
}

.cg-report-open:hover { color: #c0392b; }

/* Модальные окна ----------------------------------------------------------- */

.cg-modal {
	position: fixed;
	inset: 0;
	z-index: 900;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.cg-modal[hidden] { display: none; }

.cg-modal__backdrop { position: absolute; inset: 0; background: rgba(8, 20, 32, .62); }

.cg-modal__box {
	position: relative;
	width: 100%;
	max-width: 450px;
	max-height: 90vh;
	overflow-y: auto;
	padding: 26px 28px;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 24px 70px rgba(8, 20, 32, .32);
}

.cg-modal__box h2 { margin: 0 0 8px; font-size: 22px; }
.cg-modal__lead { margin: 0 0 18px; color: var(--cg-muted); font-size: 14px; }

.cg-modal__close {
	position: absolute;
	right: 12px;
	top: 12px;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #f1f4f8;
	color: var(--cg-muted);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.cg-modal__close:hover { background: #e3e9f1; color: var(--cg-text); }

.cg-check {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 5px 0;
	font-weight: 400;
	cursor: pointer;
}

.cg-check input { width: auto; margin: 0; }

.cg-login__row { margin-bottom: 14px; }
.cg-login__links { margin: 0; text-align: center; font-size: 14px; }

.cg-login__error {
	margin: 0 0 12px;
	padding: 10px 14px;
	border-radius: 8px;
	background: #fdecea;
	color: #8f2c22;
	font-size: 14px;
}

.cg-login__error[hidden] { display: none; }

.cg-login__error.is-ok {
	background: #e8f5ee;
	color: var(--cg-green);
}

.cg-report__reasons { margin: 0 0 16px; padding: 0; border: 0; }
.cg-report__reasons legend { margin-bottom: 6px; font-size: 15px; font-weight: 600; }

.cg-report__status { margin: 0 0 12px; font-size: 14px; color: #c0392b; }
.cg-report__status.is-ok { color: var(--cg-green); font-weight: 600; }
.cg-report__status[hidden] { display: none; }

.cg-fav__head { margin-bottom: 18px; }

@media (max-width: 860px) {
	.cg-account__name { display: none; }
	.cg-account { gap: 10px; font-size: 13px; }
	.cg-account__login { padding: 8px 14px; font-size: 14px; }
	.cg-modal__box { padding: 22px 20px; }
}

/* ==========================================================================
   Мессенджеры: поле в форме подачи и вывод в объявлении
   ========================================================================== */

.cg-form__messengers {
	border: 0;
	padding: 0;
	margin: 0 0 18px;
}

.cg-form__messengers legend {
	padding: 0;
	margin-bottom: 4px;
	font-size: 14px;
	font-weight: 600;
}

.cg-messenger {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 8px;
}

.cg-messenger .cg-check {
	flex: 0 0 130px;
	padding: 0;
	font-size: 15px;
}

.cg-messenger input[type="text"] { flex: 1 1 auto; min-width: 0; }

.cg-messenger-link {
	display: block;
	padding: 2px 0;
}

.cg-messenger-link__name { color: var(--cg-muted); }

@media (max-width: 560px) {
	.cg-messenger { flex-wrap: wrap; gap: 6px; }
	.cg-messenger .cg-check { flex: 1 1 100%; }
}

/* ==========================================================================
   18. Быстрые контакты и «Поделиться» в объявлении
   ========================================================================== */

.cg-contact-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 8px 0 0;
}

.cg-contact-actions .cg-btn {
	padding: 10px 14px;
	font-size: 14px;
}

.cg-btn--wa {
	background: #25d366;
	color: #fff;
}

.cg-btn--wa:hover {
	background: #1da851;
	color: #fff;
}

.cg-btn--tg {
	background: #229ed9;
	color: #fff;
}

.cg-btn--tg:hover {
	background: #1b8ac0;
	color: #fff;
}

.cg-share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0 0 20px;
	font-size: 14px;
}

.cg-share__label {
	color: var(--cg-muted);
}

.cg-share__link {
	display: inline-block;
	padding: 6px 12px;
	border: 1px solid var(--cg-line);
	border-radius: 20px;
	background: #fff;
	color: var(--cg-blue);
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	cursor: pointer;
}

.cg-share__link:hover {
	border-color: var(--cg-blue);
	background: var(--cg-blue-light);
	color: var(--cg-blue-dark);
}

.cg-share__link.is-copied {
	border-color: var(--cg-green);
	color: var(--cg-green);
}

.cg-share--bottom {
	margin: 30px 0 24px;
	padding-top: 18px;
	border-top: 1px solid var(--cg-line);
}
