/* Market Products tab (market_all catalog)
   Keep it lightweight and compatible with existing .btn/.card/.input styles.
*/

.mp-view{display:none;}
.mp-view.mp-active{display:block;}

.mp-products{margin-top:10px;}

.mp-top{display:flex;gap:10px;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;}
.mp-presets{display:flex;gap:8px;flex-wrap:wrap;}
.mp-filters{display:flex;gap:8px;align-items:center;flex-wrap:wrap;}

/* Keep controls aligned with the chart/toolbars (Apple-ish cleanliness) */
.mp-search,
.mp-sort{
  height: 42px;
}
.mp-presets .btn.small{border-radius:999px;}

.mp-note{
  margin-top:10px;
  padding:8px 10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
  line-height:1.35;
}
:root[data-theme="light"] .mp-note{
  border-color:rgba(0,0,0,.08);
  background:rgba(0,0,0,.03);
}

.mp-search{min-width:240px;}
@media (max-width: 640px){
  .mp-filters{width:100%;}
  .mp-search{min-width:0;width:100%;}
  .mp-sort{flex:1;min-width:0;}
}

.mp-status{margin:10px 0;}

.mp-head{
  display:grid;
  grid-template-columns: 1.6fr 0.8fr 0.55fr 0.7fr 100px;
  gap:10px;
  align-items:center;
  padding:8px 6px;
  border-top:1px solid rgba(255,255,255,.10);
  border-bottom:1px solid rgba(255,255,255,.08);
  font-size:12px;
  color:var(--muted);
}
:root .mp-head > div{min-width:0;}
:root[data-theme="light"] .mp-head{border-top:1px solid rgba(0,0,0,.08);border-bottom:1px solid rgba(0,0,0,.07);}
.mp-h-right{text-align:right;white-space:nowrap;}

.mp-list{margin-top:0;}

.mp-row{
  display:grid;
  grid-template-columns: 1.6fr 0.8fr 0.55fr 0.7fr 100px;
  gap:10px;
  align-items:center;
  padding:12px 6px;
  border-bottom:1px solid rgba(255,255,255,.08);
  cursor:pointer;
  user-select:none;
  -webkit-tap-highlight-color: transparent;
}
:root[data-theme="light"] .mp-row{border-bottom:1px solid rgba(0,0,0,.07);}

.mp-row:hover{background:rgba(255,255,255,.04);}
:root[data-theme="light"] .mp-row:hover{background:rgba(0,0,0,.03);}

.mp-row{transition: background .16s ease, transform .16s ease;}
.mp-row:hover{transform: translateY(-1px);}

.mp-main{min-width:0;}
.mp-title{font-weight:800;letter-spacing:-.2px;line-height:1.2;white-space:normal;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;}
.mp-sub{
  font-size:12.5px;
  color:var(--muted);
  margin-top:6px;
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  white-space:normal;
  overflow:visible;
}

/* Small pills to avoid confusion ("kategori" gibi görünmesin) */
.mp-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:3px 8px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  line-height:1.2;
}
:root[data-theme="light"] .mp-chip{
  border-color:rgba(0,0,0,.10);
  background:rgba(0,0,0,.03);
}
.mp-chip-k{
  font-size:11px;
  color:var(--muted);
}

.mp-price{text-align:right;font-weight:900;white-space:nowrap;letter-spacing:-.2px;}
.mp-unit{
  display:inline-block;
  margin-left:6px;
  padding:1px 7px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  font-size:12px;
  font-weight:800;
  color:var(--muted);
}
:root[data-theme="light"] .mp-unit{
  border-color:rgba(0,0,0,.10);
  background:rgba(0,0,0,.03);
}
.mp-date{text-align:right;font-size:12px;color:var(--muted);margin-top:2px;white-space:nowrap;}
.mp-price-meta{opacity:.85;}
.mp-pack{text-align:right;font-size:12px;color:var(--muted);margin-top:2px;white-space:nowrap;}
.mp-offers{text-align:right;font-weight:700;white-space:nowrap;}
.mp-change{text-align:right;font-weight:800;white-space:nowrap;}
.mp-change.up{color:rgba(84,209,200,.95);}
.mp-change.down{color:rgba(255,110,110,.95);}
.mp-change.flat{color:var(--muted);}

.mp-spark{display:flex;justify-content:flex-end;}
.mp-spark svg{width:100px;height:28px;display:block;color:rgba(255,255,255,.65);}
:root[data-theme="light"] .mp-spark svg{color:rgba(0,0,0,.55);}
.mp-spark polyline{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;opacity:.95;}

.mp-expand{
  grid-column:1/-1;
  max-height:0;
  overflow:hidden;
  opacity:0;
  padding:0 6px;
  border-bottom:0;
  transition: max-height .22s ease, opacity .22s ease, padding .22s ease;
}
.mp-expand.open{
  max-height:520px;
  opacity:1;
  padding:10px 6px 14px;
  border-bottom:1px solid rgba(255,255,255,.08);
}
:root[data-theme="light"] .mp-expand.open{border-bottom:1px solid rgba(0,0,0,.07);}
.mp-expand .mp-expand-inner{
  padding:12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.05);
}
:root[data-theme="light"] .mp-expand .mp-expand-inner{
  border-color:rgba(0,0,0,.08);
  background:rgba(255,255,255,.80);
}

.mp-expand h4{margin:0 0 8px;font-size:13px;font-weight:800;}
.mp-detail{display:flex;flex-direction:column;gap:8px;}
.mp-detail svg{width:100%;height:160px;display:block;color:rgba(255,255,255,.75);}
:root[data-theme="light"] .mp-detail svg{color:rgba(0,0,0,.65);}
.mp-detail polyline{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
.mp-detail .mp-detail-meta{display:flex;gap:10px;flex-wrap:wrap;font-size:12px;color:var(--muted);}

.mp-pager{display:flex;gap:10px;align-items:center;justify-content:center;margin-top:12px;}
.mp-pager .btn.small{min-width:40px;text-align:center;}

@media(max-width: 840px){
  .mp-head{grid-template-columns: 1fr 0.8fr 0.7fr 100px;}
  .mp-h-offers{display:none;}
  .mp-row{grid-template-columns: 1fr 0.8fr 0.7fr 100px;}
  .mp-offers{display:none;}
}
@media(max-width: 640px){
  .mp-head{grid-template-columns: 1fr 0.8fr 0.7fr;}
  .mp-row{grid-template-columns: 1fr 0.8fr 0.7fr;}
  .mp-spark{display:none;}
}

/* --- Product detail chart polish (clean, readable, no clutter) --- */
.mp-detail-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
}
.mp-detail-sub{font-size:12px;color:var(--muted);white-space:nowrap;}

.mp-detail-chart{
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.03);
  padding:8px;
}
:root[data-theme="light"] .mp-detail-chart{
  border-color:rgba(0,0,0,.08);
  background:rgba(0,0,0,.02);
}

.mp-detail svg.mp-chart{height:190px;}

.mp-chart .mp-grid line{stroke:currentColor;stroke-width:1;opacity:.10;}
.mp-chart .mp-area{fill:currentColor;opacity:.08;}
.mp-chart .mp-line{fill:none;stroke:currentColor;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round;opacity:.92;}
.mp-chart .mp-dot{fill:currentColor;opacity:.85;stroke:rgba(255,255,255,.35);stroke-width:1;}
:root[data-theme="light"] .mp-chart .mp-dot{stroke:rgba(0,0,0,.22);}

.mp-chart .mp-axis text{
  fill:currentColor;
  opacity:.58;
  font-size:11px;
}
