/**
 * Стили страницы детального просмотра продукта
 * URL: /products/{slug}/
 * PHP: class-dgl-product-base.php → render_product_detail_page()
 * JS:  product-detail.js
 *
 * Структура страницы:
 *
 *  .dgl-detail                         — контейнер (max-width: 1280px, по центру)
 *    .dgl-detail-breadcrumbs           — хлебные крошки: Каталог › Смартфоны › iPhone 17e
 *    .dgl-detail-hero                  — основная секция
 *      .dgl-detail-hero-header         — шапка с двумя строками
 *        .dgl-detail-header-top        — 1-я строка: ★ звезда + <h1> + флаг России
 *        .dgl-detail-header-bottom     — 2-я строка: рейтинг числом + производитель + дата
 *      .dgl-detail-hero-body           — тело (flex, горизонтально)
 *        .dgl-detail-image-col         — левый столбец: картинка (sticky, 310px)
 *        .dgl-detail-right-col         — правый столбец (flex: 1)
 *          .dgl-detail-specs-card      — карточка характеристик (3×3 сетка + цена + кнопка)
 *          .dgl-detail-verdict         — вердикт + подоценки в ряд
 *          .dgl-detail-proscons        — плюсы / минусы (два столбца)
 *          .dgl-detail-reviews         — связанные обзоры
 *          .dgl-detail-news            — связанные новости
 *    .dgl-detail-fullspecs             — полная таблица характеристик (на всю ширину)
 *
 * Цветовая палитра:
 *  - Основной синий:   #274bc8
 *  - Активный синий:   #2244cc (#24c)
 *  - Розовый (плюсы):  #ff80f0
 *  - Текст основной:   #2a3142
 *  - Текст мета:       #888 / #999
 *  - Звезда:           #FFBA26
 *  - Фон чётных строк: #e2edff
 *  - Тень карточек:    rgba(49,94,251,0.05)
 *
 * Шрифты:
 *  - Gilroy — заголовки, рейтинги
 *  - Golos Text — строки таблицы характеристик
 *  - Inter — текст вердикта
 */

/* === КОНТЕЙНЕР СТРАНИЦЫ === */

.dgl-detail {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    font-family: 'Gilroy', 'Helvetica Neue', Arial, sans-serif;
}
/* === ХЛЕБНЫЕ КРОШКИ === */

.dgl-detail-breadcrumbs {
    font-size: 14px;
    color: #888;
    margin-bottom: 20px;
}
.dgl-detail-breadcrumbs a {
    color: #274bc8;
    text-decoration: none;
}
.dgl-detail-breadcrumbs a:hover {
    text-decoration: underline;
}
.dgl-detail-breadcrumbs .sep {
    margin: 0 6px;
    color: #ccc;
}
/* === ГЕРОЙ-СЕКЦИЯ === */

.dgl-detail-hero {
    margin-bottom: 40px;
}
/* -- Шапка героя -- */

.dgl-detail-hero-header {
    margin-bottom: 24px;
}
/* Верхняя строка: ★ звезда + заголовок + флаг (прижат вправо через margin-left:auto) */

.dgl-detail-header-top {
    display: flex;
    align-items: center;
    gap: 29px;
    margin-bottom: 8px;
}
.dgl-detail-star {
    flex-shrink: 0;
}
.dgl-detail-title {
    font-size: 28px;
    font-weight: 700;
    color: #2a3142;
    margin: 0;
    line-height: 1.2;
}
/* Нижняя строка: рейтинг (синий) + «Apple > iPhone» + дата выхода */

.dgl-detail-header-bottom {
    display: flex;
    align-items: baseline;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 14px;
    color: #888;
    padding-left: 40px;
}
.dgl-detail-rating-val {
    font-size: 28px;
    font-weight: 700;
    color: #274bc8;
}
.dgl-detail-meta-info {
    color: #2A3142;
    font-size: 20px;
    font-style: normal;
    font-weight: 600;
    line-height: 110%;
}
.dgl-detail-meta-info a {
    color: #274bc8;
    text-decoration: none;
}
.dgl-detail-meta-info a:hover {
    text-decoration: underline;
}
.dgl-detail-meta-info .sep {
    color: #ccc;
    margin: 0 4px;
    font-weight: 400;
}
.dgl-detail-date {
    color: #999;
}
/* Бейдж «Продается в России» — SVG-флаг + подпись, прижат вправо */

.dgl-detail-badges {
    display: flex;
    gap: 24px;
    flex-shrink: 0;
    margin-left: auto;
}
.dgl-detail-badge-item {
    display: flex;
    /*flex-direction: column;*/
    align-items: center;
    gap: 4px;
}
.dgl-detail-badge-item .badge-icon {
    width: 40px;
    height: 40px;
}
.dgl-detail-badge-item .badge-icon svg {
    width: 40px;
    height: 40px;
}
.dgl-detail-badge-item .badge-label {
    font-size: 16px;
    color: #999;
    white-space: nowrap;
    font-family: 'Gilroy', sans-serif;
    font-weight: 500;
    line-height: 1.1;
}
/* === Кнопки маркетов (Price.ru / Я.Маркет) — по макету Figma ===
   Solid-фон, логотип «выглядывает» из верхнего-левого угла кнопки. */
.dgl-detail-marketlinks {
    display: flex;
    gap: 30px; /* лого YM выступает влево на ~10px, нужен зазор от соседней кнопки */
    margin-top: 12px;
    align-items: flex-end;
    padding-top: 14px;          /* место для нависающего сверху лого */
}
.dgl-marketlink {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-family: 'Gilroy', sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.225;
    text-align: center;
    transition: filter .2s, transform .05s;
}
.dgl-marketlink:hover  { filter: brightness(0.95); }
.dgl-marketlink:active { transform: translateY(1px); }
.dgl-marketlink--price { background: #26CBF0; color: #fff; }
.dgl-marketlink--ym    { background: #FFDD04; color: red; }
.dgl-marketlink-logo {
    position: absolute;
    /* Desktop: лого выступает за рамку кнопки (по макету Figma 7280:32790). */
    top: -11px;
    left: -10px;
    display: block;
    /* !important — тема на мобиле выставляет img { width:100%; height:auto } с !important,
       без перебивки PNG-лого Я.Маркета раздувается. */
    height: 22px !important;
    width: auto !important;
    max-width: none !important;
    pointer-events: none;
}
.dgl-marketlink--ym .dgl-marketlink-logo {
    height: 36px !important;
    top: -14px;
}
.dgl-marketlink-label {
    display: inline-block;
    max-width: 100%;
}
@media (max-width: 768px) {
    /* Mobile: лого выносим целиком над кнопкой (bottom: 100%, -3px якорь),
       чтобы при переносе текста на 2 строки не было наложения. */
    .dgl-detail-marketlinks {
        flex-direction: column;
        align-items: stretch;
        gap: 36px; /* YM-лого свисает ~23px над своей кнопкой, нужен зазор */
        padding-top: 24px;
    }
    .dgl-detail-marketlinks .dgl-marketlink-logo {
        height: 18px !important;
        top: auto;
        bottom: 100%;
        left: 8px;
        margin-bottom: -3px;
    }
    .dgl-detail-marketlinks .dgl-marketlink--ym .dgl-marketlink-logo {
        height: 26px !important;
        top: auto;
    }
}
/* === ТЕЛО ГЕРОЯ: два столбца === */

.dgl-detail-hero-body {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}
/* -- Левый столбец: картинка (sticky при прокрутке) -- */

.dgl-detail-image-col {
    width: 310px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
}
.dgl-detail-image-col .dgl-card-main-image {
    width: 100%;
    height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    cursor: pointer;
}
.dgl-detail-image-col .dgl-card-main-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.dgl-detail-image-col .dgl-card-thumbs {
    display: flex;
    justify-content: center;
    gap: 10px;
}
.dgl-detail-image-col .dgl-card-thumb {
    width: 60px;
    height: 48px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dgl-detail-image-col .dgl-card-thumb.active {
    border-color: #274bc8;
}
.dgl-detail-image-col .dgl-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Основное изображение продукта */

.dgl-detail-main-image {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}
.dgl-detail-main-image img {
    max-width: 100%;
    max-height: 360px;
    object-fit: contain;
}
/* Точки-индикаторы галереи (● ● ● ●), активная — крупнее и синяя */

.dgl-detail-gallery-dots {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-bottom: 16px;
}
.dgl-detail-gallery-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: all .2s;
}
.dgl-detail-gallery-dot.active {
    width: 6px;
    height: 6px;
    background: #274bc8;
}
/* Миниатюры галереи, активная — синяя рамка */

.dgl-detail-thumbs {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.dgl-detail-thumb {
    width: 59px;
    height: 33px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #e8e8e8;
    transition: border-color .2s;
}
.dgl-detail-thumb.active {
    border-color: #274bc8;
}
.dgl-detail-thumb:hover {
    border-color: #274bc8;
}
.dgl-detail-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* -- Правый столбец -- */

.dgl-detail-right-col {
    flex: 1;
    min-width: 0;
}
/* === КАРТОЧКА ХАРАКТЕРИСТИК (белая, с тенью) === */

.dgl-detail-specs-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 12px 0 rgba(49, 94, 251, 0.05);
    padding: 32px;
    display: flex;
    flex-direction: column;
    margin-bottom: 32px;
}
/* Сетка 3×3: каждая ячейка = иконка + название + значение */

.dgl-detail-specs-grid {
    flex: 1;
    align-content: start;
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}
/* Элемент характеристики: иконка слева + текст справа */

.dgl-detail .dgl-spec-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    width: 33.333%;
    padding: 12px;
    min-width: 200px;
    flex: auto;
}
.dgl-detail .dgl-spec-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3355dd;
}
.dgl-detail .dgl-spec-icon svg {
    width: auto;
    height: auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 0;
    max-width: 36px;
    max-height: 36px;
}
.dgl-detail .dgl-spec-text {
    flex: 1;
    min-width: 0;
}
.dgl-detail .dgl-spec-label {
    font-size: 14px;
    font-weight: 700;
    color: #000;
    margin-bottom: 4px;
    line-height: 1.2;
}
.dgl-detail .dgl-spec-value {
    font-size: 13px;
    color: #444;
    line-height: 1.4;
    word-break: break-word;
}
/* Строка с ценой и кнопкой «Подобрать» внизу карточки */

.dgl-detail-buy-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
    padding-top: 20px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.dgl-detail-price {
    font-size: 20px;
    font-weight: 700;
    color: #274bc8;
    font-style: italic;
    white-space: nowrap;
}
.dgl-detail-price .rub {
    color: #274bc8;
    font-style: normal;
}
.dgl-detail .dgl-btn-buy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 48px;
    background: #274bc8;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    min-width: 200px;
    transition: background .2s;
}
.dgl-detail .dgl-btn-buy:hover {
    background: #1a3ab0;
    color: #fff;
}
/* === ВЕРДИКТ (белая карточка с тенью) === */

.dgl-detail-section {
    margin-bottom: 32px;
}
.dgl-detail-section-title {
    font-size: 22px;
    font-weight: 700;
    color: #2a3142;
    margin: 0 0 24px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.dgl-detail-verdict {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 12px 0 rgba(49, 94, 251, 0.05);
    padding: 32px;
}
.dgl-detail-verdict .dgl-detail-section-title {
    margin-bottom: 32px;
}
.dgl-detail-verdict-text {
    font-size: 18px;
    line-height: 1.6;
    color: #2a3142;
    margin-bottom: 24px;
    font-family: 'Inter', 'Gilroy', sans-serif;
}
.dgl-detail-verdict-text p {
    margin: 0 0 12px;
}
/* Подоценки: ряд блоков «число + подпись», равномерно по ширине */

.dgl-detail-subratings {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
}
.dgl-subrating-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    /*flex: 1;*/
    min-width: 100px;
}
.dgl-subrating-val {
    font-size: 42px;
    font-weight: 700;
    color: #274bc8;
    line-height: 1;
    font-family: 'Gilroy', sans-serif;
}
.dgl-subrating-label {
    color: #2A3142;
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 90%;
    max-width: 120px;
    text-align: center;
}
/* === ПЛЮСЫ / МИНУСЫ (белая карточка с тенью, два столбца) === */

.dgl-detail-proscons {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 12px 0 rgba(49, 94, 251, 0.05);
    padding: 32px;
}
.dgl-detail-proscons-grid {
    display: flex;
    gap: 32px;
}
.dgl-proscons-col {
    flex: 1;
}
/* Заголовки: иконка (круг с +/−) + текст */

.dgl-proscons-col h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 16px;
}
.dgl-pros h3 {
    color: #ff80f0;
}
/* Плюсы — розовый */

.dgl-cons h3 {
    color: #274bc8;
}
/* Минусы — синий */

.dgl-proscons-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}
/* Текст плюсов/минусов */

.dgl-proscons-col ul,
.dgl-proscons-list {
    list-style: disc !important;
    margin: 0;
    padding: 0 0 0 20px;
}
.dgl-proscons-col li,
.dgl-proscons-list li {
    list-style: disc !important;
    display: list-item !important;
    padding: 4px 0;
    font-size: 15px;
    line-height: 1.8;
    color: #2a3142;
}
/* === СВЯЗАННЫЕ СТАТЬИ (обзоры / новости) — макет по Figma 7135:79898 === */

/* Секция-обёртка: белая панель со скруглением и внутренним паддингом */
.dgl-detail-section.dgl-detail-reviews,
.dgl-detail-section.dgl-detail-news {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}
.dgl-detail-section.dgl-detail-reviews .dgl-detail-section-title,
.dgl-detail-section.dgl-detail-news .dgl-detail-section-title {
    margin: 0;
    color: #2a3142;
    font-size: 22px;
    font-weight: 700;
}

.dgl-detail-posts-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Карточка: картинка 171×116 слева с оверлеями, справа — мета/заголовок/excerpt */
.dgl-detail-post-card {
    display: flex;
    gap: 16px;
    background: #fff;
    border-radius: 8px;
    text-decoration: none;
    color: #2a3142;
    transition: background .15s;
    padding: 0 24px 0 0;
    align-items: center;
    min-height: 116px;
    box-shadow: 0 1px 4px rgba(49, 94, 251, 0.18);
}
.dgl-detail-post-card:hover {
    background: #f8f9ff;
}
.dgl-detail-post-img {
    width: 171px;
    height: 116px;
    flex-shrink: 0;
    border-radius: 8px 0 0 8px;
    overflow: hidden;
    position: relative;
}
.dgl-detail-post-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Оверлей: редакционный знак — как в .result-img .box-sign */
.dgl-detail-post-img .box-sign {
    position: absolute;
    top: 6px;
    right: 6px;
    bottom: auto;
    left: auto;
    width: 40px;
    height: 34px;
    z-index: 2;
}
.dgl-detail-post-img .box-sign img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
/* Оверлей: рейтинг звёздами слева-снизу */
.dgl-detail-post-rating {
    position: absolute;
    bottom: 6px;
    left: 8px;
    display: inline-flex;
    gap: 2px;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
}
.dgl-star { fill: #ced9f8; }
.dgl-star.filled { fill: #ffba26; }
/* Оверлей: play-кружок для видео-обзоров */
.dgl-detail-post-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #c1272d;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}
.dgl-detail-post-play svg { margin-left: 2px; }
/* Правая колонка */
.dgl-detail-post-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    position: relative;
}
/* Мета-строка: дата + время */
.dgl-detail-post-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #2a3142;
    opacity: .7;
    text-transform: uppercase;
}
.dgl-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1;
}
.dgl-meta-item .dgl-meta-icon {
    flex-shrink: 0;
}
/* Заголовок + бейдж «Обновлено» inline перед ним (.label-item темы) */
.dgl-detail-post-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    color: #2a3142;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.dgl-detail-post-title .label-item {
    display: inline-block;
    vertical-align: middle;
    height: auto;
    margin: 0 6px 0 0;
    padding: 2px 4px;
    font-size: 10px;
    line-height: 1.2;
    position: relative;
    top: -1px;
}
.dgl-detail-post-excerpt {
    font-size: 12px;
    line-height: 1.3;
    color: #2a3142;
    opacity: .7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 768px) {
    .dgl-detail-section.dgl-detail-reviews,
    .dgl-detail-section.dgl-detail-news {
        padding: 16px;
        gap: 16px;
    }
    /* На мобильных — картинка сверху, текст снизу (как .result-item в теме) */
    .dgl-detail-post-card {
        flex-wrap: wrap;
        align-items: stretch;
        padding: 0 0 16px 0;
        gap: 0;
        min-height: 0;
    }
    .dgl-detail-post-img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        border-radius: 8px 8px 0 0;
        margin-bottom: 12px;
    }
    .dgl-detail-post-info {
        padding: 0 16px;
    }
    .dgl-detail-post-play {
        width: 48px;
        height: 48px;
    }
    .dgl-detail-post-play svg {
        width: 48px;
        height: 48px;
    }
}
.dgl-detail-more-link {
    display: block;
    text-align: right;
    font-size: 15px;
    color: #274bc8;
    text-decoration: underline;
    margin-top: 8px;
}
/* ======================================================
   ПОЛНАЯ ТАБЛИЦА ХАРАКТЕРИСТИК
   Располагается ниже героя на всю ширину контейнера.
   Группы: Основные, Экран, Камеры, Батарея и т.д.
   ====================================================== */

.dgl-detail-fullspecs {
    padding: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}
.dgl-spec-group {
    margin-bottom: 0;
}
.dgl-spec-group:last-child {
    margin-bottom: 0;
}
/* Заголовок группы: ★ звезда (30×29) + рейтинг числом (42px, синий) + название (32px) */

.dgl-spec-group-header {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 32px 0;
    border-bottom: none;
    margin-bottom: 0;
}
.dgl-spec-group-rating {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}
.dgl-spec-group-rating .star-icon {
    width: 30px;
    height: 29px;
    flex-shrink: 0;
}
.dgl-spec-group-rating .rating-num {
    font-size: 42px;
    font-weight: 700;
    color: #24c;
    line-height: 1;
    font-family: 'Gilroy', sans-serif;
    letter-spacing: -0.84px;
}
.dgl-spec-group-header h3 {
    font-size: 32px;
    font-weight: 700;
    color: #2a3142;
    margin: 0;
    line-height: 1;
    letter-spacing: 0.32px;
    font-family: 'Gilroy', sans-serif;
}
/* Строки таблицы: название слева + значение справа
   Чётные строки: фон #e2edff (голубой), скруглённые углы
   Нечётные: прозрачный фон
   Шрифт: 20px Golos Text */

.dgl-spec-table {
    border-radius: 0;
    overflow: visible;
}
.dgl-spec-row {
    display: flex;
    gap: 32px;
    padding: 8px 10px;
    font-size: 20px;
    letter-spacing: 0.2px;
    align-items: flex-start;
    line-height: 28px;
}
.dgl-spec-row.even {
    background: #e2edff;
    border-radius: 8px;
}
.dgl-spec-row.odd {
    background: transparent;
    border-radius: 4px;
}
.dgl-spec-row-label {
    flex: 1;
    color: #2a3142;
    font-family: 'Golos Text', 'Gilroy', sans-serif;
    font-weight: 400;
}
.dgl-spec-row-value {
    flex: 1;
    color: #2a3142;
    font-family: 'Golos Text', 'Gilroy', sans-serif;
    font-weight: 400;
}
/* Строка цены — жирный текст */

.dgl-spec-row.price-row .dgl-spec-row-label, .dgl-spec-row.price-row .dgl-spec-row-value {
    font-weight: 700;
}
/* ============================
   МОБИЛЬНАЯ АДАПТАЦИЯ (≤768px)
   ============================ */

@media (max-width:768px) {
    .dgl-detail {
        padding: 0 16px;
    }
    .dgl-detail-title {
        font-size: 22px;
    }
    .dgl-detail-header-top {
        flex-wrap: wrap;
    }
    .dgl-detail-header-bottom {
        padding-left: 0;
    }
    .dgl-detail-badges {
        margin-left: 0;
    }
    /* Тело героя: столбцы → вертикально */
    .dgl-detail-hero-body {
        flex-direction: column;
        gap: 20px;
    }
    .dgl-detail-image-col {
        width: 100%;
        position: static;
    }
    /* Убираем sticky */
    .dgl-detail-main-image img {
        max-height: 280px;
    }
    /* Характеристики: 3 колонки → 2 */
    .dgl-detail-specs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    /* Кнопка покупки на всю ширину */
    .dgl-detail-buy-row {
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
    }
    .dgl-detail .dgl-btn-buy {
        width: 100%;
        justify-content: center;
    }
    .dgl-detail-price {
        text-align: center;
    }
    .dgl-detail-section-title {
        font-size: 20px;
    }
    /* Подоценки: уменьшаем */
    .dgl-detail-subratings {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 12px 0;
    }
    .dgl-subrating-item {
        min-width: 80px;
        flex: 0 0 auto;
        width: 33.333%;
    }
    .dgl-subrating-val {
        font-size: 36px;
    }
    /* Плюсы/Минусы: в столбец */
    .dgl-detail-proscons-grid {
        flex-direction: column;
        gap: 24px;
    }
    /* Таблица характеристик: строки в столбец */
    .dgl-spec-row {
        flex-direction: column;
        gap: 4px;
        font-size: 16px;
    }
    .dgl-spec-row-label {
        color: #666;
    }
    .dgl-spec-group-header h3 {
        font-size: 22px;
    }
    .dgl-spec-group-rating .rating-num {
        font-size: 28px;
    }
}
/* Совсем узкие экраны (≤480px) */

@media (max-width:480px) {
    .dgl-detail-specs-grid {
        grid-template-columns: 1fr;
    }
    /* 1 колонка */
    .dgl-detail-thumbs {
        gap: 6px;
    }
    .dgl-detail-thumb {
        width: 48px;
        height: 28px;
    }
}
.w31{
    min-width: 31%;
}
.title-col {
    flex: auto;
}
.rating-col svg{
    display: block;
    margin: 0 auto;
}
.title-row {
    display: flex;
    align-items: center;
    gap: 0 10px;
    margin-bottom: 0;
    width: 100%;
}

@media (max-width: 1024px) {
    .title-row {
        flex-wrap: wrap;
        gap: 4px 12px;
    }
    h1.dgl-detail-title {
        flex: 1 1 100%;
    }
    span.dgl-detail-date {
        flex: 1 1 100%;
    }
    .dgl-detail-badges {
        margin-left: auto;
    }
    .dgl-detail-rating-val {
        font-size: 26px;
    }
}
/* Мобильная шапка — по макету Figma (480px):
 *   [★ 4,5]   Название продукта
 *             дата выхода: ДД.ММ.ГГГГ
 *             Производитель › Серия
 *                                       Продаётся в России 🇷🇺
 */
@media (max-width: 768px) {
    .dgl-detail-header-top {
        flex-wrap: wrap;
        gap: 12px;
        align-items: flex-start;
        margin-bottom: 16px;
        position: static;
    }
    .rating-col.text-center {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        position: static;
        top: auto;
        flex-shrink: 0;
    }
    .rating-col svg {
        margin: 0;
        width: 26px;
        height: 25px;
    }
    .title-col {
        flex: 1 1 auto;
        min-width: 0;
    }
    .title-row {
        align-items: baseline;
    }
    .dgl-detail-title {
        font-size: 24px;
        line-height: 1.15;
    }
    span.dgl-detail-date {
        color: #999;
        font-size: 14px;
        order: 1;
    }
    .dgl-detail-meta-info {
        font-size: 16px;
        line-height: 1.2;
    }
    .dgl-detail-badges {
        order: 2;
        flex: 1 1 100%;
        justify-content: flex-end;
        margin: 4px 0 0;
    }
}
@media (max-width: 480px) {
    .dgl-subrating-item {
        width: 50%;
    }
}
