/* -----------------------------------------------------------
   YENİ SIDEBAR TASARIMI (KART GÖRÜNÜMÜ)
   ----------------------------------------------------------- */

/* Sidebar Ana Kutusu */
.sidebar-panel {
    background: #ffffff;
    border: 0;
    padding: 25px 20px;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.05);
    height: calc(100vh - 150px);
    position: sticky;
    top: 25px;
    overflow-y: auto;
}

/* Sidebar Başlık Alanı */
.sidebar-header {
    position: -webkit-sticky;
    position: sticky;
    top: -25px;

    z-index: 1000;
    background-color: #ffffff;
    padding-top: 10px;
    padding-bottom: 20px;
    margin-bottom: 15px;
    border-bottom: 1px solid #f1f3f9;
    transition: box-shadow 0.3s ease;

}

#sticky-sentinel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px; /* Sadece 1px yüksekliğinde */
    visibility: hidden;
    pointer-events: none;
}


.sidebar-header-shadow{
    -webkit-box-shadow: 0px 18px 25px -5px #f1f3f9;
    -moz-box-shadow: 0px 18px 25px -5px #f1f3f9;
    box-shadow: 0px 18px 25px -5px #f1f3f9;
}

.sidebar-title {
    font-weight: 800;
    color: #1a1c24;
    font-size: 1.2rem;
    margin: 0;
}

.sidebar-subtitle {
    font-size: 0.8rem;
    color: #858796;
}

/* Ürün Kartı (Nav Item) */
.products-nav .nav-item {
    display: flex;
    /* Yan yana dizilim için */
    align-items: center;
    background: #ffffff;

    /* Referans resimdeki kesik çizgi efekti */
    border: 1px dashed #d1d3e2;
    border-radius: 12px;

    padding: 15px;
    margin-bottom: 15px;
    /* Kartlar arası boşluk */
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    position: relative;
}

/* Kartın Solundaki Resim Alanı */
.card-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background-color: #f8f9fc;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    overflow: hidden;
    flex-shrink: 0;
    /* Küçülmesini engelle */
}

.card-icon-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Varsayılan İkon (Resim yoksa) */
.card-icon-placeholder {
    font-size: 20px;
    color: #0044cc;
}

/* Yazı Alanı */
.card-info {
    flex-grow: 1;
    overflow: hidden;
    /* Taşmayı engelle */
}

.product-name {
    display: block;
    font-weight: 700;
    color: #2e3440;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Sığmazsa üç nokta koy */
}

.product-description{
    display: block;
    font-size: 0.8rem;
    color: #686975;
    margin-top: 2px;
}
.product-code {
    display: block;
    font-size: 0.75rem;
    color: #858796;
    margin-top: 2px;
}

/* Sağdaki Üç Nokta veya Ok İkonu */
.card-action {
    color: #d1d3e2;
    transition: color 0.2s;
}

/* HOVER DURUMU */
.products-nav .nav-item:hover {
    border-color: #0044cc;
    /* Çerçeve mavi olsun */
    background-color: #fff;
    transform: translateY(-2px);
    /* Hafif yukarı kalksın */
    box-shadow: 0 5px 15px rgba(0, 68, 204, 0.05);
}

/* AKTİF (SEÇİLİ) DURUM */
.products-nav .nav-item.active {
    background-color: #f0f4ff;
    /* Çok açık mavi zemin */
    border: 1px solid #0044cc;
    /* Kesik çizgi yerine DÜZ MAVİ çizgi */
}

.products-nav .nav-item.active .product-name {
    color: #0044cc;
}

.products-nav .nav-item.active .card-icon-wrapper {
    background-color: #ffffff;
    border: 1px solid #cce0ff;
}

/* Scrollbar Tasarımı */
.sidebar-panel::-webkit-scrollbar {
    width: 5px;
}

.sidebar-panel::-webkit-scrollbar-thumb {
    background: #e3e6f0;
    border-radius: 10px;
}

.sidebar-panel::-webkit-scrollbar-thumb:hover {
    background: #0044cc;
}


@media (max-width: 1024px) {
    
    /* 1. Eski Sidebar kolonunu tamamen gizle */
    .col-md-3.col-lg-3.hide-mobile,
    .sidebar-panel {
        display: none !important;
    }

    /* 2. Ana içerik alanını tam genişliğe yay (col-9'dan col-12 gibi davranmasını sağla) */
    .col-md-9.col-lg-9 {
        flex: 0 0 100%;
        max-width: 100%;
        padding-left: 15px; /* Mobilde kenar boşluklarını biraz azaltalım */
        padding-right: 15px;
    }

    /* 3. Yeni eklediğimiz Selectbox'ı görünür yap */
    .mobile-product-selector.d-none {
        display: block !important;
    }
}