:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --text: #1c1b1a;
  --muted: #6b6762;
  --line: #e6e3de;
  --accent: #e8590c;
  --accent-ink: #ffffff;
  --ok: #1f8a4c;
  --err: #c92a2a;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.06);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.5; }
a { color: inherit; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
[hidden] { display: none !important; }

/* top bar */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { font-weight: 800; font-size: 22px; text-decoration: none; letter-spacing: -.5px; }
.logo span { color: var(--accent); }
.session { font-size: 14px; color: var(--muted); display: flex; gap: 10px; align-items: center; }

/* hero */
.hero { padding: 48px 0 32px; }
.hero h1 { font-size: clamp(28px, 5vw, 44px); line-height: 1.15; margin: 0 0 14px; letter-spacing: -1px; }
.hero p { max-width: 620px; color: var(--muted); font-size: 17px; margin: 0 0 22px; }
.steps { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px 6px 6px; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.steps b { background: var(--accent); color: var(--accent-ink); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; }

/* stores */
.section-title { font-size: 20px; margin: 16px 0 14px; }
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; padding-bottom: 48px; }
.store-card {
  all: unset; cursor: pointer; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s;
}
.store-card:hover, .store-card:focus-visible { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,.1); }
.store-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.store-banner { height: 92px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 26px; letter-spacing: -.5px; }
.store-info { padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.store-info span { color: var(--muted); }
.store-info b { color: var(--accent); }

/* modal */
.modal { border: 0; padding: 0; border-radius: 18px; width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal::backdrop { background: rgba(20,18,16,.55); }
.modal-head { padding: 18px 20px; color: #fff; display: flex; justify-content: space-between; align-items: center; }
.modal-head h3 { margin: 0; font-size: 20px; }
.close { all: unset; cursor: pointer; font-size: 28px; line-height: 1; opacity: .85; padding: 0 4px; }
.close:hover { opacity: 1; }
.modal-body { padding: 20px; }
.step { display: flex; flex-direction: column; gap: 14px; }
.center { align-items: center; padding: 30px 0; }
.muted { color: var(--muted); margin: 0; }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.field input, .phone-input { font: inherit; font-size: 18px; font-weight: 500; }
.phone-input { display: flex; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.phone-input:focus-within, .code-input:focus { border-color: var(--accent); }
.prefix { padding: 12px; background: var(--bg); color: var(--muted); border-right: 1.5px solid var(--line); }
.phone-input input { border: 0; outline: 0; padding: 12px; flex: 1; min-width: 0; }
.code-input { border: 1.5px solid var(--line); border-radius: 10px; padding: 12px; letter-spacing: 10px; text-align: center; font-size: 26px !important; outline: 0; }
.check { display: flex; gap: 10px; font-size: 13px; color: var(--muted); align-items: flex-start; }
.check input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }

.btn { font: inherit; font-weight: 700; font-size: 16px; border: 0; border-radius: 10px; padding: 14px; background: var(--accent); color: var(--accent-ink); cursor: pointer; }
.btn:disabled { opacity: .6; cursor: default; }
.link-btn { all: unset; cursor: pointer; color: var(--accent); font-size: 14px; font-weight: 600; }
.link-btn:disabled { color: var(--muted); cursor: default; }
.row-between { display: flex; justify-content: space-between; }
.error { color: var(--err); font-size: 14px; margin: 0; min-height: 0; }
.error:empty { display: none; }
.dev-hint { font-size: 13px; background: #fff8db; border: 1px dashed #e6c200; padding: 8px 10px; border-radius: 8px; margin: 0; }

.spinner { width: 36px; height: 36px; border: 4px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* coupons */
.result-head { display: flex; align-items: center; gap: 8px; color: var(--ok); font-weight: 700; }
.coupon { border: 1.5px dashed var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.coupon-discount { display: inline-block; background: #fff1e6; color: var(--accent); font-weight: 800; font-size: 13px; padding: 3px 8px; border-radius: 6px; }
.coupon-discount:empty { display: none; }
.coupon-title { margin: 6px 0 2px; font-size: 16px; }
.coupon-desc { margin: 0; color: var(--muted); font-size: 14px; }
.coupon-meta { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.coupon-meta:empty { display: none; }
.coupon-action { display: flex; gap: 8px; flex-wrap: wrap; }
.code-btn { font: inherit; flex: 1; min-width: 150px; display: flex; justify-content: space-between; align-items: center; gap: 8px; border: 1.5px solid var(--accent); background: #fff; color: var(--text); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.code-btn .code-text { font-family: ui-monospace, Menlo, monospace; font-weight: 700; font-size: 16px; letter-spacing: 1px; }
.code-btn small { color: var(--accent); font-weight: 700; }
.code-btn.copied { background: var(--ok); border-color: var(--ok); color: #fff; }
.code-btn.copied small { color: #fff; }
.go-btn { flex: 1; min-width: 150px; text-align: center; text-decoration: none; background: var(--text); color: #fff; border-radius: 10px; padding: 11px 12px; font-weight: 700; font-size: 14px; }
.nocode { flex: 1; min-width: 150px; font-size: 13px; color: var(--muted); align-self: center; }

.empty { text-align: center; padding: 10px 0; }
.empty .icon { font-size: 44px; }
.empty h4 { margin: 6px 0; font-size: 18px; }
.empty p { color: var(--muted); margin: 0; }

.footer { border-top: 1px solid var(--line); padding: 24px 0; font-size: 13px; color: var(--muted); background: var(--surface); }
.footer p { margin: 4px 0; }

/* static pages */
.page { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin: 32px auto; max-width: 760px; }

/* reklam alanları */
.ad-slot { position: relative; margin: 0 0 24px; border-radius: var(--radius); overflow: hidden; }
.ad-slot::before { content: 'Reklam'; position: absolute; top: 6px; right: 8px; z-index: 2; font-size: 10px; letter-spacing: .5px; text-transform: uppercase; background: rgba(0,0,0,.45); color: #fff; padding: 1px 6px; border-radius: 4px; pointer-events: none; }
.ad-slot a, .ad-slot img { display: block; width: 100%; }
.ad-slot img { height: auto; object-fit: cover; }
.ad-wide img { max-height: 250px; }
.ad-modal { margin: 16px 0 0; }
.ad-modal img { max-height: 140px; }
.ad-slot.ad-grid { margin: 0; background: var(--surface); box-shadow: var(--shadow); min-height: 150px; display: flex; }
.ad-slot.ad-grid a { display: flex; flex: 1; }
.ad-slot.ad-grid img { height: 100%; }
.ad-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; width: 100%;
  min-height: 90px; padding: 16px; border: 2px dashed var(--line); border-radius: var(--radius); color: var(--muted); font-size: 14px; background: repeating-linear-gradient(45deg, transparent 0 12px, rgba(0,0,0,.015) 12px 24px); }
.ad-placeholder b { color: var(--text); font-size: 15px; }
.ad-placeholder small { font-size: 12px; }
.ad-slot:has(.ad-placeholder)::before { display: none; }
.ad-slot.ad-grid .ad-placeholder { min-height: 150px; }
.ad-modal .ad-placeholder { min-height: 70px; padding: 10px; }

/* bölgesel içerik */
.preview-bar { background: #1c1b1a; color: #fff; text-align: center; font-size: 13px; padding: 6px 12px; position: sticky; top: 0; z-index: 10; }
.preview-bar a { color: #ffd8a8; margin-left: 10px; }
.region-banner { display: block; margin: 0 0 20px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.region-banner img { display: block; width: 100%; max-height: 260px; object-fit: cover; }
.store-banner { position: relative; }
.store-badge { position: absolute; top: 8px; left: 8px; background: #fff; color: var(--text); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; letter-spacing: 0; }
.coupon-region { display: inline-block; margin: 0 6px 6px 0; background: #eef3ff; color: #2f4fb5; font-weight: 700; font-size: 12px; padding: 3px 8px; border-radius: 6px; }
