/* ================================================================
   style.css — Proser Store
   ================================================================ */

/* --- GENEL --- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f9;
    overflow-x: hidden;
    margin: 0;
    /* Fixed navbar yüksekliği kadar boşluk — içerik arkasına girmesin */
    padding-top: 58px;
}

/* ================================================================
   OVERLAY — mobil menü karartması (her zaman tanımlı, varsayılan gizli)
   ================================================================ */
.overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
}
.overlay.aktif { display: block; }

/* ================================================================
   SIDEBAR
   ================================================================ */
.sidebar {
    height: 100vh;
    width: 220px;
    position: fixed;
    top: 0;
    left: 0;
    background-color: #0f172a;
    color: #fff;
    z-index: 1050;
    transition: left 0.3s ease-in-out, box-shadow 0.3s;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Scrollbar sidebar içinde ince olsun */
.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }

/* Logo alanı */
.sidebar-brand-box {
    padding: 15px 10px 5px 10px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar hr {
    margin: 5px 15px 10px 15px;
    opacity: 0.1;
    flex-shrink: 0;
}

/* Nav linkleri */
.sidebar .nav-link {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    padding: 8px 15px;
    margin: 2px 10px;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    white-space: nowrap;
}
.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateX(3px);
}
.sidebar .nav-link.active {
    background: #3b82f6;
    color: #fff;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

/* Kategori grup başlığı */
.kategori-baslik {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 25px 5px;
    flex-shrink: 0;
}

/* Kategori linkleri */
.kategori-item {
    font-size: 12px;
    padding: 6px 15px 6px 25px;
    color: rgba(255, 255, 255, 0.5);
    display: block;
    text-decoration: none;
    transition: color 0.2s, padding-left 0.2s, background 0.2s;
    border-left: 3px solid transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.kategori-item:hover {
    color: #3b82f6;
    padding-left: 30px;
    background: rgba(59, 130, 246, 0.05);
}
.kategori-item.active {
    color: #fff;
    border-left-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    font-weight: bold;
}
.kategori-item i {
    font-size: 8px;
    margin-right: 8px;
    opacity: 0.5;
}

/* ================================================================
   İÇERİK ALANI — masaüstü
   ================================================================ */
.main-content {
    margin-left: 220px;
    padding: 20px;
    transition: margin-left 0.3s ease-in-out;
    min-height: 100vh;
    /* Navbar sticky-top zaten content içinde olduğu için extra padding-top gereksiz */
}

/* ================================================================
   ÜRÜN KARTLARI
   ================================================================ */
.urun-kart {
    border: none;
    border-radius: 12px;
    background: #fff;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.urun-kart:hover {
    transform: translateY(-7px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1);
}
.urun-kart .card-body { padding: 1rem; }
.urun-kart .fiyat { color: #198754; font-size: 1.2rem; font-weight: 800; }

/* ================================================================
   NAVBAR — position:fixed olduğu için masaüstünde sidebar kadar sola boşluk
   ================================================================ */
.navbar-fixed {
    position: fixed !important;
    top: 0;
    left: 220px;   /* sidebar genişliği */
    right: 0;
    z-index: 1031;
    width: auto;
}

/* ================================================================
   FİLTRE SCROLL WRAPPER
   ================================================================ */
.filtre-scroll-wrap {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.filtre-scroll-wrap::-webkit-scrollbar { display: none; }

/* ================================================================
   MOBİL — max-width: 991px
   ================================================================ */
@media (max-width: 991.98px) {

    .sidebar {
        left: -240px;
        width: 220px;
        box-shadow: none;
    }
    .sidebar.aktif {
        left: 0;
        box-shadow: 6px 0 24px rgba(0, 0, 0, 0.35);
    }

    /* Mobilde navbar tüm genişliği kaplar */
    .navbar-fixed {
        left: 0 !important;
    }

    .main-content {
        margin-left: 0;
        padding: 0;
    }

    .table-responsive { -webkit-overflow-scrolling: touch; }
}

@media (max-width: 767.98px) {
    /* Mobilde tek sütun (col-6 olan kartlar için) */
    .row.g-4 > .col-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    .urun-kart h6 { font-size: 0.85rem; }
    .urun-kart .fiyat { font-size: 1rem; }
    .urun-kart .btn { font-size: 0.75rem; padding: 4px 8px; }
}

/* ================================================================
   YAZDIRMA
   ================================================================ */
@media print {
    .no-print, .sidebar { display: none !important; }
    .main-content { margin-left: 0 !important; padding: 0 !important; }
}
