:root {
    --bg: #fbf8f3;
    --card: #ffffff;
    --text: #2b2420;
    --muted: #7a6e66;
    --accent: #e0702b;
    --accent-dark: #b9561c;
    --line: #ece4da;
    --ok: #2f8a4c;
    --danger: #c0392b;
    --hotel: #3b6fb6;
    --grooming: #b0478e;
    --taxi: #d49a00;
    --dark: #2b2420;
    --radius: 6px;
    --radius-sm: 4px;
    --shadow: 0 1px 2px rgba(43, 36, 32, .06), 0 4px 14px rgba(43, 36, 32, .06);
}
* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent-dark); }
h1 { font-size: 1.9rem; line-height: 1.2; margin: 1.6rem 0 1rem; letter-spacing: -.01em; }
h1, h2, h3 { font-weight: 700; }
.icon { flex: none; vertical-align: -.2em; }
h2 { margin-top: 2rem; }
.wrap { max-width: 1400px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); font-size: .92rem; }

.site-header { background: var(--card); border-bottom: 1px solid var(--line); }
.topbar { background: var(--dark); color: #e9dfd5; font-size: .85rem; }
.topbar .wrap { display: flex; align-items: center; gap: 16px; min-height: 34px; }
.topbar-city { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: #fff; }
.topbar-note { flex: 1; opacity: .8; }
.topbar a { color: #e9dfd5; }
.topbar a:hover { color: #fff; }
.header-main { display: flex; align-items: center; gap: 12px 28px; padding-top: 14px; padding-bottom: 14px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.logo-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: var(--radius); background: var(--accent); color: #fff; }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-text b { font-size: 1.3rem; }
.logo-text small { font-size: .78rem; color: var(--muted); }
.main-nav { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; flex: 1; }
.main-nav a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: var(--radius); color: var(--text); text-decoration: none; font-weight: 500; }
.main-nav a .icon { color: var(--muted); }
.main-nav a:hover { background: var(--bg); color: var(--accent-dark); }
.main-nav a.active { background: #fbeadf; color: var(--accent-dark); }
.main-nav a:hover .icon, .main-nav a.active .icon { color: var(--accent); }

.site-main { min-height: 50vh; }
.site-footer { margin-top: 64px; background: var(--dark); color: #d8ccc1; font-size: .93rem; }
.site-footer a { color: #f2e9e0; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; padding-top: 40px; padding-bottom: 32px; }
.footer-grid h3 { margin: 4px 0 12px; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: #a89a8e; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-about p { margin: 14px 0 0; max-width: 300px; }
.logo-light, .site-footer .logo-light:hover { color: #fff; text-decoration: none; }
.logo-light .logo-text small { color: #a89a8e; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 16px; padding-bottom: 20px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .82rem; color: #a89a8e; }
.footer-bottom a { color: #d8ccc1; text-decoration: underline; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border: 1px solid var(--accent); border-radius: var(--radius); background: var(--accent); color: #fff; font-weight: 600; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--accent-dark); }
.btn-outline:hover { background: #fbeadf; color: var(--accent-dark); border-color: var(--accent-dark); }

/* Главная: приветствие и три раздела */
.hero { margin: 24px 0 8px; padding: 32px; border-radius: var(--radius); background: linear-gradient(135deg, #fff3e8 0%, #fdf8f2 60%); border: 1px solid #f3dcc8; }
.hero h1 { margin: 0 0 8px; font-size: 2.1rem; max-width: 720px; }
.hero-lead { margin: 0 0 20px; color: var(--muted); font-size: 1.08rem; }
.hero-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tile { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 16px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); color: var(--text); text-decoration: none; box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.tile:hover { transform: translateY(-2px); border-color: var(--accent); }
.tile-icon { grid-row: 1 / 3; display: grid; place-items: center; width: 52px; height: 52px; border-radius: var(--radius); color: #fff; }
.tile-hotel .tile-icon { background: var(--hotel); }
.tile-grooming .tile-icon { background: var(--grooming); }
.tile-taxi .tile-icon { background: var(--taxi); }
.tile-title { font-weight: 700; font-size: 1.1rem; }
.tile-count { color: var(--muted); font-size: .9rem; }
.section-title { margin: 32px 0 4px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip { padding: 6px 14px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip .count { opacity: .65; font-size: .85em; }

.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 12px 0 20px; padding: 12px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.filters-found { margin-left: auto; }
.filters label { display: flex; align-items: center; gap: 6px; }
.filters input[type=number] { width: 110px; }

input, select, textarea, button { font: inherit; }
input, select, textarea { padding: 8px 10px; border: 1px solid #ddd2c6; border-radius: var(--radius-sm); background: #fff; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid #f6c9a8; border-color: var(--accent); }
.filters input, .filters select { width: auto; }
button { padding: 8px 18px; border: 0; border-radius: var(--radius-sm); background: var(--accent); color: #fff; font-weight: 600; cursor: pointer; }
button:hover { background: var(--accent-dark); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card h3 { margin: 8px 0 6px; font-size: 1.08rem; line-height: 1.3; }
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a:hover { color: var(--accent); }
.card p { margin: 4px 0; }
.listing-card { position: relative; display: flex; flex-direction: column; border-top: 3px solid var(--muted); transition: box-shadow .15s, transform .15s; }
.listing-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.listing-card h3 a::after { content: ""; position: absolute; inset: 0; } /* вся карточка — ссылка */
/* Картинка карточки: фото организации или рисунок по виду услуг, сверху — логотип */
.card-cover { position: relative; margin: -16px -16px 10px; }
.card-cover img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 3px 3px 0 0; }
.card-cover .card-logo { position: absolute; left: 12px; bottom: -14px; width: 56px; height: 56px; padding: 4px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: auto; }
.card-cover:has(.card-logo) + .card-tags { padding-left: 68px; min-height: 22px; }
.listing-head { display: flex; align-items: center; gap: 16px; margin: 1.6rem 0 1rem; }
.listing-head h1 { margin: 0; }
.listing-logo { width: 72px; height: 72px; padding: 6px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); flex: none; }
.listing-cover { display: block; width: calc(100% + 40px); height: auto; aspect-ratio: 2 / 1; object-fit: cover; margin: -20px -20px 4px; border-radius: var(--radius) var(--radius) 0 0; }
.card-hotel { border-top-color: var(--hotel); }
.card-grooming { border-top-color: var(--grooming); }
.card-taxi { border-top-color: var(--taxi); }
.card-address { display: flex; gap: 4px; color: var(--muted); font-size: .9rem; }
.card-address .icon { margin-top: 2px; }
.card-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: auto !important; padding-top: 10px; }
.card-more { color: var(--line); transition: color .15s; }
.listing-card:hover .card-more { color: var(--accent); }
.price { font-weight: 700; }
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag { font-size: .75rem; font-weight: 600; padding: 2px 7px; border-radius: var(--radius-sm); color: #fff; background: var(--muted); }
.tag-hotel { background: var(--hotel); }
.tag-grooming { background: var(--grooming); }
.tag-taxi { background: var(--taxi); }

.crumbs { margin: 16px 0 0; font-size: .92rem; }
.details { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 16px; margin-top: 16px; align-items: start; }
.details dl { display: grid; grid-template-columns: 130px 1fr; gap: 10px 12px; margin: 0; align-content: start; }
.contact-box { display: grid; gap: 10px; }
.contact-box p { margin: 0; }
.contact-price { font-size: 1.3rem; font-weight: 700; }
.details dt { color: var(--muted); }
.details dd { margin: 0; overflow-wrap: anywhere; }
.description { white-space: normal; max-width: 860px; }
.details-main h2 { margin-top: 24px; }

@media (max-width: 900px) {
    .header-main { flex-wrap: wrap; }
    .main-nav { order: 3; flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 12px; }
    .main-nav a { white-space: nowrap; }
    .header-cta { margin-left: auto; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-about { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
    .wrap { padding: 0 16px; }
    h1, .hero h1 { font-size: 1.45rem; }
    .topbar-note { display: none; }
    .topbar .wrap { justify-content: space-between; }
    .header-main { padding-top: 10px; padding-bottom: 8px; }
    .header-cta { padding: 7px 10px; font-size: .9rem; margin-left: auto; }
    .hide-mobile { display: none; }
    .logo-text small { display: none; }
    .hero { padding: 20px 16px; margin-top: 16px; }
    .hero-tiles { grid-template-columns: 1fr; gap: 8px; }
    .tile { padding: 12px; }
    .tile-icon { width: 44px; height: 44px; }
    .filters-found { margin-left: 0; }
    .details { grid-template-columns: 1fr; }
    /* на телефоне кнопка «Позвонить» сразу под контактами, описание ниже */
    .details-main { display: contents; }
    .details .contact-box { order: 1; }
    .details-main h2, .details .description, .details .network-list { order: 2; margin: 8px 0 0; }
    .details dl { grid-template-columns: 100px 1fr; }
    .listing-logo { width: 56px; height: 56px; }
    .card-cover img:first-child, .listing-cover { aspect-ratio: 5 / 2; }
}

/* Подвал, статьи, формы */
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.cover { width: 100%; border-radius: var(--radius); margin-bottom: 8px; aspect-ratio: 16 / 9; object-fit: cover; }
.post { max-width: 760px; margin: 0 auto; } /* статья по центру: длинные строки читать тяжело */
.prose { max-width: 760px; }
.prose img { max-width: 100%; height: auto; }
.box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.form-narrow { max-width: 620px; }
.box label { display: block; margin-bottom: 12px; }
.box label.check { display: flex; align-items: flex-start; gap: 8px; }
.box label.check input { width: auto; margin-top: 4px; }
fieldset.field { border: 0; padding: 0; margin: 0 0 12px; }
fieldset.field legend { padding: 0; margin-bottom: 6px; }
fieldset.field label.check { margin-bottom: 4px; }
.box h2 { font-size: 1.1rem; margin: 20px 0 10px; }
.box h2:first-of-type { margin-top: 0; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 0 12px; }
@media (max-width: 520px) { .row-3 { grid-template-columns: 1fr 1fr; } .row-3 label:last-child { grid-column: 1 / -1; } }
.hp { position: absolute; left: -9999px; }
.flash { background: #e7f5ea; border: 1px solid #bfe3c8; padding: 10px 14px; border-radius: var(--radius); margin-top: 16px; }
.error { color: var(--danger); margin-bottom: 12px; }
.pager { display: flex; gap: 16px; margin: 16px 0; }
.cookie-notice { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 16px; background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0, 0, 0, .06); font-size: .9rem; }
.cookie-notice[hidden] { display: none; }
.cookie-notice p { margin: 0; }

/* Сети: несколько адресов у одной организации */
.card-network { margin: 4px 0 0; color: var(--accent); font-size: .9rem; font-weight: 600; }
.listing-network { margin: 4px 0 0; color: var(--muted); }
.network-list { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 16px; }
.network-list li { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); display: flex; flex-direction: column; gap: 2px; }
.network-list li.current { border-color: var(--accent); }
.network-phone { font-size: .9rem; }
