/* ByCatalog – tasarım sistemi */
:root {
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --bg: #f4f5fa;
  --surface: #ffffff;
  --surface-2: #f0f2f8;
  --border: #e4e7f0;
  --text: #11131b;
  --muted: #6a7186;
  --accent: #6d5efc;
  --accent-2: #b05cff;
  --accent-soft: rgba(109, 94, 252, .11);
  --accent-ink: #5143e0;
  --grad: linear-gradient(135deg, var(--accent), var(--accent-2));
  --success: #0f9d63; --success-soft: rgba(15, 157, 99, .12);
  --warn: #d97f00;    --warn-soft: rgba(217, 127, 0, .13);
  --danger: #e03e4a;  --danger-soft: rgba(224, 62, 74, .11);
  --info: #2a7bf6;    --info-soft: rgba(42, 123, 246, .12);
  --radius: 18px; --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(20, 24, 50, .06), 0 1px 1px rgba(20, 24, 50, .04);
  --shadow: 0 10px 30px -12px rgba(30, 30, 80, .22);
  --shadow-lg: 0 30px 70px -20px rgba(20, 20, 60, .35);
  --glow: radial-gradient(55% 38% at 12% -8%, rgba(109, 94, 252, .16), transparent 70%), radial-gradient(45% 32% at 100% 0%, rgba(255, 120, 190, .13), transparent 70%);
  color-scheme: light;
}
[data-theme='dark'] {
  --bg: #0b0d13;
  --surface: #141722;
  --surface-2: #1b1f2e;
  --border: #272c3e;
  --text: #eceef7;
  --muted: #8d94aa;
  --accent: #8b7dff;
  --accent-2: #c27bff;
  --accent-soft: rgba(139, 125, 255, .16);
  --accent-ink: #b3a9ff;
  --success: #34d399; --success-soft: rgba(52, 211, 153, .14);
  --warn: #fbbf24;    --warn-soft: rgba(251, 191, 36, .14);
  --danger: #ff6b76;  --danger-soft: rgba(255, 107, 118, .14);
  --info: #6aa5ff;    --info-soft: rgba(106, 165, 255, .14);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 12px 34px -14px rgba(0, 0, 0, .7);
  --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, .8);
  --glow: radial-gradient(55% 38% at 12% -8%, rgba(139, 125, 255, .20), transparent 70%), radial-gradient(45% 32% at 100% 0%, rgba(255, 110, 190, .10), transparent 70%);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5;
  color: var(--text); background: var(--bg); background-image: var(--glow); background-repeat: no-repeat; background-attachment: fixed;
  -webkit-font-smoothing: antialiased; min-height: 100vh;
  transition: background-color .25s, color .25s;
}
body.no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
a { color: var(--accent-ink); text-decoration: none; }
[hidden] { display: none !important; }
.i { flex: none; }
.muted { color: var(--muted); }
.spacer { flex: 1; }
.row { display: flex; align-items: center; gap: 10px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-soft); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; border: 2px solid transparent; background-clip: content-box; }

/* ---------- Butonlar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 14px; border: 1px solid transparent;
  font-weight: 600; font-size: 14.5px; white-space: nowrap; transition: transform .15s, box-shadow .2s, background .2s, opacity .2s;
  background: var(--surface-2); color: var(--text);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--grad); color: #fff; box-shadow: 0 8px 22px -8px var(--accent); }
.btn.primary:hover { box-shadow: 0 12px 28px -8px var(--accent); }
.btn.ghost { background: transparent; border-color: var(--border); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.soft-danger { background: var(--danger-soft); color: var(--danger); }
.btn.soft-success { background: var(--success-soft); color: var(--success); }
.btn.soft { background: var(--accent-soft); color: var(--accent-ink); }
.btn.sm { height: 36px; padding: 0 13px; font-size: 13.5px; border-radius: 11px; }
.btn.block { width: 100%; }
.btn.lg { height: 52px; font-size: 16px; border-radius: 16px; }
.btn .spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; flex: none;
  border-radius: 13px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  transition: background .2s, transform .15s, border-color .2s;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--accent); }
.icon-btn:active { transform: scale(.94); }
.icon-btn.plain { border-color: transparent; background: transparent; }
.icon-btn.sm { width: 34px; height: 34px; border-radius: 10px; }
.icon-btn.danger:hover { color: var(--danger); border-color: var(--danger); }
.dot-badge {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  display: grid; place-items: center; background: var(--grad); color: #fff; font-size: 11px; font-weight: 700; border: 2px solid var(--bg);
}
.dot-badge.pulse { animation: pop .4s; }
@keyframes pop { 40% { transform: scale(1.35); } }

/* ---------- Form ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.field .err { font-size: 12.5px; color: var(--danger); min-height: 0; }
input[type=text], input[type=search], input[type=number], input[type=tel], input[type=email], select, textarea {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 13px; border: 1.5px solid var(--border);
  background: var(--surface); outline: none; transition: border-color .2s, box-shadow .2s;
}
textarea { height: auto; padding: 12px 14px; resize: vertical; line-height: 1.5; }
select { appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238d94aa' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
input.invalid, textarea.invalid { border-color: var(--danger); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .7; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .span2 { grid-column: 1 / -1; }
@media (max-width: 520px) { .form-grid { grid-template-columns: 1fr; } }

.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 500; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 44px; height: 26px; border-radius: 20px; background: var(--border); position: relative; transition: background .2s; flex: none; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }

.check { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 11px; cursor: pointer; user-select: none; transition: background .15s; }
.check:hover { background: var(--surface-2); }
.check input { appearance: none; width: 20px; height: 20px; border-radius: 6px; border: 1.8px solid var(--border); background: var(--surface); display: grid; place-items: center; flex: none; margin: 0; transition: .15s; }
.check input:checked { background: var(--grad); border-color: transparent; }
.check input:checked::after { content: ''; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.check .cnt { margin-left: auto; font-size: 12.5px; color: var(--muted); }

.stepper { display: inline-flex; align-items: center; background: var(--surface-2); border-radius: 13px; padding: 3px; }
.stepper button { width: 34px; height: 34px; border: 0; border-radius: 10px; background: transparent; display: grid; place-items: center; }
.stepper button:hover:not(:disabled) { background: var(--surface); box-shadow: var(--shadow-sm); }
.stepper button:disabled { opacity: .35; cursor: not-allowed; }
.stepper b { min-width: 30px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 20px; font-size: 12.5px; font-weight: 600; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.pill.st-pending { background: var(--warn-soft); color: var(--warn); }
.pill.st-confirmed { background: var(--info-soft); color: var(--info); }
.pill.st-completed { background: var(--success-soft); color: var(--success); }
.pill.st-cancelled { background: var(--danger-soft); color: var(--danger); }
.pill.ok { background: var(--success-soft); color: var(--success); }
.pill.low { background: var(--warn-soft); color: var(--warn); }
.pill.out { background: var(--danger-soft); color: var(--danger); }
.pill.accent { background: var(--accent-soft); color: var(--accent-ink); }

/* ---------- Marka ---------- */
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; transition: transform .2s cubic-bezier(.2, .8, .2, 1), opacity .2s; }
.brand:hover { transform: scale(1.02); opacity: .95; }
.brand-logo-wrap { display: flex; align-items: center; }
.brand-logo-img {
  height: 32px;
  width: auto;
  max-width: 110px;
  object-fit: contain;
  display: block;
  transition: filter .25s ease;
}
/* Açık temada beyaz logo siyah/koyu olsun, koyu temada beyaz parlasın */
[data-theme='light'] .brand-logo-img {
  filter: brightness(0) saturate(100%);
}
[data-theme='dark'] .brand-logo-img {
  filter: brightness(1) drop-shadow(0 2px 8px rgba(255, 255, 255, 0.12));
}

.brand-name {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -.02em;
  display: flex;
  align-items: baseline;
  background: var(--text);
  -webkit-background-clip: text;
  background-clip: text;
}
.brand-name .by {
  font-weight: 500;
  color: var(--accent);
  margin-right: 1px;
}

@media (max-width: 640px) {
  .brand { gap: 8px; }
  .brand-logo-img { height: 26px; max-width: 90px; }
  .brand-name { font-size: 18px; }
}



/* ---------- Üst bar (müşteri) ---------- */
.demo-banner { background: var(--warn-soft); color: var(--warn); text-align: center; font-size: 13px; font-weight: 500; padding: 7px 14px; }
.topbar {
  position: sticky; top: 0; z-index: 40; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px;
  padding: 12px clamp(14px, 3vw, 36px); background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); border-bottom: 1px solid var(--border);
}
.search { position: relative; max-width: 560px; width: 100%; justify-self: center; }
.search > span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; display: flex; }
.search input { padding-left: 44px; padding-right: 42px; height: 46px; border-radius: 15px; background: var(--surface); }
.search .clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; background: transparent; color: var(--muted); border-radius: 10px; display: none; place-items: center; }
.search.has-value .clear { display: grid; }
.search .clear:hover { background: var(--surface-2); }
.actions { display: flex; gap: 10px; align-items: center; }

/* ---------- Sayfa düzeni (müşteri) ---------- */
.wrap { width: min(1320px, 100%); margin: 0 auto; padding: 0 clamp(14px, 3vw, 36px); }
.hero { padding: clamp(24px, 5vw, 48px) 0 18px; }
.hero h1 { font-size: clamp(26px, 4.4vw, 42px); font-weight: 800; letter-spacing: -.03em; line-height: 1.12; max-width: 720px; }
.hero h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { margin-top: 10px; color: var(--muted); font-size: clamp(14.5px, 1.6vw, 17px); max-width: 560px; }

.cats-row { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 14px; scrollbar-width: none; margin: 0 calc(-1 * clamp(14px, 3vw, 36px)); padding-inline: clamp(14px, 3vw, 36px); }
.cats-row::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 38px; padding: 0 16px; border-radius: 20px; border: 1.5px solid var(--border); background: var(--surface); font-weight: 600; font-size: 14px; color: var(--muted); transition: .18s; display: inline-flex; align-items: center; gap: 6px; }
.chip:hover { color: var(--text); border-color: var(--accent); }
.chip.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 8px 18px -10px var(--accent); }
.chip .n { font-size: 12px; opacity: .75; font-weight: 500; }

.layout { display: grid; grid-template-columns: 1fr; gap: 28px; padding-bottom: 60px; }
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar .count { font-weight: 600; }
.toolbar .count small { color: var(--muted); font-weight: 500; margin-left: 4px; }
.toolbar select { width: auto; min-width: 180px; height: 42px; }
.link-btn { background: none; border: 0; color: var(--accent-ink); font-weight: 600; padding: 4px 6px; border-radius: 8px; }
.link-btn:hover { background: var(--accent-soft); }
.only-mobile { display: inline-flex; }

/* Filtre paneli */
.filters { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; }
.filters-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 6px; }
.filters-head h2 { font-size: 17px; font-weight: 700; }
.filters-body { padding: 8px 14px 6px; overflow-y: auto; }
.f-group { padding: 14px 6px; border-bottom: 1px solid var(--border); }
.f-group:last-child { border-bottom: 0; }
.f-group h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; font-weight: 700; }
.f-list { display: flex; flex-direction: column; gap: 2px; max-height: 260px; overflow-y: auto; }
.price-range { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; color: var(--muted); }
.price-range input { height: 42px; }
.hint { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.filters-foot { display: flex; gap: 10px; padding: 12px 20px 18px; }
.filters-foot .btn { flex: 1; }
.backdrop { position: fixed; inset: 0; z-index: 55; background: rgba(8, 10, 18, .5); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .25s; }
.backdrop.show { opacity: 1; pointer-events: auto; }

@media (min-width: 1024px) {
  .layout { grid-template-columns: 270px 1fr; align-items: start; }
  .filters { position: sticky; top: 88px; max-height: calc(100vh - 108px); }
  .only-mobile { display: none !important; }
  .backdrop { display: none; }
}
@media (max-width: 1023px) {
  .filters { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; max-height: 86vh; border-radius: 24px 24px 0 0; border-bottom: 0; transform: translateY(105%); transition: transform .32s cubic-bezier(.2, .8, .2, 1); box-shadow: var(--shadow-lg); }
  .filters.open { transform: none; }
  .filters-body { flex: 1; }
}

/* ---------- Ürün kartları ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.card {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; cursor: pointer;
  display: flex; flex-direction: column; transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s, border-color .25s;
  animation: rise .45s both;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.card-media { position: relative; aspect-ratio: 1 / 1; background: var(--surface-2); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.card:hover .card-media img { transform: scale(1.06); }
.noimg { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); background: var(--surface-2); }
.card-flags { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; pointer-events: none; }
.flag { padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; background: rgba(15, 17, 26, .6); color: #fff; backdrop-filter: blur(8px); display: inline-flex; gap: 5px; align-items: center; }
.card.soldout .card-media img { filter: grayscale(.85) opacity(.6); }
.soldout-tag { position: absolute; inset: auto 0 12px 0; margin: auto; width: max-content; padding: 6px 16px; border-radius: 20px; background: var(--danger); color: #fff; font-weight: 700; font-size: 13px; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-cat { font-size: 12px; font-weight: 600; color: var(--accent-ink); text-transform: uppercase; letter-spacing: .05em; min-height: 18px; }
.card-title { font-size: 15.5px; font-weight: 650; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; }
.price { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.stock-note { font-size: 12.5px; font-weight: 500; }
.stock-note.ok { color: var(--muted); } .stock-note.low { color: var(--warn); } .stock-note.out { color: var(--danger); }
.add-btn { width: 44px; height: 44px; border-radius: 14px; border: 0; background: var(--grad); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 18px -8px var(--accent); transition: transform .15s; flex: none; }
.add-btn:hover { transform: scale(1.08) rotate(6deg); }
.add-btn:active { transform: scale(.92); }
.add-btn:disabled { background: var(--surface-2); color: var(--muted); box-shadow: none; cursor: not-allowed; transform: none; }
.card.skel { pointer-events: none; }
.skel .card-media, .skel .sk { background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
.skel .sk { height: 14px; border-radius: 8px; margin: 8px 0; }
@keyframes shimmer { to { background-position: -200% 0; } }

.empty { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty .ic { width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 24px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; }
.empty h3 { color: var(--text); font-size: 18px; margin-bottom: 6px; }

@media (max-width: 640px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card-body { padding: 11px 12px 13px; }
  .card-title { font-size: 14px; }
  .price { font-size: 16px; }
  .add-btn { width: 40px; height: 40px; border-radius: 12px; }
  .topbar { grid-template-columns: 1fr auto; gap: 10px 12px; }
  .topbar .search { grid-column: 1 / -1; grid-row: 2; max-width: none; }
  .brand-name { font-size: 19px; }
}

/* ---------- Modal / çekmece ---------- */
.overlay { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(8, 10, 18, .55); backdrop-filter: blur(5px); animation: fade .2s both; }
.overlay.closing { animation: fadeOut .18s both; }
@keyframes fade { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
.panel { position: relative; display: flex; flex-direction: column; width: 100%; max-width: 540px; max-height: min(92vh, 900px); background: var(--surface); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow-lg); overflow: hidden; animation: pop-in .3s cubic-bezier(.2, .9, .3, 1.1) both; }
.overlay.closing .panel { animation: pop-out .18s both; }
@keyframes pop-in { from { opacity: 0; transform: translateY(18px) scale(.97); } }
@keyframes pop-out { to { opacity: 0; transform: translateY(10px) scale(.98); } }
.panel.sm { max-width: 420px; } .panel.lg { max-width: 760px; } .panel.xl { max-width: 1000px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 14px 24px; border-bottom: 1px solid var(--border); }
.panel-title { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.panel-body { padding: 22px 24px; overflow-y: auto; flex: 1; }
.panel-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px 18px; border-top: 1px solid var(--border); }
.panel-foot:empty { display: none; }
.panel-x { position: absolute; top: 14px; right: 14px; z-index: 5; background: color-mix(in srgb, var(--surface) 85%, transparent); backdrop-filter: blur(8px); }
.dlg-msg { color: var(--muted); line-height: 1.6; }

.overlay.drawer { justify-content: flex-end; align-items: stretch; padding: 0; }
.overlay.drawer .panel { height: 100%; max-height: 100%; max-width: 460px; border-radius: 26px 0 0 26px; border-right: 0; animation: slide-in .35s cubic-bezier(.2, .8, .2, 1) both; }
.overlay.drawer.closing .panel { animation: slide-out .2s both; }
@keyframes slide-in { from { transform: translateX(100%); } }
@keyframes slide-out { to { transform: translateX(100%); } }
@media (max-width: 640px) {
  .overlay, .overlay.drawer { padding: 0; align-items: flex-end; justify-content: center; }
  .panel, .overlay.drawer .panel { max-width: 100%; max-height: 94vh; height: auto; border-radius: 26px 26px 0 0; border-left: 0; border-right: 0; border-bottom: 0; animation: sheet-up .35s cubic-bezier(.2, .8, .2, 1) both; }
  .overlay.drawer .panel { height: 94vh; }
  .overlay.closing .panel, .overlay.drawer.closing .panel { animation: sheet-down .2s both; }
  .panel-body { padding: 18px 18px; } .panel-head { padding-left: 18px; } .panel-foot { padding: 12px 18px 16px; }
  .panel-foot .btn { flex: 1; }
}
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes sheet-down { to { transform: translateY(100%); } }

/* Ürün detayı */
.pd .panel-body { padding: 0; }
.pd-grid { display: grid; grid-template-columns: 1.05fr 1fr; }
.gallery { padding: 20px; background: var(--surface-2); }
.gal-main { position: relative; aspect-ratio: 1 / 1; border-radius: 20px; overflow: hidden; background: var(--surface); touch-action: pan-y; }
.gal-main img { width: 100%; height: 100%; object-fit: cover; animation: fade .3s; }
.gal-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(6px); display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.gal-nav:hover { background: var(--surface); }
.gal-nav.prev { left: 10px; } .gal-nav.next { right: 10px; }
.gal-count { position: absolute; bottom: 12px; right: 12px; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; background: rgba(15, 17, 26, .6); color: #fff; }
.gal-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.gal-thumb { flex: none; width: 64px; height: 64px; border-radius: 14px; overflow: hidden; border: 2.5px solid transparent; padding: 0; background: var(--surface); opacity: .7; transition: .2s; }
.gal-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gal-thumb.active { border-color: var(--accent); opacity: 1; }
.pd-info { padding: 30px 28px 28px; display: flex; flex-direction: column; gap: 14px; }
.pd-info h2 { font-size: clamp(22px, 3vw, 28px); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.pd-price { font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.pd-desc { color: var(--muted); white-space: pre-line; line-height: 1.7; }
.pd-buy { margin-top: auto; display: flex; gap: 12px; align-items: center; padding-top: 10px; }
.pd-buy .btn { flex: 1; }
@media (max-width: 820px) {
  .pd-grid { grid-template-columns: 1fr; }
  .gallery { padding: 14px; }
  .pd-info { padding: 20px 18px 24px; }
  .pd-buy { position: sticky; bottom: 0; background: var(--surface); padding: 12px 0 2px; }
}

/* Sepet */
.cart-line { display: grid; grid-template-columns: 72px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); animation: rise .3s both; }
.cart-line:last-child { border-bottom: 0; }
.cart-line .thumb { width: 72px; height: 72px; border-radius: 16px; overflow: hidden; background: var(--surface-2); }
.cart-line .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-line h4 { font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.cart-line .meta { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; gap: 8px; }
.cart-line .lp { font-weight: 700; }
.cart-sum { display: flex; align-items: baseline; justify-content: space-between; width: 100%; }
.cart-sum b { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.panel-foot.col { flex-direction: column; align-items: stretch; }
.co-summary { margin-top: 18px; border: 1px dashed var(--border); border-radius: 16px; padding: 14px 16px; background: var(--surface-2); }
.co-summary .ln { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 3px 0; }
.co-summary .tot { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 10px; font-weight: 800; font-size: 17px; }
.success { text-align: center; padding: 18px 6px 6px; }
.success .big { width: 84px; height: 84px; margin: 0 auto 18px; border-radius: 50%; background: var(--success-soft); color: var(--success); display: grid; place-items: center; animation: pop-in .5s both; }
.success h3 { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.success .no { display: inline-block; margin: 14px 0; padding: 8px 16px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; letter-spacing: .04em; }

/* Toast */
#toasts { position: fixed; z-index: 300; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 28px); }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 16px; background: var(--text); color: var(--bg); font-weight: 500; font-size: 14px; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(14px) scale(.96); transition: .25s cubic-bezier(.2, .9, .3, 1.2); }
.toast.show { opacity: 1; transform: none; }
.toast.success .i { color: #34d399; } .toast.error .i { color: #ff6b76; }

.footer { text-align: center; color: var(--muted); font-size: 13px; padding: 28px 16px 40px; border-top: 1px solid var(--border); }
.footer b { color: var(--text); }

/* ---------- Yönetim paneli ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(100%, 420px); background: var(--surface); border: 1px solid var(--border); border-radius: 28px; padding: 36px 30px; text-align: center; box-shadow: var(--shadow); animation: pop-in .5s both; }
.login-card .brand { margin-bottom: 24px; }
.login-card h1 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.login-card p { color: var(--muted); margin: 8px 0 24px; }
.login-card .btn { width: 100%; height: 52px; background: var(--surface); border: 1.5px solid var(--border); font-size: 15.5px; }
.login-card .btn:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.login-card .note { margin-top: 18px; padding: 12px 14px; border-radius: 14px; font-size: 13.5px; background: var(--danger-soft); color: var(--danger); text-align: left; }
.login-card .demo { margin-top: 18px; font-size: 13px; padding: 12px 14px; border-radius: 14px; background: var(--warn-soft); color: var(--warn); text-align: left; }
.login-foot { margin-top: 18px; }

.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; padding: 22px 16px; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.side .brand { padding: 0 8px 18px; }
.nav-btn { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; height: 46px; padding: 0 14px; border-radius: 14px; border: 0; background: transparent; color: var(--muted); font-weight: 600; text-align: left; transition: .18s; }
.nav-btn:hover { background: var(--surface-2); color: var(--text); }
.nav-btn.active { background: var(--accent-soft); color: var(--accent-ink); }
.nav-btn .badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--grad); color: #fff; font-size: 12px; display: grid; place-items: center; }
.side .me { margin-top: auto; padding: 12px; border-radius: 16px; background: var(--surface-2); display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.me .who { min-width: 0; flex: 1; }
.me .who b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .who small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.main { padding: 26px clamp(16px, 3vw, 38px) 50px; min-width: 0; }
.mobile-top { display: none; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.page-head p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.tabbar { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .mobile-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
  .main { padding-bottom: 100px; }
  .tabbar { position: fixed; z-index: 50; left: 10px; right: 10px; bottom: 10px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 6px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(16px); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow-lg); }
  .tabbar .nav-btn { flex-direction: column; justify-content: center; gap: 2px; height: 54px; padding: 0; font-size: 11.5px; border-radius: 16px; text-align: center; }
  .tabbar .nav-btn .badge { position: absolute; top: 4px; right: calc(50% - 26px); margin: 0; min-width: 18px; height: 18px; font-size: 11px; }
}

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; display: flex; align-items: center; gap: 14px; }
.stat .ic { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; flex: none; }
.stat .ic.warn { background: var(--warn-soft); color: var(--warn); } .stat .ic.info { background: var(--info-soft); color: var(--info); }
.stat .ic.success { background: var(--success-soft); color: var(--success); } .stat .ic.accent { background: var(--accent-soft); color: var(--accent-ink); }
.stat small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.stat b { font-size: 21px; font-weight: 800; letter-spacing: -.02em; }

.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.filter-bar .search { margin: 0; max-width: 340px; justify-self: auto; flex: 1 1 220px; }
.filter-bar select { width: auto; min-width: 170px; height: 46px; }
.seg { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.seg::-webkit-scrollbar { display: none; }

.orders { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 16px; }
.order { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; cursor: pointer; display: flex; flex-direction: column; gap: 12px; transition: .22s; animation: rise .4s both; }
.order:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.order.new { border-color: var(--warn); }
.order-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.order-top b { display: block; font-size: 15px; letter-spacing: .02em; }
.order-top small { color: var(--muted); font-size: 12.5px; }
.order-cust { display: flex; flex-direction: column; font-size: 14px; }
.order-cust b { font-weight: 650; }
.order-cust span { color: var(--muted); font-size: 13.5px; }
.order-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.thumbs { display: flex; }
.thumbs .t { width: 36px; height: 36px; border-radius: 11px; border: 2px solid var(--surface); margin-left: -8px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.thumbs .t:first-child { margin-left: 0; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.order-total { font-weight: 800; font-size: 17px; letter-spacing: -.02em; }

.od-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.od-box { background: var(--surface-2); border-radius: 16px; padding: 14px 16px; min-width: 0; }
.od-box small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.od-box b, .od-box a { overflow-wrap: anywhere; }
.od-box.full { grid-column: 1 / -1; }
.od-note { white-space: pre-line; }
.od-items { border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.od-item { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.od-item:last-child { border-bottom: 0; }
.od-item .th { width: 48px; height: 48px; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.od-item .th img { width: 100%; height: 100%; object-fit: cover; }
.od-item .nm { font-weight: 600; font-size: 14px; }
.od-item .sub { color: var(--muted); font-size: 13px; }
.od-item .lt { font-weight: 700; text-align: right; }
.od-total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 4px 0; font-size: 15px; }
.od-total b { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.panel-foot.wrap-actions { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 520px) { .od-grid { grid-template-columns: 1fr; } }

.alist { display: flex; flex-direction: column; gap: 10px; }
.arow { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto; align-items: center; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px 12px 12px; animation: rise .35s both; transition: .2s; }
.arow:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); box-shadow: var(--shadow-sm); }
.arow .th { width: 64px; height: 64px; border-radius: 16px; overflow: hidden; background: var(--surface-2); }
.arow .th img { width: 100%; height: 100%; object-fit: cover; }
.arow .info { min-width: 0; }
.arow .info b { display: block; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arow .info small { color: var(--muted); font-size: 13px; }
.arow .nums { text-align: right; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.arow .nums b { font-weight: 800; }
.arow .btns { display: flex; gap: 8px; }
.arow.plain { grid-template-columns: 46px minmax(0, 1fr) auto; padding: 12px 16px; }
.arow.plain .ic { width: 46px; height: 46px; border-radius: 15px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; }
@media (max-width: 640px) {
  .arow { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; padding: 10px; }
  .arow .th { width: 56px; height: 56px; }
  .arow .nums { grid-column: 2; grid-row: 2; flex-direction: row; align-items: center; gap: 10px; text-align: left; justify-content: flex-start; }
  .arow .btns { grid-column: 3; grid-row: 1 / span 2; flex-direction: column; }
}

.add-form { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.add-form input { flex: 1 1 200px; }
.add-form .btn { flex: none; }

.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 12px; padding: 12px; border: 2px dashed var(--border); border-radius: 18px; transition: .2s; }
.img-grid.drag { border-color: var(--accent); background: var(--accent-soft); }
.img-tile { position: relative; aspect-ratio: 1 / 1; border-radius: 14px; overflow: hidden; background: var(--surface-2); animation: pop-in .3s both; }
.img-tile img { width: 100%; height: 100%; object-fit: cover; }
.img-tile .cv { position: absolute; left: 6px; top: 6px; padding: 2px 8px; border-radius: 10px; background: var(--grad); color: #fff; font-size: 11px; font-weight: 700; }
.img-tile .tb { position: absolute; right: 6px; top: 6px; display: flex; flex-direction: column; gap: 5px; }
.img-tile .tb button { width: 28px; height: 28px; border-radius: 9px; border: 0; background: rgba(15, 17, 26, .7); color: #fff; display: grid; place-items: center; backdrop-filter: blur(4px); }
.img-tile .tb button:hover { background: var(--danger); }
.img-tile .tb button.star:hover { background: var(--accent); }
.img-add { aspect-ratio: 1 / 1; border-radius: 14px; border: 0; background: var(--surface-2); color: var(--muted); display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 600; transition: .2s; }
.img-add:hover { background: var(--accent-soft); color: var(--accent-ink); }
.meter { margin-top: 8px; font-size: 12.5px; color: var(--muted); display: flex; justify-content: space-between; gap: 10px; }
.meter.warn { color: var(--warn); }
