/* ==========================================================================
   CAMAK MAKİNA — Yedek Parça / Sarf Malzeme Kataloğu
   Fiyat teklifi isteme sistemi (e-ticaret değil) için ek stiller.
   Mevcut tasarım sistemindeki (style.css) renk/gölge değişkenlerini kullanır.
   ========================================================================== */

/* --- Araç çubuğu: arama + grup/tip filtreleri --- */
.parts-toolbar{
  display:flex; flex-wrap:wrap; gap:12px; align-items:center;
  margin-bottom:22px;
}
.parts-toolbar input[type=text]{
  flex:1; min-width:220px; padding:13px 16px; border:2px solid var(--steel-line);
  border-radius:10px; font-size:15px; font-family:inherit;
}
.parts-toolbar input[type=text]:focus{ outline:none; border-color:var(--spark); }
.parts-count{ font-size:13.5px; color:var(--muted); font-weight:700; white-space:nowrap; }

.type-filter{
  display:flex; flex-wrap:wrap; gap:8px; margin-bottom:28px;
}
.type-filter button{
  background:#fff; border:1.5px solid var(--steel-line); color:#454b54;
  padding:8px 16px; border-radius:999px; font-size:13px; font-weight:700;
  cursor:pointer; transition:all .2s var(--ease); font-family:inherit;
}
.type-filter button:hover{ border-color:var(--spark); color:var(--spark-dark); }
.type-filter button.active{ background:var(--ink); border-color:var(--ink); color:#fff; }

/* --- Ürün / parça ızgarası --- */
.parts-grid{
  display:grid; grid-template-columns:repeat(auto-fill,minmax(226px,1fr)); gap:18px;
}
.part-card{
  background:#fff; border:1px solid var(--steel-line); border-radius:14px;
  padding:18px; display:flex; flex-direction:column; box-shadow:var(--shadow-sm);
  transition:transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.part-card:hover{ transform:translateY(-4px); box-shadow:var(--shadow-md); border-color:var(--spark-light); }
.part-icon{
  width:100%; aspect-ratio:1; background:var(--steel-100); border-radius:10px;
  display:flex; align-items:center; justify-content:center; margin-bottom:14px;
}
.part-icon svg{ width:46%; height:46%; stroke:var(--ink); fill:none; stroke-width:1.4; }
.part-icon img{ width:88%; height:88%; object-fit:contain; }
.part-type-badge{
  align-self:flex-start; font-size:11px; font-weight:800; text-transform:uppercase;
  letter-spacing:.03em; color:var(--muted); background:var(--steel-100);
  padding:3px 9px; border-radius:999px; margin-bottom:8px;
}
.part-code{ font-family:"SFMono-Regular",Consolas,Menlo,monospace; font-size:12.5px; color:var(--muted); margin-bottom:2px; }
.part-card h4{ margin:0 0 10px; font-size:15px; line-height:1.35; min-height:40px; color:var(--ink); }
.part-price{ font-size:14px; font-weight:700; color:var(--muted); margin-bottom:12px; }
.part-price.has-price{ font-size:19px; font-weight:800; color:var(--spark-dark); }
.part-actions{ margin-top:auto; display:flex; gap:8px; }
.btn-quote-add{
  flex:1; padding:10px; border:0; border-radius:8px; background:var(--ink);
  color:#fff; font-weight:700; font-size:13.5px; cursor:pointer; transition:background .2s var(--ease);
}
.btn-quote-add:hover{ background:var(--spark); }
.btn-quote-add.added{ background:#1f9d55; }
.btn-quick-wa{
  flex-shrink:0; width:42px; display:flex; align-items:center; justify-content:center;
  border-radius:8px; border:1.5px solid var(--steel-line); color:#25D366; text-decoration:none;
  transition:all .2s var(--ease);
}
.btn-quick-wa:hover{ background:#25D366; border-color:#25D366; color:#fff; }
.btn-quick-wa svg{ width:19px; height:19px; }

.parts-empty{ text-align:center; padding:50px 20px; color:var(--muted); font-size:15px; display:none; }

/* --- Grup başlıkları (XD / XPR300) --- */
.parts-group-title{
  font-size:22px; margin:44px 0 20px; padding-top:10px; border-top:1px solid var(--steel-line);
}
.parts-group-title:first-of-type{ border-top:none; padding-top:0; margin-top:8px; }

/* --- Teklif Sepeti: yüzen buton --- */
.quote-fab{
  position:fixed; right:22px; bottom:22px; z-index:997;
  background:var(--ink); color:#fff; border:0; border-radius:999px;
  padding:15px 22px 15px 18px; display:flex; align-items:center; gap:10px;
  font-weight:800; font-size:14.5px; cursor:pointer; box-shadow:var(--shadow-lg);
  transition:background .2s var(--ease), transform .2s var(--ease);
}
.quote-fab:hover{ background:var(--spark); transform:translateY(-2px); }
.quote-fab svg{ width:20px; height:20px; flex-shrink:0; }
.quote-fab-count{
  background:var(--spark); color:#fff; border-radius:999px; font-size:12px;
  min-width:20px; height:20px; display:flex; align-items:center; justify-content:center;
  padding:0 5px; font-weight:800;
}
.quote-fab:hover .quote-fab-count{ background:#fff; color:var(--spark-dark); }
.quote-fab.hidden{ display:none; }

/* --- Teklif Sepeti: kayar panel --- */
.quote-drawer{
  position:fixed; top:0; right:-420px; width:min(420px,100vw); height:100vh;
  background:#fff; box-shadow:var(--shadow-lg); z-index:1001;
  display:flex; flex-direction:column; transition:right .3s var(--ease);
}
.quote-drawer.open{ right:0; }
.quote-drawer-head{
  padding:20px 22px; background:var(--ink); color:#fff; display:flex;
  align-items:center; justify-content:space-between; flex-shrink:0;
}
.quote-drawer-head h3{ color:#fff; margin:0; font-size:17px; }
.quote-drawer-head button{ background:none; border:0; color:#fff; font-size:26px; cursor:pointer; line-height:1; }
.quote-drawer-body{ flex:1; overflow-y:auto; padding:18px 22px; }
.quote-drawer-empty{ color:var(--muted); text-align:center; padding:40px 10px; font-size:14.5px; }
.quote-line{
  display:flex; align-items:center; gap:10px; padding:12px 0; border-bottom:1px solid var(--steel-line);
}
.quote-line-name{ flex:1; font-size:13.5px; font-weight:700; color:var(--ink); }
.quote-line-code{ font-size:11.5px; color:var(--muted); font-family:monospace; }
.quote-qty{ display:flex; align-items:center; gap:6px; }
.quote-qty button{
  width:24px; height:24px; border-radius:6px; border:1px solid var(--steel-line);
  background:#fff; cursor:pointer; font-weight:700; line-height:1;
}
.quote-qty span{ min-width:18px; text-align:center; font-weight:700; font-size:13px; }
.quote-remove{ background:none; border:0; color:#b00020; cursor:pointer; font-size:18px; padding:0 4px; }
.quote-drawer-foot{ padding:18px 22px; border-top:1px solid var(--steel-line); flex-shrink:0; }
.quote-drawer-foot .qd-total{ font-size:13.5px; color:var(--muted); margin-bottom:12px; }
.qd-btn{
  display:flex; align-items:center; justify-content:center; gap:8px; width:100%;
  padding:12px; border-radius:9px; border:0; font-weight:800; font-size:14px;
  cursor:pointer; margin-bottom:10px; text-decoration:none;
}
.qd-btn svg{ width:18px; height:18px; }
.qd-btn-wa{ background:#25D366; color:#fff; }
.qd-btn-wa:hover{ background:#1fb355; }
.qd-btn-mail{ background:var(--ink); color:#fff; }
.qd-btn-mail:hover{ background:var(--spark); }
.qd-btn-clear{ background:none; color:#b00020; border:1.5px solid #f1c9cf; }
.qd-btn-clear:hover{ background:#fff2f3; }
.quote-drawer-backdrop{
  position:fixed; inset:0; background:rgba(13,17,23,.45); z-index:1000;
  opacity:0; pointer-events:none; transition:opacity .25s var(--ease);
}
.quote-drawer-backdrop.open{ opacity:1; pointer-events:auto; }

.toast-added{
  position:fixed; left:50%; bottom:96px; transform:translateX(-50%) translateY(20px);
  background:var(--ink); color:#fff; padding:11px 20px; border-radius:999px;
  font-size:13.5px; font-weight:700; opacity:0; pointer-events:none; z-index:999;
  transition:opacity .25s var(--ease), transform .25s var(--ease);
}
.toast-added.show{ opacity:1; transform:translateX(-50%) translateY(0); }

@media (max-width:600px){
  .quote-fab{ right:14px; bottom:14px; padding:13px 18px 13px 15px; }
  .quote-drawer{ width:100vw; right:-100vw; }
}
