:root {
  --bg: #f6f3ee;
  --surface: #ffffff;
  --ink: #1b1a18;
  --muted: #6f6a62;
  --line: #e4ded4;
  --accent: #7a5c2e;
  --accent-ink: #ffffff;
  --chip: #ece6dc;
  --danger: #a33a2c;
  --ok: #3f6b45;
  --radius: 14px;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
:root[data-theme='dark'] {
  --bg: #131211;
  --surface: #1d1b19;
  --ink: #f1ece4;
  --muted: #a39b8f;
  --line: #2f2c28;
  --accent: #c9a46a;
  --accent-ink: #17140f;
  --chip: #272420;
  --danger: #e07a68;
  --ok: #8fc095;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body { padding-bottom: calc(24px + var(--safe-b)); overflow-x: hidden; }
body.locked { overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; }

.top { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; background: var(--bg); }
.top-actions { display: flex; gap: 8px; }
.filters { position: sticky; top: 0; z-index: 6; background: var(--bg); padding-top: 8px; transition: box-shadow .2s; }
.filters.stuck { box-shadow: 0 6px 14px -10px rgba(0,0,0,.35); border-bottom: 1px solid var(--line); }
.search-row { display: flex; gap: 10px; align-items: center; padding: 0 16px 10px; }
.search-box { flex: 1; position: relative; }
.search-box svg { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-box #search { padding-left: 38px; }
.filters .list-bar { padding: 0 16px 8px; margin: 0; }
.scroller { position: relative; }
.sc-arrow { position: absolute; top: 50%; transform: translateY(calc(-50% - 6px)); z-index: 2; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 20px; line-height: 1; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.18); padding: 0 0 2px; }
.sc-arrow[hidden] { display: none; }
.sc-arrow.left { left: 6px; }
.sc-arrow.right { right: 6px; }
.related .sc-arrow, .showcase .sc-arrow { transform: translateY(-80%); }
.to-top { position: fixed; right: 16px; bottom: calc(20px + var(--safe-b)); z-index: 15; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--ink); color: var(--bg); display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.to-top[hidden] { display: none; }
.to-top svg { width: 22px; height: 22px; }
.brand { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; background: none; border: 0; padding: 0; text-align: left; }
.brand-name { font-family: var(--serif); font-size: 24px; font-weight: 600; letter-spacing: .14em; }
.brand-sub { font-size: 11px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin-top: 3px; }
.icon-btn { position: relative; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; }
.icon-btn svg { width: 21px; height: 21px; }
.badge[hidden] { display: none; }
.badge { position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 600; display: grid; place-items: center; }

#search { width: 100%; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 0 14px; font-size: 15px; outline: none; }
#search:focus { border-color: var(--accent); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px 12px; scrollbar-width: none; scroll-behavior: smooth; cursor: grab; }
.chips.dragging, .rel-row.dragging { cursor: grabbing; scroll-behavior: auto; user-select: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 34px; padding: 0 14px; border-radius: 17px; border: 1px solid transparent; background: var(--chip); font-size: 13px; white-space: nowrap; }
.chip[aria-pressed='true'] { background: var(--ink); color: var(--bg); }

main { padding: 0 16px; }
.list-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 10px; }
.result-meta { font-size: 12px; color: var(--muted); min-height: 14px; }
.sort select { appearance: none; -webkit-appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; height: 32px; border-radius: 9px; padding: 0 28px 0 10px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: right 13px center, right 8px center; background-size: 5px 5px; background-repeat: no-repeat; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.chart-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; color: var(--accent); font-size: 13px; padding: 0; margin: -4px 0 16px; text-decoration: underline; text-underline-offset: 3px; }
.chart-btn[hidden] { display: none; }
.chart-btn svg { width: 20px; height: 20px; }
.chart-img { display: block; width: calc(100% - 32px); margin: 8px 16px 0; border-radius: 12px; background: #fff; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card { background: none; border: 0; padding: 0; text-align: left; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.card .ph { aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--chip); position: relative; }
.card img { width: 100%; height: 100%; object-fit: cover; transition: opacity .3s; opacity: 0; }
.card img.loaded { opacity: 1; }
.card .tag { position: absolute; left: 8px; top: 8px; background: var(--accent); color: var(--accent-ink); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; padding: 3px 7px; border-radius: 6px; }
.card .nm { font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 34px; }
.card .pr { font-size: 14px; font-weight: 600; }
.card .mdl { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-top: -2px; }
.card .pr del { color: var(--muted); font-weight: 400; margin-left: 6px; font-size: 12px; }
.state { text-align: center; color: var(--muted); padding: 40px 0; font-size: 14px; }
.state[hidden] { display: none; }
.more { display: block; margin: 18px auto 0; }

.foot { text-align: center; color: var(--muted); font-size: 11px; padding: 28px 24px 0; line-height: 1.5; }

.sheet { position: fixed; inset: 0; z-index: 20; background: var(--bg); overflow-y: auto; overscroll-behavior: contain; animation: up .22s ease-out; }
.sheet[hidden] { display: none; }
@keyframes up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-body { min-height: 100%; padding-bottom: calc(96px + var(--safe-b)); position: relative; }
.float-actions { position: fixed; top: 12px; right: 12px; z-index: 3; display: flex; gap: 8px; }
.round { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; box-shadow: 0 2px 10px rgba(0,0,0,.18); padding: 0; color: var(--ink); }
.round svg { width: 19px; height: 19px; fill: none; }
.fav-toggle[aria-pressed='true'] svg { fill: #c0392b; stroke: #c0392b; }
.sheet-title { font-family: var(--serif); font-size: 28px; font-weight: 600; margin: 0; padding: 18px 64px 8px 16px; }

.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; background: var(--chip); }
.gallery::-webkit-scrollbar { display: none; }
.gallery img { flex: none; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; scroll-snap-align: center; }
.dots { display: flex; justify-content: center; gap: 6px; padding: 10px 0 0; min-height: 16px; }
.dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line); transition: width .2s, background .2s; }
.dots i.on { width: 16px; background: var(--ink); }

.p-info { padding: 8px 16px 0; }
.p-cat { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.p-name { font-family: var(--serif); font-size: 26px; font-weight: 600; line-height: 1.15; margin: 6px 0 8px; }
.p-price { font-size: 20px; font-weight: 600; margin-bottom: 16px; }
.p-price del { color: var(--muted); font-weight: 400; font-size: 15px; margin-left: 8px; }
.sel { margin-bottom: 16px; }
.sel .label, .qty-row .label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); display: block; margin-bottom: 8px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { min-width: 48px; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; }
.opt[aria-pressed='true'] { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.opt:disabled { opacity: .38; text-decoration: line-through; cursor: not-allowed; }
.qty-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.qty-row .label { margin: 0; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.stepper button { width: 40px; height: 38px; border: 0; background: none; font-size: 18px; }
.stepper button:disabled { opacity: .35; }
.stepper span { min-width: 28px; text-align: center; font-weight: 600; }
.stock-note { font-size: 12px; color: var(--muted); }
.stock-note.warn { color: var(--danger); }
.p-specs { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13px; margin: 0 0 6px; }
.p-specs:empty { display: none; }
.p-specs dt { color: var(--muted); }
.p-specs dd { margin: 0; }
.p-desc { font-size: 14px; line-height: 1.55; color: var(--muted); white-space: pre-line; }
.p-desc:empty { display: none; }
.p-link { display: inline-block; font-size: 13px; color: var(--accent); margin: 4px 0 8px; }

.actions { position: fixed; left: 0; right: 0; bottom: 0; display: flex; gap: 10px; padding: 12px 16px calc(12px + var(--safe-b)); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-top: 1px solid var(--line); z-index: 2; }
.btn { flex: 1; height: 50px; border-radius: 12px; font-size: 15px; font-weight: 600; border: 1px solid var(--ink); }
.btn.solid { background: var(--ink); color: var(--bg); }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.wide { flex: 1 1 100%; }
.btn[hidden] { display: none; }

.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); align-items: center; }
.line img { width: 64px; height: 80px; object-fit: cover; border-radius: 10px; background: var(--chip); }
.line .ln { font-size: 14px; line-height: 1.3; }
.line .lv { font-size: 12px; color: var(--muted); margin-top: 3px; }
.line .lp { font-size: 14px; font-weight: 600; margin-top: 6px; }
.line .side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.line .rm { border: 0; background: none; color: var(--danger); font-size: 12px; padding: 4px 0; }
.line .stepper button { width: 32px; height: 32px; font-size: 16px; }
.cart-total { display: flex; justify-content: space-between; padding: 16px; font-size: 17px; font-weight: 600; }
.cart-total:empty { display: none; }
.hint { font-size: 13px; color: var(--muted); line-height: 1.5; padding: 0 16px; }
.empty { padding: 40px 16px; text-align: center; color: var(--muted); }

.steps { list-style: none; margin: 8px 0 0; padding: 0 16px; display: flex; flex-direction: column; gap: 10px; }
.step { display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.step .num { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--chip); font-weight: 600; font-size: 14px; }
.step.done .num { background: var(--ok); color: #fff; }
.step .st { font-size: 14px; line-height: 1.3; }
.step .sq { font-size: 12px; color: var(--muted); margin-top: 2px; }
.step .btn { grid-column: 1 / -1; height: 44px; font-size: 14px; }

.toast { position: fixed; left: 50%; bottom: calc(90px + var(--safe-b)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 40; max-width: calc(100% - 32px); text-align: center; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.toast[hidden] { display: none; }

.related { padding: 18px 0 4px; border-top: 1px solid var(--line); margin-top: 10px; }
.related[hidden] { display: none; }
.rel-title { font-family: var(--serif); font-size: 22px; font-weight: 600; margin: 0 16px 12px; }
.strip { display: flex; gap: 12px; overflow-x: auto; padding: 0 16px 6px; scroll-snap-type: x proximity; scroll-padding: 0 16px; scrollbar-width: none; scroll-behavior: smooth; cursor: grab; }
.strip::-webkit-scrollbar { display: none; }
.strip.dragging { cursor: grabbing; scroll-behavior: auto; user-select: none; }
.s-card { flex: none; width: 132px; scroll-snap-align: start; background: none; border: 0; padding: 0; text-align: left; display: flex; flex-direction: column; gap: 5px; }
.s-card .ph { aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden; background: var(--chip); }
.s-card img { width: 100%; height: 100%; object-fit: cover; }
.s-card .cat { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.s-card .nm { font-size: 12px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.s-card .mdl { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.s-card .pr { font-size: 13px; font-weight: 600; }

/* ---------- Telegram native alt butonlari varken HTML alt cubuk gizlenir ---------- */
body.native .web-only { display: none; }
body.native .sheet-body { padding-bottom: calc(28px + var(--safe-b)); }
body.native .toast { bottom: calc(24px + var(--safe-b)); }
body.native .to-top { bottom: calc(16px + var(--safe-b)); }

/* ---------- vitrin ---------- */
.showcase[hidden] { display: none; }
.hero { position: relative; margin: 0 16px 6px; }
.hero-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 18px; }
.hero-track::-webkit-scrollbar { display: none; }
.hero-slide { position: relative; flex: none; width: 100%; aspect-ratio: 4 / 4.4; scroll-snap-align: center; border: 0; padding: 0; background: var(--chip); overflow: hidden; text-align: left; color: #fff; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.hero-slide::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,.62) 100%); }
.hero-copy { position: absolute; left: 18px; right: 18px; bottom: 18px; z-index: 1; }
.hero-kicker { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; opacity: .9; }
.hero-title { font-family: var(--serif); font-size: 30px; line-height: 1.05; font-weight: 600; margin: 6px 0 12px; text-shadow: 0 1px 12px rgba(0,0,0,.25); }
.hero-cta { display: inline-flex; align-items: center; gap: 6px; background: #fff; color: #17140f; font-size: 13px; font-weight: 600; padding: 9px 14px; border-radius: 999px; }
.hero-dots { display: flex; justify-content: center; gap: 6px; padding: 10px 0 0; min-height: 16px; }
.hero-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line); transition: width .2s, background .2s; }
.hero-dots i.on { width: 16px; background: var(--ink); }

.sec-head { display: flex; align-items: baseline; justify-content: space-between; padding: 18px 16px 10px; }
.sec-head h2 { font-family: var(--serif); font-size: 23px; font-weight: 600; margin: 0; }
.see-all { border: 0; background: none; color: var(--accent); font-size: 13px; padding: 0; }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 16px; }
.tile { position: relative; aspect-ratio: 1 / 1.05; border-radius: 14px; overflow: hidden; border: 0; padding: 0; background: var(--chip); color: #fff; text-align: left; }
.tile img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; transition: transform .4s; }
.tile:active img { transform: scale(1.03); }
.tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.6) 100%); }
.tile span { position: absolute; left: 12px; bottom: 10px; z-index: 1; }
.tile b { display: block; font-family: var(--serif); font-size: 20px; font-weight: 600; line-height: 1.1; }
.tile small { font-size: 11px; opacity: .85; letter-spacing: .04em; }
.tile.wide { grid-column: 1 / -1; aspect-ratio: 2.3 / 1; }

.perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 22px 16px 0; padding: 14px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-align: center; }
.perks div { display: flex; flex-direction: column; gap: 3px; }
.perks b { font-size: 13px; }
.perks span { font-size: 11px; color: var(--muted); line-height: 1.3; }

/* yatay kart (yeni gelenler, son bakilanlar, kombin) */
.s-card { flex: none; width: 138px; scroll-snap-align: start; background: none; border: 0; padding: 0; text-align: left; display: flex; flex-direction: column; gap: 5px; position: relative; }

/* ---------- urun karti ekleri ---------- */
.card { position: relative; }
.card .ph .tags { position: absolute; left: 8px; top: 8px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.card .ph .tag { position: static; }
.tag.new { background: var(--ink); color: var(--bg); }
.tag.low { background: #fff; color: #a33a2c; }
.heart { position: absolute; right: 8px; top: 8px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255,255,255,.88); display: grid; place-items: center; padding: 0; color: #1b1a18; z-index: 1; }
.heart svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.heart[aria-pressed='true'] svg { fill: #c0392b; stroke: #c0392b; }
.grid.pad { padding: 4px 16px 0; }

/* ---------- iskelet yukleyici ---------- */
.sk { position: relative; overflow: hidden; background: var(--chip); }
.sk::before { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 55%, transparent), transparent); animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.card.skc { pointer-events: none; }
.card.skc .ph { background: var(--chip); }
.card.skc .l1, .card.skc .l2 { height: 12px; border-radius: 6px; }
.card.skc .l1 { width: 90%; }
.card.skc .l2 { width: 45%; }

/* ---------- urun sayfasi ---------- */
.assure { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); margin: 0 0 14px; }
.acc { border-top: 1px solid var(--line); }
.acc:last-of-type { border-bottom: 1px solid var(--line); }
.acc summary { list-style: none; cursor: pointer; padding: 14px 0; font-size: 14px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: '+'; font-weight: 400; font-size: 20px; color: var(--muted); }
.acc[open] summary::after { content: '−'; }
.acc[hidden] { display: none; }
.acc .p-desc { margin: 0 0 14px; }
.p-link { margin-top: 14px; }
.opt { transition: background .15s, color .15s, border-color .15s; }

.site-cart-note { margin-top: 10px; }
.site-cart-note a { color: var(--accent); }
