:root{
  --theme:#1d4ed8;
  --btn:#2563eb;
  --btnText:#fff;
  --bg:#fff;
  --text:#0f172a;
  --muted:#64748b;
  --border:#e2e8f0;
  --shadow:0 10px 24px rgba(15,23,42,.08);
  --shadow2:0 18px 40px rgba(2,6,23,.14);
  --radius2:22px;
  --focus:0 0 0 4px rgba(37,99,235,.18)
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
  line-height:1.45
}
a{color:inherit;text-decoration:none}
.container{width:min(1160px,calc(100% - 32px));margin:0 auto}
.page{padding:18px 0 60px}
.muted{color:var(--muted)}

.badge{
  display:inline-flex;gap:8px;align-items:center;
  padding:7px 10px;border-radius:999px;
  border:1px solid var(--border);
  background:#fff;color:var(--muted);
  font-weight:800;font-size:12px
}

.panel{
  border:1px solid var(--border);
  background:#fff;border-radius:var(--radius2);
  box-shadow:var(--shadow);padding:14px
}

.notice{
  border:1px solid rgba(37,99,235,.25);
  background:rgba(37,99,235,.06);
  padding:12px 14px;border-radius:16px;font-weight:800
}

/* ===== TOPBAR ===== */
.topbar{
  position:sticky;top:0;
  background:rgba(255,255,255,.9);
  backdrop-filter:saturate(160%) blur(10px);
  border-bottom:1px solid var(--border);
  z-index:50
}
.topbar-inner{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0}
.brand{display:flex;align-items:center;gap:10px;font-weight:950}
.brand-badge{
  width:34px;height:34px;border-radius:12px;
  background:rgba(37,99,235,.12);
  border:1px solid rgba(37,99,235,.25);
  display:flex;align-items:center;justify-content:center;
  font-weight:1000;color:var(--theme)
}
.nav{display:flex;align-items:center;gap:8px}
.nav a{padding:10px 14px;border-radius:999px;font-weight:850;color:var(--muted)}
.nav a:hover{background:rgba(2,6,23,.04);color:var(--text)}
.nav-toggle{display:none;border:1px solid var(--border);background:#fff;border-radius:14px;padding:8px 12px;font-weight:950}

/* ===== HERO ===== */
.hero{display:grid;grid-template-columns:1.2fr .8fr;gap:16px;align-items:stretch}
.hero h1{margin:0;font-size:30px;letter-spacing:-.8px}
.hero .lead{margin:10px 0 0;font-size:15px;color:var(--muted);font-weight:700}
.hero-card{border:1px solid var(--border);background:#fff;border-radius:var(--radius2);box-shadow:var(--shadow);padding:14px}
.hero-steps{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}
.hero-steps .step{
  display:flex;align-items:center;gap:8px;
  padding:10px 12px;border-radius:16px;
  border:1px solid var(--border);background:#fff;
  box-shadow:0 10px 18px rgba(2,6,23,.06);
  font-weight:900;color:var(--text)
}
.hero-steps .n{
  width:26px;height:26px;border-radius:10px;
  display:inline-flex;align-items:center;justify-content:center;
  background:rgba(37,99,235,.12);border:1px solid rgba(37,99,235,.22);
  color:var(--theme)
}

/* ===== LAYOUT ===== */
.layout-home{display:grid;grid-template-columns:280px 1fr;gap:16px;align-items:start}
.sidebar{
  position:sticky;top:86px;
  border:1px solid var(--border);
  border-radius:var(--radius2);
  background:#fff;box-shadow:var(--shadow);
  padding:10px
}
.side-head{font-weight:1000;padding:10px 10px 6px}
.side-group{padding:8px 10px;border-top:1px solid rgba(226,232,240,.6)}
.side-cat{font-weight:1000;color:var(--text)}
.side-cat-link{display:block;padding:8px 10px;border-radius:14px}
.side-cat-link:hover{background:rgba(2,6,23,.04)}
.side-sub{margin-top:6px;display:flex;flex-direction:column;gap:6px}
.side-sub a{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:8px 10px;border-radius:14px;
  color:var(--muted);font-weight:850
}
.side-sub a:hover{background:rgba(2,6,23,.04);color:var(--text)}
.side-sub .count{font-size:12px;padding:3px 8px;border-radius:999px;border:1px solid var(--border);background:#fff;color:var(--muted);font-weight:950}

.section-title{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin:10px 2px}
.section-title h2{margin:0;font-size:18px;font-weight:1000}
.section-title a{color:var(--theme);font-weight:900}
.title-link{color:inherit}
.title-link:hover{color:var(--theme)}

/* ===== GRID + CARD (BUTON EN ALTTA SABİT) ===== */
.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;align-items:stretch}
.card{
  border:1px solid var(--border);
  background:#fff;border-radius:var(--radius2);
  overflow:hidden;box-shadow:0 12px 24px rgba(15,23,42,.06);
  transition:.18s ease;position:relative;
  height:100%;
  display:flex;flex-direction:column
}
.card:hover{transform:translateY(-2px);box-shadow:0 18px 34px rgba(15,23,42,.10)}
.card-img{height:160px;background:#f8fafc;display:flex;align-items:center;justify-content:center;flex:0 0 auto}
.card-img img{width:100%;height:100%;object-fit:cover;display:block}
.card-body{padding:12px 12px 14px;display:flex;flex-direction:column;flex:1 1 auto}
.card-title{font-weight:900;letter-spacing:-.2px;margin:0 0 6px;font-size:14px}
.meta{display:flex;flex-wrap:wrap;gap:8px;color:var(--muted);font-size:12px}
.price{font-size:16px;font-weight:900;margin-top:8px}
.card-actions{margin-top:auto;display:flex;gap:10px;padding-top:10px}
.card-actions .btn{width:100%;justify-content:center}

/* ===== BUTTON ===== */
.btn{
  appearance:none;border:none;cursor:pointer;
  background:var(--btn);color:var(--btnText);
  font-weight:950;padding:12px 14px;border-radius:16px;
  box-shadow:0 12px 26px rgba(37,99,235,.22);
  display:inline-flex;align-items:center;justify-content:center;gap:10px;
  position:relative;overflow:hidden
}
.btn:hover{filter:brightness(.98)}
.btn:focus{outline:none;box-shadow:var(--focus)}
.btn.ghost{background:#fff;color:var(--text);border:1px solid var(--border);box-shadow:none}
.btn.small{padding:10px 12px;border-radius:14px;font-size:13px}
.btn.danger{background:rgba(239,68,68,.12);color:#ef4444;border:1px solid rgba(239,68,68,.22);box-shadow:none}
.btn.xs{padding:7px 10px;font-size:12px;border-radius:12px}

/* ===== TAGS ===== */
.tag{position:absolute;top:12px;left:12px;background:rgba(239,68,68,.92);color:#fff;font-weight:950;font-size:12px;padding:6px 10px;border-radius:999px}
.tag.fav{background:rgba(2,6,23,.85)}

/* ===== PRODUCT DETAIL ===== */
.detail-top{display:grid;grid-template-columns:1.1fr .9fr;gap:16px;align-items:start}

/* ===== GALLERY PRO ===== */
.gallery{
  border:1px solid var(--border);
  border-radius:var(--radius2);
  overflow:hidden;background:#fff;
  box-shadow:var(--shadow);
  position:relative
}
.gallery-main{
  height:360px;background:#f8fafc;
  display:flex;align-items:center;justify-content:center;
  position:relative
}
.gallery-main img{
  width:100%;height:100%;
  object-fit:contain;       /* KIRPMA/YAKIN GÖSTERME BİTTİ */
  cursor:zoom-in;
  background:#f8fafc
}
.gallery-thumbs{
  display:flex;gap:10px;
  padding:10px;overflow:auto;
  border-top:1px solid var(--border)
}
.thumb{
  width:84px;height:64px;
  border-radius:14px;
  overflow:hidden;border:1px solid var(--border);
  flex:0 0 auto;cursor:pointer;
  background:#f8fafc
}
.thumb img{width:100%;height:100%;object-fit:cover;display:block}
.thumb.is-active{
  outline:3px solid rgba(37,99,235,.55);
  border-color:rgba(37,99,235,.55)
}

/* Galeri okları */
.gnav{
  position:absolute;top:50%;
  transform:translateY(-50%);
  width:40px;height:40px;border-radius:999px;
  border:1px solid rgba(226,232,240,.9);
  background:rgba(255,255,255,.85);
  box-shadow:0 12px 22px rgba(2,6,23,.10);
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;user-select:none;
  z-index:5
}
.gnav:hover{background:#fff}
.gnav.prev{left:12px}
.gnav.next{right:12px}
.gnav svg{width:18px;height:18px;opacity:.85}

/* ===== RIGHT DETAIL CARD ===== */
.detail-card{border:1px solid var(--border);border-radius:var(--radius2);background:#fff;box-shadow:var(--shadow);padding:14px}
.detail-card h1{margin:6px 0 0;font-size:22px;letter-spacing:-.6px}
.hr{height:1px;background:rgba(226,232,240,.9);margin:12px 0}
.table{width:100%;border-collapse:separate;border-spacing:0;border:1px solid var(--border);border-radius:16px;overflow:hidden}
.table th,.table td{padding:10px 12px;border-bottom:1px solid var(--border);font-size:13px}
.table tr:last-child td{border-bottom:none}
.table thead th{background:#f8fafc;font-weight:950;text-align:left}

/* ===== FORM ===== */
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
input,select,textarea{width:100%;padding:12px 12px;border-radius:16px;border:1px solid var(--border);background:#fff;font-weight:750}
textarea{resize:vertical}
label{font-weight:900;font-size:13px;color:var(--muted);display:block;margin:10px 0 6px}

/* ===== MODAL ===== */
.modal{
  position:fixed;inset:0;
  display:flex;align-items:center;justify-content:center;
  background:rgba(2,6,23,.55);
  backdrop-filter:blur(4px);
  opacity:0;pointer-events:none;
  transition:.18s ease;z-index:99
}
.modal[aria-hidden="false"]{opacity:1;pointer-events:auto}
.modal-inner{
  width:min(980px,calc(100% - 28px));
  max-height:calc(100% - 28px);
  background:#fff;border-radius:24px;
  overflow:auto;box-shadow:var(--shadow2)
}
.modal-head{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:14px 16px;border-bottom:1px solid var(--border)
}
.modal-head strong{font-weight:1000}
.modal-body{padding:16px}

/* Başvuru modal: GENİŞ + ÜST BAR YOK, alttaki kapat kalsın */
#applyModal .modal-head{display:none !important;}
#applyModal .modal-inner{
  width:min(980px,calc(100% - 28px)) !important;
  max-height:calc(100% - 28px) !important;
}

/* Mobilde de “küçük kutu” değil, ekranı doldursun */
@media (max-width: 640px){
  #applyModal .modal-inner{
    width:calc(100% - 16px) !important;
    max-height:calc(100% - 16px) !important;
  }
  #applyModal .form-grid{grid-template-columns:1fr !important;}
}

/* Başarı kutusu + spinner */
.apply-success{
  margin-bottom:12px;
  padding:12px 14px;
  border-radius:16px;
  border:1px solid rgba(34,197,94,.25);
  background:rgba(34,197,94,.10);
  box-shadow:0 10px 22px rgba(2,6,23,.08);
  font-weight:750
}
.spinner{
  width:16px;height:16px;border-radius:50%;
  border:2px solid rgba(255,255,255,.55);
  border-top-color:#fff;
  display:inline-block;
  vertical-align:-3px;
  margin-right:8px;
  animation:spin .9s linear infinite
}
@keyframes spin{to{transform:rotate(360deg)}}

/* ===== FOOTER ===== */
.footer{
  border-top:1px solid var(--border);
  margin-top:24px;padding-top:16px;
  color:var(--muted);font-weight:800;
  display:flex;align-items:center;justify-content:space-between;gap:12px
}
.footer a{color:var(--muted)}
.footer a:hover{color:var(--text)}

/* ===== RESPONSIVE ===== */
@media (max-width:980px){
  .grid{grid-template-columns:repeat(2,1fr)}
  .detail-top{grid-template-columns:1fr}
  .hero{grid-template-columns:1fr}
  .layout-home{grid-template-columns:1fr}
  .sidebar{position:static}
}
@media (max-width:560px){
  .grid{grid-template-columns:1fr}
  .nav{display:none}
  .nav-toggle{display:block}
  .gallery-main{height:300px}
  .gnav{width:38px;height:38px}
}
