/* ══ [mtgbox_referanslar] — kategori filtreli grid + lightbox ══════════════ */

/* Sayfa bölümü — mtgbox kart tasarım dili: radius'lu kutu + ince kenar + ışık gradyanı */
.mtgref-section{
  position:relative;
  max-width:1280px;
  margin:24px auto;
  padding:48px 32px 56px;
  border-radius:22px;
  border:1px solid rgba(31,143,74,.16);
  background:
    radial-gradient(900px 360px at 50% -6%, rgba(255,212,42,.16), transparent 60%),
    linear-gradient(180deg,#f6faf7 0%,#eef4ef 100%);
  box-shadow:0 8px 30px rgba(15,60,30,.06);
  overflow:hidden;
}
.mtgref-section-inner{max-width:1240px;margin:0 auto}
/* Başlık bandı — panel tp-order-header ile aynı görünüm (bağımsız, .tag-panel gerekmez) */
.mtgref-section .tp-order-header{text-align:center;margin-bottom:30px}
.mtgref-section .tp-badge{display:inline-flex;align-items:center;gap:8px;white-space:nowrap;font:800 11px/1 ui-monospace,"SF Mono",Menlo,monospace;letter-spacing:1.6px;text-transform:uppercase;color:#555;background:rgba(255,212,42,.12);border:1px solid rgba(255,212,42,.45);padding:8px 14px;border-radius:999px;margin-bottom:14px}
.mtgref-section .tp-dot{width:6px;height:6px;border-radius:50%;background:#FFD42A;box-shadow:0 0 10px #FFD42A}
.mtgref-section .tp-order-title{margin:0;font-size:clamp(22px,4vw,30px);font-weight:900;line-height:1.12;letter-spacing:-.7px;color:#0F2210}
.mtgref-section .tp-accent{color:#0F2210;background:linear-gradient(180deg,transparent 60%,rgba(255,212,42,.55) 60%);padding:0 2px}

.mtgref-list{--mtgref-cols:4;max-width:1200px;margin:0 auto}
.mtgref-list-empty{text-align:center;padding:40px 16px;color:#6a726c;font-weight:600}

/* ── Filtre çubukları (iki eksen: Sektör + Kategori) ── */
.mtgref-filters{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin:0 0 24px;
}
.mtgref-filterbar{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  justify-content:center;
}
.mtgref-filterlbl{
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.5px;
  color:#6a726c;
  margin-right:4px;
}
/* Cascading: alt çubuk (bir ana seçilince belirir) */
.mtgref-filterbar[hidden]{display:none}
.mtgref-fb-alt{border-top:1px dashed #e0e4e0;padding-top:10px;margin-top:2px}

/* Alt filtre — aranabilir dropdown */
.mtgref-altselect{position:relative;display:inline-block}
.mtgref-altselect-btn{
  display:inline-flex;align-items:center;gap:10px;
  min-width:220px;justify-content:space-between;
  padding:9px 16px;border:1px solid #cfe6d5;background:#fff;
  border-radius:999px;font-size:13.5px;font-weight:700;color:#2f3a31;cursor:pointer;
  transition:border-color .18s ease,box-shadow .18s ease;
}
.mtgref-altselect-btn:hover{border-color:#1f8f4a}
.mtgref-altselect.is-open .mtgref-altselect-btn{border-color:#1f8f4a;box-shadow:0 0 0 3px rgba(31,143,74,.12)}
.mtgref-altselect-arrow{transition:transform .2s ease;color:#1f8f4a}
.mtgref-altselect.is-open .mtgref-altselect-arrow{transform:rotate(180deg)}
.mtgref-altselect-panel{
  position:absolute;top:calc(100% + 8px);left:50%;transform:translateX(-50%);z-index:30;
  width:280px;max-width:86vw;background:#fff;border:1px solid #dfe5df;border-radius:14px;
  box-shadow:0 12px 34px rgba(15,60,30,.16);padding:10px;
}
.mtgref-altselect-search{
  width:100%;box-sizing:border-box;padding:9px 12px;
  border:1px solid #dfe5df;border-radius:9px;font-size:13px;outline:none;
}
.mtgref-altselect-search:focus{border-color:#1f8f4a}
.mtgref-altselect-list{list-style:none;margin:8px 0 0;padding:0;max-height:260px;overflow-y:auto}
.mtgref-altselect-list li{
  padding:9px 12px;border-radius:8px;font-size:13px;color:#2f3a31;cursor:pointer;
  transition:background .12s ease;text-align:left;
}
.mtgref-altselect-list li:hover{background:#eef7f0}
.mtgref-altselect-list li.is-active{background:#dff2e4;color:#0f5a2c;font-weight:800}
.mtgref-altselect-bos{margin:8px 4px 2px;color:#8a8f94;font-size:12.5px;text-align:center}

/* Ana kategori: buton (tek satır) + altında sürekli özellik badge (e-ticaret etiketi gibi) */
.mtgref-fb-ana{align-items:flex-start}
.mtgref-anacol{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
}
.mtgref-anabadge{
  max-width:180px;
  padding:4px 11px;
  background:#FFD42A;
  border:1px solid rgba(122,94,0,.28);
  border-radius:10px;
  color:#7a5e00;              /* sarı üzerine AA-uyumlu koyu altın */
  font-size:9.5px;
  font-weight:700;
  letter-spacing:.2px;
  line-height:1.3;
  text-align:center;
  box-shadow:0 2px 6px rgba(255,212,42,.28);
}
/* Aktif ananın badge'i biraz daha vurgulu */
.mtgref-anacol:has(.is-active) .mtgref-anabadge{
  background:#ffc800;
  border-color:rgba(122,94,0,.5);
  box-shadow:0 3px 10px rgba(255,200,0,.4);
}
.mtgref-fbtn{
  position:relative;
  -webkit-appearance:none;appearance:none;
  border:1px solid #d9ded9;
  background:#f5f7f5;
  color:#2f3a31;
  font-size:13.5px;
  font-weight:700;
  padding:9px 18px;
  border-radius:999px;
  cursor:pointer;
  transition:background .18s ease,color .18s ease,border-color .18s ease,transform .12s ease;
}
/* Seçili filtre köşesinde ✓ rozeti (sarı gradient daire) */
.mtgref-fbtn.is-active::after{
  content:"\2713";
  position:absolute;top:-7px;left:-7px;width:22px;height:22px;
  background:linear-gradient(135deg,#ffd42a,#ffb300);color:#fff;
  border-radius:50%;display:flex;align-items:center;justify-content:center;
  font-weight:700;font-size:12px;line-height:1;
  box-shadow:0 3px 8px rgba(255,212,42,.4);border:2px solid #fff;z-index:5;
}
.mtgref-fbtn:hover{background:#eaeeea}
.mtgref-fbtn.is-active{
  background:linear-gradient(135deg,#1f8f4a,#0f5a2c);
  border-color:transparent;
  color:#fff;
}
.mtgref-fbtn:active{transform:scale(.96)}

/* ── Grid ── */
.mtgref-grid2{
  display:grid !important;
  grid-template-columns:repeat(var(--mtgref-cols,4),1fr) !important;
  gap:14px;
}
.mtgref-cell{
  position:relative;
  display:block;
  overflow:hidden;
  border-radius:14px;
  background:#f2f4f2;
  aspect-ratio:1/1;
  cursor:zoom-in;
  text-decoration:none;
  box-shadow:0 2px 10px rgba(18,36,26,.06);
  transition:transform .25s ease,box-shadow .25s ease;
}
.mtgref-cell.is-hidden{display:none}

/* ── Kaydır/buton ile yükleme ── */
.mtgref-more{display:flex;justify-content:center;align-items:center;gap:12px;margin:22px 0 4px}
.mtgref-more[hidden]{display:none}
.mtgref-more-btn{
  font:inherit;font-weight:700;font-size:14px;color:#7a5e00;
  background:#FFD42A;border:0;border-radius:999px;padding:11px 26px;cursor:pointer;
  box-shadow:0 4px 14px rgba(255,212,42,.35);transition:transform .15s ease,box-shadow .15s ease,opacity .15s ease;
}
.mtgref-more-btn:hover{transform:translateY(-1px);box-shadow:0 8px 20px rgba(255,212,42,.45)}
.mtgref-more-btn:disabled{opacity:.6;cursor:default;transform:none;box-shadow:none}
.mtgref-sentinel{width:100%;height:1px}

/* Yükleniyor göstergesi (filtre değişince / sonraki sayfa gelirken) */
.mtgref-loading{
  display:flex;align-items:center;justify-content:center;gap:11px;
  padding:28px 0;color:#0f5a2c;font-weight:700;font-size:14px;
}
.mtgref-loading[hidden]{display:none}
.mtgref-loading-spin{
  display:inline-block;width:22px;height:22px;border-radius:50%;
  border:3px solid rgba(31,64,32,.2);border-top-color:#1F4020;
  animation:mtgref-lbspin .8s linear infinite;
}
.mtgref-cell:hover{transform:translateY(-4px);box-shadow:0 16px 32px rgba(15,60,30,.18)}
.mtgref-cell-img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .4s ease}
.mtgref-cell:hover .mtgref-cell-img{transform:scale(1.07)}
/* Başlık — altta degrade şerit, hover'da belirginleşir */
.mtgref-cell-ttl{
  position:absolute;left:0;right:0;bottom:0;
  padding:22px 14px 12px;
  font-size:13.5px;
  font-weight:700;
  color:#fff;
  line-height:1.3;
  background:linear-gradient(to top,rgba(0,0,0,.78),transparent);
  opacity:0;
  transform:translateY(8px);
  transition:opacity .25s ease,transform .25s ease;
}
.mtgref-cell:hover .mtgref-cell-ttl{opacity:1;transform:translateY(0)}

/* ── Grid: video play ikonu (kapağın üstünde) ── */
.mtgref-play{
  position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);
  width:56px;height:56px;border-radius:50%;
  background:rgba(0,0,0,.55);border:2px solid rgba(255,255,255,.9);
  pointer-events:none;transition:background .2s ease,transform .2s ease;
}
.mtgref-play::before{
  content:"";position:absolute;top:50%;left:54%;transform:translate(-50%,-50%);
  border-style:solid;border-width:9px 0 9px 15px;border-color:transparent transparent transparent #fff;
}
.mtgref-cell:hover .mtgref-play{background:rgba(15,90,45,.85);transform:translate(-50%,-50%) scale(1.08)}

/* ── Lightbox ── */
.mtgref-lb2{
  position:fixed;inset:0;z-index:100060;display:none;
  align-items:center;justify-content:center;
  background:rgba(0,0,0,.9);padding:24px;
}
.mtgref-lb2.is-open{display:flex}
body.mtgref-lb2-lock{overflow:hidden}
/* Görsel/video yüklenirken spinner */
.mtgref-lb2-spin{
  display:none;position:absolute;top:50%;left:50%;
  width:46px;height:46px;margin:-23px 0 0 -23px;
  border-radius:50%;border:4px solid rgba(255,255,255,.25);border-top-color:#FFD42A;
  animation:mtgref-lbspin .8s linear infinite;z-index:2;pointer-events:none;
}
@keyframes mtgref-lbspin{to{transform:rotate(360deg)}}
.mtgref-lb2-fig{margin:0;max-width:92vw;max-height:90vh;display:flex;flex-direction:column;align-items:center;gap:12px}
.mtgref-lb2-img{max-width:92vw;max-height:82vh;object-fit:contain;border-radius:6px;user-select:none;cursor:pointer}
/* Video oynatıcı — orana göre: yatay 16:9, dikey (Shorts) 9:16, MP4 kendi oranı */
.mtgref-lb2-media{max-width:92vw;max-height:86vh;background:#000;border-radius:8px;overflow:hidden;display:flex;align-items:center;justify-content:center}
.mtgref-lb2-media.is-iframe{width:min(92vw,1120px);aspect-ratio:16/9}
.mtgref-lb2-media.is-iframe.is-portrait{width:auto;height:86vh;aspect-ratio:9/16;max-width:96vw}
.mtgref-lb2-media.is-iframe iframe{width:100%;height:100%;border:0;display:block}
.mtgref-lb2-media.is-video{background:transparent}
.mtgref-lb2-media.is-video video{max-width:92vw;max-height:86vh;width:auto;height:auto;display:block;border-radius:8px}
.mtgref-lb2-cap{color:#fff;font-size:14px;font-weight:600;text-align:center;max-width:80vw}
.mtgref-lb2-close{position:absolute;top:18px;right:18px;width:40px;height:40px;border:none;border-radius:50%;background:rgba(255,255,255,.14);color:#fff;font-size:26px;cursor:pointer;line-height:1}
.mtgref-lb2-close:hover{background:rgba(255,255,255,.26)}
.mtgref-lb2-nav{position:absolute;top:50%;transform:translateY(-50%);width:52px;height:52px;border:none;border-radius:50%;background:rgba(255,255,255,.12);color:#fff;font-size:34px;cursor:pointer;line-height:1;display:flex;align-items:center;justify-content:center}
.mtgref-lb2-nav:hover{background:rgba(255,255,255,.24)}
.mtgref-lb2-prev{left:14px}
.mtgref-lb2-next{right:14px}

/* ── Responsive: masaüstü/tablet 4, mobil 3 ── */
@media(max-width:767px){
  .mtgref-section{margin:14px 10px;padding:32px 16px 38px;border-radius:18px}
  .mtgref-list{--mtgref-cols:3 !important}
  .mtgref-grid2{gap:10px}
  /* Filtre: mobilde tp-tabs gibi YAN YANA segmented grid (toggle/açılır-kapanır yok) */
  .mtgref-filter-toggle{display:none}
  .mtgref-filters{display:flex;flex-direction:column;gap:8px;margin:6px 0 16px}
  .mtgref-fb-ana{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(80px,1fr));
    gap:6px;align-items:start;overflow:visible;
    background:#f1f3f1;padding:5px;border-radius:14px;   /* tp-tabs segmented görünüm */
  }
  .mtgref-anacol{width:100%;gap:4px}
  .mtgref-fbtn{
    width:100%;min-height:42px;
    white-space:normal;line-height:1.15;
    font-size:11px;padding:7px 5px;border-radius:10px;
  }
  .mtgref-fbtn.is-active::after{width:18px;height:18px;top:-6px;left:-6px;font-size:10px}
  .mtgref-anabadge{max-width:100%;font-size:8px;padding:3px 6px}
  .mtgref-fb-alt{flex-wrap:wrap;justify-content:center}
  .mtgref-cell-ttl{display:none}   /* mobilde resim üstü başlık gizli (çirkin duruyordu) */
  .mtgref-lb2-nav{width:42px;height:42px;font-size:28px}
}
/* Masaüstünde toggle butonu gizli — filtreler hep açık */
@media(min-width:768px){ .mtgref-filter-toggle{display:none} }
