:root {
  --ink: #1a2340;
  --ink-soft: #4a5370;
  --paper: #f2f4f6;
  --white: #ffffff;
  --sky: #dce7ef;
  --line: #d3dae2;
  --tag: #ffd447;
  --tag-edge: #e8b800;
  --brand: #2f7a57; /* config.js içindeki color ile değişir */
  --wa: #1f9e55;
  --radius-s: 6px;
  --radius-m: 14px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Demo şeridi ---------- */
.demo-strip {
  background: var(--ink);
  color: var(--tag);
  font-size: .875rem;
  text-align: center;
  padding: 8px var(--gutter);
}

/* ---------- Üst bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 12px var(--gutter);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.125rem; }
.brand img { height: 36px; width: auto; }
.monogram {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  background: var(--brand); color: var(--white);
  border-radius: 50% 50% 50% 8px;
  font-weight: 900; font-stretch: 80%; font-size: 1.05rem; letter-spacing: -.02em;
}

/* ---------- Butonlar ---------- */
.wa-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--wa); color: var(--white);
  text-decoration: none; font-weight: 700;
  padding: 12px 18px; border-radius: 999px;
  border: 0; cursor: pointer;
  transition: background .15s;
}
.wa-btn:hover { background: #17834a; }
.wa-btn svg { width: 20px; height: 20px; flex: none; }
.wa-btn.small { padding: 8px 14px; font-size: .9375rem; }
.wa-btn.wide { width: 100%; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 16px; border-radius: 999px;
  font-weight: 700; text-decoration: none; cursor: pointer;
  border: 2px solid var(--ink); background: transparent;
}
.btn:hover { background: var(--ink); color: var(--white); }
.link-btn { background: none; border: 0; color: var(--ink-soft); text-decoration: underline; cursor: pointer; padding: 8px; }
.icon-btn { background: none; border: 0; font-size: 1.25rem; cursor: pointer; padding: 6px 10px; border-radius: 8px; }
.icon-btn:hover { background: var(--sky); }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(32px, 7vw, 80px) var(--gutter) clamp(32px, 5vw, 56px);
  display: grid; gap: clamp(28px, 5vw, 56px);
  grid-template-columns: 1.1fr 1fr; align-items: center;
}
.status {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 18px; padding: 6px 12px 6px 10px;
  border-radius: 999px; background: var(--white); border: 1px solid var(--line);
  font-size: .9375rem; font-weight: 600;
}
.status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #9aa3b5; }
.status.open::before { background: #22a05a; box-shadow: 0 0 0 4px #22a05a33; }
.status.closed::before { background: #d1495b; }
.hero h1 {
  margin: 0;
  font-size: clamp(2.75rem, 8vw, 5.5rem);
  line-height: .92;
  font-weight: 900;
  font-stretch: 72%;
  letter-spacing: -.02em;
  text-wrap: balance;
}
.tagline { margin: 20px 0 0; font-size: clamp(1.0625rem, 1.6vw, 1.25rem); max-width: 34em; color: var(--ink-soft); }
.address { margin: 14px 0 0; font-size: .9375rem; color: var(--ink-soft); }

.cat-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cat-tile {
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 150px; padding: 18px;
  border-radius: var(--radius-m);
  background: var(--sky);
  text-decoration: none; cursor: pointer; border: 0; text-align: left;
  overflow: hidden;
  transition: transform .15s ease, background .15s;
}
.cat-tile:nth-child(2) { background: #e6eadf; }
.cat-tile:nth-child(3) { background: #f4ecd4; }
.cat-tile:nth-child(4) { background: #d8ebea; }
.cat-tile:hover { transform: translateY(-2px); }
.cat-tile .emoji { font-size: 3.5rem; line-height: 1; }
.cat-tile .label { font-size: 1.5rem; font-weight: 800; font-stretch: 85%; }
.cat-tile .count { font-size: .875rem; color: var(--ink-soft); font-weight: 500; }

/* ---------- Katalog ---------- */
.catalog { max-width: var(--max); margin: 0 auto; padding: 24px var(--gutter) 64px; }
.catalog-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; }
h2 { margin: 0; font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 900; font-stretch: 75%; letter-spacing: -.01em; line-height: 1.05; }
.delivery { margin: 0; color: var(--ink-soft); font-size: .9375rem; }

.filters {
  position: sticky; top: 63px; z-index: 10;
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  margin: 20px calc(var(--gutter) * -1) 24px; padding: 12px var(--gutter);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  padding: 8px 16px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--white);
  font-weight: 600; cursor: pointer; white-space: nowrap;
}
.chip[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.search {
  display: flex; align-items: center; gap: 8px;
  flex: 1 1 260px; max-width: 360px;
  padding: 0 14px; border-radius: 999px;
  background: var(--white); border: 1.5px solid var(--line);
}
.search:focus-within { border-color: var(--ink); }
.search svg { width: 18px; height: 18px; fill: none; stroke: var(--ink-soft); stroke-width: 2; stroke-linecap: round; flex: none; }
.search input { border: 0; outline: 0; background: transparent; font: inherit; padding: 10px 0; width: 100%; color: var(--ink); }

.grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 28px 18px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.product { display: flex; flex-direction: column; }
.product-media {
  position: relative;
  aspect-ratio: 5 / 4;
  border-radius: var(--radius-m);
  display: grid; place-items: center;
  font-size: 4.5rem;
  background: var(--white);
  border: 1px solid var(--line);
}
.product-media img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.product[data-cat="kedi"] .product-media { background: #eef3f7; }
.product[data-cat="kopek"] .product-media { background: #f1f3ec; }
.product[data-cat="kus"] .product-media { background: #faf5e6; }
.product[data-cat="balik"] .product-media { background: #ebf4f3; }
.badge {
  position: absolute; top: 12px; left: 12px;
  font-size: .8125rem; font-weight: 700;
  padding: 3px 10px; border-radius: 999px;
  background: var(--ink); color: var(--white);
}
.product.out .product-media { filter: grayscale(1); opacity: .6; }

/* Raf etiketi: sayfanın imzası */
.price-tag {
  position: absolute; right: -6px; bottom: -14px;
  display: flex; align-items: baseline; gap: 2px;
  padding: 6px 14px 6px 26px;
  background: var(--tag);
  border: 1px solid var(--tag-edge);
  border-radius: 4px;
  transform: rotate(-3deg);
  box-shadow: 0 2px 0 var(--tag-edge);
  color: var(--ink);
  line-height: 1;
}
.price-tag::before { /* askı deliği */
  content: ""; position: absolute; left: 9px; top: 50%;
  width: 8px; height: 8px; margin-top: -4px; border-radius: 50%;
  background: var(--paper); box-shadow: inset 0 1px 1px #0003;
}
.price-tag .num { font-size: 1.875rem; font-weight: 900; font-stretch: 62%; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.price-tag .cur { font-size: 1rem; font-weight: 800; font-stretch: 70%; }
.product.out .price-tag { background: #e3e6ea; border-color: #c4c9d0; box-shadow: 0 2px 0 #c4c9d0; }

.product-body { padding: 22px 2px 0; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.product-name { margin: 0; font-size: 1.0625rem; font-weight: 700; line-height: 1.3; }
.product-size { margin: 0; color: var(--ink-soft); font-size: .9375rem; }
.product-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 14px; }
.out-note + .product-actions { margin-top: 0; padding-top: 8px; }
.out-note { margin-top: auto !important; }
.add-btn {
  flex: 1;
  padding: 10px 12px; border-radius: 999px;
  background: var(--brand); color: var(--white);
  border: 0; font-weight: 700; cursor: pointer;
}
.add-btn:hover { filter: brightness(.92); }
.add-btn.in-cart { background: var(--white); color: var(--brand); box-shadow: inset 0 0 0 2px var(--brand); }
.qty { flex: 1; display: flex; align-items: center; justify-content: space-between; border-radius: 999px; box-shadow: inset 0 0 0 2px var(--brand); }
.qty button { width: 42px; height: 42px; border: 0; background: none; font-size: 1.25rem; font-weight: 700; cursor: pointer; color: var(--brand); border-radius: 999px; }
.qty output { font-weight: 800; color: var(--brand); }
.ask-btn {
  display: grid; place-items: center;
  width: 44px; height: 44px; flex: none;
  border-radius: 50%; background: var(--white); color: var(--wa);
  border: 1.5px solid var(--line); text-decoration: none;
}
.ask-btn svg { width: 22px; height: 22px; }
.ask-btn:hover { border-color: var(--wa); }
.out-note { margin: 12px 0 0; font-size: .9375rem; font-weight: 600; color: #a33a48; }
.empty { text-align: center; color: var(--ink-soft); padding: 40px 0; }

/* ---------- Mağaza / harita ---------- */
.visit {
  max-width: var(--max); margin: 0 auto;
  padding: 56px var(--gutter);
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 32px; align-items: start;
  border-top: 1px solid var(--line);
}
.visit-address { margin: 12px 0 20px; font-size: 1.0625rem; max-width: 28em; }
.hours { border-collapse: collapse; width: 100%; max-width: 360px; font-variant-numeric: tabular-nums; }
.hours td { padding: 7px 0; border-bottom: 1px solid var(--line); }
.hours td:last-child { text-align: right; }
.hours tr.today td { font-weight: 800; }
.hours tr.today td:first-child::after { content: " (bugün)"; font-weight: 500; color: var(--ink-soft); }
.visit-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.map { border-radius: var(--radius-m); overflow: hidden; border: 1px solid var(--line); background: var(--sky); aspect-ratio: 4 / 3; }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }

.footer {
  padding: 28px var(--gutter) 120px;
  text-align: center; font-size: .875rem; color: var(--ink-soft);
  border-top: 1px solid var(--line);
}

/* ---------- Sepet ---------- */
.cartbar {
  position: fixed; z-index: 30; left: 50%; bottom: 16px;
  transform: translateX(-50%);
  width: min(640px, calc(100% - 24px));
  display: flex; gap: 8px; align-items: center;
  padding: 8px; border-radius: 999px;
  background: var(--ink); color: var(--white);
  box-shadow: 0 10px 30px #1a234055;
}
.cartbar[hidden] { display: none; }
.cartbar-summary {
  flex: 1; display: flex; flex-direction: column; align-items: flex-start;
  background: none; border: 0; color: inherit; cursor: pointer;
  padding: 4px 14px; border-radius: 999px; line-height: 1.2; text-align: left;
}
.cartbar-summary:hover { background: #ffffff14; }
.cart-count { font-size: .8125rem; opacity: .8; text-decoration: underline; text-underline-offset: 2px; }
.cart-total { font-size: 1.25rem; font-weight: 900; font-stretch: 70%; }
.cartbar.bump { animation: bump .35s ease; }
@keyframes bump { 40% { transform: translateX(-50%) scale(1.03); } }

.cart {
  border: 0; padding: 0; margin: auto 0 0 auto;
  width: min(440px, 100%); max-height: 100dvh; height: 100dvh;
  background: var(--white); color: var(--ink);
  display: none; flex-direction: column;
}
.cart[open] { display: flex; }
.cart::backdrop { background: #1a234066; }
.cart-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 20px 12px; border-bottom: 1px solid var(--line); }
.cart-list { list-style: none; margin: 0; padding: 8px 20px; overflow-y: auto; flex: 1; }
.cart-item { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-item .ci-icon { font-size: 1.75rem; text-align: center; }
.cart-item .ci-name { font-weight: 600; line-height: 1.3; }
.cart-item .ci-meta { font-size: .875rem; color: var(--ink-soft); }
.cart-item .qty { box-shadow: inset 0 0 0 1.5px var(--line); }
.cart-item .qty button { width: 34px; height: 34px; color: var(--ink); }
.cart-item .qty output { color: var(--ink); min-width: 1.5em; text-align: center; }
.cart-foot { padding: 16px 20px 24px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.cart-sum { display: flex; justify-content: space-between; align-items: baseline; margin: 0; font-size: 1.125rem; }
.cart-sum strong { font-size: 1.75rem; font-weight: 900; font-stretch: 65%; }
.cart-note { margin: 0; font-size: .875rem; color: var(--ink-soft); }
.cart-foot .link-btn { align-self: center; }

.toast {
  position: fixed; z-index: 40; left: 50%; top: 76px; transform: translate(-50%, -8px);
  background: var(--ink); color: var(--white);
  padding: 10px 16px; border-radius: 999px; font-size: .9375rem; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Mobil ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .visit { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .cat-tile { min-height: 112px; padding: 14px; }
  .cat-tile .emoji { font-size: 2.5rem; }
  .cat-tile .label { font-size: 1.25rem; }
  .grid { grid-template-columns: 1fr 1fr; gap: 26px 12px; }
  .product-media { font-size: 3.25rem; }
  .price-tag { padding: 5px 10px 5px 22px; right: -4px; }
  .price-tag::before { left: 7px; }
  .price-tag .num { font-size: 1.5rem; }
  .product-name { font-size: .9375rem; }
  .product-size { font-size: .875rem; }
  .ask-btn { display: none; }
  .search { max-width: none; flex-basis: 100%; }
  .cartbar .wa-btn span { font-size: .9375rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
