:root {
  --bg: #f5f5f3;
  --surface: #ffffff;
  --ink: #141414;
  --muted: #64645f;
  --line: #e3e2dd;
  --brand: #111111;
  --brand-ink: #ffffff;
  --accent: #f5c400;
  --accent-ink: #111111;
  --ok: #18753a;
  --ok-bg: #e4f3e8;
  --no: #a1261c;
  --no-bg: #fbe8e6;
  --wa: #1fa855;
  --radius: 12px;
  --tap: 46px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e0e; --surface: #191919; --ink: #f2f2ee; --muted: #a5a59e; --line: #2c2c29;
    --ok: #7fd394; --ok-bg: #15301d; --no: #ff8f85; --no-bg: #3a1714;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1 { font-size: 1.45rem; line-height: 1.25; margin: 4px 0 12px; }
h2 { font-size: 1.15rem; margin: 28px 0 12px; }
.wrap { max-width: 1180px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; z-index: 99; background: var(--accent); color: #111; padding: 8px 12px; border-radius: 6px; }

/* Üst kısım */
.dealer-bar { background: var(--accent); color: #111; font-size: .875rem; padding: 6px 16px; display: flex; justify-content: space-between; gap: 12px; }
.dealer-links { display: flex; gap: 14px; align-items: center; }
.dealer-links form { margin: 0; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.site-head { background: var(--brand); color: var(--brand-ink); position: sticky; top: 0; z-index: 30; padding-bottom: 10px; }
.head-row { display: flex; align-items: center; gap: 12px; height: 58px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.logo img { width: 52px; height: auto; }
.logo-text { font-weight: 800; letter-spacing: .02em; line-height: 1.05; font-size: 1.05rem; }
.logo-text small { display: block; font-weight: 500; letter-spacing: .28em; font-size: .7rem; color: var(--accent); }
.head-nav { display: none; gap: 20px; }
.head-nav a { text-decoration: none; opacity: .9; }
.head-nav a:hover { color: var(--accent); }
.cart-btn { position: relative; display: grid; place-items: center; width: var(--tap); height: var(--tap); border-radius: 10px; color: #fff; }
.cart-btn:hover { background: rgba(255,255,255,.08); }
.cart-count { position: absolute; top: 3px; right: 1px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--accent); color: #111; font-size: .75rem; font-weight: 800; display: grid; place-items: center; }
.search { display: flex; gap: 0; }
.search input { flex: 1; min-width: 0; height: var(--tap); border: 0; border-radius: 10px 0 0 10px; padding: 0 14px; font: inherit; background: #fff; color: #111; }
.search button { width: 54px; border: 0; border-radius: 0 10px 10px 0; background: var(--accent); color: #111; cursor: pointer; display: grid; place-items: center; }
.search input:focus { outline: 3px solid var(--accent); outline-offset: -3px; }
@media (min-width: 760px) {
  .head-nav { display: flex; }
  .site-head { padding-bottom: 0; }
  .site-head .wrap.head-row { height: 68px; }
  .search { position: absolute; top: 11px; left: 50%; transform: translateX(-50%); width: min(460px, 40vw); padding: 0; }
}

.main { padding-top: 16px; padding-bottom: 48px; min-height: 60vh; }
.flash { padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; font-weight: 600; }
.flash-ok { background: var(--ok-bg); color: var(--ok); }
.flash-err { background: var(--no-bg); color: var(--no); }
.crumbs { font-size: .85rem; color: var(--muted); margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span[aria-hidden] { opacity: .6; }

/* Ana sayfa */
.hero { background: var(--brand); color: #fff; border-radius: var(--radius); padding: 22px 18px; margin-bottom: 8px; display: grid; gap: 14px; align-items: center; }
.hero img { width: 200px; max-width: 60%; }
.hero p { margin: 0; color: #d9d9d4; }
.hero b { color: var(--accent); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (min-width: 760px) { .hero { grid-template-columns: 260px 1fr; padding: 28px; } .hero img { width: 240px; } }
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .cat-grid { grid-template-columns: repeat(4, 1fr); } }
.cat-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; text-decoration: none; display: flex; flex-direction: column; gap: 2px; min-height: 76px; }
.cat-tile b { font-size: 1rem; }
.cat-tile span { color: var(--muted); font-size: .85rem; }
.cat-tile:hover { border-color: var(--accent); }
.cat-tile.brand { border-left: 4px solid var(--accent); }
.brands { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; font-size: .9rem; white-space: nowrap; }
.chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; scrollbar-width: thin; }
.steps { display: grid; gap: 10px; counter-reset: s; padding: 0; margin: 0; list-style: none; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px 12px 52px; position: relative; }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; left: 14px; top: 12px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #111; font-weight: 800; display: grid; place-items: center; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }

/* Ürün kartları */
.list-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(4, 1fr); gap: 14px; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card-img { aspect-ratio: 1; background: #fff; display: grid; place-items: center; border-bottom: 1px solid var(--line); }
.card-img img { width: 100%; height: 100%; object-fit: contain; }
.card-img .ph { width: 46%; opacity: .18; }
@media (prefers-color-scheme: dark) { .card-img .ph, .product-img .ph { opacity: .35; filter: invert(1); } }
.card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-name { font-weight: 600; font-size: .95rem; line-height: 1.3; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-name:hover { text-decoration: underline; }
.card-code { font-size: .78rem; color: var(--muted); word-break: break-all; }
.card-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 6px; }
.price { font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.price-sub { font-size: .8rem; color: var(--muted); }
.dealer-price { color: var(--ok); }
.stock { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; }
.stock::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.stock.in { color: var(--ok); }
.stock.out { color: var(--no); }
.stock.supply { color: #a15c00; } /* tedarikten gelir (Sürat): stokta değil ama sipariş verilebilir */

/* Butonlar */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 0 18px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #111; }
.btn-dark { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-wa { background: var(--wa); border-color: var(--wa); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { min-height: 40px; padding: 0 12px; font-size: .9rem; }
.btn.added { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }

/* Ürün sayfası */
.product { display: grid; gap: 18px; }
@media (min-width: 800px) { .product { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; } }
.product-img { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; }
.product-img img { width: 100%; height: 100%; object-fit: contain; }
.product-img .ph { width: 34%; opacity: .15; }
.product-info { display: flex; flex-direction: column; gap: 12px; }
.facts { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: .95rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; word-break: break-word; }
.big-price { font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.qty button { width: var(--tap); height: var(--tap); border: 0; background: none; font-size: 1.3rem; color: var(--ink); cursor: pointer; }
.qty input { width: 52px; height: var(--tap); text-align: center; border: 0; background: none; font: inherit; font-weight: 700; color: var(--ink); -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.buy-row { display: flex; gap: 10px; flex-wrap: wrap; }
.buy-row .btn { flex: 1 1 160px; }
.note { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; font-size: .9rem; }

/* Sepet */
.cart-list { display: flex; flex-direction: column; gap: 10px; }
.cart-item { display: grid; grid-template-columns: 72px 1fr; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.cart-item .thumb { width: 72px; height: 72px; border-radius: 8px; background: #fff; border: 1px solid var(--line); object-fit: contain; }
.cart-item .ph-box { width: 72px; height: 72px; border-radius: 8px; background: var(--bg); }
.cart-item .ci-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.cart-item .ci-name { font-weight: 600; text-decoration: none; line-height: 1.3; }
.cart-item .ci-warn { color: var(--no); font-size: .82rem; font-weight: 600; }
.remove { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: .85rem; padding: 8px 0; }
.summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.summary-row { display: flex; justify-content: space-between; font-size: 1.15rem; font-weight: 800; }
.cart-layout { display: grid; gap: 4px; }
@media (min-width: 900px) { .cart-layout { grid-template-columns: 1fr 360px; gap: 24px; align-items: start; } .cart-layout .summary { margin-top: 0; position: sticky; top: 90px; } }
.empty { text-align: center; padding: 40px 16px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }

/* Sayfalama */
.pager { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 22px 0 0; }

/* İletişim */
.contact-grid { display: grid; gap: 14px; }
@media (min-width: 800px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.panel h2 { margin-top: 0; }
.hours { width: 100%; border-collapse: collapse; }
.hours td { padding: 6px 0; border-bottom: 1px solid var(--line); }
.hours td + td { text-align: right; font-weight: 600; }
.map-box { aspect-ratio: 4 / 3; background: var(--bg); border-radius: 10px; display: grid; place-items: center; text-align: center; padding: 16px; overflow: hidden; }
.map-box iframe { width: 100%; height: 100%; border: 0; }

/* Formlar (esnaf girişi) */
.form-card { max-width: 420px; margin: 20px auto; }
label { display: block; font-weight: 600; font-size: .9rem; margin: 12px 0 4px; }
.form-card input { width: 100%; min-height: var(--tap); padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; }
.form-card input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Alt kısım */
.site-foot { background: var(--brand); color: #d6d6d0; font-size: .92rem; padding: 28px 0 90px; }
.site-foot h2 { color: #fff; font-size: .95rem; margin: 0 0 6px; }
.site-foot p { margin: 0 0 14px; }
.site-foot a { color: #fff; }
.foot-grid { display: grid; gap: 18px; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1.1fr 1fr 1fr; } }
.foot-logo { width: 170px; height: auto; margin-bottom: 8px; }
.foot-bottom { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid #2b2b28; padding-top: 14px; margin-top: 8px; font-size: .85rem; }

/* Sabit WhatsApp butonu */
.wa-float { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 40; width: 58px; height: 58px; border-radius: 50%; background: var(--wa); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0,0,0,.28); }
.wa-float:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* Sepete eklendi bildirimi */
.toast { position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50; background: var(--brand); color: #fff; border-radius: 10px; padding: 12px 16px; display: flex; gap: 14px; align-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.3); width: min(440px, calc(100vw - 32px)); justify-content: space-between; font-size: .95rem; }
.toast a { color: var(--accent); font-weight: 700; white-space: nowrap; }
.page-cart .wa-float, .page-product .wa-float { display: none; }
.product-img.no-photo, .card-img.no-photo { background: var(--surface); }
