/* ==========================================================================
   DIJITAL MARKET — Tasarim Sistemi v3 (Koyu Lacivert / Beyaz, Mobil-Oncelikli)
   ========================================================================== */

:root {
  --navy: #0b1e46;
  --navy-deep: #081633;
  --navy-soft: #14285c;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-100: #dbeafe;
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --border: #e2e8f0;
  --border-soft: #eef1f6;
  --bg: #f6f8fc;
  --white: #ffffff;
  --success: #16a34a;
  --success-bg: #f0fdf4;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --radius-lg: 16px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 18px 44px rgba(11, 30, 70, 0.22);
  --container: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body.has-bottom-nav { padding-bottom: 64px; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-weight: 800; letter-spacing: -0.01em; color: var(--ink); }
h1 { font-size: 26px; margin: 0 0 16px; }
h2 { font-size: 19px; margin: 30px 0 14px; }
h3 { font-size: 16px; margin: 20px 0 10px; }

/* ---------------- Header ---------------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border-soft);
  position: sticky; top: 0; z-index: 200;
  box-shadow: 0 1px 0 rgba(15,23,42,.02);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 20px;
}
.logo {
  font-size: 19px; font-weight: 900; color: var(--primary); letter-spacing: -0.02em;
  white-space: nowrap; display: flex; align-items: center;
}
.logo-img { height: 34px; width: auto; }

.header-icons { display: flex; align-items: center; gap: 4px; }
.icon-btn {
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  border-radius: 999px; color: var(--ink-soft); position: relative; transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--primary-light); color: var(--primary); }
.cart-badge {
  position: absolute; top: 2px; right: 2px;
  background: var(--primary); color: #fff;
  font-size: 10px; font-weight: 800;
  border-radius: 999px; min-width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center; padding: 0 3px;
}

/* Hamburger */
.nav-toggle {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; background: var(--navy); border: none; cursor: pointer;
  border-radius: var(--radius-sm); flex-shrink: 0;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: #fff; border-radius: 2px; margin: 0 auto; }

/* Off-canvas menu */
.offcanvas-overlay {
  display: none; position: fixed; inset: 0; background: rgba(8,22,51,.55); z-index: 300; backdrop-filter: blur(2px);
}
.offcanvas-overlay.open { display: block; }
.offcanvas-menu {
  position: fixed; top: 0; left: 0; bottom: 0; width: 300px; max-width: 84vw;
  background: var(--navy); color: #fff; z-index: 301;
  transform: translateX(-100%); transition: transform .25s ease;
  display: flex; flex-direction: column; overflow-y: auto;
}
.offcanvas-menu.open { transform: translateX(0); }
.offcanvas-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; font-weight: 800; font-size: 15px; border-bottom: 1px solid rgba(255,255,255,.1); }
.offcanvas-head button { background: none; border: none; color: #fff; font-size: 18px; cursor: pointer; }
.offcanvas-account { display: flex; align-items: center; gap: 10px; padding: 16px 20px; background: rgba(255,255,255,.06); font-size: 13.5px; font-weight: 600; }
.offcanvas-account small { color: #93c5fd; font-weight: 500; }
.offcanvas-login-btn { display: block; margin: 16px 20px; padding: 11px; text-align: center; background: var(--primary); border-radius: 999px; font-weight: 700; font-size: 14px; }
.offcanvas-nav { display: flex; flex-direction: column; padding: 10px 10px 24px; }
.offcanvas-nav a { padding: 12px 14px; border-radius: var(--radius-sm); color: #cbd5e1; font-size: 14.5px; font-weight: 500; }
.offcanvas-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.offcanvas-divider { height: 1px; background: rgba(255,255,255,.1); margin: 8px 10px; }

.avatar-dot {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--primary); color: #fff; font-weight: 800;
  display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0;
}

/* WhatsApp float button */
.whatsapp-float {
  position: fixed; right: 18px; bottom: 84px; z-index: 250;
  width: 54px; height: 54px; border-radius: 50%;
  background: #25D366; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(37,211,102,.45);
  transition: transform .15s;
}
.whatsapp-float:hover { transform: scale(1.06); }
body:not(.has-bottom-nav) .whatsapp-float { bottom: 24px; }

.page-content { padding: 26px 20px 50px; min-height: 60vh; }

/* ---------------- Hero (banner yoksa fallback) ---------------- */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--navy) 100%);
  color: #fff; padding: 52px 32px; border-radius: var(--radius-lg);
  text-align: center; margin-bottom: 30px; box-shadow: var(--shadow-lg);
}
.hero h1 { color: #fff; margin: 0 0 10px; font-size: 28px; }
.hero p { margin: 0; color: #dbeafe; font-size: 14.5px; }

/* ---------------- Hero slider (banner_slides) ---------------- */
.hero-slider { position: relative; border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 30px; box-shadow: var(--shadow-lg); height: 240px; }
.hero-slide {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; transition: opacity .5s ease; display: flex; align-items: center;
}
.hero-slide.active { opacity: 1; }
.hero-slide-overlay {
  background: linear-gradient(90deg, rgba(8,22,51,.88) 0%, rgba(8,22,51,.55) 55%, rgba(8,22,51,.15) 100%);
  width: 100%; height: 100%; padding: 30px 36px; display: flex; flex-direction: column; justify-content: center; gap: 8px;
}
.hero-badge { display: inline-block; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.3); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .06em; padding: 4px 12px; border-radius: 999px; width: fit-content; }
.hero-slide-overlay h1 { color: #fff; margin: 0; font-size: 24px; max-width: 480px; }
.hero-slide-overlay p { color: #cbd5e1; margin: 0 0 6px; font-size: 13.5px; max-width: 420px; }
.hero-slide-overlay .btn { width: fit-content; }
.hero-dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.hero-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.4); border: none; cursor: pointer; padding: 0; }
.hero-dot.active { background: #fff; width: 20px; border-radius: 4px; }

/* ---------------- Category grid ---------------- */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); gap: 12px; margin-bottom: 34px; }
.category-card {
  background: var(--white); border: 1px solid var(--border-soft);
  padding: 18px 12px; border-radius: var(--radius); text-align: center;
  font-weight: 700; font-size: 13.5px; color: var(--ink-soft);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: transform .15s, box-shadow .15s, border-color .15s, color .15s;
}
.category-card img { width: 40px; height: 40px; object-fit: contain; }
.category-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--primary-100); color: var(--primary); }
.category-grid-big .category-card-big { padding: 26px 14px; }
.category-icon-placeholder { font-size: 28px; }
.category-card-big small { color: var(--muted); font-weight: 500; font-size: 12px; }

.section-head { display: flex; align-items: center; justify-content: space-between; margin: 30px 0 14px; }
.section-head h2 { margin: 0; }
.section-link { font-size: 13.5px; font-weight: 700; color: var(--primary); }

/* ---------------- Product grid / cards ---------------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 16px; }
.product-card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border-soft);
  transition: transform .15s, box-shadow .15s;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.product-card img { width: 100%; height: 140px; object-fit: cover; background: var(--bg); }
.product-card h3 { font-size: 14px; margin: 12px 14px 4px; font-weight: 700; }
.product-card .price { margin: 0 14px 14px; font-weight: 800; color: var(--primary); font-size: 15px; }

/* ---------------- Product detail ---------------- */
.product-detail { display: flex; gap: 32px; flex-wrap: wrap; background: var(--white); padding: 26px; border-radius: var(--radius-lg); border: 1px solid var(--border-soft); }
.product-gallery { width: 300px; }
.main-image { width: 100%; height: 270px; object-fit: cover; border-radius: var(--radius); background: var(--bg); }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.thumb { width: 56px; height: 56px; object-fit: cover; border-radius: var(--radius-sm); cursor: pointer; border: 2px solid transparent; transition: border-color .15s; }
.thumb:hover { border-color: var(--primary); }
.product-detail-info { flex: 1; min-width: 280px; }
.price-big { font-size: 27px; font-weight: 900; color: var(--primary); margin: 8px 0; }
.stock-info { color: var(--success); font-weight: 700; font-size: 13.5px; background: var(--success-bg); display: inline-block; padding: 6px 12px; border-radius: 999px; }
.description { color: var(--ink-soft); margin: 16px 0; }

.variant-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 18px; }
.variant-option {
  display: flex; align-items: center; gap: 10px;
  background: var(--white); padding: 12px 14px; border-radius: var(--radius);
  border: 1.5px solid var(--border); font-weight: 600; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.variant-option:has(input:checked) { border-color: var(--primary); background: var(--primary-light); }
.variant-option input { width: auto; accent-color: var(--primary); }
.variant-option small { color: var(--muted); font-weight: 400; margin-left: 6px; }

/* ---------------- Search ---------------- */
.search-form-page { display: flex; gap: 10px; margin-bottom: 20px; }
.search-form-page input { flex: 1; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 22px; border-radius: var(--radius-sm); border: none; cursor: pointer;
  font-size: 14.5px; font-weight: 700; font-family: inherit;
  transition: background .15s, box-shadow .15s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); box-shadow: var(--shadow-md); }
.btn-secondary { background: var(--white); color: var(--ink-soft); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg); }
.btn-disabled { background: var(--border); color: var(--muted); cursor: not-allowed; }

/* ---------------- Tables ---------------- */
.table-scroll { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border-soft); }
.cart-table, .admin-table {
  width: 100%; border-collapse: collapse; background: var(--white);
  min-width: 560px;
}
.cart-table th, .cart-table td, .admin-table th, .admin-table td {
  padding: 13px 14px; border-bottom: 1px solid var(--border-soft); text-align: left; font-size: 13.5px;
}
.cart-table thead th, .admin-table thead th {
  background: var(--bg); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); font-weight: 700;
}
.cart-table tbody tr:hover, .admin-table tbody tr:hover { background: #fafbff; }
.grand-total { font-size: 21px; font-weight: 800; margin: 18px 0; color: var(--ink); }

/* ---------------- Forms ---------------- */
.auth-box { max-width: 420px; margin: 0 auto; background: var(--white); padding: 30px; border-radius: var(--radius-lg); border: 1px solid var(--border-soft); box-shadow: var(--shadow-sm); }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 20px; background: var(--bg); padding: 4px; border-radius: 999px; }
.auth-tabs a { flex: 1; text-align: center; padding: 9px 16px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--muted); }
.auth-tabs a.active { background: var(--white); color: var(--primary); box-shadow: var(--shadow-sm); }

form label { display: block; margin: 14px 0 6px; font-size: 13.5px; font-weight: 700; color: var(--ink-soft); }
form input, form select, form textarea {
  width: 100%; padding: 11px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit; background: var(--white); color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
form input:focus, form select:focus, form textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light);
}
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 16px 0; }
.inline-form input, .inline-form select { width: auto; }

.error { color: var(--danger); background: var(--danger-bg); padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; border: 1px solid #fecaca; }
.success { color: var(--success); background: var(--success-bg); padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; border: 1px solid #bbf7d0; }

/* ---------------- Panel (musteri) ---------------- */
.panel-summary { display: flex; gap: 16px; flex-wrap: wrap; margin: 22px 0; }
.summary-card { background: var(--white); padding: 22px; border-radius: var(--radius); flex: 1; min-width: 180px; text-align: center; border: 1px solid var(--border-soft); }
.summary-card h3 { font-size: 12.5px; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; letter-spacing: .04em; }
.summary-card p { font-size: 24px; font-weight: 800; color: var(--primary); margin: 0 0 12px; }
.panel-nav { display: flex; gap: 6px; margin: 18px 0 24px; flex-wrap: wrap; background: var(--white); padding: 6px; border-radius: 999px; border: 1px solid var(--border-soft); width: fit-content; }
.panel-nav a { padding: 9px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 700; color: var(--ink-soft); }
.panel-nav a.active { background: var(--primary); color: #fff; }
.panel-nav a:not(.active):hover { background: var(--bg); }

.code-box { background: var(--bg); padding: 12px; border-radius: var(--radius-sm); white-space: pre-wrap; word-break: break-all; font-size: 13px; border: 1px dashed var(--border); }

.result-box { text-align: center; background: var(--white); padding: 48px 30px; border-radius: var(--radius-lg); border: 1px solid var(--border-soft); }
.result-box.success h1 { color: var(--success); }
.result-box.fail h1 { color: var(--danger); }

/* ---------------- Reviews ---------------- */
.rating-line { color: #d97706; font-weight: 700; font-size: 14px; }
.reviews-section { margin-top: 44px; background: var(--white); padding: 24px; border-radius: var(--radius-lg); border: 1px solid var(--border-soft); }
.review-item { border-bottom: 1px solid var(--border-soft); padding: 14px 0; }
.review-item .stars { color: #d97706; }
.review-item small { color: var(--muted); }

/* ---------------- Blog ---------------- */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px,1fr)); gap: 16px; }
.blog-card { background: var(--white); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border-soft); transition: transform .15s, box-shadow .15s; }
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.blog-card img { width: 100%; height: 140px; object-fit: cover; background: var(--bg); }
.blog-card h3, .blog-card p, .blog-card small { margin: 8px 14px; display: block; }
.blog-card small { color: var(--muted); }
.blog-card p { color: var(--ink-soft); font-size: 13.5px; }
.blog-post-image { width: 100%; max-height: 380px; object-fit: cover; border-radius: var(--radius); margin: 16px 0; }
.blog-post-content { line-height: 1.8; color: var(--ink-soft); }
.blog-post { background: var(--white); padding: 26px; border-radius: var(--radius-lg); border: 1px solid var(--border-soft); }

/* ---------------- Support tickets ---------------- */
.ticket-thread { margin: 18px 0; }
.ticket-msg { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 10px; background: var(--bg); }
.ticket-msg.admin { background: var(--primary-light); }
.ticket-msg small { color: var(--muted); }

.tag { display: inline-block; background: var(--primary); color: #fff; font-size: 10.5px; padding: 2px 8px; border-radius: 999px; margin-left: 6px; font-weight: 700; }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--navy); color: #cbd5e1; margin-top: 50px; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 28px; padding: 40px 20px 26px; }
.footer-col { min-width: 170px; }
.footer-brand { font-weight: 900; font-size: 17px; color: #fff; margin: 0 0 8px; }
.footer-heading { font-weight: 700; color: #fff; font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 12px; }
.footer-muted { color: #94a3b8; font-size: 13.5px; margin: 4px 0; }
.footer-col a { display: block; color: #cbd5e1; font-size: 13.5px; margin: 6px 0; transition: color .15s; }
.footer-col a:hover { color: #fff; }
.footer-social { display: flex; gap: 10px; margin-top: 10px; }
.footer-social a { background: rgba(255,255,255,.08); padding: 6px 12px; border-radius: 999px; font-size: 12px; }
.copyright { text-align: center; font-size: 12.5px; color: #64748b; padding: 16px 20px; border-top: 1px solid #16264d; }

/* ---------------- Bottom mobile nav ---------------- */
.bottom-nav {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 220;
  background: var(--white); border-top: 1px solid var(--border-soft);
  box-shadow: 0 -4px 16px rgba(15,23,42,.06);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  justify-content: space-around;
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--muted); font-size: 10.5px; font-weight: 700; padding: 6px 10px; border-radius: var(--radius-sm);
  position: relative; flex: 1;
}
.bottom-nav a.active { color: var(--primary); }
.bottom-nav-badge {
  position: absolute; top: -2px; right: 18%;
  background: var(--primary); color: #fff; font-size: 9px; font-weight: 800;
  border-radius: 999px; min-width: 14px; height: 14px; display: flex; align-items: center; justify-content: center; padding: 0 3px;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 860px) {
  .bottom-nav { display: flex; }
  .whatsapp-float { bottom: 84px; }
}

@media (max-width: 700px) {
  .hero { padding: 40px 20px; }
  .hero h1 { font-size: 22px; }
  .hero-slider { height: 200px; }
  .hero-slide-overlay { padding: 22px 24px; }
  .hero-slide-overlay h1 { font-size: 19px; }
  .product-detail { flex-direction: column; padding: 20px; }
  .product-gallery { width: 100%; }
  .main-image { height: 220px; }
  h1 { font-size: 21px; }
  .footer-inner { padding: 30px 20px 18px; }
  .whatsapp-float { width: 48px; height: 48px; right: 14px; }
}

@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .page-content { padding: 18px 14px 36px; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); gap: 10px; }
  .category-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .category-card { padding: 12px 6px; font-size: 11.5px; }
  .category-card img { width: 28px; height: 28px; }
  .product-card h3 { font-size: 13px; }
  .header-inner { padding: 10px 14px; }
  .logo { font-size: 16px; }
}
