/* =====================================================================
   Fotomagnet4K - yeni ana sayfa tasarimi (Kasim 2026)
   Mobil header (solda logo, sagda arama), kaydirilabilir kategori seridi,
   dar ana slider ve mobil 4'lu banner. Eski kurallarin uzerine yazar;
   geri almak icin header.php'deki bu dosyanin <link> satirini kaldirmak yeterli.
   ===================================================================== */
:root {
    --fm-ana: #109bca;
    --fm-vurgu: #e5383b;
    --fm-metin: #2e3440;
    --fm-cizgi: #e9ecef;
}

/* ---------- Kategori seridi (chip) ---------- */
.fm-chipbar { display: none; }
.fm-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.fm-chips::-webkit-scrollbar { display: none; }
.fm-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    border-radius: 16px;
    border: 1px solid var(--fm-cizgi);
    background: #f7f8f9;
    color: var(--fm-metin) !important;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none !important;
    font-family: inherit;
    cursor: pointer;
}
.fm-chip:hover, .fm-chip:focus { border-color: var(--fm-ana); }
.fm-chip.vurgu { background: #fff; border-color: #f5b5b5; }
.fm-chip.vurgu i { color: var(--fm-vurgu); }
.fm-chip.menu { background: var(--fm-ana); border-color: var(--fm-ana); color: #fff !important; }

/* Menude one cikan linkler (Kampanyalar, Cok Satanlar) */
.sf-menu > li.fm-nav-chip > a i { color: var(--fm-vurgu); margin-right: 6px; }
@media (min-width: 992px) {
    .header .navigation .sf-menu > li.fm-nav-chip > a {
        border: 1px solid #f5b5b5;
        border-radius: 16px;
        padding: 5px 12px !important;
        margin: 8px 3px;
        line-height: 1.3 !important;
        background: #fff;
    }
    .header .navigation .sf-menu > li.fm-nav-chip > a i { color: var(--fm-vurgu); margin-right: 4px; }
}

/* ---------- Mobil header ---------- */
@media (max-width: 991px) {
    body .header .header-wrapper {
        height: 56px !important;
        padding: 7px 0 !important;
        box-sizing: border-box;
    }
    .header .header-wrapper > .container {
        display: flex !important;
        align-items: center;
        gap: 10px;
        min-height: 0;
    }
    .header .header-wrapper > .container:before,
    .header .header-wrapper > .container:after { display: none; }
    .header .logo {
        flex: 0 0 auto;
        float: none !important;
        margin: 0 !important;
        height: auto !important;
        text-align: left;
    }
    .header .logo h1, .header .logo a { margin: 0 !important; display: block; }
    .header .logo img { width: auto !important; height: 36px !important; max-width: none; }
    .header .header-search {
        flex: 1 1 auto;
        float: none !important;
        width: auto !important;
        margin: 0 !important;
        display: block !important;
        position: relative;
        min-width: 0; /* uzun metinde kutu ekran disina tasmasin */
    }
    .header .header-search form { width: 100%; }
    .header .header-search .form-control {
        height: 42px;
        line-height: 42px;
        border-radius: 21px !important;
        background: #fff;
        border: 1.5px solid var(--fm-cizgi);
        padding: 0 14px 0 38px;
        font-size: 13px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, .04);
        width: 100%;
        min-width: 0;
        text-overflow: ellipsis;
    }
    /* Arama oneri listesi ekran genisligini asmasin */
    .ui-autocomplete.ui-widget-content {
        width: auto !important;
        max-width: calc(100vw - 20px);
        left: 10px !important;
        right: 10px !important;
    }
    .header .header-search button {
        left: 8px;
        right: auto;
        top: 5px;
        background: transparent;
        color: var(--fm-metin);
        font-size: 16px;
    }
    /* Eski mobil ikonlar (arama, hamburger, uye) gizlenir: menu seritte, hesap alt menude */
    .header .header-cart { display: none !important; }

    .fm-chipbar {
        display: block;
        height: 46px;
        box-sizing: border-box;
        background: #fff;
        border-bottom: 1px solid #f1f1f1;
    }
    .fm-chips { padding: 5px 0 9px; }

    /* Ust yigin: Bicazip bandi (60) + header (102) = 162 px */
    .content-area { margin-top: 162px !important; }

    /* Alt menu: 5 oge yan yana */
    .bottom-menu { display: flex !important; justify-content: space-around; align-items: flex-start; }
    .bottom-menu a { flex: 1 1 0; width: auto; min-width: 0; }
    .bottom-menu a span { display: block; white-space: nowrap; font-size: 1.1rem; }
}

/* ---------- Ana slider (dar) ---------- */
.slider { margin: 16px 0 20px !important; }
.main-slider .item {
    margin: 0 !important;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 1440 / 480; /* masaustu gorsel: 1440 x 480 px */
    background: #f2f3f5;
}
.main-slider .item > a { display: block; height: 100%; }
.main-slider .item img.slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.main-slider .owl-dots { text-align: center; margin-top: 8px; }
.main-slider .owl-dots .owl-dot { display: inline-block; }
.main-slider .owl-dots .owl-dot span {
    display: block;
    width: 6px;
    height: 6px;
    margin: 0 3px;
    border-radius: 3px;
    background: #d0d5da;
    transition: width .2s;
}
.main-slider .owl-dots .owl-dot.active span { width: 18px; background: var(--fm-ana); }
@media (max-width: 991px) {
    .slider { margin: 10px 0 14px !important; }
    /* yan bosluk .container'dan (15 px) gelir */
    .main-slider .item {
        aspect-ratio: 1080 / 450; /* mobil gorsel: 1080 x 450 px */
        border-radius: 12px;
    }
    .main-slider .owl-nav { display: none !important; }
}

/* ---------- Mobil 4'lu banner ---------- */
.fm-dortlu { display: none; }
@media (max-width: 991px) {
    .fm-dortlu {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding: 0 15px;
        margin: 6px 0 16px;
    }
    .fm-dortlu a {
        display: block;
        border-radius: 12px;
        overflow: hidden;
        aspect-ratio: 1 / 1; /* gorsel: 600 x 600 px */
        background: #f2f3f5;
    }
    .fm-dortlu img { width: 100%; height: 100%; object-fit: cover; display: block; }
}

/* ---------- Masaustu header (992 px ve ustu) ---------- */
@media (min-width: 992px) {
    .header .header-wrapper > .container {
        display: flex !important;
        align-items: center;
        gap: 28px;
        padding-top: 12px;
        padding-bottom: 12px;
    }
    .header .header-wrapper > .container:before,
    .header .header-wrapper > .container:after { display: none; }
    .header .logo { float: none !important; margin: 0 !important; flex: 0 0 auto; height: auto !important; }
    .header .logo h1, .header .logo a { margin: 0 !important; display: block; }
    .header .logo img { height: 52px; width: auto; }
    .header .header-search {
        float: none !important;
        flex: 1 1 auto;
        width: auto !important;
        max-width: 640px;
        margin: 0 auto !important;
        min-width: 0;
    }
    .header .header-search .form-control {
        height: 46px;
        line-height: 46px;
        border-radius: 23px;
        background: #f5f6f7;
        border: 1.5px solid var(--fm-cizgi);
        padding: 0 54px 0 20px;
        font-size: 14px;
        box-shadow: none;
    }
    .header .header-search .form-control:focus { background: #fff; border-color: var(--fm-ana); }
    .header .header-search button {
        top: 5px;
        right: 5px;
        width: 36px;
        height: 36px;
        padding: 0;
        line-height: 36px;
        border-radius: 50%;
        background: var(--fm-ana);
        color: #fff;
    }
    .header .header-search:hover button { color: #fff; }
    .header .header-cart { float: none !important; margin: 0 !important; flex: 0 0 auto; white-space: nowrap; }
}

/* ---------- Bicazip uygulama bandi + sabit ust yigin (mobil) ---------- */
#bicazip-app-banner { display: none; }
@media (max-width: 991px) {
    #bicazip-app-banner {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 60px;
        z-index: 1030; /* header (1040) ve acilir menu bunun ustunde kalir */
        align-items: center;
        gap: 10px;
        padding: 0 12px;
        box-sizing: border-box;
        background: #fff;
        border-bottom: 1px solid #f0f0f0;
    }
    #bicazip-app-banner img { width: 40px; height: 40px; border-radius: 9px; border: 1px solid #eee; flex: 0 0 auto; }
    #bicazip-app-banner .info-text { flex: 1 1 auto; min-width: 0; line-height: 1.25; }
    #bicazip-app-banner .info-text strong { display: block; font-size: 14px; color: #222; }
    #bicazip-app-banner .info-text span {
        display: block;
        font-size: 11.5px;
        color: #666;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    #bicazip-app-banner .btn-go {
        flex: 0 0 auto;
        background: #e91e63;
        color: #fff !important;
        text-decoration: none !important;
        padding: 7px 16px;
        border-radius: 18px;
        font-weight: 700;
        font-size: 12px;
    }

    /* Header bandin hemen altinda sabit; theme.js'in kaydirmada verdigi top degeri ezilir */
    .sticky-wrapper { top: 60px !important; z-index: 1040 !important; }
    .header { box-shadow: 0 2px 8px rgba(0, 0, 0, .05); }
    /* Firsat bandi mobilde sabit yiginin arkasinda kalacagi icin gizlenir */
    .top-bar { display: none !important; }

    /* ---------- Acilir menu (soldan cekmece) ---------- */
    .header .navigation {
        top: 0 !important;
        height: 100% !important;
        width: 300px;
        max-width: 86vw;
        z-index: 2000 !important;
        border: 0;
        box-shadow: none;
        overscroll-behavior: contain;
        transition: left .25s ease, box-shadow .25s ease;
    }
    .header .navigation.closed { left: -110% !important; }
    .header .navigation.opened {
        left: 0 !important;
        overflow-y: auto;
        /* sayfanin geri kalanini karartir */
        box-shadow: 0 0 0 100vmax rgba(15, 23, 42, .45);
    }
    .header .navigation .mobil-top {
        position: sticky;
        top: 0;
        z-index: 2;
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        height: 60px;
        padding: 0 12px 0 16px !important;
        background: #fff;
        border-bottom: 1px solid #f0f0f0;
    }
    .header .navigation .mobil-top img {
        width: auto !important;
        height: 30px !important;
        max-width: 170px;
        margin: 0 !important;
        float: none !important;
        display: block;
    }
    .header .navigation .menu-toggle-close {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        width: 36px !important;
        height: 36px;
        padding: 0 !important;
        margin: 0 !important;
        border-radius: 50%;
        background: #f3f4f6;
        border: 0;
        box-shadow: none;
    }
    .header .navigation .menu-toggle-close:hover { background: #e9ecef; }
    .header .navigation .menu-toggle-close .fa {
        width: auto !important;
        height: auto !important;
        line-height: 1 !important;
        font-size: 16px !important;
        color: var(--fm-metin) !important;
        background: transparent !important;
        border: 0 !important;
    }
}
