/* ==============================================
   GLOBAL FİLTRE SİSTEMİ — ateşsönmez
   Tüm sayfalarda ortak kullanılır
=============================================== */

:root {
  --f-blue:      #2f5f9b;
  --f-blue-dark: #1f3f6b;
  --f-blue-light:#4f7fc1;
  --f-border:    #e5e7eb;
  --f-bg:        #f4f6f9;
  --f-hover:     #f1f5fb;
  --f-radius:    12px;
}

/* ---- LAYOUT ---- */
.urun-page {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 28px;
  padding: 32px 20px;
  box-sizing: border-box;
}

/* ---- FİLTRE PANELİ ---- */
.urun-filter {
  width: 260px;
  min-width: 260px;
  background: #fff;
  border-radius: var(--f-radius);
  padding: 20px;
  border: 1px solid var(--f-border);
  box-shadow: 0 4px 16px rgba(0,0,0,.05);
  position: sticky;
    top: 200px;
  max-height: calc(100vh - 155px);
  overflow-y: auto;
  box-sizing: border-box;
}

/* scrollbar */
.urun-filter::-webkit-scrollbar { width: 4px; }
.urun-filter::-webkit-scrollbar-track { background: transparent; }
.urun-filter::-webkit-scrollbar-thumb { background: #d0d8e8; border-radius: 4px; }

/* ---- PANEL BAŞLIK ---- */
.filter-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 17px;
  font-weight: 700;
  color: var(--f-blue-dark);
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--f-border);
}

.filter-panel-close {
  display: none;
  cursor: pointer;
  font-size: 20px;
  color: #999;
  line-height: 1;
}



/* ---- FİLTRE BLOĞU ---- */
.filter-item {
  margin-bottom: 4px;
  border-radius: 8px;
  overflow: hidden;
}

/* ---- BLOK BAŞLIĞI ---- */
.filter-header {
  font-size: 11px;
  font-weight: 800;
  color: var(--f-blue);
  letter-spacing: .6px;
  text-transform: uppercase;
  padding: 10px 4px;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 6px;
  transition: background .15s;
}

.filter-header:hover { background: var(--f-hover); }

/* ok — sadece MARKALAR dışındakilere */
.filter-item:not(.brand-filter) .filter-header::after {
  content: "▾";
  font-size: 11px;
  color: #8fa0bb;
  transition: transform .2s;
}

.filter-item.active:not(.brand-filter) .filter-header::after {
  transform: rotate(180deg);
}

/* ---- İÇERİK ALANI ---- */
.filter-content {
  display: none;
  padding: 4px 0 8px;
}

.filter-item.active .filter-content {
  display: block;
}

/* ---- MARKALAR ---- */
.brand-filter .filter-content,
.brand-filter .brand-list { display: block !important; }

.brand-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0 8px;
}

.brand-list a {
  display: block;
  font-size: 13.5px;
  font-weight: 500;
  color: #333;
  text-decoration: none;
  padding: 7px 8px;
  border-radius: 6px;
  transition: .18s;
}

.brand-list a:hover {
  color: var(--f-blue);
  background: var(--f-hover);
  padding-left: 12px;
}

/* aktif sayfa markası vurgula */
.brand-list a.active {
  color: var(--f-blue);
  font-weight: 700;
  background: #eaf0fb;
}

/* ---- CHECKBOX ---- */
.filter-content label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 500;
  color: #444;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s;
  margin: 0;
}

.filter-content label:hover { background: var(--f-hover); }

.filter-content label span { flex: 1; }

.filter-content input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--f-blue);
  cursor: pointer;
  flex-shrink: 0;
}

/* ---- SELECT ---- */
.filter-select {
  width: 100%;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid var(--f-border);
  background: #fafafa;
  font-size: 13px;
  color: #333;
  margin-top: 6px;
  cursor: pointer;
  outline: none;
  transition: border .2s;
}

.filter-select:focus { border-color: var(--f-blue); }

/* ---- UYGULA BUTONU ---- */
.filter-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .4px;
  color: #fff;
  margin-top: 14px;
  background: linear-gradient(90deg, var(--f-blue), var(--f-blue-light));
  cursor: pointer;
  transition: .25s;
}

.filter-btn:hover {
  background: linear-gradient(90deg, var(--f-blue-dark), var(--f-blue));
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(47,95,155,.25);
}

/* ---- MOBİL FİLTRE AÇ BUTONU ---- */
.filter-toggle-btn {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--f-blue);
  background: #fff;
  color: var(--f-blue);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 16px;
}

/* ---- OVERLAY ---- */
.filter-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 9998;
}

.filter-overlay.active { display: block; }

/* ---- ÜRÜN GRID ---- */
.urun-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 22px;
  min-width: 0;
}

/* ---- ÜRÜN KARTI ---- */
.urun-kutu {
  background: #fff;
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  border: 1px solid var(--f-border);
  transition: .25s;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.urun-kutu:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 32px rgba(47,95,155,.13);
  border-color: #c5d4ed;
}

.urun-kutu img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: contain;
  background: #f6f8fc;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
  transition: transform .3s;
}

.urun-kutu:hover img { transform: scale(1.05); }

.urun-kutu h3 {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  line-height: 1.4;
}

/* ---- POPUP ---- */
.popup-container {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  display: none;
  z-index: 10000;
}

.popup-container.open {
  display: block;
}

.popup-box {
  position: fixed;
  top: 15%;
  left: 0;
  right: 0;
  margin-left: auto;
  margin-right: auto;
  width: 90%;
  max-width: 380px;
  height: fit-content;
  background: #fff;
  padding: 28px 24px 22px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}

.popup-box img {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
}

.popup-box h3 {
  font-size: 15px;
  font-weight: 700;
  margin-top: 14px;
  color: #222;
}

.popup-close {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 20px;
  cursor: pointer;
  color: #888;
  line-height: 1;
  transition: color .2s;
}

.popup-close:hover { color: #222; }

/* =====================
   RESPONSIVE
===================== */

@media (max-width: 1024px) {
  .urun-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

@media (max-width: 900px) {
  .urun-page {
    flex-direction: column;
    padding: 20px 16px;
  }

  .filter-toggle-btn { display: flex; }

  .urun-filter {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0 16px 16px 0;
    z-index: 9999;
    transform: translateX(-105%);
    transition: transform .32s ease;
    overflow-y: auto;
    box-shadow: 4px 0 24px rgba(0,0,0,.12);
  }

  .urun-filter.panel-open {
    transform: translateX(0);
  }

  .filter-panel-close { display: block; }

  .urun-grid {
    width: 100%;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .urun-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .urun-kutu { padding: 14px 12px; }
}
/* Mobil filtre — her iki class adını da destekle */
.urun-filter.active {
  transform: translateX(0) !important;
}