/* aiavm yasal/statik sayfa stilleri */
.page {
  background: var(--bg);
  font-family: "Inter", -apple-system, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}
.page-main { padding: 28px 18px 80px; max-width: 760px; margin: 0 auto; }
.page-doc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 26px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
}
.page-doc h1 { font-size: 22px; margin: 0 0 14px; font-weight: 600; letter-spacing: -0.01em; }
.page-doc h2 { font-size: 16px; margin: 20px 0 6px; font-weight: 600; }
.page-doc h3 { font-size: 14px; margin: 14px 0 4px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: .03em; }
.page-doc p { margin: 0 0 8px; }
.page-doc ul, .page-doc ol { margin: 0 0 10px 20px; padding: 0; }
.page-doc li { margin-bottom: 2px; }
.page-doc table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.page-doc th, .page-doc td { padding: 8px 10px; border: 1px solid var(--border); text-align: left; font-size: 14px; vertical-align: top; }
.page-doc th { background: var(--bg); font-weight: 600; }
.page-doc a { color: var(--accent); }
/* Button-link'lerin yazısı accent rengini DEVRALMASIN — kendi color'larını korusun */
.page-doc a.btn,
.page-doc a.stok-btn,
.page-doc a.urun-buy { color: var(--accent-fg); }
.page-doc a.btn-alt { color: var(--text); }
.page-doc strong { font-weight: 600; }
.page-doc hr { border: none; border-top: 1px solid var(--border); margin: 24px 0 14px; }
.page-foot { font-size: 12px; color: var(--text-dim); }
.page-foot p { line-height: 1.7; }
.page-foot a { color: var(--text-dim); text-decoration: underline; }
.page-foot a:hover { color: var(--text); }
.muted { color: var(--text-dim); }

/* Sayfa header (yasal/stok/ürün sayfaları için) */
.chat-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.chat-brand {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.chat-subtitle {
  font-size: 13px;
  color: var(--text-dim);
  border-left: 1px solid var(--border);
  padding-left: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-spacer { flex: 1; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
}
.icon-btn:hover { background: var(--bg-alt); }

/* Stok Durumu sayfası */
.stok-cats { list-style: none; margin: 18px 0 0 !important; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.stok-cats li { margin: 0; }
.stok-cats a { display: block; padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; color: var(--text); text-decoration: none; font-size: 14px; }
.stok-cats a:hover { background: var(--bg-alt); }
.stok-cats .muted { font-size: 12px; margin-left: 4px; }

.stok-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.stok-table td { padding: 6px 10px; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: middle; line-height: 1.3; }
.stok-table tr:last-child td { border-bottom: none; }
.stok-name { color: var(--text); }
.stok-row-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  line-height: 1.3;
}
.stok-row-link:hover span { text-decoration: underline; }
.stok-thumb {
  width: 40px; height: 40px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.stok-action { width: 1%; white-space: nowrap; text-align: right; }
.stok-btn {
  display: inline-block;
  padding: 6px 14px;
  background: var(--accent);
  color: var(--accent-fg);
  border-radius: 7px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--accent);
}
.stok-btn:hover { opacity: 0.92; }

/* Ürün detay sayfası */
.urun-detay {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 18px 60px;
}
.urun-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
@media (max-width: 720px) {
  .urun-grid { grid-template-columns: 1fr; padding: 18px; gap: 18px; }
}
.urun-img-wrap {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.urun-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}
.urun-info { display: flex; flex-direction: column; gap: 14px; }
.urun-name { font-size: 22px; font-weight: 600; line-height: 1.3; margin: 0; color: var(--text); }
.urun-price { font-size: 26px; font-weight: 700; color: var(--text); }
.urun-stock-ok  { color: #2a6b3e; font-size: 13px; font-weight: 500; }
.urun-stock-out { color: #9a2a2a; font-size: 13px; font-weight: 500; }
.urun-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.urun-buy {
  padding: 12px 28px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
}
.urun-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 14px;
}

/* İlgili ürünler — footer'ın üstü, tek layout */
.urun-related {
  margin-top: 32px;
  padding: 18px 0 6px;
  border-top: 1px solid var(--border, #e8e2d5);
}
.ur-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim, #6a665c);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 14px;
}
.ur-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.ur-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text, #1f1d18);
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e8e2d5);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color .15s, transform .12s;
}
.ur-card:hover { border-color: var(--accent, #7c3aed); transform: translateY(-2px); }
.ur-img-wrap {
  aspect-ratio: 1 / 1;
  background: var(--bg-alt, #f3eee0);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.ur-img-wrap img { width: 100%; height: 100%; object-fit: contain; }
.ur-name {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  padding: 8px 10px 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}
.ur-price {
  font-size: 13px;
  color: var(--accent, #7c3aed);
  font-weight: 600;
  padding: 0 10px 10px;
}
.urun-desc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 18px;
}
.urun-desc h2 { font-size: 16px; margin: 0 0 12px; font-weight: 600; }
/* İLETİŞİM FORMU */
.contact-form {
  display: grid;
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin: 14px 0 26px;
}
.contact-form label { display: grid; gap: 4px; font-size: 12px; font-weight: 600; color: var(--text-soft); }
.contact-form label span { text-transform: uppercase; letter-spacing: 0.05em; }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  font-family: inherit;
  font-size: 15px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  font-weight: 400;
  width: 100%;
  box-sizing: border-box;
}
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.contact-form button[type="submit"] {
  justify-self: start;
  padding: 10px 24px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}
.contact-flash { padding: 10px 14px; border-radius: 8px; font-size: 13px; }
.contact-flash.ok  { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.contact-flash.err { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* SEPETİM (/sepetim) */
.cart-empty { padding: 40px 0; text-align: center; }
.cart-empty p { margin-bottom: 14px; }

.cart-flash { padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; }
.cart-flash.ok  { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.cart-flash.err { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

.cart-list { display: flex; flex-direction: column; }
.cart-row {
  display: grid;
  grid-template-columns: 72px 1fr auto auto 28px;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  transition: opacity .2s;
}
.cart-row:last-child { border-bottom: 0; }
.cart-row-thumb img {
  width: 72px; height: 72px;
  object-fit: contain;
  background: var(--bg-alt);
  border-radius: 8px;
  display: block;
}
.cart-row-info { min-width: 0; }
.cart-row-name {
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}
.cart-row-name:hover { color: var(--accent); }
.cart-row-unit { font-size: 12px; color: var(--text-soft); margin-top: 4px; }
.cart-row-oos  { font-size: 12px; color: #991b1b; margin-top: 4px; }
.cart-row-qty  { display: flex; align-items: center; gap: 8px; }
.qbtn {
  width: 28px; height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  padding: 0;
}
.qbtn:hover    { background: var(--bg-alt); border-color: var(--accent); color: var(--accent); }
.qbtn:disabled { opacity: 0.4; cursor: not-allowed; }
.qval { min-width: 22px; text-align: center; font-weight: 600; font-size: 14px; }
.cart-row-line { font-weight: 700; font-size: 15px; white-space: nowrap; }
.cart-row-del  {
  background: none; border: 0; font-size: 22px; line-height: 1;
  cursor: pointer; color: var(--text-muted);
  padding: 0; width: 28px; height: 28px;
}
.cart-row-del:hover { color: #991b1b; }

@media (max-width: 600px) {
  .cart-row { grid-template-columns: 60px 1fr auto; grid-template-rows: auto auto; gap: 10px 12px; }
  .cart-row-thumb { grid-row: 1 / 3; }
  .cart-row-info { grid-column: 2; grid-row: 1; }
  .cart-row-qty  { grid-column: 2; grid-row: 2; justify-self: start; }
  .cart-row-line { grid-column: 3; grid-row: 1; align-self: start; text-align: right; }
  .cart-row-del  { grid-column: 3; grid-row: 2; align-self: end; justify-self: end; }
  .cart-row-thumb img { width: 60px; height: 60px; }
}

.cart-summary {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 2px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cart-summary-label { font-size: 14px; color: var(--text-soft); }
.cart-summary-meta  { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.cart-summary-total { font-size: 24px; font-weight: 700; }

.cart-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.cart-checkout {
  padding: 12px 24px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}
@media (max-width: 480px) {
  .cart-actions { flex-direction: column-reverse; }
  .cart-actions .btn { width: 100%; text-align: center; }
}

.urun-desc-body {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  white-space: pre-wrap;
}
.urun-desc-body p { margin: 0 0 8px; }
.urun-desc-body p:last-child { margin-bottom: 0; }

/* === Hızlı satın al popup === */
.qb-overlay {
  position: fixed; inset: 0;
  background: rgba(20, 16, 8, 0.55);
  z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  overflow-y: auto;
}
.qb-modal {
  background: #fff;
  border-radius: 12px;
  width: 100%; max-width: 480px;
  padding: 22px 22px 18px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}
.qb-close {
  position: absolute; top: 10px; right: 12px;
  background: transparent; border: none;
  font-size: 28px; line-height: 1;
  color: #888; cursor: pointer;
  padding: 4px 10px;
}
.qb-close:hover { color: #333; }
.qb-product {
  display: flex; gap: 12px; align-items: center;
  padding-bottom: 14px; border-bottom: 1px solid #efeae0;
  margin-bottom: 14px;
}
.qb-img {
  width: 60px; height: 60px;
  object-fit: cover; border-radius: 8px;
  border: 1px solid #efeae0;
  background: #f9f6ef;
}
.qb-name {
  font-size: 14px; font-weight: 500;
  color: #2a261f; line-height: 1.35;
}
.qb-price {
  font-size: 16px; font-weight: 600;
  color: #7a6b4a; margin-top: 4px;
}
.qb-row, .qb-row2 label {
  display: block;
  font-size: 12px; color: #6b6453;
  margin-bottom: 10px;
}
.qb-row input, .qb-row2 input {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid #e0d9c8;
  border-radius: 6px;
  font-size: 14px;
  margin-top: 4px;
  font-family: inherit;
  box-sizing: border-box;
}
.qb-row input:focus, .qb-row2 input:focus {
  outline: none;
  border-color: #7a6b4a;
}
.qb-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.qb-opt { color: #a59f8e; font-weight: normal; font-size: 11px; }
.qb-err {
  color: #c0392b;
  font-size: 13px;
  margin: 8px 0;
  min-height: 18px;
}
.qb-submit {
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  font-size: 15px;
}
.qb-foot {
  font-size: 11px;
  margin-top: 12px;
  margin-bottom: 0;
  line-height: 1.5;
}
