/* ============================================================
   LisansMarket - Ana Stiller
   Dark Mode (varsayılan) + Light Mode
   ============================================================ */

:root {
  --primary: #2563eb;
  --primary-2: #7c3aed;
  --primary-grad: linear-gradient(135deg, #3b82f6 0%, #7c3aed 100%);
  --radius: 16px;
  --radius-sm: 10px;
  --container: 1180px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --shadow: 0 10px 40px rgba(0,0,0,.35);
}

/* ---------- DARK (default) ---------- */
:root,
[data-theme="dark"] {
  --bg: #050a18;
  --bg-2: #0a1124;
  --surface: #0e1730;
  --surface-2: #121d3a;
  --surface-hover: #16234a;
  --border: rgba(255,255,255,.07);
  --border-strong: rgba(255,255,255,.12);
  --text: #eef2ff;
  --text-2: #aab3cf;
  --text-3: #6b748f;
  --glow: radial-gradient(60% 60% at 70% 20%, rgba(59,130,246,.20), transparent 70%);
}

/* ---------- LIGHT ---------- */
[data-theme="light"] {
  --bg: #f4f6fb;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #f7f9fd;
  --surface-hover: #eef2fb;
  --border: rgba(15,23,42,.08);
  --border-strong: rgba(15,23,42,.14);
  --text: #0f172a;
  --text-2: #475069;
  --text-3: #8a93a8;
  --shadow: 0 10px 30px rgba(15,23,42,.08);
  --glow: radial-gradient(60% 60% at 70% 20%, rgba(59,130,246,.10), transparent 70%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 88px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; }
.logo .logo-mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--primary-grad); display: grid; place-items: center;
  color: #fff; font-size: 20px;
}
.logo small { display: block; font-size: 10px; font-weight: 500; color: var(--text-3); }
.logo .accent { color: var(--primary); }

.main-nav { display: flex; gap: 26px; margin-left: 10px; }
.main-nav a { color: var(--text-2); font-weight: 500; font-size: 15px; padding: 6px 0; position: relative; }
.main-nav a:hover, .main-nav a.active { color: var(--text); }
.main-nav a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px;
  background: var(--primary); border-radius: 2px;
}

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); display: grid; place-items: center;
  position: relative; transition: .2s;
}
.icon-btn:hover { background: var(--surface-hover); }
.cart-badge {
  position: absolute; top: -6px; right: -6px; background: var(--primary);
  color: #fff; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px;
  border-radius: 9px; display: grid; place-items: center; padding: 0 4px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 12px 22px; border-radius: 12px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; transition: .2s; white-space: nowrap;
}
.btn-primary { background: var(--primary-grad); color: #fff; box-shadow: 0 8px 24px rgba(59,130,246,.35); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(59,130,246,.45); }
.btn-ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: var(--surface-hover); }
.btn-block { width: 100%; }
.btn-lg { padding: 15px 28px; font-size: 16px; }
.btn-sm { padding: 8px 14px; font-size: 13px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 60px 0 40px; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: var(--glow); pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero h1 { font-size: 52px; line-height: 1.08; font-weight: 800; letter-spacing: -1px; }
.hero h1 .grad {
  background: var(--primary-grad); -webkit-background-clip: text;
  background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p.lead { color: var(--text-2); font-size: 18px; margin: 18px 0 26px; max-width: 460px; }

.trust-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 28px; }
.trust-item {
  display: flex; align-items: center; gap: 10px; background: var(--surface);
  border: 1px solid var(--border); padding: 12px 16px; border-radius: 12px;
}
.trust-item .ti-icon {
  width: 34px; height: 34px; border-radius: 9px; background: rgba(59,130,246,.15);
  color: var(--primary); display: grid; place-items: center; font-size: 16px;
}
.trust-item b { font-size: 14px; }
.trust-item span { display: block; font-size: 12px; color: var(--text-3); }

.hero-visual {
  position: relative; min-height: 340px; border-radius: 24px;
  background:
    radial-gradient(70% 90% at 60% 40%, rgba(59,130,246,.25), transparent 70%),
    linear-gradient(180deg, rgba(124,58,237,.12), transparent);
  display: grid; place-items: center; border: 1px solid var(--border);
}
.hero-boxes { display: flex; gap: 14px; align-items: flex-end; }
.hero-box {
  width: 120px; height: 160px; border-radius: 14px; background: var(--surface-2);
  border: 1px solid var(--border-strong); box-shadow: var(--shadow);
  display: grid; place-items: center; text-align: center; padding: 14px; font-weight: 700;
}
.hero-box.lg { width: 150px; height: 200px; transform: translateY(-12px); }
.hero-box span { font-size: 26px; display: block; margin-bottom: 8px; }

/* ---------- Section ---------- */
.section { padding: 30px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.section-head h2 { font-size: 24px; display: flex; align-items: center; gap: 10px; }
.section-head a { color: var(--text-2); font-size: 14px; display: flex; align-items: center; gap: 6px; }
.section-head a:hover { color: var(--primary); }

/* ---------- Category Grid ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cat-card {
  display: flex; align-items: center; gap: 18px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 14px; padding: 20px 22px;
  transition: .2s; position: relative;
}
.cat-card:hover { background: var(--surface-hover); border-color: var(--border-strong); transform: translateY(-2px); }
.cat-icon {
  width: 88px; height: 88px; display: grid; place-items: center;
  font-size: 64px; flex-shrink: 0; background: transparent;
}
.cat-icon img { width: 88px; height: 88px; object-fit: contain; }
.cat-card .cat-name { font-weight: 700; font-size: 16px; }
.cat-card .cat-sub { font-size: 12px; color: var(--text-3); }
.cat-card .cat-arrow {
  margin-left: auto; width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface-2); display: grid; place-items: center; color: var(--text-2);
  border: 1px solid var(--border); flex-shrink: 0;
}
.cat-card:hover .cat-arrow { background: var(--primary); color: #fff; }

/* ---------- Product Cards ---------- */
.product-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.product-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.product-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; transition: .2s; display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.product-thumb {
  aspect-ratio: 1.35; background: linear-gradient(160deg, #1b2a52, #0e1730);
  display: grid; place-items: center; position: relative;
}
[data-theme="light"] .product-thumb { background: linear-gradient(160deg, #e8eefc, #f4f6fb); }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-thumb .ph-text { font-weight: 800; font-size: 20px; opacity: .9; text-align: center; padding: 12px; }
.product-badge {
  position: absolute; top: 10px; left: 10px; background: rgba(34,197,94,.9);
  color: #fff; font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 7px;
}
.product-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.product-body h3 { font-size: 15px; font-weight: 700; }
.product-body .p-sub { font-size: 12px; color: var(--text-3); }
.product-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 12px; }
.price { font-size: 18px; font-weight: 800; color: var(--primary); }
.price .old { font-size: 13px; color: var(--text-3); text-decoration: line-through; font-weight: 500; margin-left: 6px; }
.add-btn {
  width: 40px; height: 40px; border-radius: 11px; background: var(--primary-grad);
  color: #fff; display: grid; place-items: center; border: none; font-size: 16px;
}
.out-of-stock { font-size: 12px; color: #ef4444; font-weight: 600; }

/* ---------- Feature strip ---------- */
.feature-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px; margin: 30px 0;
}
.feature-item { display: flex; align-items: center; gap: 14px; }
.feature-item .fi-icon {
  width: 44px; height: 44px; border-radius: 12px; background: rgba(59,130,246,.12);
  color: var(--primary); display: grid; place-items: center; font-size: 20px;
}
.feature-item b { font-size: 15px; }
.feature-item span { display: block; font-size: 12px; color: var(--text-3); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 48px 0 24px; margin-top: 50px; background: var(--bg-2); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1.4fr; gap: 30px; }
.footer-grid h4 { font-size: 14px; margin-bottom: 16px; }
.footer-grid ul { list-style: none; }
.footer-grid ul li { margin-bottom: 10px; }
.footer-grid ul li a { color: var(--text-2); font-size: 14px; }
.footer-grid ul li a:hover { color: var(--primary); }
.social { display: flex; gap: 10px; margin-top: 16px; }
.social a {
  width: 38px; height: 38px; border-radius: 10px; background: var(--surface);
  border: 1px solid var(--border); display: grid; place-items: center; color: var(--text-2);
}
.social a:hover { background: var(--primary); color: #fff; }
.newsletter { display: flex; gap: 8px; margin-top: 12px; }
.footer-bottom { border-top: 1px solid var(--border); margin-top: 36px; padding-top: 20px;
  display: flex; justify-content: space-between; align-items: center; color: var(--text-3); font-size: 13px; }
.pay-logos { display: flex; gap: 8px; }
.pay-logos span { background: var(--surface); border: 1px solid var(--border); padding: 5px 10px; border-radius: 7px; font-size: 12px; font-weight: 700; }

/* ---------- Forms / inputs ---------- */
.input, select.input, textarea.input {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border-strong);
  border-radius: 11px; padding: 13px 15px; color: var(--text); font-size: 15px; font-family: inherit;
}
.input:focus { outline: none; border-color: var(--primary); }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; margin-bottom: 7px; color: var(--text-2); font-weight: 500; }
.search-form { position: relative; }

/* ---------- Cards / tables ---------- */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.page-title { font-size: 28px; margin: 24px 0; }
.breadcrumb { color: var(--text-3); font-size: 14px; margin: 18px 0; }
.breadcrumb a { color: var(--text-2); }

table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--border); font-size: 14px; }
table.data th { color: var(--text-3); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
table.data tr:hover td { background: var(--surface-2); }

.badge { display: inline-block; padding: 4px 10px; border-radius: 7px; font-size: 12px; font-weight: 600; }
.badge.green { background: rgba(34,197,94,.15); color: #22c55e; }
.badge.yellow { background: rgba(234,179,8,.15); color: #eab308; }
.badge.red { background: rgba(239,68,68,.15); color: #ef4444; }
.badge.blue { background: rgba(59,130,246,.15); color: #3b82f6; }
.badge.gray { background: var(--surface-2); color: var(--text-2); }

/* ---------- Flash messages ---------- */
.flash { padding: 13px 18px; border-radius: 11px; margin-bottom: 14px; font-size: 14px; font-weight: 500; }
.flash.success { background: rgba(34,197,94,.13); color: #22c55e; border: 1px solid rgba(34,197,94,.3); }
.flash.error { background: rgba(239,68,68,.13); color: #ef4444; border: 1px solid rgba(239,68,68,.3); }

/* ---------- Theme toggle ---------- */
.theme-toggle .sun { display: none; }
[data-theme="light"] .theme-toggle .sun { display: block; }
[data-theme="light"] .theme-toggle .moon { display: none; }

/* ---------- Misc ---------- */
.text-center { text-align: center; }
.mt-2 { margin-top: 20px; } .mt-3 { margin-top: 30px; } .mb-2 { margin-bottom: 20px; }
.muted { color: var(--text-3); }
.license-box { background: var(--surface-2); border: 1px dashed var(--primary); border-radius: 11px; padding: 16px; font-family: monospace; font-size: 15px; white-space: pre-wrap; word-break: break-all; }
.empty { text-align: center; padding: 60px 20px; color: var(--text-3); }
.empty .e-icon { font-size: 48px; margin-bottom: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .hero h1 { font-size: 38px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid, .product-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .feature-strip { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .main-nav { display: none; }
}
@media (max-width: 560px) {
  .cat-grid, .product-grid, .product-grid.cols-4 { grid-template-columns: 1fr; }
  .feature-strip { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 30px; }
}

/* ============================================================
   Ek bileşenler (ürün detay, sepet, ödeme, hesap, tablolar)
   ============================================================ */

/* Tablolar */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px 10px; text-align: left; font-size: 14px; border-bottom: 1px solid var(--border); }
.table th { color: var(--text-2); font-weight: 600; font-size: 13px; }
.table tfoot td { border-bottom: none; }

/* Rozetler */
.badge-green  { background: rgba(34,197,94,.15); color: #22c55e; }
.badge-blue   { background: rgba(59,130,246,.15); color: #3b82f6; }
.badge-red    { background: rgba(239,68,68,.15); color: #ef4444; }
.badge-yellow { background: rgba(234,179,8,.15); color: #eab308; }

.qty-input { width: 80px; text-align: center; }
.link-danger { color: #ef4444; font-weight: 700; }
.page-content { line-height: 1.8; color: var(--text-2); }
.page-content h2, .page-content h3 { color: var(--text); margin: 18px 0 10px; }
.page-content p { margin-bottom: 12px; }
.page-content ul { margin: 0 0 12px 20px; }

/* Ürün detay */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
.pd-info h1 { font-size: 28px; margin-bottom: 10px; }
.pd-price { font-size: 30px; font-weight: 800; color: var(--primary); margin: 18px 0; }
.pd-price .old { font-size: 17px; color: var(--text-3); text-decoration: line-through; font-weight: 500; margin-left: 10px; }
.pd-meta { display: flex; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; }
.pd-buy { display: flex; gap: 12px; align-items: stretch; margin-bottom: 18px; }
.pd-buy .qty-input { width: 90px; }
.pd-buy .btn { flex: 1; }
.pd-trust { display: flex; gap: 18px; flex-wrap: wrap; color: var(--text-3); font-size: 13px; }
.pd-desc { line-height: 1.8; color: var(--text-2); }

/* Sepet */
.cart-table-wrap { padding: 6px 14px; }
.cart-prod { display: flex; align-items: center; gap: 12px; }
.cart-thumb { width: 48px; height: 48px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; flex-shrink: 0; }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; flex-wrap: wrap; gap: 16px; }
.cart-summary { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.cart-total { font-size: 18px; }
.cart-total span { font-weight: 800; color: var(--primary); font-size: 22px; margin-left: 6px; }

/* Ödeme */
.checkout-grid { display: grid; grid-template-columns: 1.3fr .9fr; gap: 24px; align-items: start; }
.order-summary .os-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.order-summary .os-total { display: flex; justify-content: space-between; align-items: center; padding-top: 16px; font-weight: 700; font-size: 16px; }

/* Sonuç kutuları */
.result-box { text-align: center; padding: 60px 20px; max-width: 640px; margin: 0 auto; }
.result-icon { font-size: 56px; margin-bottom: 14px; }
.result-box h1 { font-size: 28px; margin-bottom: 8px; }
.result-actions { display: flex; gap: 12px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }

/* Auth */
.auth-card { max-width: 440px; margin: 20px auto; }
.auth-card h1 { font-size: 26px; margin-bottom: 4px; }
.auth-alt { text-align: center; margin-top: 16px; font-size: 14px; color: var(--text-2); }
.auth-alt a { color: var(--primary); font-weight: 600; }

/* Hesap / sipariş */
.account-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.order-head { display: flex; justify-content: space-between; align-items: flex-start; }
.license-block { margin-bottom: 16px; }
.license-box { background: var(--bg); border: 1px solid var(--border-strong); border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; }
.license-box code { font-family: 'Courier New', monospace; font-size: 14px; color: var(--primary); word-break: break-all; }

/* Hero ek */
.hero-copy .trust-item { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; }
.trust-item .ti-icon { font-size: 18px; }
.trust-item b { display: block; font-size: 13px; }
.trust-item small { color: var(--text-3); font-size: 11px; }

@media (max-width: 860px) {
  .product-detail, .checkout-grid { grid-template-columns: 1fr; }
  .cart-summary { width: 100%; justify-content: space-between; }
}