/*
Theme Name: Çetin Hurda Fiyatları PRO
Theme URI: https://example.com
Author: Ümit
Description: Yönetilebilir hurda fiyatları teması. Kategori (görsel) + ürün (fiyat) yapısı.
Version: 1.0
License: GPLv2 or later
Text Domain: cetin-hurda-pro
*/

/* ===== GENEL STILLER ===== */
body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: #f4f8fb;
  color: #222;
  line-height: 1.5;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ===== HEADER ===== */
.site-header {
  background: #0d47a1;
  color: #fff;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.site-header .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  text-align: center;
}

.site-title {
  margin: 0;
  font-size: 2rem;
}

.site-title a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  transition: opacity 0.2s ease;
}

.site-title a:hover {
  opacity: 0.9;
}

.site-description {
  color: #bbdefb;
  margin: 0.5rem 0 0 0;
  font-size: 1rem;
}

/* ===== ANA MENÜ ===== */
.main-nav {
  background: #1565c0;
  border-top: 1px solid rgba(255,255,255,0.2);
  border-bottom: 1px solid rgba(255,255,255,0.2);
  position: relative;
  width: 100%;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* Menü butonu */
.menu-toggle {
  display: none;
  background: #0d47a1;
  color: white;
  border: 2px solid rgba(255,255,255,0.3);
  padding: 12px 24px;
  border-radius: 40px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  width: auto;
  min-width: 140px;
  margin: 10px auto;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
  z-index: 1000;
}

.menu-toggle:hover {
  background: #1565c0;
  border-color: white;
  transform: scale(1.02);
}

.menu-toggle:focus {
  outline: 3px solid rgba(255,255,255,0.5);
}

/* Menü - masaüstü görünüm */
.main-nav .menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  width: 100%;
}

.main-nav .menu li {
  margin: 0;
  padding: 0;
  position: relative;
}

.main-nav .menu li a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 10px 16px;
  display: block;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.main-nav .menu li a:hover {
  background: rgba(255,255,255,0.15);
  color: #ffeb3b;
}

/* ===== ANA İÇERİK ===== */
.site-content {
  min-height: 60vh;
  padding: 1rem 0;
}

/* Kategori kartları */
.row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.category-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 5px 20px rgba(0,0,0,0.12);
}

.category-card .thumb {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  border-bottom: 4px solid #1976d2;
}

.category-card .content {
  padding: 1.2rem 1.2rem 1.5rem 1.2rem;
  flex: 1;
}

.category-card h2 {
  margin: 0 0 1rem 0;
  font-size: 1.3rem;
  color: #0d47a1;
  border-bottom: 2px solid #e3f2fd;
  padding-bottom: 0.5rem;
}

/* Fiyat tablosu */
.table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  background: white;
  border-radius: 8px;
  overflow: hidden;
}

.table th,
.table td {
  padding: 0.8rem 1rem;
  border: 1px solid #e3f2fd;
  text-align: left;
}

.table th {
  background: #1976d2;
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
}

.table tr:nth-child(even) {
  background: #f8f9fa;
}

.table tr:hover {
  background: #e3f2fd;
}

.price {
  color: #1565c0;
  font-weight: 700;
  font-size: 1.1rem;
}

.meta {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.6rem;
  font-style: italic;
}

/* ===== FOOTER ===== */
.site-footer {
  background: #0d47a1;
  color: white;
  text-align: center;
  padding: 1.5rem 0;
  margin-top: 3rem;
  font-size: 0.95rem;
  border-top: 4px solid #1565c0;
}

.site-footer p {
  margin: 0;
  opacity: 0.9;
}

/* ===== WHATSAPP BUTONU ===== */
.whatsapp-float {
  position: fixed;
  bottom: 100px;  /* Yukarı çık butonunun üzerinde duracak şekilde ayarlandı */
  right: 30px;
  background-color: #25d366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  text-align: center;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 9999;
  text-decoration: none;
  animation: whatsapp-pulse 2s infinite;
  border: 2px solid white;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
  background-color: #20b859;
}

.whatsapp-float img {
  width: 35px;
  height: 35px;
  filter: brightness(0) invert(1); /* Beyaz ikon */
}

/* Tooltip (açıklama yazısı) */
.whatsapp-tooltip {
  position: absolute;
  right: 75px;
  background-color: #25d366;
  color: white;
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  pointer-events: none;
}

.whatsapp-tooltip::after {
  content: '';
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 8px 0 8px 8px;
  border-style: solid;
  border-color: transparent transparent transparent #25d366;
}

.whatsapp-float:hover .whatsapp-tooltip {
  opacity: 1;
  visibility: visible;
  right: 85px;
}

/* Animasyon */
@keyframes whatsapp-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* ===== YUKARI ÇIK BUTONU ===== */
.scroll-up-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: #1565c0;
  color: white;
  border-radius: 50%;
  text-align: center;
  line-height: 50px;
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(21, 101, 192, 0.3);
  transition: all 0.3s ease;
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  border: 2px solid white;
}

.scroll-up-btn.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-up-btn:hover {
  background: #0d47a1;
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(21, 101, 192, 0.4);
  color: white;
}

/* ===== RESPONSIVE - MOBİL ===== */
@media screen and (max-width: 768px) {
  /* Mobil menü */
  .nav-container {
    padding: 0.5rem;
  }
  
  .menu-toggle {
    display: block;
    width: 90%;
    min-width: auto;
    margin: 10px auto;
  }
  
  .main-nav .menu {
    display: none;
    width: 100%;
    background: #0d47a1;
    border-radius: 12px;
    padding: 8px 0;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.15);
  }
  
  .main-nav .menu.active {
    display: flex;
    flex-direction: column;
    animation: slideDown 0.3s ease;
  }
  
  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .main-nav .menu li {
    width: 100%;
    text-align: center;
  }
  
  .main-nav .menu li a {
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    border-radius: 0;
    font-size: 1.1rem;
  }
  
  .main-nav .menu li:last-child a {
    border-bottom: none;
  }
  
  .main-nav .menu li a:hover {
    background: rgba(255, 255, 255, 0.2);
  }
  
  /* Kategori kartları */
  .row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .category-card .thumb {
    height: 160px;
  }
  
  .category-card h2 {
    font-size: 1.2rem;
  }
  
  /* Tablo */
  .table th,
  .table td {
    padding: 0.6rem;
    font-size: 0.9rem;
  }
  
  /* WhatsApp butonu mobil */
  .whatsapp-float {
    bottom: 80px;
    right: 20px;
    width: 55px;
    height: 55px;
  }
  
  .whatsapp-float img {
    width: 30px;
    height: 30px;
  }
  
  .whatsapp-tooltip {
    display: none;
  }
  
  /* Yukarı çık butonu mobil */
  .scroll-up-btn {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    line-height: 45px;
    font-size: 22px;
  }
}

/* Çok küçük ekranlar */
@media screen and (max-width: 480px) {
  .site-header .container {
    padding: 1rem;
  }
  
  .site-title {
    font-size: 1.6rem;
  }
  
  .site-description {
    font-size: 0.9rem;
  }
  
  .menu-toggle {
    font-size: 14px;
    padding: 10px 20px;
  }
  
  .category-card .thumb {
    height: 140px;
  }
  
  .category-card .content {
    padding: 1rem;
  }
  
  .table {
    font-size: 0.85rem;
  }
  
  .table th,
  .table td {
    padding: 0.5rem;
  }
  
  /* WhatsApp butonu çok küçük ekran */
  .whatsapp-float {
    bottom: 70px;
    right: 15px;
    width: 50px;
    height: 50px;
  }
  
  .whatsapp-float img {
    width: 28px;
    height: 28px;
  }
  
  /* Yukarı çık butonu çok küçük ekran */
  .scroll-up-btn {
    bottom: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    line-height: 40px;
    font-size: 20px;
  }
}

/* Tablet görünümü */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  .container {
    padding: 0 1.5rem;
  }
  
  .row {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
  }
  
  .category-card .thumb {
    height: 180px;
  }
}

/* ===== YARDIMCI SINIFLAR ===== */
.text-center {
  text-align: center;
}

.mt-2 {
  margin-top: 1rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}

/* ===== BASIN ===== */
@media print {
  .main-nav,
  .menu-toggle,
  .site-footer,
  .whatsapp-float,
  .scroll-up-btn {
    display: none;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .category-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
}