/* =========================================================
   ekare-bilesen.css — Site Bileşen Sistemi Stilleri
   ========================================================= */

/* ── Ortak ── */
.ekb-bilesen { box-sizing: border-box; }
.ekb-gorsel { max-width: 100%; height: auto; display: block; }
.ekb-gorsel-wrap { display: block; }
.ekb-sayac { font-weight: 700; letter-spacing: .05em; }
.ekb-buton {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
}
.ekb-kapat {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 4px 8px;
    opacity: .7;
}
.ekb-kapat:hover { opacity: 1; }

/* ── Top Bar ── */
@keyframes ekb-shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}
.ekb-top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 400;
    background: #222;
    color: #fff;
    background-size: 200% 200%;
    box-shadow: 0 4px 12px rgba(0,0,0,.35);
    padding: 8px 14px;
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.ekb-top-bar--gizli {
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
}
.ekb-top-bar[style*="gradient"] {
    animation: ekb-shimmer 8s ease-in-out infinite;
}

/* Karma içerik iç sarmalayıcı */
.ekb-tb-ic {
    max-width: 1380px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
}

/* Görsel grubu */
.ekb-tb-g-grup { flex-shrink: 0; display: flex; align-items: center; }
.ekb-tb-g-grup .ekb-gorsel { height: 36px; width: auto; max-width: none; display: block; }

/* Metin grubu */
.ekb-tb-m-grup { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ekb-tb-m-ust  { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ekb-tb-baslik { font-size: 14px; font-weight: 600; line-height: 1.3; }
.ekb-tb-alt    { font-size: 12px; font-weight: 400; opacity: .85; line-height: 1.3; }
.ekb-tb-mesaj  { font-size: 11px; opacity: .70; line-height: 1.3; }

/* Eylem grubu — sayaç üstte, buton altta */
.ekb-tb-e-grup { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }

/* ── Resim slider ────────────────────────────────────────── */
/* Faz 1 (JS init öncesi): display hide/show — CLS yok, yükseklik doğal */
.ekb-top-bar--resim.ekb-top-bar--slider { display: block !important; overflow: hidden; }
.ekb-top-bar--resim.ekb-top-bar--slider .ekb-tb-slide:not([data-aktif="1"]) { display: none; }
.ekb-top-bar--resim.ekb-top-bar--slider .ekb-tb-slide[data-aktif="1"] { display: block; }
/* Faz 2 — tam bar: JS height kilitler, width zaten 100% */
.ekb-top-bar--resim.ekb-top-bar--slider.ekb-slider-aktif .ekb-tb-slide {
    display: block !important;
    position: absolute; top: 0; left: 0; width: 100%;
    opacity: 0; transition: opacity 0.6s ease; pointer-events: none;
}
.ekb-top-bar--resim.ekb-top-bar--slider.ekb-slider-aktif .ekb-tb-slide[data-aktif="1"] {
    opacity: 1; pointer-events: auto;
}
/* Mini slider (karma içerik) */
.ekb-gorsel-slider { position: relative; display: block; overflow: hidden; }
.ekb-gorsel-slider .ekb-tb-slide { display: none; }
.ekb-gorsel-slider .ekb-tb-slide[data-aktif="1"] { display: block; }
/* Faz 2 — mini slider: JS hem height hem width kilitler; height:100% şart */
.ekb-gorsel-slider.ekb-slider-aktif .ekb-tb-slide {
    display: block !important;
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0; transition: opacity 0.6s ease; pointer-events: none;
}
.ekb-gorsel-slider.ekb-slider-aktif .ekb-tb-slide[data-aktif="1"] {
    opacity: 1; pointer-events: auto;
}

/* Sayaç blokları — script: cd-block / cd-label / cd-value */
.ekb-cd-timer {
    display: flex;
    gap: 8px;
    align-items: center;
}
.ekb-cd-blok {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.ekb-cd-label {
    font-size: 10px;
    font-weight: 600;
    margin-bottom: 1px;
}
.ekb-cd-deger {
    background: rgba(255,255,255,.92);
    padding: 4px 7px;
    min-width: 26px;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 700;
    color: #000;
    text-align: center;
    line-height: 1.2;
}
.ekb-cd-sep {
    font-weight: 700;
    margin-top: 10px;
}

/* Sadece resim modu */
.ekb-top-bar--resim {
    padding: 0;
    line-height: 0;
}
.ekb-top-bar--resim > a {
    display: block;
    width: 100%;
    line-height: 0;
}
.ekb-top-bar--resim .ekb-gorsel {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    border: 0;
}

/* ── Modal (popup + event_modal birleşimi) ── */
.ekb-modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ekb-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.55);
    cursor: pointer;
    animation: ekb-modal-fade-in 0.25s ease;
}
@keyframes ekb-modal-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.ekb-modal-kutu {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 36px 28px 28px;
    max-width: 480px;
    width: 92%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1;
    text-align: center;
    animation: ekb-modal-slide-in 0.28s cubic-bezier(.22,.68,0,1.2);
}
@keyframes ekb-modal-slide-in {
    from { opacity: 0; transform: scale(.88) translateY(16px); }
    to   { opacity: 1; transform: scale(1)   translateY(0);    }
}
.ekb-modal-kutu .ekb-kapat {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 20px;
}
/* Tipografi hiyerarşisi */
.ekb-modal-kutu .ekb-baslik {
    margin: 0 0 6px;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.25;
}
.ekb-modal-kutu .ekb-alt {
    margin: 0 0 10px;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.4;
    opacity: .9;
}
.ekb-modal-kutu .ekb-mesaj {
    margin: 0 0 14px;
    font-size: 0.82rem;
    line-height: 1.55;
    opacity: .7;
}
/* Görsel — tam genişlik, ortalı */
.ekb-modal-kutu .ekb-gorsel-wrap {
    display: block;
    margin-bottom: 18px;
    text-align: center;
}
.ekb-modal-kutu .ekb-gorsel-wrap img,
.ekb-modal-kutu .ekb-gorsel-wrap .ekb-gorsel {
    display: block;
    margin: 0 auto;
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    border-radius: 8px;
}
/* Mobil picture elementi */
.ekb-modal-kutu .ekb-gorsel-wrap picture,
.ekb-slider-item picture { display: block; width: 100%; height: 100%; }
/* Custom Slider — çoklu resim */
.ekb-slider {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 18px;
    isolation: isolate;
    transform: translateZ(0);
}
.ekb-slider-track {
    display: flex;
    flex-wrap: nowrap;
    transition: transform 0.4s ease-in-out;
}
.ekb-slider-item {
    min-width: 100%;
    flex-shrink: 0;
    height: clamp(160px, 40vh, 300px);
}
.ekb-slider-item > a {
    display: block;
    width: 100%;
    height: 100%;
}
.ekb-slider-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.ekb-slider-prev, .ekb-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 36px; height: 36px;
    cursor: pointer;
    z-index: 10;
    font-size: 15px;
    line-height: 36px;
    text-align: center;
    padding: 0;
    opacity: .85;
    transition: opacity .2s;
}
.ekb-slider-prev:hover, .ekb-slider-next:hover { opacity: 1; }
.ekb-slider-prev { left: 10px; }
.ekb-slider-next { right: 10px; }
.ekb-slider-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}
.ekb-slider-dot {
    width: 8px; height: 8px;
    background: rgba(255,255,255,.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background .2s;
}
.ekb-slider-dot--aktif { background: #fff; }
/* Sayaç ortalama */
.ekb-modal-kutu .ekb-sayac { display: block; margin: 10px auto; }
.ekb-modal-kutu .ekb-cd-timer { justify-content: center; }
.ekb-modal-kutu .ekb-buton { display: inline-block; margin-top: 16px; }
/* Sadece resim modu — çerçevesiz, görsel ön planda */
.ekb-modal-kutu--resim {
    padding: 0;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 12px;
    overflow: hidden;
    max-width: 540px;
}
.ekb-modal-kutu--resim .ekb-kapat {
    position: fixed;
    top: 14px;
    right: 14px;
    background: rgba(0,0,0,.65);
    color: #fff;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    padding: 0;
    opacity: 1;
}
.ekb-modal-kutu--resim .ekb-gorsel-wrap { margin-bottom: 0; }
.ekb-modal-kutu--resim .ekb-gorsel-wrap img,
.ekb-modal-kutu--resim .ekb-gorsel-wrap .ekb-gorsel {
    max-height: 85vh;
    border-radius: 12px;
    object-fit: cover;
    width: 100%;
}
.ekb-modal-kutu--resim .ekb-modal-carousel { margin-bottom: 0; border-radius: 12px; }
.ekb-modal-kutu--resim .ekb-modal-carousel .carousel-item img { max-height: 85vh; object-fit: cover; }
@media (max-width: 480px) {
    .ekb-modal-kutu { padding: 30px 16px 22px; }
    .ekb-modal-kutu .ekb-baslik { font-size: 1.15rem; }
    .ekb-modal-kutu .ekb-gorsel-wrap img { max-height: 220px; }
}

/* ── Badge ── */
.ekb-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 10;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: .75rem;
    font-weight: 700;
    background: #e53935;
    color: #fff;
    pointer-events: none;
}

/* ── Inline Banner ── */
.ekb-inline-banner {
    width: 100%;
    margin: 12px 0 20px;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
}

/* Sadece resim — tek */
.ekb-inline-banner--resim .ekb-gorsel-wrap,
.ekb-inline-banner--resim > picture { display: block; width: 100%; }
.ekb-inline-banner--resim .ekb-gorsel-wrap img,
.ekb-inline-banner--resim > picture img { width: 100%; height: auto; display: block; }

/* Sadece resim — slider: doğal yükseklik, kırpma yok */
.ekb-inline-banner .ekb-slider { width: 100%; }
.ekb-inline-banner--slider .ekb-slider-item { height: auto; }
.ekb-inline-banner--slider .ekb-slider-item img { width: 100%; height: auto; object-fit: contain; display: block; }
.ekb-inline-banner--slider .ekb-slider-item > a { display: block; width: 100%; }
.ekb-inline-banner--slider .ekb-slider-item picture { display: block; width: 100%; }

/* Karma mod — modal iç yapısıyla aynı dikey dizim */
.ekb-inline-banner--karma {
    padding: 16px 20px 16px;
    text-align: center;
    background: #fff;
}
.ekb-inline-banner--karma .ekb-slider { margin-bottom: 12px; }
.ekb-inline-banner--karma .ekb-slider-item { height: auto; }
.ekb-inline-banner--karma .ekb-slider-item img { width: 100%; height: auto; object-fit: contain; display: block; }
.ekb-inline-banner--karma .ekb-slider-item > a { display: block; width: 100%; }
.ekb-inline-banner--karma .ekb-slider-item picture { display: block; width: 100%; }
.ekb-inline-banner--karma .ekb-gorsel-wrap {
    display: block;
    margin-bottom: 12px;
}
.ekb-inline-banner--karma .ekb-gorsel-wrap img,
.ekb-inline-banner--karma .ekb-gorsel-wrap .ekb-gorsel {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}
.ekb-inline-banner--karma picture { display: block; width: 100%; }
.ekb-inline-banner--karma .ekb-baslik { margin: 0 0 4px; font-size: 1.35rem; font-weight: 700; line-height: 1.25; }
.ekb-inline-banner--karma .ekb-alt   { margin: 0 0 6px; font-size: 1rem; opacity: .9; }
.ekb-inline-banner--karma .ekb-mesaj { margin: 0 0 8px; font-size: 0.82rem; }
.ekb-inline-banner--karma .ekb-sayac { display: block; margin: 6px auto; }
.ekb-inline-banner--karma .ekb-cd-timer { justify-content: center; }
.ekb-inline-banner--karma .ekb-buton { display: inline-block; margin-top: 10px; }

/* ── Ürün Sayacı ── */
.ekb-urun-sayac {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 4px;
    background: #fff3e0;
    color: #e65100;
    font-size: .9rem;
    margin: 8px 0;
}
.ekb-urun-sayac .ekb-sayac { font-size: 1rem; }

/* ── Floating Button ── */
.ekb-floating-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 800;
}
.ekb-floating-btn .ekb-buton {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #1976d2;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,.25);
    padding: 0;
    font-size: .75rem;
    text-align: center;
}
.ekb-floating-btn .ekb-buton span { line-height: 1.2; }

/* ── Side Panel ── */
.ekb-side-panel-tab {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%) rotate(180deg);
    writing-mode: vertical-rl;
    z-index: 800;
    background: #1976d2;
    color: #fff;
    border: none;
    padding: 14px 8px;
    cursor: pointer;
    font-size: .85rem;
    font-weight: 600;
    border-radius: 4px 0 0 4px;
}
.ekb-side-panel-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 8490;
    background: rgba(0,0,0,.35);
}
.ekb-side-panel-overlay--acik { display: block; }
.ekb-side-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    z-index: 8500;
    background: #fff;
    box-shadow: -4px 0 16px rgba(0,0,0,.2);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform .3s ease;
}
.ekb-side-panel--acik { transform: translateX(0); }
.ekb-side-panel-ic {
    padding: 48px 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.ekb-side-panel-kapat {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
}
.ekb-side-panel-item {
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 6px;
}
.ekb-side-panel-item .ekb-baslik { font-weight: 700; margin-bottom: 4px; }
.ekb-side-panel-item .ekb-alt { font-size: .9rem; color: #555; margin-bottom: 8px; }
.ekb-side-panel-item .ekb-buton { width: 100%; text-align: center; }

/* ── Mobil ── */
@media (max-width: 768px) {
    .ekb-floating-btn { bottom: 16px; right: 12px; }
    .ekb-side-panel { width: 85vw; }
    .ekb-top-bar { padding: 6px 10px; font-size: .85rem; }
    /* Mobil: 3 satır (görsel / metin / eylem) */
    .ekb-top-bar--karma .ekb-tb-ic {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        text-align: center;
    }
    .ekb-top-bar--karma .ekb-tb-g-grup {
        justify-content: center;
    }
    .ekb-top-bar--karma .ekb-tb-g-grup .ekb-gorsel {
        height: auto;
        max-height: 48px;
        max-width: 100%;
    }
    .ekb-top-bar--karma .ekb-tb-m-grup { align-items: center; }
    .ekb-top-bar--karma .ekb-tb-m-ust  { justify-content: center; }
    .ekb-top-bar--karma .ekb-tb-baslik { font-size: 13px; }
    .ekb-top-bar--karma .ekb-tb-alt    { font-size: 11px; }
    .ekb-top-bar--karma .ekb-tb-mesaj  { font-size: 10px; }
    .ekb-top-bar--karma .ekb-tb-e-grup {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 10px;
    }
    .ekb-cd-timer { gap: 4px; }
    .ekb-cd-deger { font-size: 14px; padding: 2px 5px; min-width: 22px; border-radius: 4px; color: #000; }
    .ekb-cd-label { font-size: 9px; }
    .ekb-cd-sep { margin-top: 6px; }
}
