:root {
  --bg: #f5f6fb;
  --bg-soft: #eef0f9;
  --card: #ffffff;
  --border: #e4e7f2;
  --text: #1e2433;
  --muted: #6d7590;
  --accent: #6259e8;
  --accent-hover: #4f46d6;
  --accent-soft: #eeedfc;
  --ok: #16a06a;
  --warn: #d9820b;
  --err: #e5484d;
  --sale: #ec2f76;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(30, 36, 51, .07);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 16px; }

/* ---------- Header ---------- */
.site-header { background: var(--card); border-bottom: 1px solid var(--border); padding-top: 14px; box-shadow: var(--shadow); }
.header-inner { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.logo {
  font-size: 1.35rem; font-weight: 800; white-space: nowrap; letter-spacing: .02em;
  background: linear-gradient(120deg, #4a5cf0, #8a4bef);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.logo:hover { text-decoration: none; }
.logo-has-img { background: none; }
.logo-has-img img { display: block; max-height: 44px; width: auto; max-width: 220px; object-fit: contain; }
.search { flex: 1; display: flex; min-width: 220px; }
.search input {
  flex: 1; padding: 10px 14px; border: 1px solid var(--border); border-right: none;
  border-radius: 999px 0 0 999px; background: var(--bg-soft); color: var(--text); font-size: .95rem;
}
.search input:focus { outline: none; border-color: var(--accent); background: #fff; }
.search button {
  padding: 10px 22px; border: none; border-radius: 0 999px 999px 0;
  background: var(--accent); color: #fff; font-weight: 600; cursor: pointer;
}
.search button:hover { background: var(--accent-hover); }
.header-links { display: flex; gap: 18px; align-items: center; }
.header-links a { color: var(--text); font-weight: 500; }
.cart-link { position: relative; }
.cart-badge {
  background: var(--sale); color: #fff; border-radius: 999px; font-size: .72rem;
  padding: 1px 7px; margin-left: 4px; font-weight: 700;
}
.cat-nav { display: flex; gap: 4px; overflow-x: auto; padding: 10px 0; }
.cat-nav a {
  color: var(--muted); padding: 6px 14px; border-radius: 999px; white-space: nowrap; font-size: .92rem; font-weight: 500;
}
.cat-nav a:hover { color: var(--accent); background: var(--accent-soft); text-decoration: none; }

main.container { min-height: 60vh; padding-top: 40px; padding-bottom: 56px; }

/* ---------- Slider ---------- */
.slider {
  position: relative; border-radius: var(--radius); overflow: hidden;
  margin-bottom: 28px; box-shadow: var(--shadow); background: var(--bg-soft);
}
.slider .slides {
  display: flex; transition: transform .45s ease;
}
.slider .slide {
  flex: 0 0 100%; display: flex; align-items: center; gap: 24px;
  min-height: 340px; padding: 32px 72px;
  background: linear-gradient(120deg, #0f1c4d, #233a8f);
  color: #fff; text-decoration: none;
}
.slider .slide:hover { text-decoration: none; }
.slide-text { flex: 1.3; min-width: 0; }
.slide-text h2 { margin: 0 0 10px; font-size: clamp(1.5rem, 4vw, 2.6rem); line-height: 1.15; color: #fff; }
.slide-price { font-size: clamp(1.6rem, 4.5vw, 3rem); font-weight: 800; color: var(--sale); margin-bottom: 10px; }
.slide-text p { margin: 0; color: rgba(255, 255, 255, .78); font-size: clamp(.9rem, 1.6vw, 1.15rem); }
.slide-img { flex: 1; display: flex; justify-content: center; align-items: center; min-width: 0; }
.slide-img img {
  max-height: 280px; max-width: 100%; object-fit: contain; display: block;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, .35));
}
@media (max-width: 640px) {
  .slider .slide { flex-direction: column-reverse; min-height: 0; padding: 26px 20px 44px; text-align: center; }
  .slide-text, .slide-img { flex: 0 0 auto; width: 100%; }
  .slide-img img { max-height: 150px; }
}
.slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255, 255, 255, .85); color: var(--text);
  font-size: 1.5rem; line-height: 1; font-weight: 700;
  display: grid; place-items: center; box-shadow: var(--shadow); z-index: 2;
}
.slider-arrow:hover { background: #fff; }
.slider-prev { left: 14px; }
.slider-next { right: 14px; }
.slider-dots {
  position: absolute; left: 0; right: 0; bottom: 12px;
  display: flex; justify-content: center; gap: 8px; z-index: 2;
}
.slider-dots button {
  width: 10px; height: 10px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255, 255, 255, .55); padding: 0;
}
.slider-dots button.on { background: #fff; width: 22px; border-radius: 999px; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(120deg, #4a5cf0, #8a4bef);
  color: #fff; border-radius: var(--radius);
  padding: 40px 32px; margin-bottom: 28px;
}
.hero h1 { margin: 0 0 8px; font-size: 1.7rem; }
.hero p { margin: 0; color: rgba(255, 255, 255, .85); }

/* ---------- Ürün kartları ---------- */
.section-title { display: flex; justify-content: space-between; align-items: baseline; margin: 26px 0 14px; }
.section-title h2 { margin: 0; font-size: 1.25rem; }
.section-title a { font-weight: 600; font-size: .92rem; white-space: nowrap; }

/* Ana sayfa bölüm kutuları */
.home-section {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 22px 24px; margin-bottom: 26px; box-shadow: var(--shadow);
}
.home-section .section-title { margin: 0 0 16px; }
.home-section .section-title h2 { font-size: 1.2rem; }
.home-section .product-card { background: var(--bg); }
.product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px;
}
.product-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s; position: relative;
}
.product-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(30, 36, 51, .12); }
.product-card .thumb { aspect-ratio: 4/3; background: var(--bg-soft); display: block; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sale-badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: var(--sale); color: #fff; font-weight: 700; font-size: .78rem;
  padding: 3px 9px; border-radius: 999px;
}
.product-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-card h3 { margin: 0; font-size: 1rem; line-height: 1.35; }
.product-card h3 a { color: var(--text); }
.product-card h3 a:hover { color: var(--accent); text-decoration: none; }
.product-card .short { color: var(--muted); font-size: .85rem; margin: 0; flex: 1; }
.price-row { display: flex; align-items: center; gap: 10px; }
.price { font-size: 1.15rem; font-weight: 800; color: var(--text); }
.old-price { color: var(--muted); text-decoration: line-through; font-size: .88rem; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.badge-ok { background: #e3f6ee; color: var(--ok); }
.badge-warn { background: #fdf0dd; color: var(--warn); }
.badge-err { background: #fde4e5; color: var(--err); }
.badge-info { background: var(--accent-soft); color: var(--accent); }

/* ---------- Butonlar ---------- */
.btn {
  display: inline-block; padding: 10px 20px; border-radius: 8px; border: none;
  background: var(--accent); color: #fff; font-weight: 600; font-size: .95rem;
  cursor: pointer; text-align: center;
}
.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn-outline { background: #fff; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { background: var(--bg-soft); }
.btn-sm { padding: 6px 14px; font-size: .85rem; }
.btn-ok { background: var(--ok); }
.btn-ok:hover { background: #10875a; }
.btn-err { background: var(--err); }
.btn-err:hover { background: #d13438; }
.btn[disabled], .btn.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn-block { display: block; width: 100%; }

/* ---------- Ürün detay ---------- */
.product-detail { display: grid; grid-template-columns: 1fr 1.2fr; gap: 32px; align-items: start; }
@media (max-width: 760px) { .product-detail { grid-template-columns: 1fr; } }
.product-detail .gallery {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.product-detail .gallery img { width: 100%; display: block; }
.product-detail h1 { margin: 0 0 10px; font-size: 1.5rem; }
.detail-price { font-size: 1.7rem; font-weight: 800; margin: 12px 0 4px; color: var(--accent); }
.buy-box {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; margin-top: 18px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow);
}
.qty-row { display: flex; align-items: center; gap: 12px; }
.qty-row input { width: 80px; padding: 9px; border-radius: 8px; border: 1px solid var(--border); background: #fff; color: var(--text); text-align: center; font-size: 1rem; }
.desc-box {
  max-width: 860px; margin: 44px auto 0;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 32px; box-shadow: var(--shadow);
}
.desc-box h2 { font-size: 1.2rem; text-align: center; border-bottom: 1px solid var(--border); padding-bottom: 12px; margin-top: 0; }
.desc-box .desc-body { color: #414a61; white-space: pre-line; font-size: .97rem; }

/* ---------- Tablolar / formlar ---------- */
table.list { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; }
table.list th, table.list td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: .92rem; }
table.list th { background: var(--bg-soft); color: var(--muted); font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; }
table.list tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }

.form-grid { display: grid; gap: 16px; max-width: 560px; }
.form-grid label { font-weight: 600; font-size: .9rem; display: block; margin-bottom: 6px; }
.form-grid input[type=text], .form-grid input[type=email], .form-grid input[type=tel],
.form-grid input[type=number], .form-grid input[type=password], .form-grid select, .form-grid textarea,
input.input, select.input, textarea.input {
  width: 100%; padding: 10px 13px; border-radius: 8px; border: 1px solid var(--border);
  background: #fff; color: var(--text); font-size: .95rem; font-family: inherit;
}
.form-grid input:focus, .form-grid textarea:focus, .form-grid select:focus,
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------- Ödeme yöntemi seçimi ---------- */
.pay-option {
  display: flex; gap: 12px; align-items: flex-start;
  border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 16px; margin-top: 10px; cursor: pointer; background: #fff;
  font-weight: 400 !important;
}
.pay-option input { margin-top: 4px; accent-color: var(--accent); }
.pay-option:hover { border-color: var(--accent); }
.pay-option:has(input:checked), .pay-option.on { border-color: var(--accent); background: var(--accent-soft); }

/* ---------- Uyarılar ---------- */
.alert { padding: 13px 16px; border-radius: 10px; margin-bottom: 18px; font-size: .93rem; border: 1px solid; }
.alert-ok { background: #e3f6ee; border-color: #bce8d4; color: #0d7a50; }
.alert-err { background: #fde4e5; border-color: #f7c4c6; color: #b93338; }
.alert-warn { background: #fdf0dd; border-color: #f3ddb5; color: #9c5f08; }
.alert-info { background: var(--accent-soft); border-color: #d9d6f8; color: #4a43b8; }

/* ---------- Kartlar ---------- */
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.panel h2, .panel h3 { margin-top: 0; }
.key-code {
  font-family: "SF Mono", Menlo, Consolas, monospace; background: var(--accent-soft);
  border: 1px dashed var(--accent); border-radius: 8px; padding: 8px 14px;
  display: inline-block; font-size: .95rem; letter-spacing: .04em; user-select: all; color: #38329e;
}

/* ---------- Sepet ---------- */
.cart-summary { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.cart-summary .row { display: flex; justify-content: space-between; margin-bottom: 8px; }
.cart-summary .total { font-size: 1.25rem; font-weight: 800; border-top: 1px solid var(--border); padding-top: 12px; }
.checkout-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 26px; align-items: start; }
@media (max-width: 820px) { .checkout-grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: #1e2433; color: #aab2c8; padding: 32px 0; font-size: .9rem; margin-top: 40px; }
.site-footer strong { color: #fff; }
.site-footer a { color: #b9b3f5; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

/* ---------- Admin ---------- */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 230px; background: #1e2433; padding: 22px 14px; flex-shrink: 0;
}
.admin-sidebar .logo { display: block; margin-bottom: 26px; font-size: 1.15rem;
  background: linear-gradient(120deg, #93a2ff, #c49bff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.admin-sidebar nav a {
  display: block; padding: 10px 14px; border-radius: 8px; color: #aab2c8; margin-bottom: 3px; font-size: .94rem;
}
.admin-sidebar nav a:hover, .admin-sidebar nav a.active { background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; }
.admin-content { flex: 1; padding: 28px 32px; min-width: 0; }
.admin-content h1 { margin-top: 0; font-size: 1.4rem; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 26px; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.stat .num { font-size: 1.6rem; font-weight: 800; }
.stat .lbl { color: var(--muted); font-size: .85rem; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.thumb-sm { width: 46px; height: 36px; object-fit: cover; border-radius: 6px; background: var(--bg-soft); }
@media (max-width: 700px) {
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: auto; }
}

.muted { color: var(--muted); }
.mt-0 { margin-top: 0; }
.mb-24 { margin-bottom: 24px; }
