/* ColorMag benzeri vitrin — açık magazin görünümü */
:root {
  --cm-primary: #207daf;
  --cm-primary-light: #9bc8da;
  --cm-nav: #27272a;
  --cm-bg: #f8f8f8;
  --cm-white: #ffffff;
  --cm-text: #333333;
  --cm-muted: #888888;
  --cm-line: #e4e4e7;
  --cm-line2: #d4d4d8;
  --cm-ok: #1f9d55;
  --cm-wa: #128c7e;
  --cm-danger: #c0392b;
  --cm-wrap: 1160px;
  --cm-radius: 2px;
  --font: "Open Sans", "Segoe UI", Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--cm-bg);
  color: var(--cm-text);
  min-height: 100vh;
  line-height: 1.55;
  font-size: 15px;
}
a { color: var(--cm-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
.wrap {
  max-width: var(--cm-wrap);
  margin: 0 auto;
  padding: 0 16px;
}

/* —— Üst ince çubuk (ColorMag top bar) —— */
.cm-topbar {
  background: #f1f1f1;
  border-bottom: 1px solid var(--cm-line);
  font-size: 13px;
  color: var(--cm-muted);
}
.cm-topbar .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 36px;
  flex-wrap: wrap;
  padding-top: 6px;
  padding-bottom: 6px;
}
.cm-topbar a { color: var(--cm-text); font-weight: 600; }
.cm-topbar a:hover { color: var(--cm-primary); text-decoration: none; }

/* —— Logo + başlık satırı —— */
.cm-header {
  background: var(--cm-white);
  padding: 18px 0;
  border-bottom: 1px solid var(--cm-line);
}
.cm-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.brand img {
  height: 56px;
  width: auto;
  object-fit: contain;
  display: block;
}
.brand-text { display: flex; flex-direction: column; gap: 2px; }
.brand-title {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--cm-text);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.brand-tag {
  font-size: 0.85rem;
  color: var(--cm-muted);
}
.header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* —— Ana menü (koyu şerit + renkli üst çizgi) —— */
.cm-nav {
  background: var(--cm-nav);
  border-top: 4px solid var(--cm-primary);
}
.cm-nav .wrap {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 0;
  padding-left: 0;
  padding-right: 0;
}
.cm-nav button,
.cm-nav a.nav-item {
  appearance: none;
  background: transparent;
  border: 0;
  color: #fff;
  font-family: var(--font);
  font-weight: 600;
  font-size: 14px;
  padding: 14px 18px;
  cursor: pointer;
  border-right: 1px solid rgba(255,255,255,.08);
  text-decoration: none;
}
.cm-nav button:hover,
.cm-nav a.nav-item:hover {
  background: var(--cm-primary);
  text-decoration: none;
}
.cm-nav .wa {
  margin-left: auto;
  background: var(--cm-wa) !important;
  border-right: 0;
}
.cm-nav .wa:hover { filter: brightness(1.08); }

/* —— Butonlar —— */
.btn, button, .file-btn {
  background: var(--cm-primary);
  color: #fff;
  border: 0;
  border-radius: var(--cm-radius);
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 600;
  font-family: var(--font);
  font-size: 14px;
}
.btn:hover, button:hover { filter: brightness(1.05); }
.btn.ghost, button.ghost {
  background: transparent;
  border: 1px solid var(--cm-line2);
  color: var(--cm-text);
}
.btn.ghost:hover, button.ghost:hover {
  border-color: var(--cm-primary);
  color: var(--cm-primary);
  filter: none;
}
.btn:disabled, button:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.btn.wa, a.btn.wa { background: var(--cm-wa); color: #fff; }

/* —— Banner / slider —— */
.banner-wrap {
  margin: 20px 0 24px;
  overflow: hidden;
  border: 1px solid var(--cm-line);
  background: var(--cm-white);
  position: relative;
  min-height: 160px;
}
.banner-slide { display: none; width: 100%; }
.banner-slide.active { display: block; }
.banner-slide img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  display: block;
}
.banner-dots {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  text-align: center;
}
.banner-dots span {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  opacity: .55;
  margin: 0 3px;
  cursor: pointer;
  box-shadow: 0 0 2px rgba(0,0,0,.4);
}
.banner-dots span.on { opacity: 1; background: var(--cm-primary); }

/* —— İçerik kutuları —— */
.panel {
  background: var(--cm-white);
  border: 1px solid var(--cm-line);
  padding: 18px;
  margin-bottom: 20px;
}
.cm-title {
  margin: 0 0 14px;
  padding: 0 0 8px 12px;
  border-left: 4px solid var(--cm-primary);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--cm-text);
  text-transform: uppercase;
  letter-spacing: .02em;
}
.panel h2.cm-title, .panel h3.cm-title { margin-bottom: 14px; }
.panel h2:not(.cm-title), .panel h3:not(.cm-title) {
  margin: 0 0 12px;
  color: var(--cm-text);
}
.row { display: flex; flex-wrap: wrap; gap: 12px; }
input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--cm-radius);
  border: 1px solid var(--cm-line2);
  background: #fff;
  color: var(--cm-text);
  font-family: var(--font);
  font-size: 14px;
}
input:focus, select:focus, textarea:focus {
  outline: 1px solid var(--cm-primary);
  border-color: var(--cm-primary);
}
label {
  display: block;
  font-size: .8rem;
  color: var(--cm-muted);
  margin-bottom: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.field { flex: 1 1 160px; }
.finder-row .field { flex: 1 1 180px; min-width: 160px; }
.finder-row select {
  height: 44px;
  font-size: 14px;
  background: #fff;
}
.muted { color: var(--cm-muted); }
.hidden { display: none !important; }

/* —— Kart ızgarası —— */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.card {
  background: var(--cm-white);
  border: 1px solid var(--cm-line);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease;
}
.card:hover {
  border-color: var(--cm-primary);
  box-shadow: 0 10px 28px rgba(32, 125, 175, .12);
  transform: translateY(-2px);
}
/* Sadece ürün fotoğrafı — marka logosuna width:100% basmasın (yanında dikey T-A-B yazısı çıkıyordu) */
.card > img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: contain;
  background: linear-gradient(180deg, #f7fafc 0%, #eef3f7 100%);
  display: block;
  border-bottom: 1px solid var(--cm-line);
  flex: 0 0 auto;
}
.card .body {
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
}
.card .kart-ust {
  flex: 0 0 auto;
  min-width: 0;
}
.card .kart-orta {
  flex: 1 1 auto;
  min-height: 2.6em;
  margin-top: 6px;
}
.card .kart-alt {
  flex: 0 0 auto;
  margin-top: auto;
  padding-top: 10px;
}
.card .title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--cm-text);
  line-height: 1.35;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}
.card .urun-baslik-satir {
  min-height: 4.2em;
}
.card .kart-aksiyon {
  padding-top: 8px;
  display: flex;
  gap: 6px;
}
.card .price {
  color: var(--cm-primary);
  font-weight: 700;
  margin: 0;
  font-size: 1.05rem;
  min-height: 1.4em;
}
.card .olcu-uyari-slot {
  min-height: 3.6em;
  margin-top: 6px;
}
.card .olcu-uyari-slot .olcu-uyari {
  margin-top: 0;
}
.card .kart-aciklama {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: 2.6em;
}
.card .kart-yil {
  min-height: 1.2em;
}
.card .meta {
  color: var(--cm-muted);
  font-size: .8rem;
  margin-top: 4px;
}
.card .meta strong { color: var(--cm-text); font-weight: 600; }

/* Araç sonuç kartı */
.arac-kart .arac-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.arac-kart .arac-chip {
  display: inline-block;
  background: #f1f6fa;
  color: #3a5568;
  border: 1px solid #d9e6ef;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  line-height: 1.3;
}
.arac-kart .title { min-height: 0; }

/* Seçilen araç detay */
.arac-detay-panel { overflow: hidden; }
.arac-hero {
  display: grid;
  grid-template-columns: minmax(180px, 320px) 1fr;
  gap: 22px;
  align-items: start;
  margin-top: 14px;
}
.arac-hero-img {
  background: linear-gradient(180deg, #f7fafc 0%, #e8f0f6 100%);
  border: 1px solid var(--cm-line);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
}
.arac-hero-img img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  display: block;
}
.arac-hero-info .cm-title {
  margin: 0 0 12px;
  font-size: 1.45rem;
}
.arac-ozet {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 4px;
}
.arac-ozet .oz {
  background: #f7fafc;
  border: 1px solid var(--cm-line);
  padding: 10px 12px;
}
.arac-ozet .oz span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--cm-muted);
  font-weight: 700;
  margin-bottom: 4px;
}
.kategori-grid {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.kategori-kart .body { text-align: center; padding: 22px 14px; }
.kategori-kart .title { min-height: 0; margin-bottom: 4px; }

/* Araç seçilince: marka logoları + sol kategori + ürün ızgarası */
.arac-mini-panel .arac-mini {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
}
.arac-mini-panel .arac-mini img {
  width: 88px;
  height: 66px;
  object-fit: contain;
  background: #f7fafc;
  border: 1px solid var(--cm-line);
  flex: 0 0 auto;
}
.marka-filtre-baslik {
  font-size: 13px;
  font-weight: 700;
  color: var(--cm-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 10px;
}
.marka-filtre {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.marka-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 72px;
  max-width: 100px;
  padding: 8px 6px;
  border: 1px solid var(--cm-line);
  background: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  color: var(--cm-text);
  line-height: 1.2;
  text-align: center;
}
.marka-chip img {
  width: 56px;
  height: 22px;
  object-fit: contain;
}
.marka-chip.active,
.marka-chip:hover {
  border-color: var(--cm-primary);
  color: var(--cm-primary);
  box-shadow: 0 0 0 1px rgba(32, 125, 175, .25);
}
.urun-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  align-items: start;
  margin-top: 4px;
}
.kategori-sidebar {
  position: sticky;
  top: 72px;
  padding: 12px !important;
}
.kategori-sidebar-baslik {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--cm-text);
}
.kategori-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.kategori-nav button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--cm-text);
  cursor: pointer;
  border-radius: 0;
  box-shadow: none;
}
.kategori-nav button:hover {
  background: #f1f6fa;
}
.kategori-nav button.active {
  background: #e8f3fa;
  border-left-color: var(--cm-primary);
  color: var(--cm-primary);
}
.kategori-nav button .adet {
  color: var(--cm-muted);
  font-size: 11px;
  font-weight: 700;
}
.urun-layout-main { min-width: 0; }
@media (max-width: 860px) {
  .urun-layout {
    grid-template-columns: 1fr;
  }
  .kategori-sidebar {
    position: static;
  }
  .kategori-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .kategori-nav button {
    width: auto;
    border-left: none;
    border-bottom: 2px solid transparent;
  }
  .kategori-nav button.active {
    border-left: none;
    border-bottom-color: var(--cm-primary);
  }
}
.uye-siparis {
  border: 1px solid var(--cm-line);
  background: #fff;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.uye-siparis .kalem {
  padding: 8px 0;
  border-top: 1px solid var(--cm-line);
  font-size: 14px;
}
.urun-baslik-satir {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}
.marka-logo {
  width: 72px !important;
  height: 28px !important;
  max-width: 40%;
  object-fit: contain;
  object-position: left center;
  background: #fff;
  border: 1px solid var(--cm-line);
  flex: 0 0 auto;
  aspect-ratio: auto !important;
  border-bottom: 1px solid var(--cm-line) !important;
}
.marka-logo-lg {
  width: 96px !important;
  height: 36px !important;
}
.olcu-uyari {
  margin-top: 8px;
  padding: 8px 10px;
  background: #fff8e8;
  border: 1px solid #f0d58a;
  color: #7a5a10;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 600;
}
@media (max-width: 720px) {
  .arac-hero { grid-template-columns: 1fr; }
  .arac-hero-img { min-height: 140px; }
}

.main-pad { padding-top: 20px; padding-bottom: 88px; }
.arac-sticky {
  background: #fff;
  border-bottom: 2px solid var(--cm-primary);
  position: sticky;
  top: 0;
  z-index: 40;
}
.arac-sticky-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
}
.arac-sticky-inner img {
  width: 56px;
  height: 40px;
  object-fit: contain;
  background: #f7fafc;
  border: 1px solid var(--cm-line);
}
.arac-sticky-text { flex: 1; min-width: 0; }
.arac-sticky-text strong { display: block; font-size: 14px; }
.wa-fab {
  position: fixed;
  right: 16px;
  bottom: 72px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #128c7e;
  color: #fff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  text-decoration: none !important;
  z-index: 50;
  box-shadow: 0 4px 14px rgba(0,0,0,.2);
}
.mobil-nav {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--cm-nav);
  z-index: 45;
  grid-template-columns: repeat(5, 1fr);
}
.mobil-nav button {
  background: transparent;
  color: #ddd;
  border: 0;
  padding: 10px 4px;
  font-size: 11px;
}
@media (max-width: 720px) {
  .mobil-nav { display: grid; }
  .header-actions .ghost:nth-child(1) { display: none; }
}
.sozlesme-kutu { margin: 8px 0; border: 1px solid var(--cm-line); padding: 8px 12px; background: #fff; }
.sozlesme-metin { white-space: pre-wrap; font-size: 12px; max-height: 180px; overflow: auto; margin: 8px 0 0; }
.check-line {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 10px 0;
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
  color: var(--cm-text);
}
.stok-rozet {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  margin-top: 4px;
  background: #eef7f0;
  color: #1f7a3a;
  border: 1px solid #cfe8d6;
}
.stok-rozet.yok { background: #f7f7f7; color: #666; border-color: #ddd; }
.detay-aksiyon { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* —— Sepet —— */
.sepet-cizgi {
  display: flex;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--cm-line);
  padding: 12px 0;
}
.sepet-cizgi img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: #fafafa;
  border: 1px solid var(--cm-line);
}

/* —— Alt bilgi —— */
.cm-footer {
  margin-top: 40px;
  background: var(--cm-nav);
  color: #c8c8c8;
  border-top: 3px solid var(--cm-primary);
  padding: 28px 0 18px;
  font-size: 14px;
}
.cm-footer .wrap {
  display: grid;
  gap: 16px;
}
.cm-footer strong { color: #fff; }
.cm-footer-copy {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: 12px;
  color: #999;
}

/* —— Toast —— */
.toast {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--cm-nav);
  color: #fff;
  border: 0;
  padding: 12px 18px;
  border-radius: 2px;
  z-index: 50;
  display: none;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.toast.show { display: block; }

/* —— Yönetim paneli (ColorMag özelleştirici tadı) —— */
.admin-shell { background: #f0f0f1; min-height: 100vh; }
.admin-top {
  background: #1d2327;
  color: #fff;
  padding: 12px 0;
  border-bottom: 3px solid var(--cm-primary);
}
.admin-top .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.admin-top a { color: #fff; }
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  padding: 20px 0 40px;
}
.admin-nav {
  background: #fff;
  border: 1px solid var(--cm-line);
  padding: 8px;
}
.admin-nav button {
  width: 100%;
  margin-bottom: 4px;
  text-align: left;
  background: transparent;
  color: var(--cm-text);
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 0;
  padding: 10px 12px;
}
.admin-nav button:hover,
.admin-nav button.active {
  background: #f6f7f7;
  border-left-color: var(--cm-primary);
  color: var(--cm-primary);
  filter: none;
}
.admin-nav .nav-group {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--cm-muted);
  font-weight: 700;
  padding: 10px 12px 4px;
  letter-spacing: .04em;
}
.checks {
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--cm-line);
  padding: 8px;
  background: #fff;
}
.check-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 6px 4px;
  border-bottom: 1px solid var(--cm-line);
}
.check-row input { width: auto; }
.color-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.color-row input[type=color] {
  width: 48px;
  height: 40px;
  padding: 2px;
  cursor: pointer;
}

@media (max-width: 800px) {
  .admin-layout { grid-template-columns: 1fr; }
  .cm-nav .wrap { padding-left: 0; }
  .cm-nav .wa { margin-left: 0; width: 100%; text-align: center; }
  .brand-title { font-size: 1.25rem; }
}
