/*
 * overrides.css — журнал инкрементальных правок (bug fixes, patches)
 *
 * ПРАВИЛА:
 * — Этот файл append-only. Никогда не редактируй существующие блоки.
 * — Каждый блок начинается с маркера: /* === <короткое-имя> YYYYMMDD === */
 * — Грузится в header.php ПОСЛЕ style-new.css, чтобы cascade выигрывал.
 * — При деплое dev↔prod — НЕ копируй этот файл целиком. Каждая среда ведёт свой журнал.
 */

/* === bug-batch fixes 20260512 === */

/* Age-strip light theme: внутренние тексты должны быть светлыми поверх dark background */
:root[data-theme="light"] .age-strip {
    --cream: #fbf8f3;
    --cream-dim: rgba(251,248,243,.85);
    --cream-muted: rgba(251,248,243,.7);
    --gold: #d4b87a;
    --gold-dim: rgba(212,184,122,.5);
}

/* Mobile: длинные имена городов не вылазят за рамки карточки */
@media (max-width: 640px) {
    .is-root #citypad > .citylist {
        min-width: 100%; max-width: 100%; box-sizing: border-box;
        overflow-wrap: anywhere; word-break: break-word;
        margin-right: 0;
    }
    .is-root #citypad > .citylist a { word-break: break-all; }
}

/* Mobile: длинные тексты в карточках программ салона не вылазят */
.programme-name, .programme-text { overflow-wrap: anywhere; word-break: break-word; min-width: 0; }
.programme-head { min-width: 0; }
.salon-detail .text, .salon-detail .text * { overflow-wrap: anywhere; word-break: break-word; }
/* === banner-top polish 20260512 === */
/* Убираем дублирующиеся рамки и фоновую "белую" полосу: одна тонкая золотая граница вокруг картинки, контейнер по ширине самой картинки. */
.ri-card--top { max-width: 800px; margin: 0 auto 14px; }
.ri-card--top a {
    display: block;
    border: 1px solid var(--gold-dim);
    aspect-ratio: auto;
    line-height: 0;
    background: transparent;
    overflow: hidden;
    transition: border-color .3s, transform .3s;
}
.ri-card--top a:hover { border-color: var(--gold); transform: translateY(-2px); }
.ri-card--top a img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    background: transparent;
    opacity: .95;
}
.ri-card--top a:hover img { opacity: 1; }
.ri-card--top.stories a { aspect-ratio: auto; }
.ri-card--top.stories a img { height: auto; }

/* === bug-fix-followup 20260513 === */
/* #2 Light theme: .age-strip имеет hardcoded тёмный фон, поэтому внутренний текст
   должен оставаться светлым — не следовать --cream, который в светлой теме инвертирован в тёмный. */
:root[data-theme="light"] .age-strip .inner { color: rgba(251, 248, 243, 0.75); }
:root[data-theme="light"] .age-strip .age { color: var(--gold, #c9a96e); }

/* #3 Desktop: длинные имена городов (Петропавловск-Камчатский и т.п.)
   не должны расширять inline-block карточку — фиксируем ширину = текущий min-width 210px. */
@media (min-width: 641px) {
    .is-root #citypad > .citylist {
        width: 210px;
        max-width: 210px;
        overflow-wrap: anywhere;
        word-break: break-word;
    }
}

/* #5 mon-cheri: anchor-кнопки разделов салона не помещают «Девушки15»/«Программы15»
   на узких экранах. Переводим nav в wrap (вместо горизонтального скролла) +
   ставим пробел между текстом и счётчиком. */
.salon-anchors { flex-wrap: wrap; overflow-x: visible; row-gap: 8px; column-gap: 8px; }
.salon-anchors .go_to { white-space: nowrap; flex: 0 0 auto; }
.salon-anchors .go_to > span::before { content: " "; white-space: pre; }


/* === card-cover для normal-карточек 20260515 v2 === */
.card.list.has-cover {
    display: flex !important;
    align-items: stretch;
    gap: 18px;
    padding: 18px 20px;
}
.card.list.has-cover .card-cover {
    flex: 0 0 160px;
    width: 160px;
    align-self: stretch;
    overflow: hidden;
    background: rgba(0,0,0,.15);
    border-radius: 6px;
    display: block;
    text-decoration: none;
}
.card.list.has-cover .card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
    min-height: 160px;
}
.card.list.has-cover:hover .card-cover img { transform: scale(1.04); }
.card.list.has-cover .card-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.card.list:not(.has-cover) .card-body {
    display: contents;
}
@media (max-width: 700px) {
    .card.list.has-cover {
        flex-direction: column;
        gap: 12px;
    }
    .card.list.has-cover .card-cover {
        width: 100%;
        flex: 0 0 auto;
        height: 200px;
    }
}

/* === fix: уменьшить избыточный margin-top у crumbs (header не fixed) 20260515 === */
.page-head.top-pad { margin-top: 24px; }

/* === fix: mobile-drawer текст в light-теме 20260518 === */
/* Фон drawer хардкод-тёмный (rgba(12,11,10,.96)) в обеих темах.
   В light-теме var(--cream)/--cream-dim становятся тёмными → тёмный на тёмном.
   Форсим светлый текст внутри drawer независимо от темы. */
:root[data-theme="light"] .mobile-nav a { color: #e8e0d4; }
:root[data-theme="light"] .mobile-sub a { color: rgba(232,224,212,.72); }
:root[data-theme="light"] .mobile-nav a:hover,
:root[data-theme="light"] .mobile-nav a.is-active,
:root[data-theme="light"] .mobile-sub a:hover { color: #c9a96e; }

/* === fix: drawer поверх popup-баннера 20260518 === */
/* .ri-card--popup имеет z-index 9990 и перекрывал нижние пункты открытого
   меню (Личный кабинет / Избранное / Реклама). Поднимаем drawer выше. */
.mobile-drawer { z-index: 10001; }
.drawer-backdrop { z-index: 10000; }

/* === drawer: крестик закрытия + убраны рамки иконок шапки 20260518 === */
.drawer-close {
    position: absolute;
    top: 20px;
    right: 22px;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--cream-dim);
    transition: color .25s ease;
    z-index: 2;
}
.drawer-close:hover { color: var(--gold); }
/* Иконки шапки без рамок (тема / избранное / гамбургер) */
.nav-burger,
.nav-fav,
.theme-toggle { border: none; }

/* === faq accordion block 20260519 === */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
    background: var(--dark);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}
.faq-q {
    list-style: none;
    cursor: pointer;
    padding: 14px 46px 14px 18px;
    position: relative;
    font-size: .95rem;
    font-weight: 500;
    color: var(--cream);
    line-height: 1.45;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after {
    content: "";
    position: absolute;
    right: 18px;
    top: 50%;
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--gold);
    border-bottom: 2px solid var(--gold);
    transform: translateY(-70%) rotate(45deg);
    transition: transform .2s ease;
}
.faq-item[open] .faq-q::after { transform: translateY(-30%) rotate(-135deg); }
.faq-item[open] .faq-q { color: var(--gold); }
.faq-a {
    padding: 0 18px 16px;
    font-size: .9rem;
    color: var(--cream-dim);
    line-height: 1.6;
}

/* === fix: счётчик-бейдж в якорях салона — убрать фантомный ::before 20260519 === */
.salon-anchors .go_to > span::before { content: none; }
.salon-anchors .go_to > span { margin-left: 5px; }

/* === fix: кнопка «Оставить отзыв» (.review-toggle) была без стилей — выглядела как простая ссылка и терялась 20260522 === */
.review-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0 18px;
    padding: 11px 26px;
    border: 1px solid var(--gold-dim, #c9a96e);
    color: var(--gold, #c9a96e);
    background: rgba(201, 169, 110, .04);
    font-size: .82rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
    transition: border-color .25s, color .25s, background .25s, transform .25s;
}
.review-toggle:hover {
    border-color: var(--gold, #c9a96e);
    background: rgba(201, 169, 110, .12);
    transform: translateY(-1px);
}
/* светлая тема: золото инвертируется в тёмное — задаём явные читаемые цвета */
:root[data-theme="light"] .review-toggle {
    border-color: #b8973f;
    color: #8a6d28;
    background: rgba(184, 151, 63, .06);
}
:root[data-theme="light"] .review-toggle:hover {
    background: rgba(184, 151, 63, .14);
}

/* === fix: «Без интима» (.age-strip b) и «Только» (.age em) были тёмными на тёмном фоне страйпа в светлой теме — задаём явный светлый цвет (var(--cream) тут не срабатывал) 20260523 === */
:root[data-theme="light"] .age-strip b { color: #fbf8f3; }
:root[data-theme="light"] .age-strip .age em { color: rgba(251, 248, 243, .7); }

/* === fix: SEO-блок ключевиков .tags-block (index.php) рендерил каждый тег в <p> (блочный) → вертикальная «простыня». Делаем инлайн + приглушённо 20260523 === */
.tags-block { font-size: .78rem; line-height: 1.7; color: var(--cream-muted, rgba(232,224,212,.45)); margin: 10px 0 4px; }
.tags-block p { display: inline; margin: 0; font-size: inherit; color: inherit; }
:root[data-theme="light"] .tags-block { color: rgba(12,11,10,.5); }

/* === галерея салона: индикатор «есть ещё фото справа» — затемнение края + стрелка прокрутки 20260523 === */
.salon-hero-thumbs-wrap { position: relative; }
.salon-hero-thumbs-wrap.scrollable::after {
    content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 64px;
    pointer-events: none; background: linear-gradient(to right, transparent, var(--dark));
}
.salon-hero-thumbs-wrap .thumbs-arrow {
    position: absolute; top: 50%; right: 8px; transform: translateY(-50%);
    width: 36px; height: 36px; display: grid; place-items: center; z-index: 3;
    border-radius: 50%; border: 1px solid var(--gold, #c9a96e);
    background: rgba(12, 11, 10, .72); color: var(--gold, #c9a96e);
    font-size: 24px; line-height: 1; cursor: pointer; padding: 0;
    transition: background .25s, transform .25s;
}
.salon-hero-thumbs-wrap .thumbs-arrow:hover { background: rgba(201, 169, 110, .2); transform: translateY(-50%) scale(1.08); }
.salon-hero-thumbs-wrap .thumbs-arrow[hidden] { display: none; }
:root[data-theme="light"] .salon-hero-thumbs-wrap .thumbs-arrow { background: rgba(251, 248, 243, .85); border-color: #b8973f; color: #8a6d28; }
