/* ========================================= 
   КОНТЕЙНЕР СЛАЙДЕРА 
   ========================================= */

.sg-block {
    --sg-border-color: var(--theme-palette-color-1, #022b54);
    --sg-border-width: 1px;
    --sg-border-radius: 10px;
    --sg-max-width: 720px;
    --sg-aspect-ratio: 4 / 3;
    --sg-transition: opacity 0.35s ease;
    --sg-controls-gap: 12px;
    --sg-btn-size: 48px;
    /* Свойства */
    width: 100%;
    max-width: var(--sg-max-width);
    margin: 0 auto;
    display: block;
}

@media (max-width: 768px) {
    .sg-block {
        padding-left: 16px;
        padding-right: 16px;
        box-sizing: border-box;
    }
}

.sg-block .sg-slider {
    position: relative;
    width: 100%;
    aspect-ratio: var(--sg-aspect-ratio);
    border: var(--sg-border-width) solid var(--sg-border-color);
    border-radius: var(--sg-border-radius);
    overflow: hidden;
    background: #f5f5f5;
}

/* ========================================= 
   СЛАЙДЫ 
   ========================================= */
.sg-block .sg-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: var(--sg-transition);
    pointer-events: none;
    box-sizing: border-box;
}

.sg-block .sg-slide--active {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

.sg-block .sg-slide__btn {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: none;
    background: transparent;
    cursor: zoom-in;
}

.sg-block .sg-slide__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* ── НАВИГАЦИЯ ← ● → ─────────────────────────────────────── */ 
.sg-block .sg-controls { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 16px; 
    margin-top: var(--sg-controls-gap); 
    width: 100%; 
} 
 
.sg-block .sg-btn { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    width: var(--sg-btn-size); 
    height: var(--sg-btn-size); 
    padding: 0; 
    background: transparent; 
    border: none; 
    cursor: pointer; 
    transition: opacity 0.2s ease; 
} 

.sg-block .sg-btn:hover { 
    opacity: 0.6; 
} 

.sg-block .sg-btn:disabled { 
    opacity: 0.25; 
    cursor: default; 
} 
 
.sg-block .sg-controls__circle svg { 
    display: block; 
}

/* Кастомная полоса прокрутки */ 
.sg-progress { 
    width: 100%; 
    height: 3px; 
    background-color: #e0e0e0; 
    margin-top: 15px; 
    position: relative; 
    border-radius: 2px; 
    overflow: hidden; 
} 

.sg-progress__fill { 
    height: 100%; 
    width: 0%; 
    background-color: var(--site-primary-color, #0f2b4c); 
    transition: width 0.1s ease-out; 
}

/* ========================================= 
   ЛАЙТБОКС (ПОЛНОЭКРАННЫЙ ПРОСМОТР) 
   ========================================= */
.sg-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sg-lightbox--open {
    opacity: 1;
    visibility: visible;
}

.sg-lightbox__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    cursor: zoom-out;
    z-index: 1;
}

.sg-lightbox__img {
    position: relative;
    z-index: 2;
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}

.sg-lightbox__close {
    position: absolute;
    top: 40px;
    right: 20px;
    z-index: 3;
    width: 36px;
    height: 36px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    background: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: normal;
    font-family: sans-serif;
    line-height: 1;
}

.sg-lightbox__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    font-size: 32px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    font-style: normal;
    font-family: sans-serif;
    line-height: 1;
    padding: 0 0 2px 0;
}

.sg-lightbox__counter {
    position: absolute;
    bottom: 20px; left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    color: rgba(255, 255, 255, 0.75);
    font-size: 16px;
    font-style: normal;
    font-family: sans-serif;
    white-space: nowrap;
}

.sg-lightbox__btn:hover {
    background: rgba(0, 0, 0, 0.75);
}

.sg-lightbox__btn--prev { left: 20px; }
.sg-lightbox__btn--next { right: 20px; }

@media (max-width: 768px) {
    .sg-lightbox__btn { width: 40px; height: 40px; font-size: 22px; }
    .sg-lightbox__btn--prev { left: 10px; }
    .sg-lightbox__btn--next { right: 10px; }
}