/* Butik sipariş ve stok paneli: satıcı paneli ve katalog (genel e-ticaret tabanından). No framework. Touch targets are at least 44px. */
:root {
  --brand: #1f6f6a;
  --brand-ink: #ffffff;
  --bg: #f6f8f8;
  --card: #ffffff;
  --ink: #1d2528;
  --muted: #5b686c;
  --line: #dce3e4;
  --ok: #2f7d4f;
  --warn: #b26a00;
  --bad: #b3261e;
  --soft: #edf2f2;
  --shadow: 0 1px 3px rgba(20, 40, 40, .08), 0 6px 18px rgba(20, 40, 40, .05);
  --radius: 14px;
  --tap: 44px;
}
:root[data-theme="dark"] {
  --brand: #5cc2b8;
  --brand-ink: #0c1a19;
  --bg: #11181a;
  --card: #182225;
  --ink: #e9f0f0;
  --muted: #a3b3b6;
  --line: #2c3a3d;
  --ok: #6cc78d;
  --warn: #e3a64a;
  --bad: #ff8c82;
  --soft: #1e2b2d;
  --shadow: 0 1px 3px rgba(0, 0, 0, .4);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #5cc2b8; --brand-ink: #0c1a19; --bg: #11181a; --card: #182225; --ink: #e9f0f0;
    --muted: #a3b3b6; --line: #2c3a3d; --ok: #6cc78d; --warn: #e3a64a; --bad: #ff8c82; --soft: #1e2b2d;
    --shadow: 0 1px 3px rgba(0, 0, 0, .4);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: 1.7rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.05rem; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.tap { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); min-width: var(--tap); padding: 0 8px; }
.muted { color: var(--muted); } .small { font-size: .875rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons and fields: every one is at least 44px tall. */
.btn, button, input[type=submit] {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: var(--tap); min-width: var(--tap); padding: 0 18px; border-radius: 10px;
  border: 1px solid var(--brand); background: var(--brand); color: var(--brand-ink);
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn:hover { text-decoration: none; filter: brightness(1.06); }
.btn.alt, button.alt { background: transparent; color: var(--brand); }
.btn.wa { background: #1f9d55; border-color: #1f9d55; color: #fff; }
.btn.danger, button.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.block { display: flex; width: 100%; }
.btn[disabled], button[disabled] { opacity: .5; cursor: not-allowed; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=search],
input[type=file], input[type=date], select, textarea {
  width: 100%; min-height: var(--tap); padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--ink); font: inherit;
}
textarea { min-height: 96px; }
input[type=checkbox], input[type=radio] { width: 22px; height: 22px; accent-color: var(--brand); flex: none; }
label { display: block; font-weight: 600; margin: 12px 0 4px; }
label.check { display: flex; align-items: center; gap: 10px; min-height: var(--tap); font-weight: 400; margin: 0; }
.field-error { color: var(--bad); font-size: .875rem; margin-top: 3px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Header */
.topbar { background: var(--brand); color: var(--brand-ink); text-align: center; font-size: .9rem; padding: 8px 12px; }
.topbar a { display: inline-flex; align-items: center; min-height: var(--tap); color: inherit; text-decoration: underline; }
.header { position: sticky; top: 0; z-index: 20; background: var(--card); border-bottom: 1px solid var(--line); }
.header .wrap { display: flex; align-items: center; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.logo { font-size: 1.3rem; font-weight: 800; color: var(--ink); letter-spacing: .02em; display: inline-flex; align-items: center; min-height: var(--tap); }
.logo:hover { text-decoration: none; }
.search { flex: 1 1 220px; display: flex; gap: 6px; max-width: 460px; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav a, .nav button.link { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); min-width: var(--tap);
  padding: 0 12px; border-radius: 10px; color: var(--ink); background: none; border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.nav a:hover, .nav button.link:hover { background: var(--soft); text-decoration: none; }
.badge { background: var(--brand); color: var(--brand-ink); border-radius: 999px; font-size: .75rem; min-width: 20px; height: 20px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; margin-left: 4px; }

/* Flash and notices */
.flash { margin: 14px 0; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); }
.flash.ok { border-color: var(--ok); } .flash.error { border-color: var(--bad); color: var(--bad); }
.notice { padding: 12px 14px; border-radius: 10px; background: var(--soft); border: 1px solid var(--line); }
.notice.warn { border-color: var(--warn); }

/* Home */
.hero { background: linear-gradient(135deg, var(--soft), var(--card)); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 22px; margin: 18px 0; }
.hero h1 { font-size: 2rem; margin-bottom: .3em; }
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 14px 0 26px; }
.cats a { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 64px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); font-weight: 700; padding: 8px; }
.cats a:hover { border-color: var(--brand); text-decoration: none; }
.section { margin: 28px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.section-head a { display: inline-flex; align-items: center; min-height: var(--tap); }

/* Product grid and cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); position: relative; display: flex; flex-direction: column; }
.card .pic { aspect-ratio: 4 / 5; background: var(--soft); display: block; }
.card .pic img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card .name { color: var(--ink); font-weight: 600; display: flex; align-items: center; min-height: var(--tap); }
.price { font-weight: 800; } .old { color: var(--muted); text-decoration: line-through; font-weight: 400; margin-left: 6px; }
.tag { position: absolute; left: 10px; top: 10px; background: var(--bad); color: #fff; font-size: .78rem; font-weight: 700; border-radius: 999px; padding: 3px 10px; }
.tag.sold { background: #555; }
.fav-form { position: absolute; right: 8px; top: 8px; margin: 0; }
.fav-btn { min-width: var(--tap); min-height: var(--tap); border-radius: 50%; padding: 0; background: var(--card); color: var(--brand); border: 1px solid var(--line); font-size: 1.25rem; }
.fav-btn.on { background: var(--brand); color: var(--brand-ink); }
.stars { color: #e0a100; letter-spacing: 1px; white-space: nowrap; }
.empty { text-align: center; padding: 36px 12px; color: var(--muted); }

/* Listing with filters */
.listing { display: grid; grid-template-columns: 250px 1fr; gap: 22px; align-items: start; }
.filters { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; position: sticky; top: 80px; }
.filters summary { min-height: var(--tap); display: flex; align-items: center; cursor: pointer; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; justify-content: center; min-width: var(--tap); min-height: var(--tap); padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-weight: 600; }
.chip input:checked + span { border-color: var(--brand); background: var(--brand); color: var(--brand-ink); }
.chip input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.chip input:disabled + span { opacity: .45; text-decoration: line-through; cursor: not-allowed; }
.chip input:disabled { cursor: not-allowed; }
.swatch { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line); display: inline-block; margin-right: 6px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pager { display: flex; gap: 6px; justify-content: center; margin: 22px 0; flex-wrap: wrap; }
.pager a, .pager span { min-width: var(--tap); min-height: var(--tap); display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); padding: 0 12px; }
.pager .cur { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }

/* Product page */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.crumbs a { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); min-width: var(--tap); padding: 0 8px; }
.pdp { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 28px; margin: 18px 0; }
.gallery .main { aspect-ratio: 4 / 5; background: var(--soft); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.gallery .main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.thumbs button { padding: 0; width: 64px; height: 64px; min-width: 64px; border-radius: 10px; overflow: hidden; background: var(--soft); border: 2px solid var(--line); }
.thumbs button.on { border-color: var(--brand); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.stock-line { min-height: 1.5em; font-weight: 600; }
.stock-line.low { color: var(--warn); } .stock-line.out { color: var(--bad); }
.buy { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.qty { width: 90px; }
.reviews .rev { border-top: 1px solid var(--line); padding: 12px 0; }

/* Cart and checkout */
.two { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.line-item { display: grid; grid-template-columns: 76px 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.line-name { display: inline-flex; align-items: center; min-height: var(--tap); }
.line-item img { width: 76px; height: 95px; object-fit: cover; border-radius: 10px; background: var(--soft); }
.sum { width: 100%; border-collapse: collapse; }
.sum td { padding: 6px 0; } .sum td:last-child { text-align: right; }
.sum .total td { font-weight: 800; font-size: 1.15rem; border-top: 1px solid var(--line); padding-top: 10px; }
.methods { display: grid; gap: 8px; }
.method { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; min-height: var(--tap); font-weight: 600; margin: 0; cursor: pointer; }
.method input { margin: 0; }
.freebar { height: 8px; background: var(--soft); border-radius: 99px; overflow: hidden; margin: 6px 0; }
.freebar i { display: block; height: 100%; background: var(--brand); }
.status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .82rem; font-weight: 700; background: var(--soft); border: 1px solid var(--line); }
.status.new, .status.awaiting_payment { color: var(--warn); } .status.shipped, .status.preparing { color: var(--brand); }
.status.delivered { color: var(--ok); } .status.cancelled { color: var(--bad); }
.legal pre { white-space: pre-wrap; font: inherit; }

/* Footer and the bottom menu for phones */
.footer { margin-top: 40px; border-top: 1px solid var(--line); background: var(--card); padding: 26px 0 30px; }
.footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; }
.footer a { display: inline-flex; align-items: center; min-height: var(--tap); }
.bottom-nav { display: none; }

/* Tables (panel) */
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; background: var(--card); }
table.list th, table.list td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list th { font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
table.list td.num, table.list th.num { text-align: right; }
table.list a, .kpi a { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); min-width: var(--tap); }
.stock-input { width: 84px; }

/* Panel */
.admin-shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.side { background: var(--card); border-right: 1px solid var(--line); padding: 14px 10px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side a { display: flex; align-items: center; min-height: var(--tap); padding: 0 12px; border-radius: 10px; color: var(--ink); font-weight: 600; }
.side a:hover, .side a.on { background: var(--soft); text-decoration: none; }
.side a.on { color: var(--brand); }
.admin-main { padding: 18px; min-width: 0; }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.kpi b { display: block; font-size: 1.6rem; }
.bars { display: flex; gap: 6px; align-items: flex-end; height: 110px; }
.bars div { flex: 1; background: var(--brand); border-radius: 6px 6px 0 0; min-height: 3px; position: relative; opacity: .85; }
.bars span { position: absolute; bottom: -22px; left: 0; right: 0; text-align: center; font-size: .7rem; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 16px; }
.login-page { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.login-box { width: 100%; max-width: 400px; }

@media (max-width: 860px) {
  .listing { grid-template-columns: 1fr; }
  .filters { position: static; }
  .pdp, .two { grid-template-columns: 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; display: flex; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 760px) {
  body { padding-bottom: 76px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .hero h1 { font-size: 1.5rem; }
  .header .wrap { min-height: 56px; }
  .header .nav .hide-m { display: none; }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 56px; min-width: var(--tap);
    color: var(--muted); font-size: .72rem; font-weight: 600; gap: 2px; position: relative; }
  .bottom-nav a.on { color: var(--brand); }
  .bottom-nav a:hover { text-decoration: none; }
  .bottom-nav .ico { font-size: 1.25rem; line-height: 1; }
  .bottom-nav .badge { position: absolute; top: 4px; right: calc(50% - 26px); margin: 0; }
  .buy { grid-template-columns: 1fr; }
  .line-item { grid-template-columns: 64px 1fr; }
  .line-item .end { grid-column: 1 / -1; }
}
@media print { .header, .footer, .bottom-nav, .topbar, .side { display: none; } }

/* Seller panel (butik-panel): quick order form, balances, phone bottom menu */
.status.returned, .status.partial { color: var(--warn); }
.order-line { display: grid; grid-template-columns: minmax(0, 1fr) 84px 110px; gap: 8px; margin-bottom: 8px; align-items: center; }
.order-line[hidden], #address-box[hidden], #add-line[hidden] { display: none; }
.side-summary { display: none; min-height: var(--tap); align-items: center; cursor: pointer; font-weight: 700; padding: 0 12px; list-style: none; }
.side-menu > a { display: flex; }
.admin-bottom { display: none; }
blockquote { word-break: break-word; }
@media (max-width: 860px) {
  .side { display: block; height: auto; position: static; padding: 8px 10px; }
  .side-summary { display: flex; border: 1px solid var(--line); border-radius: 10px; margin: 4px 0; }
  .side-menu[open] > a, .side-menu[open] > button { margin-top: 2px; }
}
@media (max-width: 760px) {
  .admin-main { padding: 12px 12px 90px; }
  .admin-bottom { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .admin-bottom a { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 56px; min-width: var(--tap);
    color: var(--muted); font-size: .72rem; font-weight: 600; gap: 2px; }
  .admin-bottom a.on { color: var(--brand); }
  .admin-bottom a.plus .ico { background: var(--brand); color: var(--brand-ink); border-radius: 50%; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem; }
  .admin-bottom a:hover { text-decoration: none; }
  .admin-bottom .ico { font-size: 1.25rem; line-height: 1; }
  .order-line { grid-template-columns: 1fr 72px; }
  .order-line > div:first-child { grid-column: 1 / -1; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi b { font-size: 1.25rem; }
  table.list th, table.list td { padding: 8px 8px; }
}

/* Telefona ekle sayfası (1.3.0) */
.install-box [hidden] { display: none !important; }
.install-box { max-width: 34rem; margin: 24px auto; text-align: center; font-size: 1.15rem; }
.install-box h1 { font-size: 1.6rem; }
.install-box ol { text-align: left; display: inline-block; }
.install-box .big-btn { font-size: 1.25rem; padding: 14px 28px; min-height: 52px; }

.progress-line { display: block; height: 10px; background: var(--soft); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.progress-line > span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.setup-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin-bottom: 12px; background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); min-height: var(--tap); }
.setup-bar:hover { text-decoration: none; border-color: var(--brand); }
.setup-bar .progress-line { width: 110px; flex: 0 0 auto; }
.help-box { margin: 0 0 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 0 14px; }
.help-box summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; font-weight: 600; color: var(--brand); }
.help-box p { margin: 0 0 12px; }
.steps { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.step.next { border-color: var(--brand); box-shadow: var(--shadow); }
.step.done { opacity: .8; }
.step h2 { margin: 0 0 4px; font-size: 1.05rem; }
.step .tick { color: var(--ok); }
.step .row { gap: 8px; margin-top: 8px; }
.demo-reset { margin-bottom: 14px; border-color: var(--warn); }
.demo-reset h2 { margin-top: 0; }
.setup-head { margin-bottom: 0; }
.kpi.tap { display: block; color: var(--ink); text-decoration: none; }
.kpi.tap:hover { border-color: var(--brand); text-decoration: none; }
.empty-guide { padding: 18px; text-align: center; }
.empty-guide .row { justify-content: center; margin-top: 8px; }
.maker { margin: 14px 0 0; font-size: .8rem; color: var(--muted); text-align: center; }
.poster { border: 3px solid var(--ink); border-radius: 16px; padding: 2rem 1rem; text-align: center; margin: 1rem 0; }
.poster h3 { font-size: 2rem; margin: 0 0 .5rem; }
.posterlink { font-size: 1.3rem; font-weight: 800; word-break: break-all; }
.posterqr { display: flex; justify-content: center; margin: 1rem 0; }
.posterqr img { width: 240px; height: 240px; max-width: 100%; background: #fff; }
@media print {
  .setup-bar, .help-box { display: none !important; }
  .print-card .posterqr img { width: 9cm; height: 9cm; }
  body:has(.poster) .admin-main > :not(.print-card) { display: none !important; }
}
code { overflow-wrap: anywhere; word-break: break-word; }
