/* Kuantum Aydınlatma / Bayi Portalı — Tasarım sistemi v3
   İlham: DR. FLEX rozet logosu — retro amblem enerjisi.
   Renkler logodan örneklendi: teal zemin, tuğla kırmızısı halka,
   hardal sarısı harfler, kalın siyah kontur.
   Prensip: kalın kontürler, yuvarlak köşeler, "pop" ofset gölgeler
   (yumuşak gri gölge yerine), tek karakterli hamle: rozet/sticker hissi. */

:root {
  --cream: #fbf3e3;
  --panel: #fffdf8;
  --teal: #1a5a79;
  --teal-dark: #123f56;
  --teal-dim: #e3eef2;
  --red: #cd3c22;
  --red-dark: #a52f1a;
  --red-dim: #fbe6e1;
  --mustard: #f2b11e;
  --mustard-dark: #c98d0f;
  --mustard-dim: #fdf0d2;
  --ink: #1c1510;
  --ink-dim: #6f6255;
  --line: #1c1510;
  --line-soft: #e4d9c4;
  --ok: #2f8f4e;
  --ok-dim: #e5f3e9;
  --radius: 14px;
  --radius-sm: 9px;
  --radius-pill: 999px;
  --pop: 4px 4px 0 var(--ink);
  --pop-sm: 3px 3px 0 var(--ink);
  --pop-lg: 8px 8px 0 var(--ink);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 18px;
  --space-6: 22px;
  --space-7: 26px;
  --space-8: 44px;
  --space-9: 80px;
  --font-display: "Bungee", "Fredoka", cursive;
  --font-body: "Fredoka", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Hafif nokta deseni — vintage baskı/patch kağıdı hissi */
body {
  background-image: radial-gradient(rgba(28,21,16,0.08) 1.4px, transparent 1.4px);
  background-size: 20px 20px;
}

.mono, code, td.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

a { color: var(--red); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; }

/* --- Üst bar --- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: 66px;
  background: var(--panel);
  border-bottom: 3px solid var(--line);
}

.topbar .brand {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  color: var(--teal);
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-badge { height: 38px; width: auto; display: block; }
.login-badge { height: 84px; width: auto; display: block; margin: 0 auto 14px; }

.topbar nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.topbar nav a {
  color: var(--ink-dim);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-body);
}
.topbar nav a.active, .topbar nav a:hover { color: var(--teal); text-decoration: none; }

.cart-pill {
  background: var(--red);
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 1px 9px;
  font-size: 0.72rem;
  font-weight: 700;
  margin-left: 5px;
  font-family: var(--font-mono);
}

/* --- Kapsayıcılar --- */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 44px 24px 80px;
}
.container.narrow { max-width: 620px; }

h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.7rem;
  letter-spacing: 0.01em;
  margin: 0 0 8px;
  color: var(--teal);
}
h2 {
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--teal);
  margin: 0 0 16px;
  padding: 0 0 10px 0;
  border-bottom: 3px dotted var(--line-soft);
}
.subtitle { color: var(--ink-dim); margin-bottom: 30px; font-size: 0.95rem; }

.card {
  background: var(--panel);
  border: 2.5px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 22px;
  box-shadow: var(--pop);
}

/* --- Ürün görsel çerçevesi: hafif eğik sticker hissi --- */
.scan-frame {
  position: relative;
  padding: 16px;
  border: 2.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--teal-dim);
  margin-bottom: 16px;
  transform: rotate(-0.6deg);
  box-shadow: var(--pop-sm);
  overflow: hidden;
  max-width: 100%;
}

/* --- Grid / ürün kartları --- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 18px;
}

.product-tile {
  background: var(--panel);
  border: 2.5px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: var(--pop-sm);
  transition: transform .1s, box-shadow .1s;
}
.product-tile:hover {
  text-decoration: none;
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}

.product-tile img {
  width: 100%;
  max-width: 140px;
  height: 120px;
  object-fit: cover;
  object-position: center;
  border-radius: 6px;
  margin: 0 auto 12px;
  display: block;
}

.product-tile .code {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--teal);
  font-size: 0.88rem;
}

.spec-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 10px;
  background: var(--mustard);
  color: var(--ink);
  border: 2px solid var(--line);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  margin-top: 28px;
}
.category-card {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  border: 3px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--pop);
  overflow: hidden;
  background-color: var(--cream);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: transform .12s, box-shadow .12s;
}
.category-card:hover {
  text-decoration: none;
  transform: translate(-3px, -3px);
  box-shadow: var(--pop-lg);
}
.category-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(28,21,16,0.88) 0%, rgba(28,21,16,0.35) 45%, rgba(28,21,16,0) 70%);
}
.category-card-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 24px 22px;
  font-family: var(--font-display);
  font-size: 1.6rem;
  line-height: 1.15;
  color: var(--cream);
  text-shadow: 0 2px 0 rgba(0,0,0,0.35);
}
@media (max-width: 640px) {
  .category-grid { grid-template-columns: 1fr; }
  .category-card-label { font-size: 1.3rem; }
}

.category-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 6px;
}
.category-header img { height: 52px; width: auto; }

/* --- Form --- */
form label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--teal-dark);
  margin: 18px 0 8px;
}

form input[type=text],
form input[type=number],
form input[type=password],
form input[type=tel],
form input[type=email],
form textarea {
  width: 100%;
  padding: 11px 14px;
  background: var(--panel);
  border: 2.5px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 0.95rem;
  font-family: var(--font-body);
}
form input[type=number] { font-family: var(--font-mono); }

form select {
  width: 100%;
  padding: 11px 38px 11px 14px;
  background: var(--panel);
  border: 2.5px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 0.95rem;
  font-family: var(--font-body);
  font-weight: 600;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10'%3E%3Cpath d='M1 1L7 8L13 1' stroke='%231c1510' stroke-width='2.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

form input:focus, form select:focus, form textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-dim);
}

/* Radyo düğmelerini gizle, label'ları renkli segment-buton olarak göster */
.radio-row { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.radio-row label {
  display: flex; align-items: center; gap: 0; margin: 0;
  color: var(--ink); font-size: 0.88rem;
  font-weight: 700; cursor: pointer;
  padding: 10px 20px;
  border: 2.5px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--panel);
  transition: background .1s, color .1s, transform .1s;
}
.radio-row label:has(input:checked) {
  background: var(--mustard);
  box-shadow: var(--pop-sm);
  transform: translate(-1px, -1px);
}
.radio-row input {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

.btn {
  display: inline-block;
  background: var(--teal);
  color: #fff;
  border: 2.5px solid var(--line);
  padding: 12px 26px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.9rem;
  font-family: var(--font-body);
  cursor: pointer;
  margin-top: 22px;
  box-shadow: var(--pop-sm);
  transition: transform .08s, box-shadow .08s;
}
.btn:hover { background: var(--teal-dark); text-decoration: none; color: #fff; }
.btn:active { transform: translate(3px, 3px); box-shadow: none; }
.btn.secondary { background: var(--panel); color: var(--ink); }
.btn.secondary:hover { background: var(--cream); color: var(--ink); }
.btn.danger { background: var(--red); color: #fff; }
.btn.danger:hover { background: var(--red-dark); color: #fff; }
.btn.small { padding: 7px 16px; font-size: 0.8rem; margin-top: 0; box-shadow: var(--pop-sm); }

/* --- Fiyat kutusu --- */
.price-box {
  background: var(--teal);
  color: #fff;
  border: 2.5px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-top: 20px;
  box-shadow: var(--pop);
}
.price-box .row {
  display: flex; justify-content: space-between; padding: 6px 0;
  font-size: 0.86rem; color: #cfe3ec;
  font-family: var(--font-mono);
}
.price-box .row.total {
  color: #fff; font-weight: 700; font-size: 1.3rem;
  border-top: 2px dashed rgba(255,255,255,0.35); margin-top: 10px; padding-top: 14px;
  font-family: var(--font-body);
}
.price-box .row.total span:last-child { color: var(--mustard); font-family: var(--font-mono); }

.error-box {
  background: var(--red-dim);
  border: 2.5px solid var(--red);
  color: var(--red-dark);
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  font-size: 0.9rem;
  font-weight: 600;
}
.error-box ul { margin: 4px 0 0; padding-left: 18px; }

/* --- Tablo --- */
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th, td {
  text-align: left; padding: 13px 14px;
  border-bottom: 2px solid var(--line-soft);
}
td { font-family: var(--font-mono); font-size: 0.85rem; }
td:first-child { font-family: var(--font-body); font-weight: 700; color: var(--teal-dark); }
th {
  color: var(--teal-dark); font-weight: 700; font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.05em;
  border-bottom: 3px solid var(--ink);
}
tbody tr:hover { background: var(--cream); }

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 700;
  font-family: var(--font-mono);
  text-transform: uppercase;
  border: 2px solid var(--line);
}
.badge.yeni { background: var(--mustard-dim); color: var(--mustard-dark); }
.badge.uretimde { background: var(--red-dim); color: var(--red-dark); }
.badge.tamamlandi { background: var(--ok-dim); color: var(--ok); }
.badge.iptal { background: var(--line-soft); color: var(--ink-dim); }

.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 18px; margin-bottom: 30px; }
.stat-card { background: var(--panel); border: 2.5px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--pop-sm); }
.stat-card .value { font-size: 1.9rem; font-weight: 700; font-family: var(--font-mono); color: var(--teal); }
.stat-card .label { color: var(--ink-dim); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 5px; font-weight: 600; }

/* --- Giriş ekranı --- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream);
  background-image: radial-gradient(rgba(28,21,16,0.08) 1.4px, transparent 1.4px);
  background-size: 20px 20px;
}

.login-card {
  width: 380px;
  background: var(--panel);
  border: 3px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 36px;
  box-shadow: 7px 7px 0 var(--ink);
}
.login-card h1 { text-align: center; margin-bottom: 4px; }
.login-card .subtitle { text-align: center; }

/* --- Üretim yazdırma formu --- */
.print-form {
  background: #fff;
  color: #111;
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  padding: 32px;
}
.print-form h1 { color: var(--teal); font-family: var(--font-display); font-weight: 400; }
.print-form table th, .print-form table td { border-color: var(--line-soft); }
.print-form th { color: var(--ink-dim); border-bottom-color: var(--ink); }

.actions-row { display: flex; gap: 10px; flex-wrap: wrap; }

.two-col { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 30px; align-items: start; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }

.product-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 100%;
}
.product-images img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  background: #fff;
  border-radius: var(--radius-sm);
  object-fit: contain;
}
@media (max-width: 480px) {
  .product-images { grid-template-columns: 1fr; }
}


.garden-photo-wrap { position: relative; display: inline-block; width: 100%; }
.garden-photo-wrap img { width: 100%; height: auto; display: block; border-radius: var(--radius-sm); background: #fff; }
.code-tablet {
  position: absolute;
  left: 12px;
  bottom: 12px;
  background: var(--mustard);
  color: var(--ink);
  border: 2.5px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 4px 14px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: var(--pop-sm);
}
.product-tile .code-tablet-sm {
  position: absolute;
  left: 8px;
  bottom: 8px;
  background: var(--mustard);
  color: var(--ink);
  border: 2px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 2px 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.7rem;
}
.product-tile .img-wrap { position: relative; width: 100%; }

.muted { color: var(--ink-dim); }
.mt0 { margin-top: 0; }

@media print {
  .no-print { display: none !important; }
  body { background: #fff; color: #111; }
}

/* --- Admin: ürün görsel galerisi --- */
.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-2);
}
.image-gallery-item {
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--pop-sm);
}
.image-gallery-item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}
.image-gallery-actions {
  display: flex;
  gap: 4px;
  padding: 6px;
  justify-content: center;
  flex-wrap: wrap;
}
.image-gallery-actions form { margin: 0; }
.image-gallery-item { cursor: grab; }
.image-gallery-item.dragging { opacity: 0.4; }
.image-gallery-add {
  height: 120px;
  border: 2px dashed var(--line);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: var(--ink-dim);
  cursor: pointer;
  background: var(--cream);
  transition: background 0.15s, border-color 0.15s;
}
.image-gallery-add:hover,
.image-gallery-add.drag-over {
  background: var(--panel);
  border-color: var(--mustard);
  color: var(--mustard);
}

/* --- KDV hariç notu: tutarla aynı kontrastta, sönük değil --- */
.vat-note {
  text-align: right;
  color: var(--ink);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  margin-top: -4px;
  margin-bottom: 6px;
}
.price-box .vat-note { color: var(--mustard); }
.stat-card .vat-note { text-align: left; margin-top: 4px; margin-bottom: 0; color: var(--teal); font-size: 0.75rem; }

/* --- Bayilik başvuru formu --- */
.apply-wrap {
  min-height: 100vh;
  padding: 32px 16px 56px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: var(--cream);
  background-image: radial-gradient(rgba(28,21,16,0.08) 1.4px, transparent 1.4px);
  background-size: 20px 20px;
}
.apply-card {
  width: 100%;
  max-width: 720px;
  background: var(--panel);
  border: 3px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: 7px 7px 0 var(--ink);
}
.apply-card h1 { margin-top: 0; }
.q-block { border: 0; padding: 0; margin: 0 0 30px; min-width: 0; }
.q-title { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; padding: 0; margin: 0 0 12px; }
.q-num {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--mustard); border: 2px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center; font-size: 0.85rem;
}
.q-hint { margin: -6px 0 12px 38px; color: var(--ink-dim); font-size: 0.85rem; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-block; margin: 0; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-flex; align-items: center; min-height: 46px; padding: 10px 18px;
  border: 2px solid var(--line); border-radius: var(--radius-pill);
  background: var(--panel); font-weight: 600; line-height: 1.2;
  box-shadow: var(--pop-sm); transition: transform 0.06s, box-shadow 0.06s, background 0.1s;
  user-select: none;
}
.chip:hover span { background: var(--cream); }
.chip input:checked + span { background: var(--teal); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--mustard); outline-offset: 2px; }
.chip:active span { transform: translate(3px, 3px); box-shadow: none; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 20px; font-weight: 500; font-size: 0.9rem; cursor: pointer; }
.consent input { flex: none; width: 22px; height: 22px; margin-top: 2px; }
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.apply-teaser {
  margin-top: 22px; padding-top: 18px; border-top: 2px dashed var(--line-soft);
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
}
@media (max-width: 560px) {
  .apply-card { padding: 26px 18px; }
  .chip span { min-height: 48px; }
}
.legal h2 { font-size: 1.05rem; margin: 22px 0 6px; }
.legal p { margin: 0 0 8px; line-height: 1.55; }
