/* ONLINE PARK — карточка товара, отзывы, вопросы.
   Сетка: галерея 480 + промежуток 40 + правая колонка на остаток ширины контента. */

.pd-crumbs { margin-bottom: 40px; }

.pd-top {
    display: grid;
    grid-template-columns: 480px 1fr;
    gap: 40px;
    align-items: start;
}

.pd-top > * { min-width: 0; }

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

.pd-photo {
    position: relative;
    height: 480px;
    padding: 24px;
    background: var(--white);
    border-radius: var(--r-16);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pd-photo img { max-height: 100%; max-width: 100%; object-fit: contain; }
.pd-photo-empty { color: var(--ink); opacity: .3; }

.pd-flags { position: absolute; top: 16px; left: 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }

.pd-fav {
    position: absolute; top: 16px; right: 16px;
    width: 40px; height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--bg); border: 0; border-radius: 50%; color: var(--ink);
}

.pd-fav:hover { background: var(--bg-grey); }
.pd-fav.is-on { background: var(--orange); color: var(--white); }

.pd-thumbs-wrap { position: relative; margin-top: 12px; }

.pd-thumbs {
    display: flex; gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-behavior: smooth;
}

.pd-thumbs::-webkit-scrollbar { display: none; }

.pd-thumb {
    flex: none;
    width: 100px; height: 96px;
    padding: 6px;
    background: var(--white);
    border: 0; opacity: .5;
    border-radius: var(--r-8);
    display: flex; align-items: center; justify-content: center;
}

.pd-thumb img { max-height: 100%; object-fit: contain; }
.pd-thumb.on, .pd-thumb:hover { opacity: 1; }

.pd-round {
    width: 40px; height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--white); border: 1px solid var(--ink-10); border-radius: 50%;
    color: var(--ink);
}

.pd-round:hover { border-color: var(--blue); color: var(--blue); }

.pd-thumbs-next { position: absolute; top: 50%; right: -8px; transform: translateY(-50%); box-shadow: 0 2px 12px rgba(6, 6, 6, .12); }

/* ── Правая колонка: покупка ─────────────────────────────── */

.pd-buy { display: flex; flex-direction: column; }

.pd-meta { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.pd-rate { display: inline-flex; align-items: center; gap: 6px; }
.pd-rate .icon { color: var(--orange); }
.pd-rate b { font-weight: 600; }
.pd-meta-link { color: var(--blue); text-decoration: underline; font-size: 14px; }
.pd-meta-sep { opacity: .3; }
.pd-meta-q span { opacity: .4; }

.pd-title { font-size: 32px; line-height: 1.35; margin: 4px 0 6px; }

.pd-info { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 14px; }
.pd-deliv { display: inline-flex; align-items: center; gap: 6px; color: var(--blue); }
.pd-deliv.is-out { color: var(--red); }
.pd-sku { display: inline-flex; align-items: center; gap: 6px; padding: 0; background: 0; border: 0; color: var(--ink); }
.pd-sku:hover { color: var(--blue); }
.pd-sku.is-copied { color: var(--blue); opacity: 1; }

.pd-price-row { display: flex; align-items: center; gap: 24px; margin: 8px 0; }

.pd-price-box {
    display: inline-flex; align-items: center; gap: 12px;
    min-width: 243px; height: 64px; padding: 0 24px;
    background: var(--bg-grey); border-radius: var(--r-8);
}

.pd-price-box b { font-size: 24px; font-weight: 700; color: var(--orange); white-space: nowrap; }
.pd-price-box s { font-size: 16px; opacity: .4; }

.pd-label { font-size: 14px; opacity: .5; }

.pd-actions { display: flex; align-items: center; gap: 8px; }
.pd-btn { height: 56px; padding: 0 24px; border-radius: var(--r-8); font-size: 16px; font-weight: 500; gap: 10px; }
.pd-btn-quick { padding: 0 28px; }

.pd-compare {
    width: 56px; height: 56px; flex: none;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--bg-grey); border: 0; border-radius: var(--r-8); color: var(--ink);
}

.pd-compare:hover { background: #e3e3de; }
.pd-compare.is-on { background: var(--blue); color: var(--white); }

.pd-summary { margin-top: 16px; }
.pd-summary p { font-size: 16px; line-height: 20px; margin: 4px 0 0; }
.pd-summary-link { text-decoration: underline; opacity: .5; }
.pd-summary-link:hover { opacity: 1; }

.pd-variants { display: flex; flex-direction: row; flex-wrap: wrap; gap: 12px 32px; margin-top: 16px; }
.pd-variant-group { display: flex; flex-direction: column; gap: 8px; }
.pd-chips { display: flex; flex-wrap: wrap; gap: 4px; }

.pd-chip {
    height: 36px; padding: 0 12px;
    background: var(--bg-grey); border: 0; border-radius: 18px;
    font-size: 16px; color: var(--ink);
}

.pd-chip:hover { background: #e3e3de; }
.pd-chip.on { background: var(--ink); color: var(--white); }

/* ── Панели: характеристики, отзывы, вопросы ─────────────── */

.pd-panel {
    margin-top: 16px;
    padding: 16px;
    background: var(--white);
    border-radius: var(--r-8);
}

.pd-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.pd-h2 { font-size: 24px; font-weight: 700; line-height: 44px; }

.pd-toggle {
    display: inline-flex; align-items: center; gap: 10px;
    height: 44px; padding: 0 20px;
    background: var(--bg-grey); border: 0; border-radius: var(--r-8);
    font-size: 12px; font-weight: 500; letter-spacing: .1em; color: var(--ink);
}

.pd-toggle:hover { background: #e3e3de; }
.pd-toggle .icon { transition: transform .15s; }
.is-open > .pd-panel-head .pd-toggle .icon,
.is-open .pd-main-head .pd-toggle .icon { transform: rotate(180deg); }

/* Описание: текст с абзацами и списками, строка не шире удобной для чтения */
.pd-description-body { max-width: 900px; font-size: 16px; line-height: 1.6; }
.pd-description-body p + p { margin-top: 12px; }
.pd-description-body ul, .pd-description-body ol { margin: 8px 0 8px 20px; }

/* Характеристики: две колонки по 580 с промежутком 20, строка 34px */
.pd-specs-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }

.pd-spec {
    display: grid; grid-template-columns: 309px 1fr; align-items: center;
    min-height: 34px; padding: 4px 16px;
    border-bottom: 1px solid var(--bg-grey);
    font-size: 16px; line-height: 20px;
}

.pd-specs-col { margin: 0 -16px; }
.pd-spec-name { opacity: .7; padding-right: 12px; }
.pd-spec-value.is-no { color: var(--red); }
.pd-spec-value.is-yes { color: var(--blue); }
.pd-specs:not(.is-open) .pd-specs-cols { display: none; }

.pd-more-row:not(.only-mobile) { display: flex; }
.pd-more-row { justify-content: center; margin-top: 12px; }
.pd-more-link { background: 0; border: 0; padding: 8px; color: var(--blue); font-size: 14px; }

/* ── Отзывы и вопросы: колонка слева, список справа ──────── */

.pd-split { display: grid; grid-template-columns: 277px 1fr; padding: 0; gap: 0; }

.pd-side {
    display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
    padding: 16px;
    border-right: 1px solid var(--bg-grey);
}

.pd-side-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.pd-side-head .pd-h2 { margin-right: 4px; }
.pd-all-link { display: inline-flex; align-items: center; gap: 10px; color: var(--blue); font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; }

.pd-main { padding: 16px; min-width: 0; }
.pd-main-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.pd-main-cta { display: flex; align-items: center; gap: 16px; flex: 1 0 0; min-width: 0; }
.pd-main-name { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-btn-line { height: 46px; padding: 0 16px; border: 1px solid var(--blue); border-radius: var(--r-8); background: var(--white); font-size: 16px; font-weight: 500; }
.pd-btn-line:hover { background: var(--blue); color: var(--white); }

.pd-list { display: flex; flex-direction: column; }
.pd-empty { padding: 24px 0; opacity: .5; }

/* Фильтр отзывов */
.pd-filters { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.pd-checks { display: flex; flex-direction: column; gap: 10px; }
.pd-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 16px; }
.pd-check input { position: absolute; opacity: 0; width: 0; height: 0; }

.pd-check-box {
    width: 18px; height: 18px; flex: none;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--ink-10); border-radius: var(--r-4);
    background: var(--white); color: transparent;
}

.pd-check input:checked + .pd-check-box { color: var(--blue); }
.pd-check-count { opacity: .4; }

.pd-sort {
    height: 36px; padding: 0 16px;
    background: var(--bg-grey); border: 0; border-radius: var(--r-8);
    font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--ink);
}

.pd-sort:hover { background: #e3e3de; }

/* Отзыв */
.pd-review { padding: 20px 0; border-bottom: 1px solid var(--bg-grey); }
.pd-review:first-child { padding-top: 0; }
.pd-review:last-child { border-bottom: 0; }
.pd-review-main { display: flex; gap: 20px; align-items: flex-start; }
.pd-review-body { flex: 1 0 0; min-width: 0; }
.pd-review-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.pd-review-title { font-size: 18px; font-weight: 700; }
.pd-review-text { font-size: 16px; line-height: 20px; margin: 0 0 8px; }
.pd-review-pc { font-size: 16px; line-height: 20px; margin-bottom: 8px; }
.pd-review-pc b { font-weight: 600; }
.pd-date { font-size: 14px; opacity: .4; }

.pd-review-photos { display: flex; flex-wrap: wrap; gap: 8px; width: 300px; flex: none; }
.pd-review-photos.is-wide { width: 396px; }
.pd-review-photo { width: 146px; height: 108px; border-radius: var(--r-8); overflow: hidden; background: var(--bg-grey); }
.pd-review-photo img { width: 100%; height: 100%; object-fit: cover; }

.pd-answer { margin-top: 14px; }
.pd-answer-head { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.pd-answer-logo { display: inline-flex; align-items: center; padding: 6px 10px; background: var(--bg); border-radius: var(--r-8); }
.pd-answer-meta { display: flex; flex-direction: column; gap: 2px; }
.pd-answer-badge { font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--orange); }
.pd-answer-text { font-size: 16px; line-height: 20px; margin: 0; }

/* Вопрос */
.pd-question { padding: 20px 0; border-bottom: 1px solid var(--bg-grey); }
.pd-question:first-child { padding-top: 0; }
.pd-question:last-child { border-bottom: 0; }
.pd-question-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.pd-author { font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; opacity: .4; }
.pd-question-title { font-size: 18px; font-weight: 700; margin-bottom: 12px; }

/* Свёрнутый блок показывает только первые записи */
.pd-split:not(.is-open) .pd-item-more { display: none; }
.pd-specs:not(.is-more) .pd-spec-more { display: grid; }

/* ── Комплект и сопутствующие ────────────────────────────── */

.pd-sec { margin-top: 48px; }
.pd-sec-head { display: flex; align-items: center; gap: 24px; margin-bottom: 20px; }
.pd-sec-text { flex: 1 0 0; min-width: 0; }
.pd-kicker { display: inline-block; font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--orange); margin-bottom: 8px; }
.pd-kicker-cyan { background: var(--cyan); color: var(--ink); padding: 6px 14px; border-radius: var(--r-8); }
.pd-sec-title { font-size: 36px; font-weight: 700; line-height: 1.2; }
.pd-sec-sub { font-size: 16px; margin-top: 6px; }
.pd-arrows { display: flex; gap: 8px; }
.pd-btn-cyan { background: var(--cyan); color: var(--ink); }
.pd-btn-cyan:hover { background: #2ce89b; color: var(--ink); }

.pd-rail { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 60px) / 4); gap: 20px; overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth; }
.pd-rail::-webkit-scrollbar { display: none; }
.pd-rail > * { min-width: 0; }
.pd-set .pd-sec-head .pd-set-form { flex: 1 0 0; display: flex; justify-content: flex-end; }
.pd-set-form.only-mobile { margin-top: 16px; }

/* ── Модалки карточки ────────────────────────────────────── */

.pd-modal { width: 452px; max-width: 100%; }
.pd-modal-wide { width: 640px; }
.pd-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.pd-modal-close { width: 32px; height: 32px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: 0; border: 0; opacity: .4; }
.pd-modal-close:hover { opacity: 1; }
.pd-modal-product { font-size: 14px; margin-bottom: 16px; }
.pd-modal-product b { color: var(--orange); }

/* ── Адаптив ─────────────────────────────────────────────── */

@media (max-width: 1199px) {
    .pd-top { grid-template-columns: 400px 1fr; gap: 28px; }
    .pd-photo { height: 400px; }
    .pd-title { font-size: 26px; }
    .pd-sec-title { font-size: 26px; }
    .pd-spec { grid-template-columns: 1fr 1fr; }
    .pd-rail { grid-auto-columns: calc((100% - 40px) / 3); }
}

@media (max-width: 991px) {
    .pd-top { grid-template-columns: 1fr; }
    .pd-photo { height: 420px; }
    .pd-specs-cols { grid-template-columns: 1fr; }
    .pd-split { grid-template-columns: 1fr; }
    .pd-side { border-right: 0; border-bottom: 1px solid var(--bg-grey); }
    .pd-rail { grid-auto-columns: calc((100% - 20px) / 2); }
    .pd-review-photos { width: 220px; }
    .pd-review-photo { width: 106px; height: 80px; }
}

@media (max-width: 767px) {
    .pd-crumbs { margin-bottom: 16px; }
    .pd-photo { height: 320px; padding: 16px; }
    .pd-thumb { width: 72px; height: 70px; }
    .pd-meta { font-size: 14px; white-space: nowrap; flex-wrap: wrap; }
    .pd-title { font-size: 28px; line-height: 1.3; }
    /* Макет Card-360: доставка и артикул столбиком, цена во всю ширину (старая цена справа) */
    .pd-info { flex-direction: column; align-items: flex-start; gap: 6px; }
    .pd-price-row { flex-direction: column; align-items: stretch; gap: 12px; }
    .pd-price-box { min-width: 0; height: 56px; justify-content: space-between; }
    /* «В корзину» во всю ширину, под ней сравнение и «Заказать в один клик» в одну строку */
    .pd-actions { flex-wrap: wrap; }
    .pd-cart-form { flex: 0 0 100%; }
    .pd-cart-form .pd-btn { width: 100%; }
    .pd-actions > form[data-ajax="compare"] { order: 1; }
    .pd-btn-quick { order: 2; flex: 1 0 0; min-width: 0; padding: 0 12px; }
    .pd-variants { flex-direction: column; gap: 12px; }
    .pd-panel { padding: 16px; }
    .pd-h2, .pd-sec-title { font-size: 22px; }
    .pd-side, .pd-main { padding: 16px; }
    .pd-main-head { flex-wrap: wrap; }
    .pd-review-main { flex-direction: column; }
    /* На всей странице отзывов фото шире (is-wide) — в колонке телефона они занимают ширину отзыва */
    .pd-review-photos, .pd-review-photos.is-wide { width: 100%; }
    .pd-review-photos { width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; position: relative; }
    .pd-review-photos::-webkit-scrollbar { display: none; }
    .pd-review-photo { flex: none; width: 140px; height: 104px; }
    .pd-rail { grid-auto-columns: 74%; }
    .pd-sec { margin-top: 32px; }
    .pd-sec-head { flex-wrap: wrap; gap: 12px; }
    .pd-specs:not(.is-more) .pd-spec-more { display: none; }
    .pd-more-row.only-mobile { display: flex; }
}

/* ── Отдельные страницы всех отзывов и всех вопросов (макеты Card Reviews / Card Questions) ──
   Шапка-панель с товаром и фильтром, ниже каждый отзыв и вопрос — своя белая панель. */

.rq-head { background: var(--white); border-radius: var(--r-8); }
.rq-top { display: flex; align-items: center; gap: 8px; padding: 16px 16px 16px 0; }
.rq-head:has(.rq-filters) .rq-top { padding-top: 24px; padding-bottom: 24px; }
.rq-back { flex: none; width: 56px; height: 48px; display: inline-flex; align-items: center; justify-content: center; color: var(--blue); }
.rq-back .icon { transform: rotate(180deg); }
.rq-back:hover { color: var(--blue-h); }
.rq-info { flex: 1 1 0; min-width: 0; }
.rq-line { display: flex; align-items: center; flex-wrap: wrap; gap: 0 24px; min-height: 32px; }
.rq-name { font-size: 20px; font-weight: 500; line-height: 24px; min-width: 0; }
.rq-name a:hover { color: var(--blue); }
.rq-price { display: inline-flex; align-items: center; gap: 16px; white-space: nowrap; }
.rq-price b { font-size: 26px; font-weight: 700; line-height: 32px; }
.rq-price s { font-size: 16px; opacity: .4; }
.rq-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; min-height: 24px; font-size: 16px; line-height: 20px; }
.rq-count { opacity: .4; }
.rq-qsort { margin-left: 8px; }
.rq-qsort .pd-sort { height: 24px; padding: 0 8px; }
.rq-actions { flex: none; display: flex; align-items: center; gap: 8px; }
.rq-cart { height: 45px; padding: 0 16px; gap: 8px; border-radius: var(--r-8); font-size: 18px; font-weight: 500; }
.rq .pd-btn-line { height: 47px; padding: 0 17px; font-size: 18px; }

.rq-filters { padding: 16px; border-top: 1px solid var(--bg-grey); }
.rq-filters .pd-filters { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.rq-filters .pd-checks { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.rq-filters .pd-check { gap: 4px; min-height: 24px; }
.rq-filters .pd-check-box { width: 20px; height: 20px; }
.rq-filters .pd-check-count { opacity: 1; }
.rq-filters .pd-sort { height: 32px; padding: 0 12px; }

.rq-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.rq-empty { padding: 32px 16px; background: var(--white); border-radius: var(--r-8); font-size: 16px; color: rgba(6, 6, 6, .5); }
.rq .pager { margin-top: 16px; }

.rq .pd-review, .rq .pd-question { background: var(--white); border-radius: var(--r-8); border-bottom: 0; }
.rq .pd-review { padding: 0; }
.rq .pd-review-main { flex-direction: column; align-items: stretch; gap: 8px; padding: 32px 16px 16px; }
.rq .pd-review-body { flex: none; }
.rq .pd-review-head { gap: 8px; }
.rq .pd-review-title, .rq .pd-question-title { font-size: 20px; line-height: 24px; }
.rq .pd-review-photos, .rq .pd-review-photos.is-wide { width: 100%; flex-wrap: nowrap; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.rq .pd-review-photos::-webkit-scrollbar { display: none; }
.rq .pd-review-photo { flex: none; width: 140px; height: 105px; }
.rq .pd-photos-next { display: none; position: sticky; right: 8px; flex: none; align-self: center; margin-left: -50px; box-shadow: 0 2px 12px rgba(6, 6, 6, .12); }
.rq .pd-review-photos.is-scroll .pd-photos-next { display: inline-flex; }
.rq .pd-review .pd-answer { margin-top: 0; padding: 16px; border-top: 1px solid var(--bg-grey); }
.rq .pd-answer-head { gap: 8px; margin-bottom: 4px; }
.rq .pd-answer-logo { width: 90px; height: 40px; padding: 0; justify-content: center; }

.rq .pd-question, .rq .pd-question:first-child { padding: 16px; }
.rq .pd-question-meta { gap: 8px; margin-bottom: 4px; }
.rq .pd-question-title { margin-bottom: 16px; }
.rq .pd-question .pd-answer { margin-top: 0; }

@media (max-width: 991px) {
    .rq-top, .rq-head:has(.rq-filters) .rq-top { flex-wrap: wrap; padding: 16px 16px 16px 0; }
    .rq-info { flex: 1 0 calc(100% - 64px); }
    .rq-actions { flex: 1 0 100%; padding-left: 16px; }
    .rq-actions > form, .rq-actions > .btn { flex: 1 1 0; min-width: 0; }
    .rq-cart { width: 100%; }
    .rq .pd-btn-line { padding: 0 8px; white-space: nowrap; }
}

@media (max-width: 767px) {
    .rq-back { width: 48px; align-self: flex-start; }
    .rq-info { flex-basis: calc(100% - 56px); }
    .rq-line { flex-direction: column; align-items: flex-start; gap: 4px; }
    .rq-name { font-size: 18px; line-height: 21px; }
    .rq-filters .pd-filters { flex-direction: column; align-items: flex-start; }
    .rq-filters .pd-checks { flex-direction: column; align-items: flex-start; }
    .rq .pd-review-main { padding: 16px; }
    .rq .pd-review-head { flex-direction: column; align-items: flex-start; gap: 4px; }
    .rq .pd-review-title, .rq .pd-question-title { font-size: 18px; line-height: 21px; }
    .rq-cart, .rq .pd-btn-line { font-size: 16px; }
}
