﻿#syl-photos.pswp-gallery {
    grid-template-columns: repeat(3, minmax(0,1fr));
}

@media (max-width: 992px) {
    #syl-photos.pswp-gallery {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }
}

@media (max-width: 576px) {
    #syl-photos.pswp-gallery {
        grid-template-columns: 1fr;
    }
}

.syl-viewer {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center
}

.syl-main {
    flex: 1;
    text-align: center
}

.syl-thumbs {
    width: 140px;
    display: flex;
    flex-direction: column;
    gap: 12px
}

.syl-thumbs img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.15);
    cursor: pointer;
    opacity: .9;
    transition: transform .15s,opacity .15s,box-shadow .15s
}

.syl-thumbs a.active img {
    opacity: 1;
    box-shadow: 0 4px 14px rgba(0,0,0,.15)
}

@media(max-width:992px) {
    .syl-viewer {
        flex-direction: column-reverse
    }

    .syl-thumbs {
        width: 100%;
        flex-direction: row;
        justify-content: center
    }

    .syl-main img {
        max-width: 360px !important
    }
}


/* --- COMPACT VIEWER --- */

.syl-viewer {
    gap: 12px;
    align-items: center;
}

.syl-main img {
    max-height: 800px !important;
    width: auto !important;
}

.syl-thumbs {
    width: 108px;
    gap: 8px;
    max-height: 800px;
    overflow-y: auto;
    padding-right: 4px;
}

.syl-thumbs a {
    padding: 6px;
    border-radius: 12px;
    background: rgba(255,255,255,.04);
}

.syl-thumbs img {
    display: block;
    height: 64px;
    width: auto;
    margin: 0 auto;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.15);
    opacity: .9;
    transition: transform .15s,opacity .15s,box-shadow .15s;
}

.syl-thumbs a.active img {
    opacity: 1;
    box-shadow: 0 4px 12px rgba(0,0,0,.14);
}

.product-card .syl-viewer {
    padding-block: 8px;
}

@media (max-width:992px) {
    .syl-viewer {
        flex-direction: column-reverse
    }

    .syl-thumbs {
        width: 100%;
        max-height: unset;
        overflow-y: visible;
        overflow-x: auto;
        justify-content: center;
    }

    .syl-thumbs img {
        height: 56px;
    }

    .syl-main img {
        max-height: 260px !important;
    }
}

.syl-thumbs {
    width: 160px;
    gap: 10px;
}

.syl-thumbs a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 12px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    transition: background .15s, box-shadow .15s, border-color .15s;
}

.syl-thumbs a:hover {
    background: rgba(255,255,255,.06);
    border-color: rgba(255,255,255,.14);
}

.syl-thumbs a.active {
    background: rgba(255,255,255,.09);
    box-shadow: 0 4px 12px rgba(0,0,0,.14);
    border-color: rgba(255,255,255,.18);
}

.syl-thumbs img {
    display: block;
    height: 64px;
    width: auto;
    flex: 0 0 auto;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.15);
    opacity: .95;
    transition: transform .15s, opacity .15s;
}

.syl-thumbs a:hover img {
    transform: scale(1.03);
    opacity: 1;
}

.syl-thumbs a::after {
    content: attr(data-label);
    font-size: 12px;
    line-height: 1;
    color: #fff;
    opacity: .85;
    letter-spacing: .2px;
    white-space: nowrap;
    margin-left: auto;
}

@media (max-width: 992px) {
    .syl-thumbs {
        width: 100%;
        flex-direction: row;
        justify-content: center;
        gap: 8px;
    }

    .syl-thumbs a {
        flex-direction: column;
        min-width: 88px;
        gap: 6px;
    }

    .syl-thumbs img {
        height: 56px;
    }

    .syl-thumbs a::after {
        margin: 0;
        font-size: 11px;
        opacity: .9;
    }
}

@media (max-width: 576px) {
    .syl-viewer {
        flex-direction: column-reverse;
    }

    .syl-thumbs {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        max-height: unset;
        overflow: visible;
        justify-items: center;
    }

    .syl-thumbs a {
        flex-direction: column;
        min-width: 0;
        padding: 6px;
        gap: 6px;
    }

    .syl-thumbs img {
        height: 48px;
    }

    .syl-thumbs a[data-label="Лінійка"] {
        display: none;
    }

    .syl-main img {
        max-height: 240px !important;
    }
}

@media (max-width: 380px) {
    .syl-thumbs img {
        height: 44px;
    }

    .syl-main img {
        max-height: 220px !important;
    }
}
