.twg-front {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 14px;
    background: #eee;
}

.twg-main {
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
}

.twg-main-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    transition: opacity .18s ease;
}

.twg-main-image.is-changing {
    opacity: .35;
}

.twg-thumbs {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 14px;
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding: 7px;
    border-radius: 13px;
    background: rgba(245, 238, 233, .88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    scrollbar-width: none;
    scroll-behavior: smooth;
}

.twg-thumbs::-webkit-scrollbar {
    display: none;
}

.twg-thumb {
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 9px;
    border: 2px solid transparent;
    background: transparent;
    cursor: pointer;
    box-shadow: none;
    min-width: 0;
}

.twg-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

.twg-thumb.is-active {
    border-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.22);
}

.twg-thumb:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
    .twg-thumb:hover {
        transform: translateY(-1px);
    }
}

@media (max-width: 767px) {
    .twg-thumbs {
        left: 10px;
        right: 10px;
        bottom: 10px;
        gap: 6px;
        padding: 6px;
    }

    .twg-thumb {
        flex-basis: 52px;
        width: 52px;
        height: 52px;
    }
}
