/* Default tema — görsel overrides */

@media (max-width: 768px) {
    .product-card-modern {
        border-radius: 2px;
    }
}
/* ═══════════════════════════════════════════════════════════════
   MOBİL MENÜ (sağdan açılan panel) — v2 sade tasarım
   Yalnız GÖRÜNÜM. Açma/kapama (script.js), kategori açılır listeleri
   (toggleAccordion), dil şeridi ve bağlantılar aynen çalışır; sınıf
   adları değişmedi.
   İlke: çizgisiz satırlar, dolgusuz/çerçeveli düğmeler, tek renk ikonlar.
   Renkler panel üzerindeki --ms-* değişkenlerinden gelir (koyu / açık).
   ═══════════════════════════════════════════════════════════════ */
body .mobile-sidebar {
    --ms-bg: #1b1e23;
    --ms-text: #e9ecf0;
    --ms-muted: #8d96a3;
    --ms-line: rgba(255, 255, 255, 0.08);
    --ms-hover: rgba(255, 255, 255, 0.05);
    --ms-icon: #c7cdd5;
    --ms-accent: var(--primary-blue, #6aa9f0);            /* tema rengi */
    --ms-accent-line: rgba(var(--primary-blue-rgb, 106, 169, 240), 0.65);
    --ms-outline: rgba(255, 255, 255, 0.26);
    --ms-guest: #bcc3cc;
    --ms-sub: #b4bcc6;
    width: 310px !important;
    background: var(--ms-bg) !important;
    border-left: 1px solid var(--ms-line) !important;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.28) !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
html[data-theme="light"] body .mobile-sidebar {
    --ms-bg: #ffffff;
    --ms-text: #1a202c;
    --ms-muted: #64748b;
    --ms-line: rgba(0, 0, 0, 0.09);
    --ms-hover: rgba(0, 0, 0, 0.04);
    --ms-icon: #475569;
    --ms-accent: var(--primary-blue, #2563eb);            /* tema rengi */
    --ms-accent-line: rgba(var(--primary-blue-rgb, 37, 99, 235), 0.6);
    --ms-outline: rgba(15, 23, 42, 0.26);
    --ms-guest: #475569;
    --ms-sub: #4a5568;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.12) !important;
}

/* Başlık */
body .mobile-sidebar .sidebar-header {
    padding: 18px 20px 14px !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 0 !important;
}
body .mobile-sidebar .sidebar-title-text {
    font-size: 20px;
    font-weight: 800;
    color: var(--ms-text) !important;
}
body .mobile-sidebar .sidebar-header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}
body .mobile-sidebar .sidebar-header-actions button {
    color: var(--ms-muted) !important;
    box-shadow: none !important;
    width: auto !important;
    height: auto !important;
    border-radius: 6px !important;
}
body .mobile-sidebar .sidebar-header-actions button i { color: var(--ms-muted) !important; }
body .mobile-sidebar .sidebar-header-actions .theme-toggle-btn { font-size: 19px !important; }
body .mobile-sidebar .sidebar-header-actions .close-sidebar { font-size: 21px !important; }

/* Menü başlığındaki dil seçici (lang_switcher.php, kompakt): tema düğmesinin solunda.
   Üstteki genel "başlık düğmesi" kuralı onu ikon gibi çıplak bıraktığı için burada
   küçük bir hap olarak yeniden biçimlenir. */
body .mobile-sidebar .sidebar-header-actions .lang-switcher { display: inline-flex; }
body .mobile-sidebar .sidebar-header-actions .lang-trigger {
    height: 32px !important;
    width: auto !important;
    padding: 0 8px !important;
    gap: 5px;
    border-radius: 8px !important;
    background: var(--ms-hover) !important;
    border: 1px solid var(--ms-line) !important;
    color: var(--ms-text) !important;
}
body .mobile-sidebar .sidebar-header-actions .lang-trigger .lang-caret { opacity: 0.7; }
/* Dil listesi gövdeye taşınan ayrı bir kutu (z-index 1200); menü paneli 11000 olduğu
   için panel açıkken listenin onun ÜSTÜNDE çizilmesi gerekir. */
body.mobile-menu-open .lang-menu { z-index: 11050 !important; }
body .mobile-sidebar .sidebar-content {
    padding: 4px 20px 90px 20px !important;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Üye / misafir bölümü */
body .mobile-sidebar .sidebar-auth-section {
    margin-top: 4px !important;
    margin-bottom: 18px !important;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--ms-line);
}
body .mobile-sidebar .guest-btns-container,
body .mobile-sidebar .sidebar-user-actions {
    display: flex;
    gap: 10px;
    width: 100%;
}
body .mobile-sidebar .sidebar-guest-btn,
body .mobile-sidebar .sidebar-balance-btn,
body .mobile-sidebar .sidebar-profile-btn {
    flex: 1;
    height: 42px;
    border-radius: 7px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    background: transparent !important;
    box-shadow: none !important;
    transition: background 0.15s ease, transform 0.15s ease;
}
body .mobile-sidebar .sidebar-guest-btn:active,
body .mobile-sidebar .sidebar-balance-btn:active,
body .mobile-sidebar .sidebar-profile-btn:active { transform: scale(0.97); }

/* Misafir düğmeleri: biçim aynı (çerçeveli, büyük harf, ikonlu); RENK sitenin tema
   renginden gelir (--primary-blue — Admin > Tema'da ne seçildiyse o), ana sayfadaki
   Kayıt Ol / Giriş Yap düğmeleriyle aynı mantık: Kayıt Ol dolu tema rengi, Giriş Yap
   aynı rengin koyu/soluk tonu. Tema rengi değişince kendiliğinden uyar. */
body .mobile-sidebar .sidebar-guest-btn.login-btn,
body .mobile-sidebar .sidebar-guest-btn.register-btn {
    border: 1px solid var(--primary-blue, #3b82f6) !important;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}
body .mobile-sidebar .sidebar-guest-btn.register-btn {
    background: var(--primary-blue, #3b82f6) !important;
    color: #ffffff !important;
}
body .mobile-sidebar .sidebar-guest-btn.login-btn {
    background: rgba(var(--primary-blue-rgb, 59, 130, 246), 0.16) !important;
    color: var(--primary-blue, #3b82f6) !important;
}
body .mobile-sidebar .sidebar-guest-btn i { font-size: 13px; opacity: 0.95; }
body .mobile-sidebar .sidebar-guest-btn.register-btn:hover { filter: brightness(1.08); }
body .mobile-sidebar .sidebar-guest-btn.login-btn:hover { background: rgba(var(--primary-blue-rgb, 59, 130, 246), 0.26) !important; }

/* Üye: avatar + ad + bakiye, altında iki mavi çerçeveli düğme */
body .mobile-sidebar .user-info-sidebar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}
body .mobile-sidebar .user-avatar i {
    font-size: 48px;
    color: var(--ms-accent) !important;
}
body .mobile-sidebar .user-details { display: flex; flex-direction: column; min-width: 0; }
body .mobile-sidebar .user-name-label {
    display: block !important;
    font-weight: 800 !important;
    font-size: 17px !important;
    color: var(--ms-text) !important;
    margin-bottom: 3px !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
body .mobile-sidebar .user-balance-label {
    display: block !important;
    font-size: 14px !important;
    color: var(--ms-muted) !important;
}
body .mobile-sidebar .user-balance-label strong {
    color: var(--ms-muted) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
}
body .mobile-sidebar .sidebar-balance-btn,
body .mobile-sidebar .sidebar-profile-btn {
    border: 1px solid var(--ms-accent-line) !important;
    color: var(--ms-accent) !important;
}
body .mobile-sidebar .sidebar-balance-btn:hover,
body .mobile-sidebar .sidebar-profile-btn:hover { background: var(--ms-hover) !important; }

/* Bölüm başlığı ve ayırıcı */
body .mobile-sidebar .sidebar-section-title {
    font-size: 12.5px !important;
    font-weight: 700 !important;
    letter-spacing: 0.6px !important;
    text-transform: uppercase;
    color: var(--ms-muted) !important;
    opacity: 1 !important;
    margin: 6px 0 6px 2px !important;
}
body .mobile-sidebar .sidebar-divider {
    height: 1px;
    background: var(--ms-line) !important;
    margin: 14px 0 16px !important;
}

/* Açılır/kapanır MENÜ başlığı (header.php: #sidebarMenuToggle + #sidebarMenuLinks).
   Varsayılan kapalı; .is-open sınıfını sidebarMenuAcKapa() ekler. Diğer temalarda bu
   kurallar yoksa bağlantılar hep açık görünür (kapsayıcı düz bir div'dir). */
body .mobile-sidebar .sidebar-section-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 9px 8px 9px 2px;
    margin: 0 !important;
    background: none;
    border: 0;
    border-radius: 8px;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
body .mobile-sidebar .sidebar-section-toggle:hover { background: var(--ms-hover); }
body .mobile-sidebar .sidebar-section-toggle i {
    font-size: 12px;
    color: var(--ms-accent);
    transition: transform 0.25s ease;
}
body .mobile-sidebar .sidebar-section-toggle.is-open i { transform: rotate(180deg); }
body .mobile-sidebar .sidebar-menu-collapse {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
body .mobile-sidebar .sidebar-menu-collapse.is-open { max-height: 640px; padding-top: 2px; }
/* Menü satırları: çizgisiz, girintili, tek renk ikon */
body .mobile-sidebar .sidebar-nav-container { display: flex; flex-direction: column; }
body .mobile-sidebar .sidebar-nav-item,
body .mobile-sidebar .accordion-header-link {
    display: flex;
    align-items: center;
    justify-content: flex-start !important;
    gap: 14px !important;
    padding: 10px 8px 10px 20px;
    border-bottom: 0 !important;
    border-radius: 8px;
    text-decoration: none;
    font-size: 15.5px;
    font-weight: 600;
    color: var(--ms-text) !important;
    cursor: pointer;
    transition: background 0.2s ease;
}
body .mobile-sidebar .sidebar-nav-item .menu-icon {
    width: 22px;
    text-align: center;
    font-size: 17px;
    color: var(--ms-icon) !important;
    opacity: 1;
}
body .mobile-sidebar .sidebar-nav-item:hover,
body .mobile-sidebar .accordion-header:hover,
body .mobile-sidebar .accordion-header-link:hover { background: var(--ms-hover) !important; }

/* Kategoriler */
body .mobile-sidebar .accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between !important;
    padding: 7px 8px;
    border-bottom: 0 !important;
    border-radius: 8px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    color: var(--ms-text) !important;
    cursor: pointer;
    transition: background 0.2s ease;
}
body .mobile-sidebar .accordion-header-link { padding: 7px 8px; font-size: 16px; }
body .mobile-sidebar .accordion-header-left { display: flex; align-items: center; gap: 13px; min-width: 0; }
body .mobile-sidebar .category-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body .mobile-sidebar .category-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px var(--ms-line);
}
body .mobile-sidebar .category-icon-placeholder {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
    color: var(--ms-icon) !important;
    box-shadow: 0 0 0 1px var(--ms-line);
}
body .mobile-sidebar .accordion-chevron {
    font-size: 12px;
    color: var(--ms-accent) !important;
    opacity: 0.95;
    transition: transform 0.25s ease, opacity 0.2s ease;
}
body .mobile-sidebar .accordion-collapse {
    max-height: 0;
    overflow: hidden;
    background: transparent !important;
    transition: max-height 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
body .mobile-sidebar .accordion-body { padding: 2px 0 6px; display: flex; flex-direction: column; }
body .mobile-sidebar .subcategory-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 8px 9px 51px;
    border-bottom: 0 !important;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--ms-sub) !important;
    transition: background 0.2s ease, color 0.2s ease;
}
body .mobile-sidebar .subcategory-item:hover { background: var(--ms-hover) !important; color: var(--ms-text) !important; }
body .mobile-sidebar .subcategory-icon { width: 20px; height: 20px; border-radius: 4px; object-fit: cover; }
body .mobile-sidebar .subcategory-bullet { font-size: 6px; width: 20px; text-align: center; color: var(--ms-muted) !important; opacity: 0.8; }

/* ═══════════════════════════════════════════════════════════════
   BASİT TAB GÖRÜNÜMÜ (Admin > Tema Ayarları > Tab Görünümü: Basit)
   YALNIZCA sekme (tab) butonlarını sadeleştirir. Başlık, ikon,
   "Tüm İlanlar" butonu ve diğer her şey varsayılanla birebir aynı
   kalır. .tab-view-simple sınıfı yokken hiçbir etkisi yoktur.
   ═══════════════════════════════════════════════════════════════ */

html body .showcase-tabs.tab-view-simple,
html body .firsatlar-tabs.tab-view-simple {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid var(--border-color) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 0 4px 10px 4px !important;
    gap: 20px !important;
    margin: 4px 0 18px 0 !important;
}
html body .showcase-tabs.tab-view-simple .showcase-tab,
html body .firsatlar-tabs.tab-view-simple .firsatlar-tab {
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: var(--text-muted) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.4px !important;
    padding: 4px 2px 10px 2px !important;
    margin-bottom: -11px !important;
    transform: none !important;
}
html body .firsatlar-tabs.tab-view-simple .firsatlar-tab img {
    display: none !important; /* Basit görünümde sekme ikonları gizlenir */
}
html body .showcase-tabs.tab-view-simple .showcase-tab:hover,
html body .firsatlar-tabs.tab-view-simple .firsatlar-tab:hover {
    color: var(--text-color) !important;
    background: transparent !important;
    border-bottom-color: var(--border-color) !important;
    transform: none !important;
    box-shadow: none !important;
}
html body .showcase-tabs.tab-view-simple .showcase-tab.active,
html body .firsatlar-tabs.tab-view-simple .firsatlar-tab.active {
    background: transparent !important;
    color: var(--text-color) !important;
    border-bottom: 2px solid var(--primary-blue) !important;
    box-shadow: none !important;
}

/* Basit görünümde, kutulu (varsayılan) sekmeden kalan efektler kapatılır.
   base.css bunları .showcase-tab için tanımlıyor ve yukarıdaki kurallar
   yalnız kutuyu sıfırladığı için efektler çalışmaya devam ediyordu:
     • backdrop-filter: blur — sekme, altından geçen ayırıcı çizginin üstüne
       oturur (margin-bottom: -11px); bulanıklık çizgiyi sekme genişliğince
       siliyor, çizgi kopuk görünüyordu.
     • .active::before (parlama süpürmesi) ve .active::after (bulanık, nefes
       alan ışık çubuğu) — alt çizginin altında silik bir leke bırakıyordu.
     • overflow: hidden + yaylanan "all" geçişi — sekme değişirken titreme.
   Kutulu görünüm (.tab-view-simple yokken) bu kurallardan etkilenmez. */
html body .showcase-tabs.tab-view-simple .showcase-tab {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    overflow: visible !important;
    opacity: 1 !important;
    transition: color 0.2s ease, border-color 0.2s ease !important;
    /* Seçili olmayan sekme --text-muted ile renkli/gradyan zeminde okunmuyordu;
       metin rengine yaklaştırılır (seçili sekmeden hâlâ belirgin biçimde soluk).
       color-mix desteklenmezse üstteki --text-muted kuralı geçerli kalır. */
    color: color-mix(in srgb, var(--text-color) 62%, var(--text-muted)) !important;
}
html body .showcase-tabs.tab-view-simple .showcase-tab::before,
html body .showcase-tabs.tab-view-simple .showcase-tab::after {
    content: none !important;
    display: none !important;
    animation: none !important;
}

/* Mobil: sekmeler tek satırda yatay kaydırılabilir kalır, taşma yapmaz */
@media (max-width: 768px) {
    html body .showcase-tabs.tab-view-simple,
    html body .firsatlar-tabs.tab-view-simple {
        gap: 14px !important;
        padding: 0 2px 8px 2px !important;
        margin: 2px 0 14px 0 !important;
    }
    html body .showcase-tabs.tab-view-simple .showcase-tab,
    html body .firsatlar-tabs.tab-view-simple .firsatlar-tab {
        font-size: 12px !important;
        margin-bottom: -9px !important;
        white-space: nowrap !important;
    }
}

/* ── Basit Görünüm: Başlık Barı (masaüstü) ─────────────────────
   Kategori başlığını yuvarlatılmış sade bir kart bara dönüştürür.
   Yalnızca .tab-view-simple aktifken geçerlidir. */
html body .showcase-section.tab-view-simple .showcase-header {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 10px !important;
    padding: 14px 20px !important;
    box-shadow: var(--shadow-sm) !important;
}
html[data-theme="light"] body .showcase-section.tab-view-simple .showcase-header {
    background: #f7f8fa !important;
    border-color: rgba(0, 0, 0, 0.06) !important;
}
html body .showcase-section.tab-view-simple .showcase-header {
    margin-bottom: 18px !important;
}
html body .showcase-section.tab-view-simple .showcase-title-wrapper {
    gap: 12px !important;
}
html body .showcase-section.tab-view-simple .showcase-title {
    font-size: 17px !important;
    font-weight: 800 !important;
    letter-spacing: 0.1px !important;
}
html body .showcase-section.tab-view-simple .showcase-title-icon {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    width: 40px !important;
    height: 40px !important;
}
html body .showcase-section.tab-view-simple .showcase-title-icon i {
    font-size: 18px !important;
}
html body .showcase-section.tab-view-simple .showcase-custom-icon {
    width: 30px !important;
    height: 30px !important;
}
html body .showcase-section.tab-view-simple .showcase-title-icon::after {
    display: none !important;
    animation: none !important;
}
html body .showcase-section.tab-view-simple .showcase-title-icon i {
    filter: none !important;
}
html body .showcase-section.tab-view-simple .showcase-custom-icon {
    filter: none !important;
}
html body .showcase-section.tab-view-simple .view-all-link {
    background: transparent !important;
    border: 1.5px solid var(--border-color) !important;
    color: var(--text-color) !important;
    border-radius: 8px !important;
    padding: 9px 16px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    font-size: 11.5px !important;
    font-weight: 800 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
}
html[data-theme="light"] body .showcase-section.tab-view-simple .view-all-link {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
}
html body .showcase-section.tab-view-simple .view-all-link:hover {
    border-color: var(--primary-blue) !important;
    color: var(--primary-blue) !important;
    background: rgba(var(--primary-blue-rgb), 0.05) !important;
    transform: none !important;
}

/* ── Basit Görünüm: Mobil (varsayılanın mobil ölçüleri korunur,
      sadece kompakt bar arka planı eklenir — taşma/bozulma yok) ── */
@media (max-width: 768px) {
    html body .showcase-section.tab-view-simple .showcase-header {
        padding: 9px 12px !important;
        border-radius: 8px !important;
        gap: 6px !important;
        flex-wrap: nowrap !important;
    }
    /* Başlık ve ikon ölçüleri varsayılan mobil değerlerinde kalır */
    html body .showcase-section.tab-view-simple .showcase-title {
        font-size: 13px !important;
        white-space: nowrap !important;
        line-height: 1 !important;
        letter-spacing: -0.2px !important;
        max-width: none !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important; /* uzun başlık butona taşmasın */
    }
    html body .showcase-section.tab-view-simple .showcase-title-wrapper {
        flex: 1 !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }
    html body .showcase-section.tab-view-simple .showcase-title-icon {
        width: 30px !important;
        height: 30px !important;
        flex-shrink: 0 !important;
    }
    html body .showcase-section.tab-view-simple .showcase-title-icon i {
        font-size: 14px !important;
    }
    html body .showcase-section.tab-view-simple .view-all-link {
        padding: 6px 10px !important;
        font-size: 10px !important;
        letter-spacing: 0.4px !important;
        flex-shrink: 0 !important;
        white-space: nowrap !important;
    }
}
