

/* Start:/local/components/librederm/product.quiz/templates/.default/style.css?178592403123140*/
/* ============================================================
   Подбор продуктов LIBREDERM
   Визуальная база: librederm:advisor / librederm:ask.expert
   Префикс: .pq-
   ============================================================ */

.pq {
    font-family: "GraphikLCG", "Helvetica", "Arial", sans-serif;
    color: #000;
}

.pq-screen {
    padding: 0 0 8px;
    width: 100%;
    box-sizing: border-box;
}

/* Шаги вопросов держим в комфортной для чтения ширине: варианты ответов —
   это текст, и растягивать их на 1400px в шесть колонок незачем.
   Выдача товаров ниже идёт на всю ширину. */
.pq-screen[data-pq-screen="question"] {
    max-width: 1000px;
}

.pq-screen[hidden] {
    display: none;
}

/* ---- Загрузка ---- */
.pq-screen--loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
}

.pq-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e0e7ef;
    border-top-color: #000;
    border-radius: 50%;
    animation: pq-spin .7s linear infinite;
}

@keyframes pq-spin {
    to { transform: rotate(360deg); }
}

/* ---- Вводный блок на первом шаге ---- */
.pq-lead {
    max-width: 680px;
    margin-bottom: 28px;
}

.pq-lead[hidden] {
    display: none;
}

.pq-lead__title {
    font: 500 26px/34px "GraphikLCG", "Helvetica", "Arial", sans-serif;
    margin-bottom: 10px;
}

.pq-lead__text {
    font: 300 16px/24px "GraphikLCG", "Helvetica", "Arial", sans-serif;
    color: #444;
}

/* Заголовок страницы сворачивается со второго шага — см. updatePageTitle() */
.pq-page-title--collapsed {
    display: none;
}

/* Дисклеймер внизу результата */
.pq-result__note--legal {
    margin: 32px 0 0;
    font-size: 12px;
    color: #a0a0a0;
}

/* ---- Прогресс ---- */
.pq-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.pq-progress[hidden] {
    display: none;
}

.pq-progress__bar {
    flex: 1;
    height: 6px;
    /* Раньше дорожка была белой на сером фоне; на белой странице ей нужен
       собственный тон, иначе видна только заливка. */
    background: #ececec;
    overflow: hidden;
}

.pq-progress__fill {
    height: 100%;
    width: 0;
    background: #000;
    transition: width .3s ease;
}

.pq-progress__text {
    font-size: 12px;
    color: #888;
    white-space: nowrap;
}

/* ---- Уже данные ответы над вопросом ---- */
.pq-answered {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.pq-answered[hidden] {
    display: none;
}

/* ---- Вопрос ---- */
.pq-question__title {
    font: 500 18px/28px "GraphikLCG", "Helvetica", "Arial", sans-serif;
    margin-bottom: 6px;
}

.pq-question__subtitle {
    font: 300 15px/22px "GraphikLCG", "Helvetica", "Arial", sans-serif;
    color: #888;
    margin-bottom: 24px;
}

.pq-question__subtitle[hidden] {
    display: none;
}

/* ---- Варианты ответа ---- */
.pq-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 8px;
    margin-bottom: 28px;
}

.pq-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    /* Граница видимая, а не прозрачная: на белой странице белый вариант
       без неё сливается с фоном. */
    border: 1px solid #e2e8ee;
    cursor: pointer;
    text-align: start;
    font: 300 15px/22px "GraphikLCG", "Helvetica", "Arial", sans-serif;
    color: #000;
    transition: box-shadow .15s, border-color .15s;
    box-sizing: border-box;
}

.pq-option:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, .16);
}

.pq-option--selected {
    border-color: #000;
    box-shadow: 0 0 0 1px #000;
}

.pq-option__marker {
    width: 18px;
    height: 18px;
    border: 2px solid #ccc;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    box-sizing: border-box;
    transition: border-color .15s, background .15s;
}

.pq-option__marker--box {
    border-radius: 2px;
}

.pq-option--selected .pq-option__marker {
    border-color: #000;
    background: #000;
}

.pq-option--selected .pq-option__marker::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
}

.pq-option--selected .pq-option__marker--box::after {
    border-radius: 0;
}

.pq-option__row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.pq-option__label {
    flex: 1;
}

/* ---- Варианты карточками ---- */
.pq-options--cards {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
}

/* Фиксированные четыре колонки, а не auto-fill: восемь зон ложатся ровно
   в две строки по четыре, тогда как auto-fill на этой ширине даёт 5 + 3. */
@media (min-width: 768px) {
    .pq-options--cards {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.pq-option--card {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
}

.pq-option__image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    background: #f7f7f7;
    overflow: hidden;
    /* Поле внутри плашки: в процентах, чтобы на мобильном, где карточка вдвое
       уже, отступ ужимался пропорционально, а не съедал всю картинку.
       Единственное число для подгонки размера иконок. */
    padding: 12%;
    box-sizing: border-box;
}

.pq-option__image img {
    width: 100%;
    height: 100%;
    /* contain, а не cover: иконки зон нельзя обрезать по краям */
    object-fit: contain;
    display: block;
    transition: transform .2s ease;
}

.pq-option--card:hover .pq-option__image img {
    transform: scale(1.04);
}

.pq-option--card .pq-option__row {
    flex: none;
}

/* Кружок в карточке не нужен: она и так кликабельна, а маркер превращал
   сетку в анкету и сдвигал подпись, ломая выравнивание с картинкой.
   Выбор показываем рамкой карточки и галочкой в углу изображения. */
.pq-option--card .pq-option__marker {
    display: none;
}

.pq-option--card.pq-option--selected .pq-option__image::before {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #000;
}

.pq-option--card.pq-option--selected .pq-option__image::after {
    content: '';
    position: absolute;
    top: 16px;
    right: 18px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.pq-option--card .pq-option__label {
    /* Место под две строки резервируем всегда. Иначе один длинный вариант
       («Шея и область декольте») растягивает весь ряд сетки, и у соседей
       снизу остаётся пустота. */
    min-height: 44px;
}

/* ---- Навигация ---- */
.pq-nav {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* ---- Кнопки ---- */
.pq-btn {
    display: inline-block;
    padding: 11px 28px;
    font: 300 14px/24px "GraphikLCG", "Helvetica", "Arial", sans-serif;
    text-transform: uppercase;
    letter-spacing: .4px;
    text-align: center;
    text-decoration: none;
    border: 1px solid #000;
    cursor: pointer;
    box-sizing: border-box;
    transition: background .15s, color .15s, opacity .15s;
}

.pq-btn:disabled {
    opacity: .4;
    cursor: default;
}

.pq-btn--sm {
    padding: 9px 16px;
    font-size: 12px;
    line-height: 16px;
}

.pq-btn--primary {
    background: #000;
    color: #fff;
}

.pq-btn--primary:hover:not(:disabled) {
    background: #fff;
    color: #000;
}

.pq-btn--ghost {
    background: #fff;
    color: #000;
}

.pq-btn--ghost:hover:not(:disabled) {
    background: #000;
    color: #fff;
}

.pq-btn--done {
    background: #2e7d32;
    border-color: #2e7d32;
    color: #fff;
}

/* ---- Результат ---- */
.pq-result__head {
    display: flex;
    align-items: center;
    /* Не space-between: на полной ширине кнопка улетала к правому краю
       и теряла связь с заголовком. Держим их рядом. */
    justify-content: flex-start;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.pq-result__title {
    font: 500 26px/34px "GraphikLCG", "Helvetica", "Arial", sans-serif;
}

/* Заголовок результата — отдельный уровень под h1 страницы, а не вровень с ним */
.pq-result__head {
    margin-top: 8px;
    margin-bottom: 20px;
}

.pq-result__answers-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.pq-result__answers {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pq-chip {
    display: inline-block;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #e2e8ee;
    font: 300 13px/18px "GraphikLCG", "Helvetica", "Arial", sans-serif;
    color: #444;
}

/* Чипс-кнопка: возврат к шагу, на котором был дан этот ответ.
   Без крестика — он означал бы «удалить ответ», а клик ведёт к шагу. */
.pq-chip--action {
    border: 1px solid #e2e8ee;
    cursor: pointer;
    transition: border-color .15s, color .15s;
}

.pq-chip--action:hover {
    border-color: #000;
    color: #000;
    text-decoration: underline;
}

.pq-result__note {
    font: 300 14px/22px "GraphikLCG", "Helvetica", "Arial", sans-serif;
    color: #888;
    margin-bottom: 20px;
}

.pq-result__note[hidden],
.pq-result__block[hidden],
.pq-empty[hidden] {
    display: none;
}

.pq-result__block {
    margin-bottom: 32px;
}

/* Заголовок блока и стрелки ленты в одной строке */
.pq-result__block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    /* Резервируем высоту стрелок, чтобы блоки без ленты не «подпрыгивали»
       относительно блоков со стрелками */
    min-height: 40px;
}

.pq-result__subtitle {
    /* 20px, а не 16: на 16 подзаголовок читался подписью, а не разделом.
       Иерархия: h1 страницы → 26px «Что мы подобрали» → 20px блок. */
    font: 500 20px/28px "GraphikLCG", "Helvetica", "Arial", sans-serif;
    margin-bottom: 0;
}

.pq-result__hint {
    font: 300 13px/20px "GraphikLCG", "Helvetica", "Arial", sans-serif;
    color: #888;
    margin: -8px 0 16px;
}

.pq-result__hint[hidden] {
    display: none;
}

/* ---- Сетка товаров ---- */
.pq-products {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

@media (min-width: 768px) {
    .pq-products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (min-width: 1200px) {
    .pq-products {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Без обёртки .page ширина доходит до 1440px — на четырёх колонках карточки
   вырастают до 350px, что для товара уже великовато. */
@media (min-width: 1440px) {
    .pq-products {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

/* Когда точных совпадений мало, ряд не должен растягиваться на всю ширину:
   две карточки в сетке из пяти колонок оставляли справа полтысячи пикселей
   пустоты. Ограничиваем число колонок количеством товаров и шириной карточки. */
@media (min-width: 768px) {
    .pq-products--1 { grid-template-columns: minmax(0, 340px); }
    .pq-products--2 { grid-template-columns: repeat(2, minmax(0, 340px)); }
    .pq-products--3 { grid-template-columns: repeat(3, minmax(0, 340px)); }
}


/* ---- Плашка коллекции ----
   В app.css .preview__title — крупный заголовок 18px. В каталоге он
   переопределён: маленькая плашка капсом, наезжающая на низ изображения
   (catalog_premium/style.css, скоуп .catalog__grid .catalog__body).
   Повторяем один в один, скоуп — своя карточка. */
@media (max-width: 767px) {
    .pq-preview .preview__title {
        width: 100%;
        margin-top: -10px;
        font: 300 12px/26px "GraphikLCG", "Helvetica", "Arial", sans-serif;
    }
}

@media (min-width: 768px) {
    .pq-preview .preview__title {
        position: relative; /* нужно, чтобы сработал z-index */
        z-index: 10;
        width: auto;
        margin-top: -32px;
        margin-bottom: 5px;
        margin-left: -10px;
        padding: 2px 10px;
        background-color: rgb(255 255 255 / 85%);
        backdrop-filter: blur(5px);
        font: 500 12px/28px "GraphikLCG", "Helvetica", "Arial", sans-serif;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        border-radius: 10px;
    }
}

/* ---- Плашки скидки и времени применения ----
   Рамка и вид приходят не из app.css, а из стилей каталога
   (catalog_premium/style.css, скоуп .catalog__grid .catalog__body).
   Переносим один в один под свою карточку. */
.pq-preview .preview-labels__item {
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.pq-preview .preview-labels__item.m-discount {
    width: auto;
    min-width: 24px;
    max-width: 32px;
    padding: 0;
    background: transparent;
    border-color: #000;
    color: #000;
    font: 400 10px/18px "GraphikLCG", "Helvetica", "Arial", sans-serif;
}

.pq-preview .preview-labels__item.m-time-of-use {
    width: 24px;
    height: 22px;
    border: thin solid #000;
    /* Левой границы нет: бейдж примыкает к скидке вплотную, общей линией */
    border-left: none;
    background: transparent;
}

/* Стоит один — возвращаем левую границу, иначе рамка окажется разомкнутой */
.pq-preview .preview-labels__row .preview-labels__item.m-time-of-use:first-child {
    border-left: thin solid #000;
}

.pq-preview .preview-labels__item.m-time-of-use.m-universal {
    width: 50px;
    gap: 2px;
}

.pq-preview .preview-labels__item.m-time-of-use img {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Десктопные размеры. В каталоге правила выше — мобильная база, а это
   переопределения в @media, без которых бейджи остаются мелкими. */
@media (min-width: 768px) {
    .pq-preview .preview-labels__item.m-discount {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
        line-height: 18px;
    }

    .pq-preview .preview-labels__item.m-time-of-use {
        width: 32px;
        height: 32px;
    }

    .pq-preview .preview-labels__item.m-time-of-use.m-universal {
        width: 64px;
        gap: 4px;
    }

    .pq-preview .preview-labels__item.m-time-of-use img {
        width: 20px;
        height: 20px;
    }
}

/* ---- Карточка товара ----
   Разметка и внешний вид — глобальные классы каталога (.preview, .price,
   .form-button, .fav-icon) из app.css, тот же набор, что в catalog_premium.
   Здесь только то, чего в каталожной карточке нет: причины подбора. */

.pq-card__reasons {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.pq-card__reasons li {
    position: relative;
    padding-left: 14px;
    font: 300 12px/17px "GraphikLCG", "Helvetica", "Arial", sans-serif;
    color: #666;
}

.pq-card__reasons li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #000;
}

/* Совпавшее значение — именно оно отвечает на вопрос «почему этот товар» */
.pq-card__reasons strong {
    font-weight: 500;
    color: #000;
}

/* В каталоге кнопка в футере позиционирована абсолютно и рассчитана на широкую
   карточку. В подборе карточка бывает уже: цена переносится на две строки и
   уезжает под кнопку. Раскладываем футер обычным потоком — наложение исключено
   при любой ширине. */
.pq-preview .preview__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.pq-preview .preview__footer .price {
    width: auto;
}

.pq-preview .preview__footer .form-button {
    position: static;
    flex: none;
}

.pq-preview__cart:disabled {
    opacity: .4;
    cursor: default;
}

/* ---- Дополнительный блок слайдером ----
   Когда подходящих товаров много, сетка растягивает страницу на три-четыре
   ряда. Горизонтальная лента компактнее и привычна по каталогу.
   Swiper на этой странице недоступен, поэтому нативная прокрутка + drag. */
.pq-products--slider {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    padding-bottom: 4px;
    cursor: grab;
    scroll-behavior: smooth;
    /* Иначе при перетаскивании выделяется текст карточек */
    user-select: none;
}

/* ---- Стрелки ленты ---- */
.pq-slider-nav {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-left: auto;
}

.pq-slider-nav__btn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e2e8ee;
    cursor: pointer;
    padding: 0;
    color: #000;
    transition: border-color .15s, opacity .15s;
}

.pq-slider-nav__btn:hover:not(:disabled) {
    border-color: #000;
}

.pq-slider-nav__btn:disabled {
    opacity: .35;
    cursor: default;
}

.pq-slider-nav__btn svg {
    width: 18px;
    height: 18px;
    display: block;
}

.pq-slider-nav__btn--prev svg {
    transform: rotate(180deg);
}

.pq-products--slider::-webkit-scrollbar {
    display: none;
}

.pq-products--slider.is-dragging {
    cursor: grabbing;
    /* Снап во время перетаскивания дёргает ленту */
    scroll-snap-type: none;
}

.pq-products--slider > .preview {
    flex: 0 0 calc((100% - 32px) / 2.5);
    scroll-snap-align: start;
}

@media (min-width: 768px) {
    /* 4,2 карточки: обрезанная пятая сама подсказывает, что лента листается.
       Без неё пользователь не догадывается, что справа что-то есть. */
    .pq-products--slider > .preview {
        flex-basis: calc((100% - 64px) / 4.2);
    }

    /* Ровно четыре товара — листать нечего, показываем их целиком
       и не оставляем висеть обрезанный край. */
    .pq-products--exact4 > .preview {
        flex-basis: calc((100% - 48px) / 4);
    }
}

/* ---- Пустая выдача и ошибка ---- */
.pq-empty {
    max-width: 560px;
}

.pq-empty__title {
    font: 500 18px/26px "GraphikLCG", "Helvetica", "Arial", sans-serif;
    margin-bottom: 8px;
}

.pq-empty__text {
    font: 300 15px/22px "GraphikLCG", "Helvetica", "Arial", sans-serif;
    color: #666;
    margin-bottom: 20px;
}

/* ---- Адаптив ---- */
@media (max-width: 600px) {
    .pq-options {
        grid-template-columns: 1fr;
    }

    /* Карточки на мобильном — в две колонки, иначе шаг вытягивается в простыню */
    .pq-options--cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .pq-option--card {
        padding: 8px;
    }

    .pq-option--card .pq-option__label {
        font-size: 14px;
        line-height: 18px;
        min-height: 36px;
    }

    .pq-question__title {
        font-size: 16px;
        line-height: 24px;
    }

    .pq-result__title {
        font-size: 18px;
        line-height: 26px;
    }

    .pq-btn {
        padding: 10px 20px;
        font-size: 13px;
    }

    .pq-nav .pq-btn {
        flex: 1;
    }
}

/* End */
/* /local/components/librederm/product.quiz/templates/.default/style.css?178592403123140 */
