@import "../nouislider/nouislider.min.css";
:root {
    --main-color: #35294f;
    --accent-color: #b7b3c1;
    --border-color: #b7b4bf;
    /* Değişken tekrarları güvenli hale getirildi */
    --main: var(--main-color);
    --accent: var(--accent-color);
    --border: var(--border-color); 
}

.page-title {
	font-size: 1.4rem;
	font-weight: 600;
	margin-bottom: 4px;
}

.page-desc {
	font-size: 0.85rem;
	color: #777;
}

/* ANA KONTEYNER: Ekrana sığma ve sabitlenme ayarı */
.filter-container { 
    border: 1px solid #eee; 
    border-radius: 10px; 
    background: #fff; 
    padding: 15px; 
    position: sticky; 
    top: 140px; 
    max-height: calc(100vh - 160px); /* Ekrana sığmama sorununu çözer */
    overflow-y: auto; 
}

/* 1. Varsayılan durumda (mouse üzerinde değilken) scrollbar'ı tamamen şeffaf yap */
.filter-container::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 10px;
    transition: background 0.3s ease;
}

.filter-container::-webkit-scrollbar-track {
    background: transparent;
}

/* 2. Mouse .filter-container üzerine geldiğinde scrollbar'ı renklendir */
.filter-container:hover::-webkit-scrollbar-thumb {
    background: var(--accent-color); /* Gri tonlu yardımcı renk */
    border: 1px solid #f1f1f1; /* Kenarlardan biraz boşluk */
}

/* 3. Mouse doğrudan scrollbar'ın üzerindeyken daha belirgin yap */
.filter-container::-webkit-scrollbar-thumb:hover {
    background: var(--main-color) !important; /* Senin ana mor rengin */
}

/* 4. Firefox için (Firefox şeffaf thumb desteği kısıtlıdır, bu yüzden genişliği sıfırlıyoruz) */
.filter-container {
    scrollbar-width: none; /* Mouse dışındayken gizle */
}

.filter-container:hover {
    scrollbar-width: thin; /* Mouse üzerindeyken göster */
    scrollbar-color: var(--accent-color) transparent;
}

/* 5. Scrollbar genişliğini sabit tut (Kayma yapmaması için) */
.filter-container::-webkit-scrollbar {
    width: 6px;
}

/* GRUP BAŞLIKLARI VE OK İŞARETİ */
.filter-group {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.filter-group-title {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--main-color);
    text-transform: uppercase;
    padding: 5px 0;
    user-select: none;
}

/* Ok İşareti Ayarları */
.filter-group-title:after {
    content: '\276E'; /* İnce ok işareti */
    font-size: 10px;
    transition: transform 0.3s ease;
    transform: rotate(-90deg); /* Açık durum */
}

.filter-group.collapsed .filter-group-title:after {
    transform: rotate(0deg); /* Kapalı durum */
}

/* İKON VARSA (i etiketi) O DA DÖNSÜN */
.filter-group-title i {
    transition: transform 0.3s ease;
    font-size: 12px;
}
.filter-group.collapsed .filter-group-title i {
    transform: rotate(-90deg);
}

/* YUMUŞAK GEÇİŞ ALANI (AKORDİYON) */
.filter-content {
    max-height: 1000px; /* Büyük bir değer animasyonun akıcı olmasını sağlar */
    opacity: 1;
    /* KRİTİK: Fiyat slider balonları için defaultta visible olmalı */
    overflow: visible; 
    transition: max-height 0.5s cubic-bezier(0, 1, 0, 1), opacity 0.3s ease;
    padding-top: 10px;
}

/* Kapalı Durum: Display none kaldırıldı, yumuşatma eklendi */
.filter-group.collapsed .filter-content {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    overflow: hidden; /* Sadece kapalıyken içeriği gizler */
    /* display: none; <-- Animasyonu bozduğu için etkisizleştirildi */
}

/* LİSTE KAYDIRMA ALANI (SCROLL) */
.filter-scroll-area {
    max-height: 150px; 
    overflow-y: auto;
    margin-bottom: 10px;
    padding-right: 5px;
    /* Firefox desteği */
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) #f1f1f1;
}

/* SCROLLBAR TASARIMI (Chrome/Safari) */
.filter-scroll-area::-webkit-scrollbar, 
.filter-container::-webkit-scrollbar { width: 5px; }

.filter-scroll-area::-webkit-scrollbar-track,
.filter-container::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 10px; }

.filter-scroll-area::-webkit-scrollbar-thumb,
.filter-container::-webkit-scrollbar-thumb { 
    background: var(--accent-color); 
    border-radius: 10px; 
    transition: background 0.3s ease;
}

.filter-scroll-area::-webkit-scrollbar-thumb:hover { background: var(--main-color); }

/* CHECKBOX ÖZELLEŞTİRME */
.filter-group .form-check-input {
    cursor: pointer;
    border: 2px solid var(--border-color);
    width: 1.1em;
    height: 1.1em;
    margin-top: 0.25em;
    transition: all 0.2s ease-in-out;
}

.filter-group .form-check-input:checked {
    background-color: var(--main-color);
    border-color: var(--main-color);
}

.filter-group .form-check-label {
    cursor: pointer;
    padding-left: 5px;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.filter-group .form-check-label:hover { color: var(--main-color); }

/* FİYAT SLIDER (noUiSlider) TASARIMI */
#price-slider { 
    margin: 40px 10px 20px 10px; 
    height: 4px; 
    border: none; 
    background: #e9ecef; 
}

.noUi-connect { background: var(--main-color) !important; }

.noUi-handle {
    width: 16px !important;
    height: 16px !important;
    right: -8px !important;
    top: -7px !important;
    border-radius: 50% !important;
    background: var(--main-color) !important;
    border: 2px solid #fff !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3) !important;
    cursor: pointer !important;
    transition: transform 0.2s;
}

.noUi-handle:before, .noUi-handle:after { display: none; }
.noUi-active { transform: scale(1.2); }

.noUi-tooltip { 
    background: var(--main-color) !important; 
    color: #fff !important; 
    font-size: 10px; 
    border-radius: 4px; 
    border: none;
    padding: 2px 5px;
}

/* ARAMA KUTUSU */
.filter-search-input {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 12px;
    padding: 6px 10px;
    margin-bottom: 10px;
    width: 100%;
    background-color: #f8f9fa;
    transition: all 0.2s;
}

.filter-search-input:focus {
    background-color: #fff;
    border-color: var(--main-color);
    box-shadow: 0 0 0 3px rgba(53, 41, 79, 0.1);
    outline: none;
}

.product-card {
  border: 1px solid #f0f0f0;
  height: 100%;
  position: relative;
  background: #fff;
  transition: box-shadow .25s ease, border-color .25s ease;
}

.product-card:hover {
  border-color: rgba(53, 41, 79, 0.25);
  box-shadow:
    0 12px 28px rgba(53, 41, 79, 0.18),
    0 4px 10px rgba(53, 41, 79, 0.08);
}

.btn-price-filter { background: var(--main-color); color: white; border: none; }
.pagination .page-item.active .page-link { background-color: var(--main-color); border-color: var(--main-color); }
.pagination .page-link { color: var(--main-color); }

.custom-breadcrumb { --bs-breadcrumb-divider: '>'; font-size: .9rem; align-items: center; }
.custom-breadcrumb a { font-size: .8rem; color: #b7b4bf; text-decoration: none; transition: color .2s ease; }
.custom-breadcrumb a:hover { color: var(--main-color); }
.custom-breadcrumb .breadcrumb-item.active { font-size: .8rem; color: var(--main-color); font-weight: 600; }

/* Masaüstünde wrapper her zaman görünür olmalı */
@media (min-width: 768px) {
    .filter-main-toggle { display: none; }
    .filter-wrapper-mobile { display: block !important; height: auto !important; opacity: 1 !important; }
}

/* Mobil Özel Ayarlar */
@media (max-width: 767.98px) {
    .filter-container {
        padding: 0; /* Kenar boşluklarını mobilde sıfırlayalım */
        overflow: hidden;
    }

    .filter-main-toggle {
        padding: 15px;
        background: var(--main-color);
        color: white;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-weight: bold;
        border-radius: 8px;
    }

    .filter-wrapper-mobile {
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transition: max-height 0.5s ease-out, opacity 0.3s ease;
        padding: 0 15px; /* İçerik açılınca yanlardan boşluk */
    }

    /* Açık durum sınıfı */
    .filter-container.mobile-open .filter-wrapper-mobile {
        max-height: 2000px; /* İçeriğe göre genişlesin */
        opacity: 1;
        padding-top: 15px;
        padding-bottom: 15px;
    }

    .filter-container.mobile-open .filter-main-toggle .arrow {
        transform: rotate(180deg);
    }
}

/* --- PAGINATION SİSTEMİ (TEK VE GÜNCEL BLOK) --- */

/* Genel Liste Yapısı */
.pagination {
    gap: 8px;
    justify-content: center;
}

/* Standart Buton Durumu */
.pagination .page-link {
    color: var(--main-color) !important; /* Mor yazı */
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px !important;
    padding: 8px 16px;
    font-weight: 600;
    min-width: 44px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
}

/* 1. AKTİF BUTON (Şu an bulunulan sayfa) */
.pagination .page-item.active .page-link {
    background-color: var(--main-color) !important; /* Mor Arka Plan */
    border-color: var(--main-color) !important;
    color: #ffffff !important; /* KESİN BEYAZ YAZI */
    pointer-events: none; /* Aktif sayfaya tekrar basılmasın */
    box-shadow: 0 4px 10px rgba(53, 41, 79, 0.3) !important;
}

/* 2. ÜZERİNE GELİNDİĞİNDE (HOVER) */
.pagination .page-item:not(.active):not(.disabled) .page-link:hover {
    background-color: #fcfaff;
    color: var(--main-color) !important;
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(53, 41, 79, 0.15);
}

/* 3. ODAKLANILDIĞINDA (FOCUS - Tıklama sonrası) */
.pagination .page-link:focus {
    outline: none;
    box-shadow: 0 0 0 0.25rem rgba(53, 41, 79, 0.15) !important;
    border-color: var(--main-color);
}

/* 4. PASİF BUTONLAR (Önceki/Sonraki yoksa) */
.pagination .page-item.disabled .page-link {
    color: #ccc !important;
    background-color: #f8f9fa;
    border-color: #eee;
    pointer-events: none;
}

/* Mobil Uyumluluk */
@media (max-width: 576px) {
    .pagination { gap: 5px; }
    .pagination .page-link {
        padding: 6px 12px;
        font-size: 14px;
        min-width: 38px;
    }
}

.form-select:focus {   
	border-color: rgba(53, 41, 79, 0.8);
	box-shadow: 0 1px 1px rgba(39, 60, 104, 0.075) inset, 0 0 8px rgba(39, 60, 104, 0.6);
	outline: 0 none;
}

/* Ortak link reset */
.product-title a,
.product-brand a {
	color: inherit;
	text-decoration: none;
	transition: color .2s ease;
}

/* Hover’da hafif vurgu */
.product-title a:hover {
	color: var(--main-color);
	text-decoration: none;
}

.product-brand a:hover {
	color: var(--main-color);
}

/* Başlık */
.product-title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 14px;
	line-height: 1.3;
	font-weight: 500;
	text-align: left;
}

/* Marka */
.product-brand {
	font-size: 0.875rem;
	color: #402b57;
	font-weight: 600;
	text-align: left;
}

/* Çok uzunsa tek satıra düş */
.product-title.one-line {
	-webkit-line-clamp: 1;
}

/* Desktop biraz büyüsün */
@media (min-width: 992px) {
	.product-title { font-size: 15px; }
}


.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 3px;
}

.price-box {
  flex-shrink: 0;   /* <<< önemli */
}

.old-price {
	font-size: 0.75rem;
	color: #999;
	text-decoration: line-through;
}

.new-price {
	font-size: 1rem;
	font-weight: 700;
	color: var(--main-color);
}

.add-to-cart {
  background: #706a82;
  color: #b7b3c1;
  border: none;
  border-radius: 4px;
  padding: 6px 7px;
  display: flex;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  overflow: hidden;
  width: 36px;
  justify-content: center;
  transition: width .25s ease, background .25s ease;
}


.add-to-cart:hover {
	width: 120px;
	background: #35294f;
}

.add-to-cart .text {
	max-width: 0;
	opacity: 0;
	white-space: nowrap;
	overflow: hidden;
	transition: max-width .25s ease, opacity .2s ease;
}

.add-to-cart:hover .text {
	max-width: 100px;
	opacity: 1;
	font-size: 0.85rem;
}

.add-to-cart:hover .cart-white-icon {
    display: none; /* Veya opacity: 0; */
}

.price-normal {
	color: #111; /* normal siyah */
}

.price-discount {
	color: #1ba94c; /* yeşil fırsat rengi */
}

@media (max-width: 768px) {
  .price-row {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .price-box {
    min-width: auto;
  }

  .add-to-cart {
    width: 100%;
    min-width: 100%;
    justify-content: center;
  }

  .add-to-cart .text {
    max-width: 100%;
    opacity: 1;
    font-size: 0.9rem;
  }

  .add-to-cart:hover {
    width: 100%;
  }
}