/**
 * Ürün listesi: ikonlar görselin HEMEN ÜSTÜNDE yatay; öneri sağda kaydırmalı
 * Overlay (absolute) kurallarını ezer #ikonusttee,horizontall
 */

/* Sol yığın: görsel 88px; ikonlar RESMİN ÜSTÜNDE yatay overlay #ikonoverlayy,horizontall */
.product-image-container.product-image-container--toolbar {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: flex-start !important;
  gap: 8px !important;
  max-width: none !important;
  width: auto !important;
}

.product-image-stack {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 4px !important;
  flex: 0 0 88px !important;
  width: 88px !important;
  max-width: 88px !important;
  position: relative !important;
}

#datatable1 tbody tr.product-row .product-image-stack,
#datatable1 .product-image-stack.product-image-left,
#datatable1 .product-image-left {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  width: 88px !important;
  max-width: 88px !important;
  gap: 4px !important;
  position: relative !important;
}

/* Kamera / arşiv / sihirli: yatay, resmin ÜSTÜNDE (overlay) — dikey değil #ikonusttee */
#datatable1 tbody tr.product-row .product-image-stack .image-action-buttons,
#datatable1 .product-image-stack .image-action-buttons,
#datatable1 tbody tr.product-row .image-action-buttons,
#datatable1 .image-action-buttons {
  position: absolute !important;
  left: 50% !important;
  top: 4px !important;
  transform: translateX(-50%) !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  width: auto !important;
  margin: 0 !important;
  padding: 2px 5px !important;
  background: rgba(255,255,255,.9) !important;
  box-shadow: 0 1px 4px rgba(0,0,0,.18) !important;
  border-radius: 16px !important;
  order: 0 !important;
  z-index: 6 !important;
}

#datatable1 tbody tr.product-row .product-image-stack .image-action-buttons i,
#datatable1 .image-action-buttons i {
  font-size: 13px !important;
  width: 22px !important;
  height: 22px !important;
  line-height: 22px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
}

.product-image-stack .product-image-wrapper,
#datatable1 .product-image-stack .product-image-wrapper {
  width: 88px !important;
  height: 88px !important;
  order: 1 !important;
  position: relative !important;
  overflow: hidden !important;
  border-radius: 8px !important;
}

.product-image-stack .no-image-name-actions {
  order: 2 !important;
  flex-direction: column !important;
  gap: 3px !important;
  margin: 0 !important;
  max-width: 92px !important;
  width: 92px !important;
}
.product-image-stack .btn-urun-title-copy,
.product-image-stack .btn-urun-title-search {
  font-size: 9px !important;
  padding: 3px 4px !important;
  min-width: 0 !important;
  width: 100%;
}

/* Öneriler: görsel yığınının SAĞINDA, geniş + scroll */
#datatable1 tbody tr.product-row .image-suggestions-container,
.image-suggestions-container {
  flex: 1 1 320px !important;
  width: auto !important;
  min-width: 240px !important;
  max-width: 520px !important;
  max-height: 220px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  align-self: flex-start !important;
}
/* Kapalı öneri kutusu yer kaplamasın (isim sütununu kaydırmasın) #kapalionerigizlee */
#datatable1 tbody tr.product-row .image-suggestions-container[style*="display: none"],
#datatable1 tbody tr.product-row .image-suggestions-container[style*="display:none"],
.image-suggestions-container[style*="display: none"],
.image-suggestions-container[style*="display:none"] {
  flex: 0 0 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  width: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
}
#datatable1 tbody tr.product-row .image-suggestions-container.is-sug-expanded,
.image-suggestions-container.is-sug-expanded {
  max-height: 300px !important;
}
#datatable1 tbody tr.product-row .suggestions-list.suggestions-grid,
.image-suggestions-container .suggestions-list.suggestions-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  overflow-x: hidden !important;
  overflow-y: visible !important;
  max-height: none !important;
  gap: 6px !important;
}

#datatable1 tbody tr.product-row > td.product-list-img {
  width: auto !important;
  white-space: normal !important;
  min-width: 140px !important;
  vertical-align: top !important;
}

.suggestion-item.dslink-sug-kb-focus,
.kat-oneri-item.dslink-sug-kb-focus,
.expand-suggestion-item.dslink-sug-kb-focus {
  outline: 3px solid #f39c12 !important;
  outline-offset: 1px;
}

#dslinkSugHoverPreview {
  position: fixed;
  z-index: 200000;
  pointer-events: none;
  display: none;
  padding: 6px;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.28);
  max-width: min(82vw, 440px);
}
#dslinkSugHoverPreview.is-open { display: block; }
#dslinkSugHoverPreview img {
  display: block;
  max-width: min(78vw, 420px);
  max-height: min(62vh, 420px);
  object-fit: contain;
  border-radius: 6px;
}
#dslinkSugHoverPreview .dslink-sug-hover-cap {
  font-size: 11px;
  color: #475569;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#datatable1 .product-suggestions-filter-mini,
.product-suggestions-filter-mini {
  max-width: 160px !important;
  min-width: 80px !important;
}

/* TL fiyat etiketi menüsü */
.dslink-price-tag-wrap { position: relative; display: inline-flex; align-items: center; }
.dslink-price-tag-btn {
  border: 0; background: transparent; padding: 0; cursor: pointer; line-height: 0;
}
.dslink-price-tag-btn .price-tag-img { width: 56px; max-width: 56px; display: block; }
.dslink-price-tag-menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 50;
  min-width: 220px;
  padding: 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(15,23,42,.18);
}
.dslink-price-tag-menu[hidden] { display: none !important; }
.ptm-row { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.ptm-row label { font-size: 11px; font-weight: 700; color: #334155; margin: 0; }
.ptm-pct { width: 64px; height: 28px; font-size: 13px; padding: 2px 6px; }
.ptm-dirs button, .ptm-rounds button, .ptm-apply {
  font-size: 11px; font-weight: 700; border-radius: 6px; border: 1px solid #cbd5e1;
  background: #f8fafc; padding: 5px 8px; cursor: pointer;
}
.ptm-dirs button.is-on { background: #2563eb; color: #fff; border-color: #1d4ed8; }
.ptm-preview {
  font-size: 13px; background: #fff7ed; border: 1px dashed #fb923c; border-radius: 8px;
  padding: 8px; margin-bottom: 8px; user-select: none; cursor: ns-resize;
}
.ptm-preview strong { color: #c2410c; font-size: 16px; }
.ptm-apply { width: 100%; background: #16a34a; color: #fff; border-color: #15803d; padding: 7px; }

@media screen and (max-width: 900px) {
  #datatable1 tbody tr.product-row .image-suggestions-container,
  .image-suggestions-container {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
  }
}

/* Ctrl+Z sonrası görselde kısa vurgu #undooflashh */
@keyframes dslinkImgUndoFlash {
  0% { outline: 3px solid #16a34a; box-shadow: 0 0 0 4px rgba(22,163,74,.35); }
  100% { outline: 3px solid transparent; box-shadow: none; }
}
img.product-image.dslink-img-undo-flash,
img.dslink-img-undo-flash {
  animation: dslinkImgUndoFlash 0.9s ease-out;
}
