/* =========== ÜRÜNLER SAYFASI =========== */

/* Grid: her kart aynı yükseklikte */
.product-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  align-items: stretch !important;
}

.product-grid > .product-card{ height: 100%; }

/* Kart */
.product-card{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:16px;
  box-shadow:0 10px 20px rgba(0,0,0,.06);
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

/* Görsel */
.imgwrap{
  display:block;
  width:100%;
  padding:16px;
  border:0;
  background:transparent;
  appearance:none; -webkit-appearance:none; -moz-appearance:none;
  cursor:pointer;
  flex:0 0 auto;
}
.imgwrap img{
  display:block;
  margin:0 auto;
  max-width:180px;
  height:auto;
}
.imgwrap:focus,
.imgwrap:focus-visible,
.imgwrap:active{ outline:none !important; box-shadow:none !important; }

/* Kart gövdesi */
.card-body{
  padding:0 16px 16px 16px;
  display:flex;
  flex-direction:column;
  flex:1 1 auto;
}
.card-body h3{ margin:12px 0 8px; font-size:20px; line-height:1.3; }
.brand-line, .meta, .desc, .price-wrap, .btn-row{ margin-left:0; }

/* Marka (bold değil) */
.brand-line{ margin-top:6px; color:#334155; font-size:14px; }
.brand-label{ font-weight:400; margin-right:6px; }

/* Meta */
.meta{ list-style:none; padding:0; margin:8px 0 0; display:grid; gap:4px; }
.meta li{ font-size:14px; color:#475569; }
.meta .label{ font-weight:400; margin-right:6px; color:#475569; }
.meta .emph{ font-weight:700; color:#0f172a; }
.meta .code{
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
  font-weight:700;
}

/* Açıklama – 3 satırda kırp */
.desc{
  margin-top:6px; color:#64748b; font-size:14px;
  display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden;
}

/* Fiyatlar */
.price-wrap{ margin-top:6px; }
.price-main{ margin-top:10px; font-weight:800; font-size:22px; color:#0f172a; }
.price-sub{ margin-top:2px; color:#64748b; font-size:13px; }

/* DMO butonu en altta */
.btn-row{
  margin-top:auto !important;
  display:flex;
  justify-content:flex-end;
}

/* Başlık ve arama */
.pg-title{ text-align:center; margin:0 0 12px; }
.searchrow{ display:flex; gap:12px; align-items:center; margin: 8px 0 14px; }
.searchwrap{ flex:1; }
.searchwrap input{
  width:100%; max-width:680px;
  border-radius:12px; padding:10px 12px;
  border:1px solid #e5e7eb; background:#fff;
}
.controls{ display:flex; gap:10px; align-items:center; }
.controls label{ display:flex; align-items:center; gap:8px; color:#475569; font-size:14px; }
.controls select{ padding:8px 10px; border-radius:10px; border:1px solid #e5e7eb; background:#fff; }

/* Pager */
.pager{ display:flex; justify-content:center; gap:8px; margin:18px 0 4px }
.pager > button{ padding:8px 12px; border:1px solid #e5e7eb; background:#fff; border-radius:10px; cursor:pointer }
.pager > button.active{ background:#0B5FFF; color:#fff; border-color:#0B5FFF }
.pager > button:disabled{ opacity:.5; cursor:not-allowed }

/* Inline İletişim */
.inline-contact{padding:28px 0 6px}
.inline-contact h2{margin:0 0 10px}
.inline-contact .contact-line{display:flex;flex-wrap:wrap;gap:20px;color:#334155}
.inline-contact .pair strong{margin-right:6px;color:#0f172a}

/* ===== ÜRÜN GALERİ MODALI (yalnızca #galleryOverlay) ===== */
#galleryOverlay{
  position: fixed; inset: 0;
  display: none; place-items: center;
  padding: 24px;
  background: rgba(15,23,42,.6);
  z-index: 9999;
}
#galleryOverlay.is-open{ display:grid; }

#galleryOverlay .modal{
  width: min(1100px, 96vw);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  box-sizing: border-box;
  padding: 12px;
  box-shadow: 0 24px 64px rgba(0,0,0,.25);
}
#galleryOverlay .modal__hdr{
  display:flex; align-items:center; justify-content:space-between;
  padding: 6px 6px 10px 8px;
  border-bottom: 1px solid #e5e7eb;
}
#galleryOverlay .modal__close{
  border:0; background:#f1f5f9;
  width:34px; height:34px; border-radius:10px;
  font-size:18px; cursor:pointer;
}
#galleryOverlay .modal__main{
  display:grid;
  grid-template-columns: minmax(360px,1fr) 180px;
  align-items:start; gap:12px;
}
#galleryOverlay .viewer{
  grid-column:1; grid-row:1;
  display:flex; align-items:center; justify-content:center;
  padding:10px; border-radius:10px;
  background:#f8fafc; border:1px solid #e5e7eb;
  cursor:pointer;
}
#galleryOverlay .viewer img{
  max-height:58vh; width:auto; height:auto; object-fit:contain;
}
#galleryOverlay .thumbs{
  grid-column:2; grid-row:1;
  display:flex; flex-direction:column; gap:10px;
  max-height:58vh; overflow:auto; padding:4px;
}
#galleryOverlay .thumb{
  display:block; width:100%; cursor:pointer;
  border:2px solid transparent; border-radius:10px;
  padding:4px; background:#fff;
}
#galleryOverlay .thumb img{
  width:100%; height:96px; object-fit:contain; display:block;
}
#galleryOverlay .thumb.active{ border-color:#0B5FFF; }
#galleryOverlay .modal__meta{ grid-column:1/3; grid-row:2; margin-top:8px; }
#galleryOverlay .md-row{ margin:2px 0; color:#475569; }
#galleryOverlay .md-price-main{ font-weight:800; font-size:22px; margin:6px 0; }
#galleryOverlay .md-price-sub{ color:#64748b; }

@media (max-width:720px){
  #galleryOverlay .modal__main{ grid-template-columns:1fr; }
  #galleryOverlay .viewer{ grid-column:1; grid-row:1; }
  #galleryOverlay .thumbs{ grid-column:1; grid-row:2; flex-direction:row; max-height:none; }
  #galleryOverlay .thumb{ width:110px; }
  #galleryOverlay .modal__meta{ grid-column:1; grid-row:3; }
}

/* ===== KURUMSAL MODALI (yalnızca #aboutOverlay) ===== */
#aboutOverlay{
  position: fixed; inset: 0;
  display: none; place-items: center;
  background: rgba(15,23,42,.45);
  z-index: 10000;
  padding: 20px;
}
#aboutOverlay.is-open{ display:grid; }

#aboutOverlay .modal{
  box-sizing: border-box;
  width: min(960px, 94vw);
  max-height: min(88vh, 100%);
  overflow: auto;
  background:#fff; border-radius:16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  padding: 24px 24px 28px; position: relative;
}
#aboutOverlay .modal__close{
  position:absolute; top:10px; right:10px;
  width:36px; height:36px; line-height:36px;
  border:0; border-radius:10px; background:#f1f5f9;
  color:#0f172a; cursor:pointer; font-size:22px; font-weight:700;
}

/* About içerik yardımcı (opsiyonel) */
#aboutOverlay .about-grid{ display:grid; gap:16px; grid-template-columns:1fr; }
@media (min-width:900px){
  #aboutOverlay .about-grid{ grid-template-columns: 1.15fr .85fr; }
}
#aboutOverlay img{ max-width:100%; height:auto; display:block; }
#aboutOverlay h1,#aboutOverlay h2,#aboutOverlay h3{ margin:0 0 8px; }
