/**
 * Стили каталога продуктов (списка)
 * URL: /products/
 * PHP: class-dgl-product-base.php → render_products_page()
 * JS:  products-catalog.js
 *
 * Структура страницы:
 *
 *  .dgl-catalog                         — контейнер (max-width: 1280px)
 *    .dgl-catalog-title-row             — заголовок «Каталог продуктов» + кол-во
 *    .dgl-catalog-categories            — горизонтальная полоса иконок категорий
 *    .dgl-catalog-filters               — фильтры: вкладки (Бренды/Модели) + теги
 *    .dgl-catalog-toolbar               — сортировка + поиск
 *    .dgl-product-cards                 — список карточек продуктов
 *      .dgl-product-card                — одна карточка
 *        .dgl-card-header               — ★ рейтинг + заголовок + мета
 *        .dgl-card-body                 — картинка слева + сетка характеристик справа
 *        .dgl-card-footer               — дата + «Ещё параметры» + цена + кнопка
 *    .dgl-pagination                    — пагинация
 *
 * Цветовая палитра:
 *  - Основной синий:          #274bc8 / #24c / #2244cc
 *  - Розовый (active фильтр): #ff80f0
 *  - Текст:                   #000 / #888 / #999
 *  - Фон фильтров:            rgba(49,94,251,0.05)
 *  - Кнопка «Подобрать»:      #274bc8
 *  - Кнопка «Ещё параметры»:  #ff80f0
 */


/* === КОНТЕЙНЕР === */
.dgl-catalog {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    font-family: 'Gilroy', 'Helvetica Neue', Arial, sans-serif;
}


/* === ЗАГОЛОВОК + КОЛИЧЕСТВО === */
.dgl-catalog-title-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 10px;
}

.dgl-catalog-title-row h1 {
    color: #2A3142;
    font-size: 36px;
    font-style: normal;
    font-weight: 700;
    line-height: 80%; /* 28.8px */
    letter-spacing: -0.72px;
}

/* Хлебные крошки (общий стиль для каталога и детальной) */
.dgl-detail-breadcrumbs {
    font-size: 14px;
    color: #555;
    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: #9aa0b3;
}
/* Заголовок каталога: префикс «Каталог продуктов» — ссылка на корень каталога,
   когда выбрана категория. */
.dgl-catalog-title-link {
    color: inherit;
    text-decoration: none;
}
.dgl-catalog-title-link:hover {
    text-decoration: underline;
}

/* Счётчики «всего N» / «в РФ N» — переключатели в одной строке */
.dgl-catalog-counts {
    display: flex;
    align-items: baseline;
    gap: 24px;
    flex-wrap: wrap;
}
.dgl-catalog-count {
    color: #2A3142;
    font-family: 'Gilroy', sans-serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 110%;
    white-space: nowrap;
    text-decoration: none;
    transition: color .15s;
}
.dgl-catalog-count:hover {
    color: #274bc8;
}
.dgl-catalog-count.active {
    color: #ff60f0;
    cursor: default;
}
@media(max-width: 768px){
    .dgl-catalog-counts {
        width: 100%;
        gap: 16px;
    }
}

/* === ИКОНКИ КАТЕГОРИЙ ===
   Горизонтальная полоса: Телефоны, Планшеты, Компьютеры, ...
   Активная категория — синий фон (#24c), белый текст
   Шрифт: 20px Gilroy Semibold */
.dgl-catalog-categories {
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    margin-bottom: 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    flex-wrap: wrap;
    gap: 16px 32px;
}

.dgl-catalog-categories::-webkit-scrollbar {
    display: none;
}

.dgl-catalog-cat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 96px;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    color: #000;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .2s, color .2s;
    gap: 10px;
    min-width: 100px;
}

.dgl-catalog-cat:hover {
    background: rgba(34, 68, 204, .06);
}

.dgl-catalog-cat.active {
    background: #24c;
    color: #fff;
}

.dgl-cat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: 48px;
    color: #2244cc;
    line-height: 0;
    transition: color .2s;
}

.dgl-cat-icon svg {
    display: block;
    width: auto;
    max-width: 48px;
    max-height: 48px;
    height: inherit;
}

.dgl-catalog-cat.active .dgl-cat-icon {
    color: #fff;
}

.dgl-cat-label {
    font-size: 20px;
    font-weight: 600;
    white-space: nowrap;
    text-align: center;
    line-height: 18px;
}


/* === ФИЛЬТРЫ ===
   Два контейнера на светло-синем фоне:
   1. Вкладки (Бренды / Модели) — .dgl-filter-tabs
   2. Теги производителей/серий — .dgl-filter-tags
   Активный тег/вкладка — розовый текст #ff80f0 (без фона) */
.dgl-catalog-filters {
    display: flex;
    gap: 20px;
    margin-bottom: 12px;
    align-items: stretch;
    flex-wrap: wrap;
}

/* Вкладки / переключатель «Бренды / Модели» */
.dgl-filter-tabs,
.dgl-filter-toggle {
    display: flex;
    gap: 10px;
    background: rgba(49, 94, 251, .05);
    border-radius: 8px;
    padding: 0 32px;
    height: 42px;
    align-items: center;
    flex-shrink: 0;
}

.dgl-filter-tab,
.dgl-filter-toggle-item {
    font-size: 14px;
    font-weight: 600;
    color: #274bc8;
    text-decoration: none;
    white-space: nowrap;
    transition: color .2s;
    padding: 0;
    background: none;
}

.dgl-filter-tab:hover,
.dgl-filter-toggle-item:hover {
    color: #1a3ab0;
}

.dgl-filter-tab.active,
.dgl-filter-toggle-item.active {
    color: #ff80f0;
    background: none;
}

/* Пилюля с тегами: одна строка по умолчанию + кнопка-стрелка справа,
   раскрывается на все строки по клику (по макету Figma 7134:88098). */
.dgl-filter-tags {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(49, 94, 251, .05);
    border-radius: 8px;
    padding: 8px 15px;
    flex: 1;
    min-width: 0;
}
.dgl-filter-tags__list {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    column-gap: 14px;
    row-gap: 4px;
    align-items: center;
    /* Desktop по умолчанию — одна строка; кнопка показывается JS-ом, если контент переполняет. */
    max-height: 26px;
    overflow: hidden;
}
.dgl-filter-tags.is-expanded .dgl-filter-tags__list {
    max-height: none;
    overflow: visible;
}
/* На мобильных лимит фиксированный — «Все» + 10 тегов, остальные за кнопкой. */
@media (max-width: 768px) {
    .dgl-filter-tags__list {
        max-height: none;
        overflow: visible;
    }
    .dgl-filter-tags__list > .dgl-filter-tag:nth-child(n+12) {
        display: none;
    }
    .dgl-filter-tags.is-expanded .dgl-filter-tags__list > .dgl-filter-tag:nth-child(n+12) {
        display: inline-flex;
    }
}
.dgl-filter-tags__more {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: transform .2s;
}
.dgl-filter-tags__more[hidden] { display: none; }
.dgl-filter-tags__more svg {
    transition: transform .2s;
    display: block;
}
.dgl-filter-tags.is-expanded .dgl-filter-tags__more svg {
    transform: rotate(90deg);
}

.dgl-filter-tag {
    font-size: 14px;
    font-weight: 600;
    color: #274bc8;
    text-decoration: none;
    white-space: nowrap;
    transition: color .2s;
    padding: 0;
    background: none;
    line-height: 24px;
}

.dgl-filter-tag:hover {
    color: #1a3ab0;
}

.dgl-filter-tag.active {
    color: #ff80f0;
    background: none;
}


/* === СОРТИРОВКА + ПОИСК === */
.dgl-catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 16px;
    flex-wrap: wrap;
}

.dgl-sort-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
    flex-wrap: wrap;
}

.dgl-sort-wrap a {
    color: #274bc8;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
}

.dgl-sort-wrap a:hover {
    text-decoration: underline;
}

.dgl-sort-wrap a.active {
    color: #000;
}

.dgl-sort-sep {
    color: #9aa0b3;
}

/* Форма поиска: текстовое поле + кнопка */
.dgl-search-form {
    display: flex;
    max-width: 500px;
    flex: 1;
    min-width: 250px;
}

.dgl-search-form input[type="text"] {
    flex: 1;
    height: 38px;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 8px 0 0 8px;
    padding: 0 16px;
    font-size: 14px;
    outline: none;
    font-family: inherit;
}

.dgl-search-form input[type="text"]:focus {
    border-color: #24c;
}

.dgl-search-form button {
    height: 38px;
    padding: 0 24px;
    background: #24c;
    color: #fff;
    border: none;
    border-radius: 0 8px 8px 0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}

.dgl-search-form button:hover {
    background: #1a3ab0;
}


/* === СПИСОК КАРТОЧЕК ПРОДУКТОВ === */
.dgl-product-cards {
    display: flex;
    flex-direction: column;
    gap: 32px;
}


/* === КАРТОЧКА ПРОДУКТА === */
.dgl-product-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 32px;
}

/* -- Шапка карточки: ★ рейтинг + название-ссылка + мета-инфо -- */
.dgl-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.dgl-card-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.dgl-card-rating svg {
    width: 23px;
    height: 22px;
}

.dgl-card-rating-val {
    font-size: 18px;
    font-weight: 700;
    color: #000;
}

.dgl-card-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    color: #274bc8;
    text-decoration: none;
}

.dgl-card-title:hover {
    color: #1a3a9e;
}

.dgl-card-meta {
    color: #2A3142;
    font-family: 'Gilroy', sans-serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 110%;
    margin-left: 8px;
}

/* -- Тело карточки: картинка слева (279px) + сетка характеристик справа -- */
.dgl-card-body {
    display: flex;
    gap: 32px;
}

/* Колонка с картинкой */
.dgl-card-image-col {
    width: 279px;
    flex-shrink: 0;
}

.dgl-card-manufacturer {
    height: 24px;
    margin-bottom: 10px;
}

.dgl-card-manufacturer img {
    max-height: 24px;
    max-width: 120px;
    object-fit: contain;
}

.dgl-card-manufacturer span {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.dgl-card-main-image {
    width: 100%;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    cursor: pointer;
}

.dgl-card-main-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.dgl-card-gallery-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.dgl-card-gallery-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
}

.dgl-card-gallery-dot.active {
    width: 6px;
    height: 6px;
    background: #24c;
}

.dgl-card-thumbs {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.dgl-card-thumb {
    width: 50px;
    height: 40px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dgl-card-thumb.active {
    border-color: #24c;
}

.dgl-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Сетка характеристик: 3 колонки, каждый элемент = иконка + название + значение */
.dgl-card-specs {
    flex: 1;
    align-content: start;
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}

.dgl-spec-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    width: 33.333%;
    padding: 12px;
    min-width: 200px;
    flex: auto;
}

.dgl-spec-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3355dd;
}

.dgl-spec-icon svg {
    width: auto;
    height: auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 0;
    max-width: 36px;
    max-height: 36px;
}

.dgl-spec-text {
    flex: 1;
    min-width: 0;
}

.dgl-spec-label {
    font-size: 14px;
    font-weight: 700;
    color: #000;
    margin-bottom: 4px;
    line-height: 1.2;
}

.dgl-spec-value {
    font-size: 13px;
    color: #444;
    line-height: 1.4;
    word-break: break-word;
}
.dgl-card-col{
    width: 100%;
}
/* -- Подвал карточки: дата + «Ещё параметры» + цена + «Подобрать» -- */
.dgl-card-footer {
    display: flex;
    align-items: center;
    gap: 0 16px;
    flex-wrap: wrap;
    width: 100%;
}
.dgl-card-footer-col {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: nowrap;
    padding-top: 24px;
    white-space: nowrap;
    flex: auto;
    justify-content: space-between;
}
.dgl-card-footer-col + .dgl-card-footer-col{
    width: calc(60% - 16px);
}
.dgl-card-footer-col .dgl-btn-more, .dgl-card-footer-col  .w53 {
    min-width: 53%;
}

/* Кнопки маркетов в футере карточки каталога (по макету Figma).
   Solid-фон, логотип «выглядывает» из верхнего-левого угла. */
.dgl-card-marketlinks {
    display: flex;
    gap: 24px; /* лого YM выступает влево на ~8px, нужен зазор от соседней кнопки */
    padding-top: 14px;            /* место для нависающего сверху лого */
    margin-top: 14px;             /* компенсация padding-top родителя */
    flex: auto;
    width: calc(60% - 16px);
    align-items: flex-end;
}
.dgl-card-marketlinks .dgl-marketlink {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    border-radius: 8px;
    text-decoration: none;
    font-family: 'Gilroy', sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    transition: filter .2s, transform .05s;
}
.dgl-card-marketlinks .dgl-marketlink:hover  { filter: brightness(0.95); }
.dgl-card-marketlinks .dgl-marketlink:active { transform: translateY(1px); }
.dgl-card-marketlinks .dgl-marketlink--price { background: #26CBF0; color: #fff; }
.dgl-card-marketlinks .dgl-marketlink--ym    { background: #FFDD04; color: red; }
.dgl-card-marketlinks .dgl-marketlink-logo {
    position: absolute;
    /* Desktop: лого выступает за рамку кнопки (по макету Figma). */
    top: -10px;
    left: -8px;
    display: block;
    /* !important — тема на мобиле перебивает img-размеры. */
    height: 20px !important;
    width: auto !important;
    max-width: none !important;
    pointer-events: none;
}
.dgl-card-marketlinks .dgl-marketlink--ym .dgl-marketlink-logo {
    height: 30px !important;
    top: -12px;
}
.dgl-card-marketlinks .dgl-marketlink-label {
    min-width: 0;
}
@media (max-width: 768px) {
    /* Mobile: лого целиком над кнопкой (bottom:100%, -3px якорь). */
    .dgl-card-marketlinks {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 30px; /* YM-лого свисает ~19px над своей кнопкой, нужен зазор */
        padding-top: 20px;
    }
    .dgl-card-marketlinks .dgl-marketlink-logo {
        height: 16px !important;
        top: auto;
        bottom: 100%;
        left: 6px;
        margin-bottom: -3px;
    }
    .dgl-card-marketlinks .dgl-marketlink--ym .dgl-marketlink-logo {
        height: 22px !important;
        top: auto;
    }
}
.dgl-card-date {
    font-size: 12px;
    color: #666;
}

/* Кнопка «Ещё параметры» — розовая */
.dgl-btn-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 27px;
    background: #ff80f0;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: background .2s;
}

.dgl-btn-more:hover {
    background: #e060d8;
    color: #fff;
}

/* Цена — жирная, курсивная, прижата вправо */
.dgl-card-price {
    font-size: 22px;
    font-weight: 700;
    color: #274bc8;
    font-style: italic;
    white-space: nowrap;
    flex: auto;
}

.dgl-card-price .rub {
    color: #274bc8;
    font-style: normal;
}

/* Кнопка «Подобрать» — синяя */
.dgl-btn-buy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 40px;
    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-btn-buy:hover {
    background: #1a3ab0;
    color: #fff;
}


/* === ДОПОЛНИТЕЛЬНЫЕ ХАРАКТЕРИСТИКИ ===
   Скрыты по умолчанию, открываются по клику на «Ещё параметры» */
.dgl-card-extra-specs {
    display: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.dgl-card-extra-specs.open {
    max-height: 500px;
    display: flex;
}

/* === ПАГИНАЦИЯ === */
.dgl-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 40px 0;
}

.dgl-pagination a,
.dgl-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    color: #333;
    border: 1px solid #e8e8e8;
}

.dgl-pagination span.current {
    background: #24c;
    color: #fff;
    border-color: #24c;
}

.dgl-pagination a:hover {
    background: rgba(34, 68, 204, .08);
    border-color: #24c;
}

.dgl-pagination .dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    font-size: 14px;
    color: #555;
    border: none;
}


/* === НЕТ РЕЗУЛЬТАТОВ === */
.dgl-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #555;
    font-size: 16px;
}


/* ============================
   МОБИЛЬНАЯ АДАПТАЦИЯ (≤768px)
   ============================ */
@media (max-width:768px) {
    .dgl-catalog {
        padding: 0
    }

    .dgl-catalog-title-row h1 {
        font-size: 36px;
    }

    /* Категории: горизонтальный скролл */
    .dgl-catalog-categories {
        justify-content: flex-start;
        gap: 8px;
    }

    .dgl-catalog-cat {
        gap: 4px;
        width: 80px;
        height: 48px;
        padding: 4px;
        min-width: 80px;
    }

    .dgl-cat-icon {
        width: 36px;
        height: 36px;
    }

    .dgl-cat-icon svg {
        max-width: 17px;
        max-height: 20px;
    }

    .dgl-cat-label {
        font-size: 12px;
        line-height: 12px;
    }

    /* Фильтры на мобиле: переключатель сверху, теги — на новой строке */
    .dgl-catalog-filters {
        gap: 8px;
        flex-wrap: wrap;
    }
    .dgl-filter-tabs,
    .dgl-filter-toggle {
        padding: 0 16px;
        flex: 0 0 auto;
    }
    .dgl-filter-tags {
        flex-basis: 100%;
        width: 100%;
        padding: 8px 12px;
    }

    /* Тулбар в столбец */
    .dgl-catalog-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .dgl-search-form {
        max-width: none;
        min-width: 0;
    }

    /* Карточки */
    .dgl-product-card {
        padding: 16px;
    }

    .dgl-card-header {
        align-items: flex-start;
        gap: 0 16px;
    }

    .dgl-card-meta {
        margin-left: 0;
    }

    .dgl-card-body {
        flex-direction: column;
        gap: 16px;
    }

    .dgl-card-image-col {
        width: 100%;
    }

    .dgl-card-main-image {
        aspect-ratio: auto;
        max-height: 260px;
    }

    /*.dgl-card-footer {*/
    /*    flex-direction: column;*/
    /*    align-items: stretch;*/
    /*    gap: 12px;*/
    /*}*/

    /*.dgl-card-price {*/
    /*    margin-left: 0;*/
    /*    text-align: center;*/
    /*}*/

    .dgl-btn-buy {
        width: 100%;
        justify-content: center;
    }

    .dgl-btn-more {
        width: 100%;
        justify-content: center;
    }

    .dgl-sort-wrap {
        font-size: 12px;
    }
    .dgl-card-price{
        font-size: 20px;
    }
    .dgl-card-footer-col .dgl-btn-more, .dgl-card-footer-col .w53{
        max-width: none;
        min-width: auto;
    }
}

/* Совсем узкие экраны (≤480px) */
@media (max-width:480px) {
    .dgl-card-specs {
        gap: 12px;
    }           /* 1 колонка */
    .dgl-spec-item{
        padding: 0;
    }
    .dgl-card-extra-specs.open {
        grid-template-columns: 1fr;
    }
    .dgl-catalog-title-row h1 {
        font-size: 24px;
        line-height: 1;
    }

    .dgl-catalog-count {
        font-size: 16px;
    }
    .dgl-card-footer-col .dgl-btn-more, .dgl-card-footer-col .w53 {
        max-width: none;
        padding: 10px 14px;
        width: auto;
    }
}

.w53{
    width: 53%;
}

/* ═══ Лайтбокс (попап при клике на картинку) ═══ */
.dgl-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,.75);
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.dgl-lightbox.active { display: flex; }
.dgl-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0,0,0,.4);
}
.dgl-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 36px;
    color: #fff;
    cursor: pointer;
    line-height: 1;
    font-weight: 300;
}
.dgl-lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 36px;
    color: #fff;
    cursor: pointer;
    user-select: none;
    padding: 12px 18px;
    border-radius: 50%;
    transition: background .15s;
    line-height: 1;
}
.dgl-lightbox-arrow:hover {
    background: rgba(255,255,255,.15);
}
.dgl-lightbox-prev { left: 20px; }
.dgl-lightbox-next { right: 20px; }
@media (max-width: 600px) {
    .dgl-lightbox-arrow { font-size: 28px; padding: 8px 12px; }
    .dgl-lightbox-prev { left: 6px; }
    .dgl-lightbox-next { right: 6px; }
}
