/* site.css - herkese açık sayfalar, "Tabela" tasarımı. Panel: admin.css */
:root {
  --ink: #17222E;
  --ink-2: #2C3946;
  --edge: #56626D;
  --accent: #F6D64A;
  --bg: #F3F5F6;
  --card: #FFFFFF;
  --muted: #55616C;
  --on-dark: #D3DAE0;
  --line: #DDE2E6;
  --field: #8A959E;
  --r-btn: 10px;
  --r-card: 16px;
  --display: 'Barlow Semi Condensed', 'Arial Narrow', sans-serif;
  --body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 12px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.45 var(--body); overflow-wrap: break-word; }
h1, h2, p, dl, dd { margin: 0; }
h1, h2 { font-family: var(--display); line-height: 1.12; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #1C6FD1; outline-offset: 2px; }
.top :focus-visible, .foot :focus-visible, .callbar :focus-visible, .seller-box :focus-visible { outline-color: var(--accent); }

.wrap { width: 100%; max-width: 1344px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.section { padding-top: 44px; padding-bottom: 56px; }
.muted { color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 10px; }
.panel { background: var(--card); border-radius: var(--r-card); padding: 24px; }
.panel h2 { font-size: 28px; margin-bottom: 12px; }
.page-title { font-size: 44px; font-weight: 800; margin-bottom: 24px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; z-index: 50; padding: 12px; background: var(--card); }

/* Düğmeler */
.btn {
  min-height: 48px; padding: 10px 20px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: var(--r-btn);
  font-weight: 700; line-height: 1.15; text-align: center; text-decoration: none; cursor: pointer;
}
.btn-main { background: var(--accent); color: var(--ink); }
.btn-main:hover { background: #EFC928; }
.btn-dark { background: var(--ink); color: #FFF; }
.btn-dark:hover { background: var(--ink-2); }
.btn-line { border-color: #7C8892; color: #FFF; }
.btn-line:hover { background: var(--ink-2); }
.btn-ghost { border-color: var(--field); }
.btn-big { min-height: 56px; font-size: 19px; }
.text-link, .back {
  min-height: 44px; padding: 0; display: inline-flex; align-items: center;
  border: 0; background: none; text-decoration: underline; cursor: pointer;
}
.inline-link { display: inline-block; padding: 12px 0; margin: -12px 0; }

/* Header */
.top { background: var(--ink); color: #FFF; }
.top-in { display: flex; align-items: center; gap: 28px; padding-top: 12px; padding-bottom: 12px; }
.brand { flex: none; min-height: 44px; display: flex; align-items: center; text-decoration: none; }
.brand img { width: 170px; height: 62px; }
.brand-name { font: 800 26px var(--display); }
.menu { margin: 0 auto; display: flex; flex-wrap: wrap; column-gap: 26px; }
.menu a { min-height: 44px; display: flex; align-items: center; text-decoration: none; white-space: nowrap; }
.menu a:hover { color: var(--accent); }
.top-actions { display: flex; gap: 10px; }
.top-actions .btn { white-space: nowrap; }

/* Ana sayfa */
.hero { position: relative; overflow: hidden; background: var(--ink); }
.hero img { width: 100%; height: 460px; object-fit: cover; object-position: center 4%; }
.hero-copy {
  position: absolute; left: 0; top: 48px; max-width: 600px; padding: 26px 40px;
  background: var(--ink); color: #FFF; border-radius: 0 28px 28px 0;
}
.hero-copy h1 { font-size: 56px; font-weight: 800; line-height: 1.02; }
.hero-copy p { margin-top: 14px; font-size: 20px; color: var(--on-dark); }
.plain-head { padding-bottom: 20px; }

.finder { position: relative; }
.finder-over { margin-top: -56px; }
.finder-box { background: var(--card); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.chips-label { font-weight: 600; margin-right: 4px; }
.chip { min-height: 44px; padding: 0 18px; border: 1px solid var(--field); border-radius: 22px; background: var(--card); cursor: pointer; }
.chip[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: #FFF; }
.more { display: none; }
.finder-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: end; }
.finder-fields .btn { min-height: 52px; font-size: 19px; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; min-width: 0; }
.field input, .field select {
  width: 100%; height: 52px; padding: 0 12px;
  border: 1px solid var(--field); border-radius: var(--r-btn); background: var(--card); font-weight: 400;
}

.inv-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 22px; }
.inv-head h2 { font-size: 40px; }
.inv-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.sort { display: flex; align-items: center; gap: 8px; }
.sort select { height: 44px; padding: 0 10px; border: 1px solid var(--field); border-radius: var(--r-btn); background: var(--card); }
.empty p { margin-bottom: 14px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 22px; }
.card { min-width: 0; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r-card); background: var(--card); text-decoration: none; }
.card img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: center 65%; background: var(--line); }
.card:hover .card-title > span:first-child { text-decoration: underline; }
.card-body { display: flex; flex-direction: column; gap: 4px; padding: 14px 18px 16px; min-width: 0; }
.card-title { display: flex; justify-content: space-between; gap: 10px; font: 700 23px/1.2 var(--display); }
.card-info { font-size: 16px; }
.card-price { margin-top: 6px; font: 800 29px/1.2 var(--display); }

.sell { background: var(--accent); }
.sell-in { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; padding-top: 40px; padding-bottom: 40px; }
.sell h2 { font-size: 42px; font-weight: 800; }
.sell p { margin-top: 10px; font-size: 19px; }

/* Araç detayı */
.detail { padding-top: 14px; padding-bottom: 56px; }
.back { margin-bottom: 8px; }
.detail-grid {
  display: grid; gap: 24px; align-items: start;
  /* minmax(0, …): küçük resim şeridi sayfayı taşırmasın */
  grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  grid-template-areas: 'gallery buy' 'gallery seller' 'more seller';
}
.gallery { grid-area: gallery; min-width: 0; }
.buy { grid-area: buy; min-width: 0; }
.detail-more { grid-area: more; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.detail-seller { grid-area: seller; min-width: 0; display: flex; flex-direction: column; gap: 14px; }

.photo { position: relative; }
.photo-open { display: block; width: 100%; padding: 0; overflow: hidden; border: 0; border-radius: 18px; background: var(--ink); cursor: zoom-in; }
.photo-open img { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; }
.arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; padding: 0 0 5px; border: 0; border-radius: 50%;
  background: var(--ink); color: #FFF; font-size: 36px; line-height: 1; cursor: pointer;
}
.arrow-prev { left: 12px; }
.arrow-next { right: 12px; }
.photo-count { position: absolute; left: 14px; bottom: 14px; padding: 5px 12px; border-radius: 14px; background: var(--ink); color: #FFF; font-size: 15px; }
.thumbs { position: relative; max-width: 100%; display: flex; gap: 10px; margin-top: 10px; padding-bottom: 4px; overflow-x: auto; }
.thumb { flex: none; padding: 0; overflow: hidden; border: 3px solid transparent; border-radius: var(--r-btn); background: none; cursor: pointer; }
.thumb[aria-current='true'] { border-color: var(--ink); }
.thumb img { width: 104px; height: 78px; object-fit: cover; }

.buy-box { display: flex; flex-direction: column; gap: 14px; }
.buy-box h1 { font-size: 38px; }
.price { font: 800 48px/1 var(--display); }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: 15px; }
.facts dd { font-weight: 700; }
.trade { justify-content: center; }

.description { white-space: pre-line; }
.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); column-gap: 32px; }
.specs div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--muted); }
.specs dd { min-width: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }

.condition { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; }
.condition-list { flex: 1 1 240px; display: flex; flex-direction: column; gap: 12px; }
.condition-list dt { color: var(--muted); }
.condition-list dd { font-weight: 600; }

.body-map {
  display: grid; gap: 5px;
  grid-template-columns: 78px 118px 78px;
  grid-template-rows: 36px 68px 68px 68px 68px 36px;
  grid-template-areas:
    'onTampon onTampon onTampon'
    'solOnCamurluk kaput sagOnCamurluk'
    'solOnKapi tavan sagOnKapi'
    'solArkaKapi tavan sagArkaKapi'
    'solArkaCamurluk bagaj sagArkaCamurluk'
    'arkaTampon arkaTampon arkaTampon';
}
.bp {
  display: flex; align-items: center; justify-content: center; padding: 2px;
  border: 2px dashed var(--field); border-radius: var(--r-btn);
  font-size: 13px; line-height: 1.1; text-align: center;
}
.bp:not([data-state='']) { border-style: solid; border-color: transparent; }
.bp[data-state='orijinal'] { background: #CFE6F5; }
.bp[data-state='lokal'] { background: var(--accent); }
.bp[data-state='boyali'] { background: #E08A2E; }
.bp[data-state='degisen'] { background: var(--ink); color: #FFF; }
.bp-onTampon { grid-area: onTampon; }
.bp-solOnCamurluk { grid-area: solOnCamurluk; }
.bp-kaput { grid-area: kaput; }
.bp-sagOnCamurluk { grid-area: sagOnCamurluk; }
.bp-solOnKapi { grid-area: solOnKapi; }
.bp-tavan { grid-area: tavan; }
.bp-sagOnKapi { grid-area: sagOnKapi; }
.bp-solArkaKapi { grid-area: solArkaKapi; }
.bp-sagArkaKapi { grid-area: sagArkaKapi; }
.bp-solArkaCamurluk { grid-area: solArkaCamurluk; }
.bp-bagaj { grid-area: bagaj; }
.bp-sagArkaCamurluk { grid-area: sagArkaCamurluk; }
.bp-arkaTampon { grid-area: arkaTampon; }

.seller-box { padding: 24px; border-radius: var(--r-card); background: var(--ink); color: var(--on-dark); display: flex; flex-direction: column; gap: 8px; }
.seller-box h2 { color: #FFF; font-size: 24px; }
.safety { padding: 14px 18px; border: 1px solid #C9D0D5; border-radius: 14px; }

.lightbox { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; overflow: hidden; background: #0B1117; }
.lightbox img { width: 100%; height: 100%; object-fit: contain; }
.lightbox-close {
  position: absolute; top: 12px; right: 12px; min-height: 44px; padding: 0 18px;
  border: 0; border-radius: var(--r-btn); background: var(--accent); color: var(--ink); font-weight: 700; cursor: pointer;
}
.lightbox .arrow { background: var(--ink-2); }

/* İletişim, giriş, bilgi */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 24px; }
.contact .panel h2 { font-size: 24px; margin: 18px 0 6px; }
.contact .panel h2:first-child { margin-top: 0; }
.contact .stack { margin-top: 22px; }
.contact .text-link { overflow-wrap: anywhere; }
.map { width: 100%; height: 100%; min-height: 420px; border: 0; border-radius: var(--r-card); }
.login { max-width: 460px; padding-top: 44px; padding-bottom: 64px; }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.notice { padding-top: 80px; padding-bottom: 96px; }
.notice h1 { font-size: 44px; }
.notice p { margin: 12px 0 22px; max-width: 520px; }

/* Footer */
.foot { background: var(--ink); color: var(--on-dark); }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 28px; padding-top: 40px; padding-bottom: 40px; }
.foot h2 { color: #FFF; font-size: 20px; margin-bottom: 8px; }
.foot-link { width: fit-content; max-width: 100%; min-height: 44px; display: flex; align-items: center; color: #FFF; overflow-wrap: anywhere; }
.hours { max-width: 290px; }
.hours div { display: flex; justify-content: space-between; gap: 14px; padding: 3px 0; }
.hours dd { font-weight: 600; }

.callbar { display: none; }

@media (max-width: 1080px) {
  .top-in { flex-wrap: wrap; gap: 4px 16px; }
  .menu { order: 3; width: 100%; margin: 0; }
  .top-actions { margin-left: auto; }
}

@media (max-width: 900px) {
  .finder-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact { grid-template-columns: minmax(0, 1fr); }
  .detail-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-template-areas: 'gallery' 'buy' 'more' 'seller';
    gap: 14px;
  }
  .map { min-height: 320px; }
}

@media (max-width: 700px) {
  body { font-size: 16px; padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  body:not(:has(.callbar)) { padding-bottom: 0; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  .section { padding-top: 14px; padding-bottom: 28px; }
  .page-title, .notice h1 { font-size: 32px; margin-bottom: 14px; }

  .top-in { flex-wrap: nowrap; justify-content: space-between; gap: 8px; padding-top: 6px; padding-bottom: 6px; }
  .brand img { width: 115px; height: 42px; }
  .brand-name { font-size: 19px; }
  .top-actions { display: none; }
  .menu { order: 0; width: auto; column-gap: 14px; }
  .menu a { font-size: 15px; }
  .menu a[href='/#sat'] { display: none; }

  .hero img { height: 170px; object-position: 85% center; }
  .hero-copy { top: auto; bottom: 12px; padding: 8px 18px; border-radius: 0 16px 16px 0; }
  .hero-copy h1 { font-size: 27px; line-height: 1.08; }
  .hero-copy p { display: none; }
  .plain-head { padding-top: 18px; }

  .finder { padding: 0; }
  .finder-over { margin-top: 0; }
  .finder-box { border-radius: 0; padding: 12px 16px 4px; gap: 4px; }
  .chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .chips-label { grid-column: 1 / -1; }
  .chip { padding: 0 4px; border-radius: var(--r-btn); }
  .more { display: block; min-height: 44px; padding: 0; border: 0; background: none; text-align: left; text-decoration: underline; cursor: pointer; }
  .finder-fields { display: none; grid-template-columns: minmax(0, 1fr); padding-bottom: 12px; }
  .finder-fields.open { display: grid; }

  .inv-head { margin-bottom: 10px; gap: 6px; }
  .inv-head h2 { font-size: 23px; }
  .sort { font-size: 0; }
  .sort select { font-size: 15px; max-width: 180px; }
  .cards { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .card { flex-direction: row; min-height: 118px; }
  /* contain:size - dikey fotoğraf kartı uzatmasın, yüksekliği metin belirlesin */
  .card img { flex: none; width: 40%; height: auto; align-self: stretch; aspect-ratio: auto; min-height: 118px; contain: size; }
  .card-body { flex: 1; padding: 10px 12px; gap: 3px; }
  .card-title { font-size: 19px; }
  .card-info { font-size: 14px; }
  .card-price { margin-top: auto; font-size: 22px; }

  .sell-in { padding-top: 28px; padding-bottom: 28px; }
  .sell h2 { font-size: 30px; }
  .sell .btn { width: 100%; }

  .detail { padding-top: 0; padding-bottom: 24px; }
  .back { margin: 0; }
  .photo, .thumbs { margin-left: -16px; margin-right: -16px; }
  .photo-open { border-radius: 0; }
  .photo-open img { aspect-ratio: 4 / 3; max-height: 38vh; }
  .thumbs { max-width: none; margin-top: 4px; padding: 0 16px 2px; gap: 6px; }
  .thumb img { width: 60px; height: 45px; }
  .panel, .seller-box { padding: 16px; }
  .panel h2 { font-size: 22px; }
  .buy-box { gap: 8px; }
  .buy-box h1 { font-size: 24px; }
  .price { font-size: 38px; }
  .facts { gap: 8px; padding: 10px 0 0; border-bottom: 0; }
  .buy-actions { display: none; }
  .body-map { width: 100%; max-width: 340px; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) minmax(0, 2fr); }

  .callbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px;
    padding: 9px 12px calc(9px + env(safe-area-inset-bottom)); background: var(--ink);
  }
  .callbar .btn { padding: 10px 4px; }
}
