﻿/* ═══════════════════════════════════════════════════════════════════════════
   main.css — Temel değişkenler, reset, tipografi
   Tasarım kaynağı: minikhane.com.tr (Woodmart v8.3.9)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Google Fonts — Inter; S11'de self-hosted woff2 ile değiştirilecek */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ── CSS Değişkenleri ────────────────────────────────────────────────────── */

:root {
  /* Ekran görüntüsü analizi: "SEPETE EKLE" butonu koyu teal/yeşil
     Kesin değer için: DevTools > "SEPETE EKLE" butonu > Computed > background-color */
  --wd-primary-color:      #1E5242;
  --wd-primary-dark:       #163d31;
  --wd-primary-light:      #2a6e59;

  /* Arka planlar */
  --wd-header-bg:          #111111;
  --wd-footer-bg:          #1a1a1a;
  --wd-footer-bottom-bg:   #0d0d0d;
  --wd-body-bg:            #ffffff;
  --wd-page-bg:            #ffffff;

  /* Mobil bottom nav yüksekliği — içerik padding için */
  --wd-mobile-nav-height:  60px;

  /* Gri palet (Woodmart'tan) */
  --wd-gray-100:           #f7f7f7;
  --wd-gray-200:           #f1f1f1;
  --wd-gray-300:           #bbbbbb;
  --wd-gray-400:           #a5a5a5;
  --wd-gray-500:           #767676;
  --wd-gray-600:           #666666;
  --wd-gray-700:           #555555;
  --wd-gray-800:           #333333;
  --wd-gray-900:           #242424;

  /* Metin */
  --wd-text-color:         #333333;
  --wd-text-light:         #767676;
  --wd-heading-color:      #1a1a1a;
  --wd-link-color:         #333333;
  --wd-link-hover:         var(--wd-primary-color);

  /* Kenar çizgileri */
  --wd-border-color:       rgba(0, 0, 0, 0.1);
  --wd-border-color-light: rgba(0, 0, 0, 0.075);
  --wd-border-color-dark:  rgba(0, 0, 0, 0.2);

  /* Tipografi */
  --wd-font-family:        'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --wd-font-size:          15px;
  --wd-font-size-sm:       13px;
  --wd-font-size-xs:       12px;
  --wd-font-weight:        400;
  --wd-line-height:        1.6;

  /* Boyutlar */
  --wd-border-radius:      0px;
  --wd-border-radius-sm:   2px;
  --wd-border-radius-lg:   4px;
  --wd-input-height:       42px;
  --wd-btn-height:         42px;
  --wd-transition:         all 0.25s ease;

  /* Gölgeler */
  --wd-shadow-sm:          0 1px 3px rgba(0,0,0,0.1);
  --wd-shadow:             0 2px 8px rgba(0,0,0,0.12);
  --wd-shadow-lg:          0 4px 20px rgba(0,0,0,0.15);

  /* Tooltip */
  --wd-tooltip-bg:         rgba(0,0,0,0.9);
  --wd-tooltip-color:      #ffffff;

  /* Rating */
  --wd-rating-color:       #EABE12;
  --wd-rating-empty:       #dddddd;

  /* Durum renkleri */
  --wd-success:            #5a9e6f;
  --wd-success-bg:         #f0f8f3;
  --wd-danger:             #d9534f;
  --wd-danger-bg:          #fdf3f3;
  --wd-warning:            #f0ad4e;
  --wd-warning-bg:         #fdf9f0;
  --wd-info:               #5bc0de;
  --wd-info-bg:            #f0f8fd;

  /* Container */
  --wd-container-width:    1230px;
  --wd-container-padding:  15px;

  /* Header (3 katman: topbar + mainbar + navbar) */
  --wd-header-height:      154px; /* toplam sabit yükseklik */
  --wd-header-color:       #ffffff;
}

/* ── Reset / Normalize ───────────────────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--wd-font-size);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--wd-font-family);
  font-size: var(--wd-font-size);
  font-weight: var(--wd-font-weight);
  line-height: var(--wd-line-height);
  color: var(--wd-text-color);
  background-color: var(--wd-body-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--wd-link-color);
  text-decoration: none;
  transition: color 0.25s ease;
}

a:hover {
  color: var(--wd-link-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* ── Tipografi ───────────────────────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
  color: var(--wd-heading-color);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.75em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.9rem; }

p {
  margin-bottom: 1em;
}

p:last-child {
  margin-bottom: 0;
}

strong { font-weight: 600; }
em { font-style: italic; }

small {
  font-size: var(--wd-font-size-xs);
}

/* ── Form Elemanları ─────────────────────────────────────────────────────── */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="search"],
textarea,
select {
  width: 100%;
  height: var(--wd-input-height);
  padding: 0 15px;
  font-size: var(--wd-font-size);
  color: var(--wd-text-color);
  background: #fff;
  border: 1px solid var(--wd-border-color-dark);
  border-radius: var(--wd-border-radius);
  outline: none;
  transition: border-color 0.25s ease;
  appearance: none;
  -webkit-appearance: none;
}

textarea {
  height: auto;
  min-height: 120px;
  padding: 12px 15px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--wd-primary-color);
}

input[type="checkbox"],
input[type="radio"] {
  width: auto;
  height: auto;
  accent-color: var(--wd-primary-color);
}

label {
  display: block;
  font-size: var(--wd-font-size-sm);
  font-weight: 500;
  margin-bottom: 5px;
  color: var(--wd-gray-800);
}

.form-group {
  margin-bottom: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-note {
  font-size: var(--wd-font-size-xs);
  color: var(--wd-text-light);
  margin-top: 4px;
}

.form-error {
  font-size: var(--wd-font-size-xs);
  color: var(--wd-danger);
  margin-top: 4px;
}

/* ── Butonlar ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--wd-btn-height);
  padding: 0 24px;
  font-size: var(--wd-font-size-sm);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: var(--wd-border-radius);
  transition: var(--wd-transition);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--wd-primary-color);
  color: #fff;
  border-color: var(--wd-primary-color);
}

.btn-primary:hover {
  background: var(--wd-primary-dark);
  border-color: var(--wd-primary-dark);
  color: #fff;
}

.btn-secondary {
  background: var(--wd-gray-800);
  color: #fff;
  border-color: var(--wd-gray-800);
}

.btn-secondary:hover {
  background: var(--wd-gray-900);
  border-color: var(--wd-gray-900);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--wd-text-color);
  border-color: var(--wd-border-color-dark);
}

.btn-outline:hover {
  background: var(--wd-primary-color);
  color: #fff;
  border-color: var(--wd-primary-color);
}

.btn-ghost {
  background: transparent;
  color: var(--wd-text-color);
  border-color: transparent;
}

.btn-ghost:hover {
  color: var(--wd-primary-color);
}

.btn-sm {
  height: 34px;
  padding: 0 16px;
  font-size: var(--wd-font-size-xs);
}

.btn-lg {
  height: 50px;
  padding: 0 32px;
  font-size: var(--wd-font-size);
}

.btn-block {
  width: 100%;
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── Badges / Etiketler ──────────────────────────────────────────────────── */

.badge {
  display: inline-block;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: var(--wd-border-radius);
  text-transform: uppercase;
}

.badge-primary   { background: var(--wd-primary-color); color: #fff; }
.badge-success   { background: var(--wd-success); color: #fff; }
.badge-danger    { background: var(--wd-danger); color: #fff; }
.badge-warning   { background: var(--wd-warning); color: #333; }
.badge-gray      { background: var(--wd-gray-200); color: var(--wd-gray-700); }
.badge-sale      { background: #d9534f; color: #fff; }
.badge-new       { background: var(--wd-primary-color); color: #fff; }
.badge-hot       { background: #e67e22; color: #fff; }

/* ── Uyarı Kutuları ──────────────────────────────────────────────────────── */

.alert {
  padding: 14px 18px;
  border-radius: var(--wd-border-radius-sm);
  font-size: var(--wd-font-size-sm);
  margin-bottom: 20px;
  border: 1px solid transparent;
}

.alert-success {
  background: var(--wd-success-bg);
  color: #2d6a47;
  border-color: #c3e6cb;
}

.alert-danger {
  background: var(--wd-danger-bg);
  color: #a02b2b;
  border-color: #f5c6cb;
}

.alert-warning {
  background: var(--wd-warning-bg);
  color: #7a5419;
  border-color: #ffeeba;
}

.alert-info {
  background: var(--wd-info-bg);
  color: #1e6a8a;
  border-color: #bee5eb;
}

/* ── Yıldız Puanlama ─────────────────────────────────────────────────────── */

.star-rating {
  display: inline-flex;
  gap: 2px;
  color: var(--wd-rating-empty);
  font-size: 14px;
}

.star-rating .star.filled {
  color: var(--wd-rating-color);
}

.star-rating .star.half {
  position: relative;
  color: var(--wd-rating-empty);
}

.star-rating .star.half::before {
  content: '★';
  position: absolute;
  color: var(--wd-rating-color);
  width: 50%;
  overflow: hidden;
}

/* ── Yardımcı Sınıflar ───────────────────────────────────────────────────── */

.text-center  { text-align: center; }
.text-left    { text-align: left; }
.text-right   { text-align: right; }
.text-muted   { color: var(--wd-text-light); }
.text-primary { color: var(--wd-primary-color); }
.text-sm      { font-size: var(--wd-font-size-sm); }
.text-xs      { font-size: var(--wd-font-size-xs); }
.fw-medium    { font-weight: 500; }
.fw-semibold  { font-weight: 600; }
.fw-bold      { font-weight: 700; }

.d-none  { display: none; }
.d-block { display: block; }
.d-flex  { display: flex; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.w-100 { width: 100%; }
.img-fluid { max-width: 100%; height: auto; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ── Bölüm Başlıkları ────────────────────────────────────────────────────── */

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--wd-heading-color);
  margin-bottom: 30px;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--wd-primary-color);
  margin-top: 10px;
}

.section-title.center {
  text-align: center;
}

.section-title.center::after {
  margin: 10px auto 0;
}

/* ── Tooltip ─────────────────────────────────────────────────────────────── */

[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--wd-tooltip-bg);
  color: var(--wd-tooltip-color);
  font-size: 11px;
  font-weight: 400;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 3px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1000;
}

[data-tooltip]:hover::after {
  opacity: 1;
}

/* ── Sayfalama ───────────────────────────────────────────────────────────── */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 40px 0 20px;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  font-size: var(--wd-font-size-sm);
  border: 1px solid var(--wd-border-color-dark);
  border-radius: var(--wd-border-radius);
  transition: var(--wd-transition);
  color: var(--wd-text-color);
}

.pagination a:hover,
.pagination span.current {
  background: var(--wd-primary-color);
  color: #fff;
  border-color: var(--wd-primary-color);
}

.pagination span.dots {
  border-color: transparent;
  pointer-events: none;
}

/* ── Breadcrumb ──────────────────────────────────────────────────────────── */

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: var(--wd-font-size-xs);
  color: var(--wd-text-light);
  padding: 12px 0;
}

.breadcrumb a {
  color: var(--wd-text-light);
}

.breadcrumb a:hover {
  color: var(--wd-primary-color);
}

.breadcrumb .sep::before {
  content: '/';
  margin: 0 2px;
}

/* ── WhatsApp Butonu ─────────────────────────────────────────────────────── */

.whatsapp-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 54px;
  height: 54px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  box-shadow: 0 4px 15px rgba(37,211,102,0.4);
  z-index: 999;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.whatsapp-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37,211,102,0.5);
  color: #fff;
}

/* ── Scroll to Top ───────────────────────────────────────────────────────── */

.scroll-top {
  position: fixed;
  bottom: 94px;
  right: 30px;
  width: 40px;
  height: 40px;
  background: var(--wd-gray-800);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 998;
}

.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-top:hover {
  background: var(--wd-primary-color);
  transform: translateY(-3px);
}

/* ── Loading Spinner ─────────────────────────────────────────────────────── */

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--wd-border-color);
  border-top-color: var(--wd-primary-color);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Responsive Kırılma Noktaları ────────────────────────────────────────── */

@media (max-width: 1200px) {
  :root { --wd-container-width: 100%; }
}

@media (max-width: 992px) {
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.4rem; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 768px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  .section-title { font-size: 1.3rem; }
  .whatsapp-btn { bottom: 20px; right: 20px; width: 48px; height: 48px; }
  .scroll-top { bottom: 78px; right: 20px; }
}

@media (max-width: 480px) {
  :root {
    --wd-container-padding: 12px;
    --wd-font-size: 14px;
  }
}
