/*
 * Discover New WordPress Plugins section.
 * Kaynak HTML tasarımından birebir taşındı; tüm genişlik/gap/breakpoint
 * değerleri KORUNDU. Sadece class isimleri temadaki diğer class'larla
 * (ör. .card, .section, .btn) çakışmasın diye "czgb-dp-" ön ekiyle
 * benzersizleştirildi.
 */
/*
 * Değişkenler global (:root) tanımlanır, çünkü yeni vitrin kartı tasarımı
 * artık sadece anasayfa bölümünde değil; mağaza arşivinde ve ürün
 * sayfasındaki "Related products" / "You may also like" alanlarında da
 * (woocommerce/content-product.php üzerinden) kullanılıyor.
 */
:root{
  --czgbdp-ink:#16171C;
  --czgbdp-ink-soft:#8C8F9B;
  --czgbdp-line:#ECECF1;
  --czgbdp-bg:#f7f8ff;
  --czgbdp-card:#FFFFFF;
  --czgbdp-gold:#FFB800;
  --czgbdp-heart-active:#FF4D6A;
  --czgbdp-radius-card:16px;
  --czgbdp-radius-media:12px;
  --czgbdp-shadow-card:0 1px 2px rgba(16,24,40,.05), 0 10px 20px -16px rgba(16,24,40,.12);
  --czgbdp-shadow-card-hover:0 22px 38px -18px rgba(16,24,40,.22);
}

.czgb-dp{
  font-family:'Inter',sans-serif;
  background:var(--czgbdp-bg);
  color:var(--czgbdp-ink);
  -webkit-font-smoothing:antialiased;
}
.czgb-dp *{ box-sizing:border-box; }
.czgb-dp-card, .czgb-dp-grid, .czgb-dp-grid *{ box-sizing:border-box; }

.czgb-dp-container{
  max-width:1280px;
  margin:0 auto;
  padding:88px 24px 96px;
}

/* ---------- Header ---------- */
.czgb-dp-head{
  text-align:center;
  max-width:600px;
  margin:0 auto 48px;
}
.czgb-dp-head h2{
  font-size:36px;
  line-height:1.2;
  font-weight:800;
  margin:0 0 14px;
  letter-spacing:-0.02em;
  color:var(--czgbdp-ink);
}
.czgb-dp-head h2 .czgb-dp-hl{
  color:#ed5356;
}
.czgb-dp-head p{
  font-size:16px;
  line-height:1.7;
  color:var(--czgbdp-ink-soft);
  margin:0;
}

/* ---------- Grid: 4 columns x 2 rows ---------- */
.czgb-dp-grid{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:28px 24px;
}

.czgb-dp-card{
  background:var(--czgbdp-card);
  border:1px solid var(--czgbdp-line);
  border-radius:var(--czgbdp-radius-card);
  padding:12px;
  box-shadow:var(--czgbdp-shadow-card);
  transition:box-shadow .3s ease, transform .3s ease, border-color .3s ease;
  list-style:none;
}
.czgb-dp-card:hover{
  box-shadow:var(--czgbdp-shadow-card-hover);
  transform:translateY(-4px);
  border:solid 1px #ed5356;
}

/* ---------- Thumbnail (gerçek ürün görseli) ---------- */
.czgb-dp-media{
  position:relative;
  aspect-ratio:8 / 5;
  border-radius:var(--czgbdp-radius-media);
  overflow:hidden;
  background:#f7f8ff;
  display:block;
}
.czgb-dp-media img{
  position:absolute; inset:0;
  width:100%; height:100%;
  object-fit:cover;
  transition:transform .6s cubic-bezier(.2,.8,.2,1);
  display:block;
}
.czgb-dp-card:hover .czgb-dp-media img{
  transform:scale(1.08);
}

/* Wishlist heart */
.czgb-dp-wish{
  position:absolute;
  top:10px;
  right:10px;
  width:32px;
  height:32px;
  border-radius:50%;
  border:none;
  background:rgba(255,255,255,.92);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  z-index:3;
  box-shadow:0 3px 8px rgba(16,24,40,.14);
  transition:transform .25s ease, background .25s ease;
  text-decoration:none;
}
.czgb-dp-wish:hover{ transform:scale(1.08); }
.czgb-dp-wish svg{
  width:16px;
  height:16px;
  stroke:#16171C;
  fill:none;
  stroke-width:1.8;
  transition:stroke .25s ease, fill .25s ease, transform .3s cubic-bezier(.4,0,.2,1.4);
}
.czgb-dp-wish.active{ background:#fff; }
.czgb-dp-wish.active svg{
  stroke:var(--czgbdp-heart-active);
  fill:var(--czgbdp-heart-active);
  transform:scale(1.08);
}
.czgb-dp-wish.pop svg{ animation:czgbDpHeartPop .4s ease; }
@keyframes czgbDpHeartPop{
  0%{transform:scale(1);}
  35%{transform:scale(1.35);}
  100%{transform:scale(1.08);}
}

/* ---------- Body ---------- */
.czgb-dp-body{ padding:14px 4px 6px; }

.czgb-dp-title{
  margin:0 0 7px;
  font-size:16px;
  font-weight:700;
  line-height:1.35;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  min-height:43px;
}
.czgb-dp-title a{
  color:var(--czgbdp-ink);
  text-decoration:none;
  background-image:linear-gradient(var(--czgbdp-ink), var(--czgbdp-ink));
  background-repeat:no-repeat;
  background-position:0 100%;
  background-size:0% 1.5px;
  transition:background-size .3s ease;
  padding-bottom:1px;
}
.czgb-dp-title a:hover{ background-size:100% 1.5px; }

/* Kategori + fiyat aynı satır */
.czgb-dp-meta{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
}
.czgb-dp-cat{
  font-size:13px;
  color:var(--czgbdp-ink-soft);
  text-decoration:none;
}
a.czgb-dp-cat:hover{
  color:var(--czgbdp-ink);
  text-decoration:underline;
}
.czgb-dp-price{ display:flex; align-items:baseline; gap:6px; }
.czgb-dp-price-now{ font-size:17px; font-weight:800; color:var(--czgbdp-ink); }
.czgb-dp-price-now ins{ text-decoration:none; }
.czgb-dp-price-old{ font-size:13px; color:var(--czgbdp-ink-soft); text-decoration:line-through; }

/* Footer: satış + puan solda, Live Demo butonu sağda */
.czgb-dp-foot{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-top:14px;
  gap:8px;
}
.czgb-dp-stats{ display:flex; flex-direction:column; gap:4px; min-height:1px; }
.czgb-dp-sales{ font-size:13px; color:var(--czgbdp-ink-soft); display:inline-flex; align-items:center; gap:6px; }
.czgb-dp-rating{ display:flex; align-items:center; gap:6px; }
.czgb-dp-stars{ display:inline-flex; gap:1px; }
.czgb-dp-stars svg{
  width:14px;
  height:14px;
  stroke:var(--czgbdp-gold);
  stroke-width:1.5;
  fill:none;
}
.czgb-dp-stars svg.filled{ fill:var(--czgbdp-gold); }
.czgb-dp-rating-count{ font-size:13px; color:var(--czgbdp-ink-soft); }

.czgb-dp-demo{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1.4px solid #D6D7E0;
  color:var(--czgbdp-ink);
  background:#fff;
  text-decoration:none;
  font-size:13px;
  font-weight:600;
  padding:9px 18px;
  border-radius:999px;
  white-space:nowrap;
  transition:background .25s ease, color .25s ease, border-color .25s ease, transform .2s ease;
}
.czgb-dp-demo:hover,
.czgb-dp-demo:focus{
  background:#ed5356;
  border-color:#ed5356;
  color:#fff;
  transform:translateY(-2px);
}

/* ---------- View All Products ---------- */
.czgb-dp-viewall-wrap{ display:flex; justify-content:center; margin-top:50px; }
.czgb-dp-viewall-btn{
  display:inline-flex;
  align-items:center;
  gap:9px;
  background:var(--czgbdp-ink);
  color:#fff;
  text-decoration:none;
  font-size:15px;
  font-weight:700;
  padding:15px 34px;
  border-radius:999px;
  box-shadow:0 16px 28px -12px rgba(22,23,28,.4);
  transition:background .25s ease, transform .25s ease, box-shadow .25s ease;
}
.czgb-dp-viewall-btn svg{
  width:17px; height:17px; stroke:currentColor; fill:none; stroke-width:2.2;
  transition:transform .3s ease;
}
.czgb-dp-viewall-btn:hover{
  background:#000;
  transform:translateY(-3px);
  box-shadow:0 20px 34px -12px rgba(22,23,28,.5);
}
.czgb-dp-viewall-btn:hover svg{ transform:translateX(4px); }

/* ---------- Responsive: HTML'deki değerler birebir korundu ---------- */
@media (max-width: 1080px){ .czgb-dp-grid{ grid-template-columns:repeat(3, 1fr); } }
@media (max-width: 760px){
  .czgb-dp-grid{ grid-template-columns:repeat(2, 1fr); gap:16px; }
  .czgb-dp-head h2{ font-size:28px; }
  .czgb-dp-container{ padding:60px 18px 70px; }
}
@media (max-width: 460px){
  .czgb-dp-grid{ grid-template-columns:1fr; }
  .czgb-dp-foot{ flex-wrap:wrap; }
}

/* ---------------------------------------------------------------------
 * Mağaza arşivi / "Related products" / "You may also like" döngüsü.
 * Aynı grid (.czgb-dp-grid), sadece sayfa akışına uysun diye ufak
 * boşluk farkı (genişlik/gap/breakpoint değerleri DEĞİŞMEDİ).
 * --------------------------------------------------------------------- */
.czgb-dp-grid--loop{
  margin:0 0 8px;
  list-style:none;
  padding:0;
}

/* ---------------------------------------------------------------------
 * Mağaza (shop / ürün kategorisi) sayfasının genel arka planı: anasayfa
 * "Discover New WordPress Plugins" bölümündeki gri ton (#f7f8ff) ile
 * aynı yapıldı (varsayılan beyaz yerine).
 * --------------------------------------------------------------------- */
body.woocommerce.archive:not(.single-product),
body.tax-product_cat:not(.single-product),
body.post-type-archive-product:not(.single-product) {
  background-color: var(--czgbdp-bg, #f7f8ff);
}
body.woocommerce.archive:not(.single-product) #primary,
body.tax-product_cat:not(.single-product) #primary,
body.post-type-archive-product:not(.single-product) #primary,
body.woocommerce.archive:not(.single-product) .site-content,
body.tax-product_cat:not(.single-product) .site-content,
body.post-type-archive-product:not(.single-product) .site-content {
  background-color: var(--czgbdp-bg, #f7f8ff);
}
