/* ============================================================
   Urun Konfigurator Viewer (Three.js)
   Urun detay sayfasindaki 3D model + renk/boyut secici stilleri.
   ============================================================ */

/* Urun detay layout'unda .product-image sabit 525px yukseklige sahip
   (product-detail.css). Konfigurator viewer + secenek paneli bu kutuya
   sigmayip footer'in uzerine tasiyor. Viewer iceren product-image'in
   yuksekligini icerige gore esnet. */
.product-block .product-content .product-image:has(.product-configurator-viewer) {
    height: auto;
}

/* Konfigurator viewer iceren carousel'in TUM owl-item'larini 325px'e indir.
   product-detail.css'teki ".owl-carousel.owl-drag .owl-item { height:545px }"
   kesin yukseklik verdigi icin min-height yetmiyor; height + !important ile ezilir. */
.sliderr .owl-carousel:has(.product-configurator-viewer) .owl-item,
.sliderr .owl-carousel.owl-drag:has(.product-configurator-viewer) .owl-item {
    height: 325px !important;
    min-height: 325px !important;
}

.product-configurator-viewer {
    position: relative;
    width: 100%;
    /* Viewer yuksekligi 325px. */
    min-height: 325px;
    height: 325px;
    display: block;
    touch-action: none;
    outline: none;
}

    .product-configurator-viewer canvas {
        display: block;
        width: 100% !important;
        height: 100% !important;
        outline: none;
    }

/* Owl nav oklari her zaman tiklanabilir ve hem viewer canvas'inin hem de
   urun dayanim ikonlarinin (product-attribute-symbols) USTUNDE kalsin. */
.product-block .product-attribute-symbols {
    z-index: 2;
}

    /* Konfigurator sayfalarinda dayanim ikonlarini EN USTTE SAGA YASLI goster.
       Play/pause butonu (top:10 right:10) ile cakismamasi icin ikonlar onun
       SOLUNA, biraz daha asagidan baslar. */
    .product-block .product-content .product-image:has(.product-configurator-viewer) .product-attribute-symbols {
        position: absolute;
        top: 10px;
        right: 52px; /* play/pause butonuna yer birak */
        left: auto;
        bottom: auto;
        z-index: 6;
    }

        .product-block .product-content .product-image:has(.product-configurator-viewer) .product-attribute-symbols ul {
            display: flex;
            flex-direction: row;
            flex-wrap: wrap;
            align-items: center;
            justify-content: flex-end;
            gap: 10px;
            margin: 0;
            padding: 0;
            list-style: none;
        }

            .product-block .product-content .product-image:has(.product-configurator-viewer) .product-attribute-symbols li {
                margin-top: 0;
            }

            .product-block .product-content .product-image:has(.product-configurator-viewer) .product-attribute-symbols img {
                max-width: 32px;
            }

.sliderr .owl-carousel .owl-nav {
    pointer-events: none;
}

    .sliderr .owl-carousel .owl-nav button.owl-prev,
    .sliderr .owl-carousel .owl-nav button.owl-next {
        pointer-events: auto !important;
        z-index: 30 !important;
    }

/* ---- Yukleme gostergesi ---- */
.pcv-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    pointer-events: none;
}

.pcv-spinner {
    width: 42px;
    height: 42px;
    border: 3px solid rgba(28, 50, 95, 0.15);
    border-top-color: #1c325f;
    border-radius: 50%;
    animation: pcv-spin 0.8s linear infinite;
}

@keyframes pcv-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---- Donus play/pause butonu ---- */
.pcv-rotate-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    width: 30px;
    height: 30px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(28, 50, 95, 0.15);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    color: #1c325f;
    cursor: pointer;
    backdrop-filter: blur(2px);
    transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}

    .pcv-rotate-toggle:hover {
        background: #fff;
        transform: scale(1.08);
        box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
    }

    /* Donuyorken pause goster, play gizle; duruyorken tersi. */
    .pcv-rotate-toggle .pcv-ic-play {
        display: none;
    }

    .pcv-rotate-toggle .pcv-ic-pause {
        display: block;
    }

    .pcv-rotate-toggle.is-paused .pcv-ic-play {
        display: block;
    }

    .pcv-rotate-toggle.is-paused .pcv-ic-pause {
        display: none;
    }

/* ---- Secenek paneli ---- */
.pcv-options {
    width: 100%;
    max-width: 640px;
    margin: 8px auto 0;
    padding: 20px 18px 8px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    /* Cok sayida konfigurasyon grubu olunca panel asagiya tasip footer'a
       binmesin diye yuksekligi sinirla ve icinde scroll et. */
    max-height: 70vh;
    overflow-y: auto;
    overscroll-behavior: contain;
}

    /* Ince, zarif scrollbar. */
    .pcv-options::-webkit-scrollbar {
        width: 8px;
    }

    .pcv-options::-webkit-scrollbar-thumb {
        background: rgba(28, 50, 95, 0.25);
        border-radius: 8px;
    }

    .pcv-options::-webkit-scrollbar-track {
        background: transparent;
    }

.pcv-group {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.pcv-group-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #1c325f;
    margin: 0 0 12px;
    position: relative;
    padding-bottom: 8px;
}

    .pcv-group-title {
        align-self: flex-start;
    }

    .pcv-group-title::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: 0;
        width: 28px;
        height: 2px;
        border-radius: 2px;
        background: #1c325f;
    }

/* ---- Yatay kaydirilabilir secenek satiri (tek satir + ok butonlari) ---- */
.pcv-scroller {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.pcv-scroll-track {
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;
    padding: 4px 2px;
}

    .pcv-scroll-track::-webkit-scrollbar {
        display: none; /* kaydirma cubugunu gizle, ok ile yonetiyoruz */
    }

.pcv-scroll-arrow {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    background: #fff;
    color: #1c325f;
    cursor: pointer;
    transition: background .15s ease, box-shadow .15s ease, opacity .15s ease;
}

    .pcv-scroll-arrow:hover {
        background: #f3f4f6;
        box-shadow: 0 2px 6px rgba(0, 0, 0, .1);
    }

    /* Tasma yoksa ya da ucta ise oku gizle (yer tutmasin). */
    .pcv-scroll-arrow.is-hidden {
        display: none;
    }

/* ---- Renk swatch'lari (TEK SATIR) ---- */
.pcv-swatches {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    justify-content: flex-start;
    width: max-content;
}

.pcv-swatch {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    overflow: hidden;
    padding: 0;
    background: #f3f4f6 center/cover no-repeat;
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
    position: relative;
}

    .pcv-swatch:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
    }

    .pcv-swatch.is-active {
        border-color: #1c325f;
        box-shadow: 0 0 0 3px rgba(28, 50, 95, 0.25);
    }

    .pcv-swatch img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

/* ---- Boyut chip'leri (TEK SATIR) ---- */
.pcv-chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    width: max-content;
}

.pcv-chip {
    flex: 0 0 auto;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all .15s ease;
    white-space: nowrap;
}

    .pcv-chip:hover {
        border-color: #1c325f;
        color: #1c325f;
    }

    .pcv-chip.is-active {
        background: #1c325f;
        border-color: #1c325f;
        color: #fff;
        box-shadow: 0 2px 8px rgba(28, 50, 95, .25);
    }

/* ---- "Daha fazla / Daha az" grup toggle butonu ---- */
.pcv-groups-toggle {
    align-self: center;
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
    color: #1c325f;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

    .pcv-groups-toggle:hover {
        border-color: #1c325f;
        box-shadow: 0 2px 8px rgba(28, 50, 95, .12);
    }

    .pcv-groups-toggle .pcv-groups-toggle-ic {
        transition: transform .2s ease;
    }

    .pcv-groups-toggle.is-expanded .pcv-groups-toggle-ic {
        transform: rotate(180deg);
    }

/* ---- Benzer Urunler slider ---- */
.related-products-section {
    width: 100%;
    padding: 40px 0 20px;
}

    .related-products-section .container {
        max-width: 1160px;
        margin: 0 auto;
        padding: 0 20px;
        box-sizing: border-box;
    }

    /* Telefon gorunumunde yan bosluklari kaldir (tam genislik). */
    @media screen and (max-width: 768px) {
        .related-products-section {
            padding: 24px 0 12px;
        }

        .related-products-section .container {
            max-width: 100%;
            padding: 0 8px;
        }
    }

    .related-products-section .ar-heading h4 {
        font-size: 20px;
        font-weight: 700;
        color: #1c325f;
        margin-bottom: 20px;
    }

    /* Swiper'in container disina tasmasini engelle: overflow gizli + tam genislik. */
    .related-products-section .related-product-slider {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        box-sizing: border-box;
    }

        .related-products-section .related-product-slider .swiper-wrapper {
            box-sizing: border-box;
        }
