/* Блок «Лучшие цены» внутри статьи (DGL_Product_Base_Inline_Card).
   Контейнер: белый, soft shadow, padding 32, gap 32.
   Внутри — карточки продуктов, разделены тонкой линией. */
.dgl-best-prices {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 12px rgba(49, 94, 251, 0.05),
                0 1px 4px rgba(49, 94, 251, 0.18);
    padding: 32px;
    margin: 32px 0;
    font-family: 'Gilroy', sans-serif;
    color: #2A3142;
}
.dgl-best-prices__title {
    font-family: 'Gilroy', sans-serif;
    font-weight: 700;
    font-size: 32px;
    line-height: 1.24;
    letter-spacing: 0.01em;
    margin: 0 0 24px;
    color: #2A3142;
}
.dgl-best-prices__list {
    display: flex;
    flex-direction: column;
    gap: 32px;
}
.dgl-best-prices__card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.dgl-best-prices__card + .dgl-best-prices__card {
    border-top: 1px solid #eef1f7;
    padding-top: 32px;
}

/* ── Шапка карточки: рейтинг + название + meta слева, кнопка «Все параметры» справа ── */
.dgl-best-prices__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}
.dgl-best-prices__head-left {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    flex: 1 1 auto;
    min-width: 0;
}
.dgl-best-prices__rating {
    display: inline-flex;
    align-items: flex-end;
    gap: 8px;
}
.dgl-best-prices__star {
    display: block;
    filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.25));
}
.dgl-best-prices__rating-val {
    font-weight: 600;
    font-size: 28px;
    line-height: 1.1;
    color: #2244CC;
}
.dgl-best-prices__title-link {
    font-weight: 600;
    font-size: 28px;
    line-height: 1.1;
    color: #2A3142;
    text-decoration: none;
}
.dgl-best-prices__title-link:hover { color: #274bc8; }
.dgl-best-prices__meta {
    font-weight: 400;
    font-size: 14px;
    line-height: 1.2;
    color: #2A3142;
}
.dgl-best-prices__more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 16px;
    background: #FF80F0;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
    text-decoration: none;
    border-radius: 8px;
    white-space: nowrap;
    transition: background .2s;
    flex-shrink: 0;
}
.dgl-best-prices__more:hover { background: #ff60f0; color: #fff; }

/* ── Тело: картинка слева + (вердикт + кнопки маркетов) справа ── */
.dgl-best-prices__body {
    display: flex;
    gap: 24px;
    align-items: stretch;
}
.dgl-best-prices__image {
    flex: 0 0 160px;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f7fb;
    align-self: flex-start;
}
.dgl-best-prices__image img {
    display: block;
    width: 100%;
    height: 172px;
    object-fit: contain;
    object-position: center;
}
.dgl-best-prices__right {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
}
.dgl-best-prices__short {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
    color: #2A3142;
}
.dgl-best-prices__short p { margin: 0 0 8px; }
.dgl-best-prices__short p:last-child { margin: 0; }

/* ── Кнопки маркетов (по макету Figma) ── Solid-фон, логотип выглядывает
   из верхнего-левого угла. ── */
.dgl-best-prices__market {
    display: flex;
    gap: 30px; /* лого YM выступает влево на ~10px, нужен зазор от соседней кнопки */
    align-items: flex-end;
    padding-top: 14px;
}
.dgl-best-prices__market .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.2;
    text-align: center;
    transition: filter .2s, transform .05s;
}
.dgl-best-prices__market .dgl-marketlink:hover  { filter: brightness(0.95); }
.dgl-best-prices__market .dgl-marketlink--price { background: #26CBF0; color: #fff; }
.dgl-best-prices__market .dgl-marketlink--ym    { background: #FFDD04; color: red; }
.dgl-best-prices__market .dgl-marketlink-logo {
    position: absolute;
    /* Desktop: лого выступает за рамку кнопки (по макету Figma 7280:32790). */
    top: -11px;
    left: -10px;
    display: block;
    /* !important — тема Newsmag на мобиле выставляет img { width:100% !important; height:auto !important },
       без перебивки PNG-лого Я.Маркета раздувается в гигант. */
    height: 22px !important;
    width: auto !important;
    max-width: none !important;
    pointer-events: none;
}
.dgl-best-prices__market .dgl-marketlink--ym .dgl-marketlink-logo {
    height: 36px !important;
    top: -14px;
}

@media (max-width: 768px) {
    .dgl-best-prices { padding: 20px; margin: 20px 0; border-radius: 12px; }
    .dgl-best-prices__title { font-size: 24px; margin-bottom: 16px; }
    .dgl-best-prices__list { gap: 24px; }
    .dgl-best-prices__card + .dgl-best-prices__card { padding-top: 24px; }
    .dgl-best-prices__head { flex-direction: column; align-items: stretch; }
    .dgl-best-prices__more { align-self: flex-start; }
    .dgl-best-prices__title-link, .dgl-best-prices__rating-val { font-size: 22px; }
    .dgl-best-prices__body { flex-direction: column; gap: 16px; }
    .dgl-best-prices__image { flex: 0 0 auto; }
    .dgl-best-prices__image img { height: auto; aspect-ratio: 16/10; object-fit: contain; }
    /* Шрифт основного текста на мобиле чуть крупнее — по просьбе. */
    .dgl-best-prices__short { font-size: 18px; line-height: 1.5; }
    .dgl-best-prices__meta  { font-size: 16px; }
    /* Mobile: на узких кнопках текст переносится на 2 строки и старый
       полу-overhang логотипа (top: -11/-14) наезжал на первую строку.
       Решение — вынести лого ЦЕЛИКОМ над кнопкой (bottom:100%) с лёгким
       якорем -3px в её верх + чуть уменьшить размер. Текст внутри кнопки
       получает всю площадь без перекрытий. */
    .dgl-best-prices__market {
        flex-direction: column;
        align-items: stretch;
        gap: 36px; /* YM-лого свисает ~23px над своей кнопкой, нужен зазор от Price-кнопки */
        padding-top: 24px;
    }
    .dgl-best-prices__market .dgl-marketlink { font-size: 15px; }
    .dgl-best-prices__market .dgl-marketlink-label { text-align: center; }
    .dgl-best-prices__market .dgl-marketlink-logo {
        height: 18px !important;
        top: auto;
        bottom: 100%;
        left: 8px;
        margin-bottom: -3px;
    }
    .dgl-best-prices__market .dgl-marketlink--ym .dgl-marketlink-logo {
        height: 26px !important;
        top: auto;
    }
}
