/**
 * Ürün galerisi + lightbox stilleri.
 */

/* ── Thumbnail şeridi ─────────────────────────────────────────────────────── */
.nimet-gallery-thumb {
    border: 2px solid transparent;
    transition: border-color .18s ease, transform .18s ease;
}

.nimet-gallery-thumb:hover {
    border-color: #cbd5e1;
}

.nimet-gallery-thumb.is-active {
    border-color: #2F80ED;
}

.nimet-gallery-thumbs {
    scrollbar-width: thin;
}

/* ── Ana görsel çerçevesi ─────────────────────────────────────────────────── */
.nimet-gallery-stage {
    position: relative;
}

.nimet-gallery-stage__zoom {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: zoom-in;
    background: transparent;
    border: 0;
    padding: 0;
}

.nimet-gallery-stage__hint {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 1px 4px rgba(15, 23, 42, .12);
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    pointer-events: none;
    opacity: 0;
    transition: opacity .18s ease;
}

.nimet-gallery-stage:hover .nimet-gallery-stage__hint {
    opacity: 1;
}

.nimet-gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 9999px;
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 2px 8px rgba(15, 23, 42, .14);
    color: #374151;
    font-size: 22px;
    cursor: pointer;
    transition: background .18s ease, color .18s ease;
    z-index: 2;
}

.nimet-gallery-arrow:hover {
    background: #2F80ED;
    color: #fff;
}

.nimet-gallery-arrow--prev {
    left: 12px;
}

.nimet-gallery-arrow--next {
    right: 12px;
}

/* ── Cihaz renk seçenekleri ───────────────────────────────────────────────── */
.nimet-color-options {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid #eef2f7;
}

.nimet-color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.nimet-color-swatch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 50%;
    background: none;
    transition: border-color .16s ease, transform .16s ease;
}

.nimet-color-swatch__dot {
    display: block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    /* Açık renklerin beyaz zeminde kaybolmaması için ince iç çerçeve */
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .18);
}

.nimet-color-swatch.is-clickable {
    cursor: pointer;
}

.nimet-color-swatch.is-clickable:hover,
.nimet-color-swatch:hover {
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.nimet-color-swatch.is-selected {
    border-color: #2F80ED;
}

.nimet-color-swatch:focus-visible {
    outline: none;
    border-color: #2F80ED;
    box-shadow: 0 0 0 3px rgba(47, 128, 237, .22);
}

.nimet-color-selected-name {
    margin-top: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    min-height: 1.25em;
}

@media (max-width: 480px) {
    .nimet-color-swatch {
        width: 34px;
        height: 34px;
    }

    .nimet-color-swatch__dot {
        width: 26px;
        height: 26px;
    }
}

/* ── Lightbox ─────────────────────────────────────────────────────────────── */
body.nimet-lightbox-open {
    overflow: hidden;
}

.nimet-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px;
    background: rgba(15, 23, 42, .92);
    backdrop-filter: blur(2px);
}

.nimet-lightbox.is-open {
    display: flex;
}

.nimet-lightbox__figure {
    margin: 0;
    max-width: min(1100px, 100%);
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.nimet-lightbox__image {
    max-width: 100%;
    max-height: calc(100vh - 140px);
    object-fit: contain;
    border-radius: 12px;
    background: #fff;
}

.nimet-lightbox__caption {
    margin: 0;
    max-width: 60ch;
    text-align: center;
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255, 255, 255, .82);
}

.nimet-lightbox__close {
    position: absolute;
    top: 18px;
    right: 20px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 9999px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    transition: background .18s ease;
}

.nimet-lightbox__close:hover {
    background: rgba(255, 255, 255, .26);
}

.nimet-lightbox__nav {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 9999px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    transition: background .18s ease;
}

.nimet-lightbox__nav:hover {
    background: rgba(255, 255, 255, .26);
}

.nimet-lightbox__counter {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 14px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, .12);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    color: #fff;
}

@media (max-width: 640px) {
    .nimet-lightbox {
        padding: 12px;
        gap: 4px;
    }

    .nimet-lightbox__nav {
        position: absolute;
        bottom: 18px;
        width: 42px;
        height: 42px;
        font-size: 24px;
    }

    .nimet-lightbox__nav--prev {
        left: 16px;
    }

    .nimet-lightbox__nav--next {
        right: 16px;
    }

    .nimet-lightbox__counter {
        bottom: 28px;
    }

    .nimet-lightbox__image {
        max-height: calc(100vh - 160px);
    }
}
