/* Убираем синее подсвечивание при таче на мобильных */
button, a, .nav-item, [role="button"] {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

button:focus, button:active, a:focus, a:active {
    outline: none;
}

/* [GRP: GALLERY] */

/* [SEC: Column] */
.gallery-column {
    padding-right: 40px;
    position: relative;
    /* Р¤РёРєСЃ СЏРєРѕСЂСЏ СЃС‡РµС‚С‡РёРєР° РІРЅРµ СЃРєСЂРѕР»Р»РµСЂР° */
}

/* [SEC: Desktop Main Image] */
.desktop-main-image-wrap {
    margin-bottom: 16px;
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    overflow: hidden;
    position: relative;
    /* РґР»СЏ РґРµСЃРєС‚РѕРї-СЏРєРѕСЂСЏ */
    min-height: 360px;
    /* Р¤РёРєСЃ: РЅРµС‚ СЃРєР°С‡РєР° РІС‹СЃРѕС‚С‹ РґРѕ Р·Р°РіСЂСѓР·РєРё */
}

/* [SEC: Slider Counter] */
.slider-counter {
    position: absolute;
    background: rgba(0, 0, 0, .5);
    color: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    z-index: 20;
    pointer-events: none;
    white-space: nowrap;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    -webkit-text-size-adjust: 100%;
    will-change: transform, opacity;
    transform: translate3d(0, 0, 0);
    user-select: none;
}

/* Р”РµСЃРєС‚РѕРї: СЃС‡РµС‚С‡РёРє Р¶РёРІРµС‚ РІ .desktop-main-image-wrap СЃРїСЂР°РІР°-СЃРЅРёР·Сѓ */
@media (min-width: 769px) {

    .desktop-slider+.slider-counter,
    .desktop-main-image-wrap>.slider-counter {
        bottom: 15px;
        right: 15px;
        left: auto;
        top: auto;
    }
}

/* [SEC: Desktop Slider] */
.desktop-slider {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    width: 100%;
    scrollbar-width: none;
}

.desktop-slider::-webkit-scrollbar {
    display: none;
}

.desktop-slide {
    flex: 0 0 100%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    scroll-snap-align: center;
}

.desktop-slide img {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    cursor: zoom-in;
}

/* [SEC: Mobile Swipe Gallery] */
.swipe-gallery {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 10px 0;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    position: relative;
}

.swipe-gallery::-webkit-scrollbar {
    display: none;
}

.swipe-slide {
    flex: 0 0 70px;
    height: 70px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: .3s;
    scroll-snap-align: start;
}

.swipe-slide:hover {
    border-color: var(--accent);
}

/* [SEC: Mobile] */
@media (max-width: 768px) {
    .gallery-column {
        padding: 0;
    }

    .desktop-main-image-wrap {
        display: none;
    }

    .swipe-gallery {
        gap: 0;
        padding: 0;
    }

    /* РњРѕР±РёР»СЊРЅС‹Р№ СЃР»Р°Р№Рґ вЂ” РїСЂРµРґСЃРєР°Р·СѓРµРјР°СЏ РІС‹СЃРѕС‚Р° РґРѕ Р·Р°РіСЂСѓР·РєРё РёР·РѕР±СЂР°Р¶РµРЅРёР№ */
    .swipe-slide {
        flex: 0 0 100%;
        width: 100%;
        height: clamp(260px, 95vw, 520px);
        /* Р¤РёРєСЃ в„–3: СЃС‚Р°Р»Рѕ РєСЂСѓРїРЅРµРµ (~95% С€РёСЂРёРЅС‹) */
        border: none;
        border-radius: 0;
        object-fit: contain;
        /* РІРёРґРёРј РІСЃС‘ С„РѕС‚Рѕ */
        scroll-snap-align: center;
    }

    /* РњРѕР±Р°Р№Р»: СЃС‡С‘С‚С‡РёРє РІРЅРµ СЃРєСЂРѕР»Р»РµСЂР°, РїРѕР·РёС†РёРѕРЅРёСЂСѓРµС‚СЃСЏ JS РїРѕ top, РїСЂР°РІРѕ С„РёРєСЃ */
    .slider-counter {
        top: 0;
        /* РІС‹С‡РёСЃР»СЏРµС‚СЃСЏ РІ JS */
        bottom: auto;
        right: 10px;
        left: auto;
    }
}

/* [SEC: Lightbox Zoom] */
.lightbox {
    position: fixed;
    inset: 0;
    background: #000;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    opacity: 0;
    transition: opacity .25s ease;
    touch-action: none;
    overscroll-behavior: contain;
    cursor: zoom-out;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox img {
    width: 100%;
    /* Р¤РёРєСЃ: С‚РѕС‡РЅС‹Р№ contain */
    height: 100%;
    /* Р¤РёРєСЃ: С‚РѕС‡РЅС‹Р№ contain */
    object-fit: contain;
    transform: scale(.9);
    opacity: 1;
    transition: transform .2s ease-out, opacity .2s ease-out;
    user-select: none;
    touch-action: none;
    will-change: transform, opacity;
}

.lightbox.dragging img {
    transition: none !important;
}

.lightbox.active img {
    transform: scale(1);
}

/* РљСѓСЂСЃРѕСЂС‹ РїСЂРё РїР°РЅРѕСЂР°РјРёСЂРѕРІР°РЅРёРё */
.lightbox.can-pan {
    cursor: grab;
}

.lightbox.dragging {
    cursor: grabbing;
}

/* [SEC: Lightbox UI overlay] */
.lightbox .lb-ui {
	position: absolute;
	top: 10px;
	left: 10px;
	right: 10px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	pointer-events: none;
	z-index: 2;
}
.lightbox .lb-counter {
	color: #fff;
	background: rgba(0, 0, 0, .44);
	font-size: 12px;
	line-height: 1;
	padding: 6px 10px;
	border-radius: 12px;
	pointer-events: none;
	user-select: none;
}
.lightbox .lb-close {
	pointer-events: auto;
	width: 40px;
	height: 40px;
	border: 0;
	padding: 0;
	border-radius: 20px;
	background: rgba(0, 0, 0, .44);
	color: #fff;
	font: inherit;
	font-size: 26px;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: transform .12s ease, background-color .12s ease, opacity .12s ease;
}
.lightbox .lb-close:hover {
	background: rgba(0, 0, 0, .58);
}
.lightbox .lb-close:active {
	transform: scale(.96);
}
.lightbox img {
	-webkit-user-drag: none;
}