/* ==========================================================================
   Карточка предприятия (новая вёрстка) и оверлей в каталоге
   ========================================================================== */

/* ============================ Оверлей каталога ============================ */

.firm-card-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    box-sizing: border-box;
    background: rgba(20, 24, 34, .55);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.firm-card-modal.is-open {
    display: flex;
}

.firm-card-modal__box {
    position: relative;
    width: 100%;
    max-width: 780px;
    max-height: 92vh;
    overflow-y: auto;
    overflow-x: hidden;
    /* scroll-behavior: smooth здесь ставить нельзя: в некоторых браузерах
       (встроенный Chromium) программная прокрутка при нём не срабатывает —
       scrollTop остаётся 0. Переход по якорям мгновенный (box.scrollTop = …). */
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, .38);
    animation: firmCardModalIn .22s ease-out;
}

@keyframes firmCardModalIn {
    from { opacity: 0; transform: translateY(18px) scale(.985); }
    to   { opacity: 1; transform: none; }
}

/* Панель навигации окна — сверху */
.firm-card-modal__top {
    position: sticky;
    top: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 22px 10px;
    background: #fff;
    border-bottom: 1px solid var(--fc-line);
    border-radius: 24px 24px 0 0;
}

.firm-card-modal__back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #4a5568;
    font-size: 15px;
    text-decoration: none;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.firm-card-modal__back::before {
    content: "\2190";
    font-size: 20px;
    line-height: 1;
}

.firm-card-modal__back:hover {
    color: #1f2a44;
}

.firm-card-modal__close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 0;
    background: #eef1f6;
    color: #4a5568;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.firm-card-modal__close:hover {
    background: #e2e7f0;
    color: #1f2a44;
}

.firm-card-modal__content {
    padding: 0 22px 26px;
}

.firm-card-modal__loading {
    padding: 60px 0;
    text-align: center;
    color: #7a869a;
    font-size: 16px;
}

.firm-card-modal__error {
    margin: 20px 0;
    padding: 14px 16px;
    border-radius: 12px;
    background: #fdecec;
    color: #a33;
}

/* Оверлей карточки — z-index 2147483000. Всплывающие окна сайта
   (форма входа, заявка) должны открываться ПОВЕРХ карточки, иначе
   пользователь не видит их. */
.mfp-container {
    z-index: 2147483200 !important;
}

.mfp-backdrop {
    z-index: 2147483150 !important;
}

/* ============================ Содержимое карточки ========================= */

/* На отдельной странице карточка не должна растягиваться на всю ширину
   экрана: на широком мониторе колонки контактов разъезжаются, а ссылки
   («Все фото») упираются в край. В оверлее ширину задаёт сам .box. */
.fc-page {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 16px 24px;
    box-sizing: border-box;
}

.firm-card-modal .fc-page {
    max-width: none;
    margin: 0;
    padding: 0;
}

.fc {
    color: #1f2a44;
    font-size: 15px;
    line-height: 1.45;
    --fc-accent: #4a5da8;
    --fc-accent-dark: #3d4e92;
    --fc-muted: #8a94a6;
    --fc-line: #e7ebf2;
    --fc-bg: #f5f7fb;
}

/* ------------------------------- Шапка ---------------------------------- */

.fc-head {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 2px 0 14px;
}

.fc-head__main {
    flex: 1 1 auto;
    min-width: 0;
}

.fc-head__line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.fc-score {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 6px;
    background: #2f855a;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

.fc-score__reviews {
    color: var(--fc-muted);
    font-size: 13px;
}

/* Отметка «оценка + отзывы» в верхней строке — открывает отзывы в окне */
.fc-scorebox {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 2px 6px 2px 0;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
}

.fc-scorebox:hover .fc-score__reviews {
    color: var(--fc-accent);
}

.fc-scorebox:hover .fc-score {
    background: #276e48;
}

/* ── Виджет «Народный бренд» в верхней строке карточки ── */
.fc-nb-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 4px 11px;
    border-radius: 9px;
    background: linear-gradient(135deg, #fdf7e7, #fbeed2);
    border: 1px solid #f1e2bd;
    text-decoration: none;
}

.fc-nb-badge:hover {
    border-color: #e6cf9a;
}

.fc-nb-badge__logo {
    width: 17px;
    height: 17px;
    display: block;
    object-fit: contain;
}

.fc-nb-badge__nums {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 12px;
    font-size: 12px;
    color: #7b5f1c;
}

.fc-nb-badge__n {
    white-space: nowrap;
}

.fc-nb-badge__n b {
    font-weight: 700;
}

.fc-nb-badge__n--win {
    font-weight: 700;
    color: #9a6700;
}

/* ── Рейтинг предприятия (интернет / телефон / общий) ── */
.fc-rate {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--fc-muted);
}

.fc-rate__label {
    color: #9aa3b5;
}

.fc-rate__vals {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 12px;
}

.fc-rate__v {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.fc-rate__v .fa {
    margin-right: 4px;
    opacity: .65;
}

.fc-title {
    margin: 0 0 4px;
    font-size: 27px;
    line-height: 1.2;
    font-weight: 700;
    color: #1f2a44;
}

.fc-subtitle {
    color: var(--fc-muted);
    font-size: 13px;
    margin-bottom: 10px;
}

/* «Данные проверены редакцией» — знак доверия */
.fc-checked {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    color: #2f855a;
    font-size: 13px;
}

.fc-checked .fa {
    font-size: 14px;
}

.fc-head__logo {
    flex: 0 0 auto;
    width: 84px;
    height: 84px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--fc-bg);
    border: 1px solid var(--fc-line);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fc-head__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ============ Карточка по прямой ссылке — всплывающее окно ============= */

/* Ссылка на карточку открывает её как окно поверх сайта — как в ленте.
   Содержимое в HTML остаётся целиком (поисковик и нейросеть видят
/* ============ Карточка по прямой ссылке — всплывающее окно ============= */

/* Ссылка на карточку открывает её как окно поверх сайта — так же,
   как в ленте каталога: затемнение, белая карточка по центру, снизу
   «← в каталог» и «×». Содержимое в HTML остаётся целиком (поисковик
   и нейросеть видят всё), карточка в DOM ровно одна — дубли нет.
   Без JS остаётся обычная страница с карточкой. Оверлей тот же,
   что в ленте (firm-card-modal). */

.firm-card-modal--page .firm-card-modal__box {
    max-width: 940px;
    max-height: 92vh;
}

/* ========================= Описание ---------------------------------- */

.fc-desc {
    font-size: 14px;
    color: #3c465c;
    margin-bottom: 14px;
}

.fc-desc p {
    margin: 0 0 6px;
}

.fc-desc.is-clipped {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fc-desc-more {
    display: inline-block;
    margin: -4px 0 14px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--fc-accent);
    font-size: 13px;
    cursor: pointer;
}

.fc-desc-more:hover {
    text-decoration: underline;
}

/* ------------------------- Состояние по режиму -------------------------- */

.fc-status {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.fc-status__label {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
}

.fc-status.is-open .fc-status__label {
    background: #e5f6ec;
    color: #2f855a;
}

.fc-status.is-closed .fc-status__label {
    background: #f1f3f7;
    color: #7a869a;
}

.fc-status__note {
    color: var(--fc-muted);
    font-size: 13px;
}

.fc-status__left {
    color: var(--fc-accent);
    font-size: 13px;
    font-weight: 600;
}

/* Расстояние до предприятия */
.fc-distance {
    margin-top: 4px;
    font-size: 13px;
    color: var(--fc-accent);
}

.fc-distance-ask {
    display: block;
    margin-top: 6px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--fc-muted);
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
}

/* --------------------------- Верхнее меню ------------------------------- */
/* Якоря на разделы: все разделы сразу в разметке (их видит поисковик),
   меню просто ведёт к нужному месту. */

.fc-anchors {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: stretch;
    gap: 4px;
    margin: 0 0 18px;
    padding: 0;
    background: #fff;
    border-bottom: 1px solid var(--fc-line);
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

/* Панель навигации оверлея — сверху, меню прилипает под ней */
.firm-card-modal .fc-anchors {
    top: 58px;
}

.fc-anchors::-webkit-scrollbar {
    display: none;
}

.fc-anchor {
    position: relative;
    flex: 0 0 auto;
    padding: 10px 12px 11px;
    color: var(--fc-muted);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.fc-anchor:hover {
    color: #1f2a44;
}

.fc-anchor.is-active {
    color: #1f2a44;
}

.fc-anchor.is-active::after {
    content: "";
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: -1px;
    height: 2px;
    border-radius: 2px;
    background: var(--fc-accent);
}

.fc-anchor__num {
    color: var(--fc-muted);
    font-weight: 400;
}

/* Отступ под «липкое» меню якорей (при переходе по якорю) */
.fc-section {
    scroll-margin-top: 58px;
}

.firm-card-modal .fc-section {
    scroll-margin-top: 116px;
}

/* --------------------------- Карусель фото ------------------------------ */

.fc-slider {
    position: relative;
    margin: 0 0 18px;
}

.fc-slider__track {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-radius: 14px;
}

.fc-slider__track::-webkit-scrollbar {
    display: none;
}

.fc-slider__slide {
    flex: 0 0 auto;
    display: block;
    width: 240px;
    height: 170px;
    padding: 0;
    border: 0;
    border-radius: 14px;
    overflow: hidden;
    background: var(--fc-bg);
    scroll-snap-align: start;
    cursor: zoom-in;
    text-decoration: none;
}

.fc-slider__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fc-slider__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    margin-top: -12px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: #1f2a44;
    font-size: 26px;
    line-height: 1;
    box-shadow: 0 2px 10px rgba(31, 42, 68, .18);
    cursor: pointer;
    z-index: 2;
    transition: background .15s ease;
}

.fc-slider__arrow:hover {
    background: #fff;
}

.fc-slider__arrow--prev {
    left: 8px;
}

.fc-slider__arrow--next {
    right: 8px;
}

.fc-slider__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 13px;
    color: var(--fc-muted);
}

.fc-slider__counter {
    font-variant-numeric: tabular-nums;
}

.fc-slider__all {
    color: var(--fc-accent);
    text-decoration: none;
}

.fc-slider__all:hover {
    text-decoration: underline;
}

/* --------------------------- Акция (визитка) ---------------------------- */

.fc-promo {
    padding: 12px 14px;
    margin-bottom: 18px;
    border-radius: 12px;
    background: var(--fc-bg);
}

.fc-promo__title {
    font-weight: 700;
    margin-bottom: 4px;
}

.fc-promo__link a {
    color: var(--fc-accent);
}

.fc-promo__date {
    margin-top: 6px;
    font-size: 13px;
    color: var(--fc-muted);
}

/* ------------------------------ Кнопки ---------------------------------- */

.fc-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.fc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 20px;
    background: #eef1f6;
    color: #1f2a44;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    border: 0;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.fc-btn:hover {
    background: #e2e7f0;
    color: #1f2a44;
}

.fc-btn--big {
    padding: 11px 18px;
    font-size: 15px;
}

.fc-btn--contact {
    background: var(--fc-accent);
    color: #fff;
}

.fc-btn--contact:hover {
    background: var(--fc-accent-dark);
    color: #fff;
}

.fc-btn--more {
    background: #eef1f6;
    color: var(--fc-accent);
}

.fc-btn--more:hover {
    background: #e2e7f0;
    color: var(--fc-accent);
}

/* ============== Карточка без оплаты: красиво, но мало ================= */

.fc--free {
    padding-bottom: 6px;
}

.fc-free__head {
    padding: 12px 0 14px;
}

.fc-free__head-top {
    display: flex;
    align-items: center;
    gap: 14px;
}

.fc-free__logo {
    flex: 0 0 auto;
    width: 70px;
    height: 70px;
    border-radius: 18px;
    overflow: hidden;
    background: var(--fc-bg);
    border: 1px solid var(--fc-line);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fc-free__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.fc-free__head-main {
    flex: 1 1 auto;
    min-width: 0;
}

.fc-free__title {
    margin: 0 0 4px;
    font-size: 23px;
    line-height: 1.22;
    font-weight: 700;
    color: #1f2a44;
}

.fc-free__subtitle {
    font-size: 13px;
    color: var(--fc-muted);
}

.fc-free__line {
    margin-top: 12px;
}

.fc-free__status {
    display: inline-flex;
    margin-top: 12px;
}

/* Фото — во всю ширину, это «лицо» карточки */
.fc-free__photos {
    margin: 0 0 18px;
}

.fc-free__photos .fc-slider__slide {
    width: 80%;
    height: 200px;
}

.fc-free__about {
    margin: 0 0 16px;
}

/* Подсказка про оплату — спокойно, без «плашки недоступности» */
.fc-free__hint {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 15px;
    border-radius: 14px;
    background: #fff8ec;
    border: 1px solid #f3e3c3;
    color: #8a6a25;
    font-size: 13px;
    line-height: 1.4;
}

.fc-free__hint-icon {
    flex: 0 0 auto;
    margin-top: 1px;
    color: #c99a35;
}

.fc-free__hint-link {
    color: #7a5c15;
    font-weight: 700;
    text-decoration: underline;
}

.fc-free__hint-link:hover {
    color: #a06a00;
}

.fc-free__contacts {
    margin: 12px 0 18px;
    padding: 6px 14px;
    border-radius: 14px;
    background: var(--fc-bg);
}

.fc-free__contacts .fc-contact:last-child {
    border-bottom: 0;
}

.fc-free__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 18px;
}

.fc-free__actions .fc-btn {
    flex: 1 1 150px;
}

.fc-free__nb {
    margin: 0 0 14px;
}

.fc-nb__widget--compact {
    margin-bottom: 0;
}

/* --------------------------- Ссылки ------------------------------------- */
/* Всё, что ведёт наружу, — в одном блоке: иконка + понятная подпись.
   Кнопка без подписи («кружок с буквой») посетителю ничего не говорит. */

.fc-links__item .fa {
    font-size: 15px;
}

.fc-links__item--vkcom .fa    { color: #0077ff; }
.fc-links__item--ok .fa       { color: #ee8208; }
.fc-links__item--telegram .fa { color: #2aabee; }
.fc-links__item--max .fa      { color: #7b2ff7; }
.fc-links__item--whatsapp .fa { color: #25d366; }
.fc-links__item--instagram .fa { color: #d62976; }
.fc-links__item--youtube .fa  { color: #ff0000; }
.fc-links__item--twitter .fa  { color: #1d9bf0; }
.fc-links__item--facebook .fa { color: #1877f2; }
.fc-links__item--web .fa       { color: var(--fc-accent); }

/* ------------------------------ Контакты -------------------------------- */

.fc-contacts {
    margin-top: 6px;
}

.fc-contacts__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 24px;
}

.fc-contacts__col {
    min-width: 0;
}

.fc-contact {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 7px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--fc-line);
}

.fc-contact:last-child {
    border-bottom: 0;
}

.fc-contact__icon {
    flex: 0 0 auto;
    width: 18px;
    margin-top: 2px;
    color: var(--fc-accent);
    text-align: center;
}

.fc-contact__value {
    min-width: 0;
    word-break: break-word;
}

.fc-contact__value a {
    color: var(--fc-accent);
    text-decoration: none;
}

.fc-contact__value a:hover {
    text-decoration: underline;
}

.fc-contact__more {
    margin-left: 8px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--fc-accent);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
}

.fc-contact__extra {
    display: block;
    margin-top: 4px;
}

.fc-contact__extra a {
    display: block;
    color: var(--fc-accent);
}

/* Фото фасада */
.fc-facade {
    margin-top: 14px;
}
.fc-facade__img {
    display: block;
    width: 190px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    overflow: hidden;
    background: var(--fc-bg);
    cursor: zoom-in;
}

.fc-facade__img img {
    width: 100%;
    display: block;
}

.fc-facade__caption {
    display: block;
    margin-top: 6px;
    color: var(--fc-muted);
    font-size: 12px;
}

/* Ссылки предприятия: сайт и соцсети */
.fc-links {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--fc-line);
}

.fc-links__title {
    margin-bottom: 10px;
    color: var(--fc-muted);
    font-size: 13px;
}

.fc-links__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fc-links__item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border: 1px solid var(--fc-line);
    border-radius: 20px;
    background: #fff;
    color: #3c465c;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .15s ease, color .15s ease;
}

.fc-links__item:hover {
    border-color: var(--fc-accent);
    color: var(--fc-accent);
}

.fc-links__item .fa {
    color: var(--fc-accent);
    font-size: 14px;
}

.fc-links__item--vkcom .fa   { color: #0077ff; }
.fc-links__item--ok .fa      { color: #ee8208; }
.fc-links__item--telegram .fa { color: #2aabee; }
.fc-links__item--max .fa     { color: #7b2ff7; }
.fc-links__item--whatsapp .fa { color: #25d366; }
.fc-links__item--instagram .fa { color: #d62976; }
.fc-links__item--youtube .fa { color: #ff0000; }
.fc-links__item--twitter .fa { color: #1d9bf0; }
.fc-links__item--facebook .fa { color: #1877f2; }

/* --------------------------- Народный Бренд ----------------------------- */

/* Виджет в разделе: сколько конкурсов, номинаций и побед */
.fc-nb__widget {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 14px;
}

.fc-nb__stat {
    flex: 0 0 auto;
    min-width: 96px;
    padding: 10px 16px;
    border-radius: 12px;
    background: var(--fc-bg);
    text-align: center;
}

.fc-nb__stat--win {
    background: #fdf7e7;
    border: 1px solid #f1e2bd;
}

.fc-nb__num {
    display: block;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.15;
    color: var(--fc-accent);
}

.fc-nb__stat--win .fc-nb__num {
    color: #9a6700;
}

.fc-nb__cap {
    display: block;
    margin-top: 1px;
    font-size: 12px;
    color: var(--fc-muted);
}

.fc-nb__about {
    flex: 1 1 240px;
    min-width: 0;
    padding: 10px 14px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--fc-line);
}

.fc-nb__about-title {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    color: var(--fc-muted);
}

.fc-nb__noms {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.fc-nb__tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    background: #eef1f8;
    color: var(--fc-accent);
    font-size: 12px;
    line-height: 1.4;
}

.fc-nb__table {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--fc-line);
}

.fc-nb__row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--fc-line);
    background: #fff;
}

.fc-nb__row:last-child {
    border-bottom: 0;
}

.fc-nb__year {
    flex: 0 0 76px;
    font-size: 24px;
    font-weight: 700;
    color: var(--fc-accent);
    padding: 12px 10px 12px 14px;
    line-height: 1;
}

.fc-nb__nom {
    flex: 1 1 auto;
    padding: 12px 14px;
    background: #f7f9fd;
}

.fc-nb__status {
    flex: 0 0 170px;
    text-align: center;
    padding: 12px 10px;
    background: #f7f9fd;
    font-size: 13px;
}

/* Строка лидеров: победа в номинации */
.fc-nb__row--win .fc-nb__status {
    background: #fdf7e7;
    color: #9a6700;
    font-weight: 700;
}

.fc-nb__row--win .fc-nb__year {
    color: #9a6700;
}

.fc-nb__percent {
    flex: 0 0 90px;
    text-align: center;
    padding: 12px 10px;
    background: #f7f9fd;
    font-weight: 700;
}

.fc-nb__vote {
    flex: 0 0 160px;
    text-align: center;
    padding: 12px 10px;
    background: var(--fc-accent);
}

.fc-nb__vote a {
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

.fc-nb__more {
    margin-top: 12px;
    text-align: center;
}

/* Режим работы — показывается всегда, это не контакт */
.fc-work {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 16px;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--fc-bg);
    font-size: 14px;
}

.fc-work__icon {
    color: var(--fc-accent);
}

.fc-work__value {
    color: #3c465c;
}

.fc-work__sub {
    color: var(--fc-muted);
}

/* Уведомление для фирм без оплаты */
.fc-note {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0 16px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #fff6e5;
    color: #8a6116;
    font-size: 14px;
}

.fc-note__icon {
    flex: 0 0 auto;
    font-size: 15px;
}

/* Скрытые контакты неоплаченной фирмы */
.fc-contacts__locked {
    display: flex;
    flex-direction: column;
}

.fc-contact__show {
    padding: 0;
    border: 0;
    background: none;
    color: var(--fc-accent);
    font-size: 14px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

.fc-contact__show:hover {
    color: var(--fc-accent-dark);
}

.fc-contact__show:disabled {
    color: var(--fc-muted);
    cursor: default;
    text-decoration: none;
}

/* ------------------------------ Галерея --------------------------------- */

.fc-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
}

.fc-gallery__item {
    padding: 0;
    border: 0;
    border-radius: 12px;
    overflow: hidden;
    background: var(--fc-bg);
    aspect-ratio: 4 / 3;
    cursor: zoom-in;
}

.fc-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fc-gallery__more {
    margin-top: 14px;
    text-align: center;
}

/* ------------------------------ Отзывы ---------------------------------- */

.fc-section__title {
    margin: 0 0 12px;
    font-size: 19px;
    font-weight: 700;
    color: #1f2a44;
}

.fc-section__num {
    color: var(--fc-muted);
    font-weight: 400;
    font-size: 16px;
}

.fc-reviews__summary {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 14px;
    margin-bottom: 16px;
    border-radius: 12px;
    background: var(--fc-bg);
}

.fc-reviews__avg {
    font-size: 38px;
    font-weight: 700;
    line-height: 1;
    color: #1f2a44;
}

.fc-reviews__bars {
    flex: 1 1 auto;
    min-width: 0;
}

.fc-reviews__bar {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--fc-muted);
    line-height: 18px;
}

.fc-reviews__star {
    flex: 0 0 30px;
}

.fc-reviews__line {
    flex: 1 1 auto;
    height: 6px;
    border-radius: 3px;
    background: #e3e8f1;
    overflow: hidden;
}

.fc-reviews__line i {
    display: block;
    height: 100%;
    background: var(--fc-accent);
}

.fc-reviews__cnt {
    flex: 0 0 24px;
    text-align: right;
}

.fc-review {
    padding: 12px 0;
    border-bottom: 1px solid var(--fc-line);
}

.fc-review__head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 4px;
}

.fc-review__author {
    font-weight: 600;
}

.fc-review__stars {
    letter-spacing: 1px;
    font-size: 13px;
}

.fc-review__star {
    color: #d4dae6;
}

.fc-review__star.is-on {
    color: #f0a500;
}

.fc-review__date {
    margin-left: auto;
    color: var(--fc-muted);
    font-size: 12px;
}

.fc-review__text {
    color: #3c465c;
    font-size: 14px;
    white-space: pre-line;
}

/* Ответ предприятия на отзыв */
.fc-review__reply {
    margin-top: 10px;
    padding: 10px 12px;
    border-left: 3px solid var(--fc-accent);
    border-radius: 0 10px 10px 0;
    background: var(--fc-bg);
    font-size: 14px;
    line-height: 1.45;
}

.fc-review__reply-label {
    display: block;
    margin-bottom: 3px;
    color: var(--fc-accent);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.fc-review__reply-text {
    color: #3c465c;
    white-space: pre-line;
}

.fc-reviews__empty {
    padding: 16px 0;
    color: var(--fc-muted);
}

/* Форма отзыва */
.fc-review-form {
    margin-top: 16px;
    padding: 14px;
    border-radius: 12px;
    background: var(--fc-bg);
}

.fc-review-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #dfe4ed;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: #1f2a44;
    background: #fff;
    resize: vertical;
}

.fc-review-form textarea:focus {
    outline: none;
    border-color: var(--fc-accent);
}

.fc-review-form__rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 14px;
}

.fc-stars {
    display: inline-flex;
    /* Разметка звёзд идёт от 5 к 1, поэтому контейнер — справа налево:
       визуально звёзды идут 1..5, и «checked» подсвечивает нужные. */
    direction: rtl;
    gap: 2px;
}

.fc-stars input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.fc-stars label {
    cursor: pointer;
    color: #d4dae6;
    font-size: 24px;
    line-height: 1;
    transition: color .12s ease;
}

.fc-stars label:hover,
.fc-stars label:hover ~ label,
.fc-stars input:checked ~ label {
    color: #f0a500;
}

.fc-review-form__foot {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.fc-review-form__result {
    font-size: 13px;
    color: var(--fc-muted);
}

.fc-review-form__result.is-ok {
    color: #2f855a;
}

.fc-review-form__result.is-error {
    color: #c53030;
}

.fc-review-form__label {
    font-size: 14px;
    color: var(--fc-muted);
}

.fc-review-form__guest {
    margin-top: 8px;
}

/* Ссылка «все отзывы» под списком отзывов в карточке */
.fc-reviews__more {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fc-reviews__more .fc-btn {
    flex: 1 1 180px;
    text-align: center;
    justify-content: center;
}

/* ── Модальное окно отзывов (поверх карточки) ── */

.fc-rmodal {
    position: fixed;
    inset: 0;
    z-index: 2147483100;
    display: none;
    padding: 24px 16px;
    box-sizing: border-box;
    background: rgba(14, 18, 30, .55);
    overflow-y: auto;
}

.fc-rmodal.is-open {
    display: block;
}

.fc-rmodal__box {
    max-width: 660px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(10, 16, 32, .3);
    overflow: hidden;
}

.fc-rmodal__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 18px;
    border-bottom: 1px solid var(--fc-line);
    background: #fff;
}

.fc-rmodal__title {
    font-size: 16px;
    font-weight: 700;
    color: #1f2a44;
}

.fc-rmodal__close {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: var(--fc-bg);
    color: var(--fc-muted);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.fc-rmodal__close:hover {
    background: #e7ebf2;
    color: #1f2a44;
}

.fc-rmodal__content {
    padding: 16px 18px 20px;
    max-height: 72vh;
    overflow-y: auto;
}

.fc-rmodal__loading,
.fc-rmodal__error {
    padding: 18px 0;
    text-align: center;
    color: var(--fc-muted);
    font-size: 14px;
}

.fc-rmodal .fc-page__head {
    margin-top: 0;
}

.fc-rmodal .fc-page__title {
    font-size: 20px;
}

.fc-rmodal .fc-review {
    padding: 12px 0;
}

/* --------------------- Страница отзывов (отдельное окно) ----------------- */

.fc-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
    font-size: 13px;
    color: var(--fc-muted);
}

.fc-breadcrumbs a {
    color: var(--fc-accent);
    text-decoration: none;
}

.fc-breadcrumbs a:hover {
    text-decoration: underline;
}

.fc-breadcrumbs__current {
    color: var(--fc-text);
}

.fc-page__head {
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--fc-line);
}

.fc-page__title {
    margin: 0 0 10px;
    font-size: 24px;
    line-height: 1.25;
    font-weight: 700;
}

.fc-page__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.fc-page__count {
    font-size: 14px;
    color: var(--fc-muted);
}

.fc-page__foot {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--fc-line);
}

.fc-reviews-page .fc-reviews__summary {
    margin-bottom: 18px;
}

.fc-reviews-page .fc-review {
    padding: 14px 0;
    border-bottom: 1px solid var(--fc-line);
}

.fc-reviews-page .fc-review:last-child {
    border-bottom: 0;
}

/* ------------------------------ Услуги ---------------------------------- */

.fc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.fc-table td {
    padding: 9px 10px;
    border-bottom: 1px solid var(--fc-line);
}

.fc-table__name {
    width: 55%;
}

.fc-table__unit {
    width: 20%;
    color: var(--fc-muted);
}

.fc-table__price {
    text-align: right;
    font-weight: 600;
}

/* ------------------------------- Карта ---------------------------------- */

/* Наша карта проекта (/catalog/map/<адрес>) — на весь блок карточки */
.fc-map__frame {
    width: 100%;
    min-height: 320px;
    border: 0;
    border-radius: 12px;
    display: block;
    background: var(--fc-bg);
}

.fc-map__frame--full {
    min-height: 500px;
}

/* ========================== Страница галереи ========================== */

.fg__head {
    padding: 6px 0 16px;
    border-bottom: 1px solid var(--fc-line);
    margin-bottom: 18px;
}

.fg__back {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--fc-accent);
    font-size: 14px;
    text-decoration: none;
}

.fg__back:hover {
    text-decoration: underline;
}

.fg__title {
    margin: 0 0 6px;
    font-size: 26px;
    line-height: 1.2;
    font-weight: 700;
}

.fg__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: var(--fc-muted);
    font-size: 13px;
}

.fg__body {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 22px;
    align-items: start;
}

.fg__stage {
    position: relative;
    min-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0d1017;
    border-radius: 16px;
    overflow: hidden;
}

.fg__img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
}

.fg__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.fg__arrow:hover {
    background: rgba(255, 255, 255, .3);
}

.fg__arrow--prev { left: 12px; }
.fg__arrow--next { right: 12px; }

.fg__counter {
    position: absolute;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.fg__empty {
    padding: 60px 20px;
    color: #9aa3b2;
}

.fg__side {
    padding: 16px;
    border: 1px solid var(--fc-line);
    border-radius: 14px;
    background: #fff;
}

.fg__side__title {
    margin: 0 0 10px;
    font-size: 17px;
    font-weight: 700;
}

.fg__side__actions {
    margin-top: 14px;
}

.fg__side__card {
    display: block;
    margin-top: 14px;
    padding: 11px 16px;
    border-radius: 20px;
    background: var(--fc-accent);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
}

.fg__side__card:hover {
    background: var(--fc-accent-dark);
    color: #fff;
}

.fg__thumbs {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding-bottom: 6px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.fg__thumb {
    flex: 0 0 auto;
    width: 104px;
    height: 78px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    background: var(--fc-bg);
    cursor: pointer;
}

.fg__thumb.is-active {
    border-color: var(--fc-accent);
}

.fg__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ============================ Телефон =================================== */

@media (max-width: 767px) {
    .firm-card-modal {
        padding: 0;
    }

    .firm-card-modal__box {
        max-width: 100%;
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
    }

    .firm-card-modal__top {
        border-radius: 0;
        padding: 12px 14px 8px;
    }

    .firm-card-modal__content {
        padding: 0 14px 20px;
    }

    .fc-title {
        font-size: 22px;
    }

    .fc-head__logo {
        width: 62px;
        height: 62px;
        border-radius: 10px;
    }

    /* Карусель: на телефоне показываем почти всю карточку */
    .fc-slider__slide {
        width: 78%;
        height: 150px;
    }

    .fc-contacts__grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .fc-contact {
        padding: 9px 0;
    }

    .fc-nb__row {
        flex-wrap: wrap;
    }

    .fc-nb__year {
        flex: 0 0 62px;
        font-size: 20px;
    }

    .fc-nb__nom {
        flex: 1 1 auto;
    }

    .fc-nb__status,
    .fc-nb__percent,
    .fc-nb__vote {
        flex: 1 1 auto;
    }

    .fc-btn--big {
        padding: 12px 16px;
        font-size: 15px;
    }

    .fc-gallery {
        grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    }

    .fc-reviews__summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .fg__body {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .fg__stage {
        min-height: 260px;
    }

    .fg__img {
        max-height: 56vh;
    }

    .fg__title {
        font-size: 21px;
    }
}
