@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

:root {
  --primary: #d42228; /* Referans renk - Kırmızı tonları */
  --secondary: #333333;
  --bg-light: #ffffff;
  --bg-gray: #f8f8f8;
  --text-main: #212121;
  --text-muted: #757575;
  --border: #e0e0e0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
  --transition: all 0.2s ease-in-out;
}

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

body {
  font-family: 'Roboto', sans-serif;
  background-color: var(--bg-light);
  color: var(--text-main);
  line-height: 1.5;
}

.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Header & Navbar */
.header-top {
  border-bottom: 1px solid var(--border);
  background: var(--bg-gray);
  padding: 8px 0;
  font-size: 13px;
  color: var(--text-muted);
}

.navbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 20px;
}

.nav-icons {
  display: flex;
  align-items: center;
  gap: 15px;
}

.social-icon {
  color: var(--secondary);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
}

.social-icon:hover {
  color: var(--primary);
  opacity: 1;
  transform: translateY(-2px);
}

.nav-icons a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.logo {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--secondary);
  text-decoration: none;
  letter-spacing: -1px;
  white-space: nowrap;
}

.logo span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  justify-content: center;
  list-style: none;
  gap: 5px;
  flex: 1;
}

.nav-links a {
  text-decoration: none;
  color: #333;
  padding: 8px 15px;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-links a:hover {
  color: var(--primary);
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
}

.mobile-menu-btn span {
  width: 25px;
  height: 2px;
  background: #333;
  transition: var(--transition);
}

.mobile-menu-btn.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.nav-links .dropdown-arrow {
  border: solid var(--text-muted);
  border-width: 0 2px 2px 0;
  display: inline-block;
  padding: 2px;
  transform: rotate(45deg);
  transition: var(--transition);
}

.has-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  min-width: 200px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 10px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  z-index: 1001;
}

.has-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.has-dropdown:hover .dropdown-arrow {
  transform: rotate(-135deg);
  border-color: var(--primary);
}

.dropdown-menu a {
  padding: 10px 20px !important;
  text-transform: none !important;
  font-size: 13px !important;
  color: var(--text-main) !important;
  width: 100%;
  display: block;
}

.dropdown-menu a:hover {
  background: var(--bg-gray);
  color: var(--primary) !important;
}


/* Banner Grid */
.banner-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin: 20px 0;
}


.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 40px 0;
}


.banner-item {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  min-height: 250px; /* Görsel yüklenmese bile metinler için alan kalsın */
  background: #eee;
}

.banner-item img {
  width: 100%;
  height: 100%;
  min-height: 250px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.banner-item:hover img {
  transform: scale(1.02);
}

.banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  padding: 20px;
  background: linear-gradient(to left, rgba(255,255,255,0.7) 0%, transparent 100%);
  pointer-events: none;
}

.banner-overlay h2 {
  font-size: 1.4rem;
  line-height: 1.2;
}

/* Buttons */
.btn {
  padding: 10px 25px;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
}

.btn-primary:hover {
  background: #b01a1e;
}

/* Hero Slider Styles */
.hero-slider {
  position: relative;
  height: 80vh;
  min-height: 500px;
  overflow: hidden;
  background: #000;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  display: flex;
  align-items: center;
}

.hero-slide.active {
  opacity: 1;
}

.hero-content {
  color: white;
  z-index: 10;
}

.hero-text-box {
  max-width: 600px;
  transform: translateY(30px);
  opacity: 0;
  transition: all 0.8s ease 0.5s;
}

.hero-slide.active .hero-text-box {
  transform: translateY(0);
  opacity: 1;
}

.hero-sub {
  display: block;
  font-size: 1.2rem;
  font-weight: 300;
  letter-spacing: 5px;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.hero-title {
  font-size: 4.5rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 40px;
  letter-spacing: -2px;
}

.hero-btn {
  padding: 18px 40px;
  font-size: 16px;
  letter-spacing: 2px;
}

.hero-nav {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 15px;
  z-index: 20;
}

.hero-dot {
  width: 50px;
  height: 3px;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: all 0.3s;
}

.hero-dot.active {
  background: white;
  width: 80px;
}


/* Updated Banner Grid (Modern Glassmorphism) */
.banner-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(2, 350px);
  gap: 20px;
  margin: 60px 0;
}

/* Dinamik grid spanlar inline style ile yönetiliyor */
/* .banner-item:nth-child(1) { grid-column: span 8; }
.banner-item:nth-child(2) { grid-column: span 4; }
.banner-item:nth-child(3) { grid-column: span 4; }
.banner-item:nth-child(4) { grid-column: span 8; } */


.banner-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  background: #eee;
}

.banner-overlay {
  background: linear-gradient(to right, rgba(0,0,0,0.6) 0%, transparent 100%);
  align-items: flex-start;
  padding: 40px;
}

.banner-overlay h2 {
  color: white;
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 20px;
  text-align: left;
}


/* Service Bar */
.service-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 40px 0;
  background: #fbfbfb;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  margin: 50px 0;
}

.service-item {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: center;
}

.service-icon {
  font-size: 28px;
}

.service-item h4 {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 5px;
}

.service-item p {
  font-size: 12px;
  color: #888;
}


/* Category Circles */
.category-circles {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin: 60px 0;
  flex-wrap: wrap;
}

.cat-circle-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  cursor: pointer;
}

.cat-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid transparent;
  transition: all 0.3s;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.cat-circle-item:hover .cat-circle {
  border-color: var(--primary);
  transform: scale(1.1);
}

.cat-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cat-circle-item span {
  font-size: 13px;
  font-weight: 700;
  color: #333;
}


/* Modern Product Card Enhancements */
.product-card {
  background: white;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.product-card:hover {
  box-shadow: 0 10px 20px rgba(0,0,0,0.05);
  transform: translateY(-5px);
}

.product-card .image-wrapper {
  height: 350px;
  overflow: hidden;
  position: relative;
  background: #f5f5f5;
}

.product-card .image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .image-wrapper img {
  transform: scale(1.05);
}

.product-info {
  padding: 20px;
  text-align: center;
}

.product-cat {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 5px;
}

.product-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-main);
  height: 40px;
  overflow: hidden;
}

.price-box {
  margin-bottom: 15px;
}

.price-old {
  color: #999;
  text-decoration: line-through;
  font-size: 12px;
  margin-right: 10px;
}

.price-new {
  color: var(--primary);
  font-weight: 700;
  font-size: 18px;
}

.price-normal {
  color: var(--text-main);
  font-weight: 700;
  font-size: 18px;
}

.badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 2px;
  z-index: 2;
}

.badge.sale {
  background: #d32f2f;
  color: white;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-main);
  width: 100%;
  padding: 8px;
  font-size: 12px;
}

.product-card:hover .btn-outline {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Product Detail Page Layout */
.product-detail-page {
  padding: 40px 0;
  background: #fff;
}

.product-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 50px;
  align-items: start;
}

.product-details-content {
  position: sticky;
  top: 100px;
}


/* Modal and Slider (Existing & Updated) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  padding: 20px;
  backdrop-filter: blur(10px);
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: white;
  width: 100%;
  max-width: 1000px;
  max-height: 90vh;
  position: relative;
  overflow-y: auto;
  border-radius: 8px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.5);
  animation: slideUp 0.3s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 35px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 2010;
  color: #333;
  line-height: 1;
}

.product-modal-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
}

.slider-container {
  background: #fdfdfd;
  position: relative;
  border-right: 1px solid #eee;
}

.main-slider {
  height: 600px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-slider img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.slide-prev, .slide-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: white;
  border: 1px solid #eee;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: var(--transition);
  z-index: 10;
}

.slide-prev:hover, .slide-next:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.slide-prev { left: 20px; }
.slide-next { right: 20px; }

.slide-dots {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.dot {
  width: 10px;
  height: 10px;
  background: #ddd;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s;
}

.dot.active {
  background: var(--primary);
  width: 25px;
  border-radius: 5px;
}

.product-modal-details {
  padding: 50px;
}

.loader {
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 100px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


/* Admin Styles (Yenilenmiş) */
.admin-section {
  background: white;
  padding: 3rem;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  margin-bottom: 3rem;
  border: 1px solid var(--border);
}

.input-group {
  margin-bottom: 1.5rem;
}

.input-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-group input, 
.input-group select, 
.input-group textarea {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 15px;
  transition: var(--transition);
  background: #fcfcfc;
}

.input-group input:focus {
  border-color: var(--primary);
  outline: none;
  background: white;
  box-shadow: 0 0 0 4px rgba(212, 34, 40, 0.08);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.admin-table th {
  background: #f8f9fa;
  padding: 1.2rem 1rem;
  text-align: left;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  color: #666;
  border-bottom: 2px solid var(--border);
}

.admin-table td {
  padding: 1.2rem 1rem;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}

.admin-table tr:hover {
  background: #fafafa;
}

.category-tag {
  background: #f0f0f0;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #555;
  text-transform: uppercase;
}

.section-padding { padding: 60px 0; }

/* Cart Page Styles */
.cart-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 50px; }
.cart-item { display: flex; gap: 20px; padding: 25px 0; border-bottom: 1px solid #eee; align-items: center; }
.cart-item-info { flex: 1; }
.cart-item-qty { width: 120px; text-align: center; }
.cart-item-price { font-weight: 700; width: 120px; text-align: right; font-size: 1.1rem; }

/* ==========================================================================
   GENEL RESPONSIVE AYARLAR (TÜM SİTE)
   ========================================================================== */

/* 1200px altı */
@media (max-width: 1200px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}

/* 992px altı (Tablet) */
@media (max-width: 992px) {
  .header-top { display: none !important; }
  .navbar { padding: 12px 0 !important; }
  .logo { font-size: 1.5rem !important; }
  .mobile-menu-btn { display: flex !important; }
  
  .nav-links {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: #fff;
    flex-direction: column;
    padding: 60px 20px;
    box-shadow: 15px 0 40px rgba(0,0,0,0.15);
    transition: left 0.3s ease;
    z-index: 9999;
    overflow-y: auto;
    display: flex !important;
  }
  .nav-links.active { left: 0; }
  .nav-links li { width: 100%; border-bottom: 1px solid #f5f5f5; }
  .nav-links a { padding: 15px 0 !important; font-size: 15px; width: 100%; justify-content: space-between; font-weight: 600; }
  
  .dropdown-menu {
    position: static !important;
    display: none !important;
    visibility: visible !important;
    opacity: 1 !important;
    box-shadow: none !important;
    padding-left: 20px !important;
    background: #fbfbfb !important;
    width: 100% !important;
    transform: none !important;
  }
  .has-dropdown.active .dropdown-menu { display: flex !important; }
  .has-dropdown.active .dropdown-arrow { transform: rotate(-135deg); }

  .cart-grid { grid-template-columns: 1fr; gap: 30px; }
  .banner-grid { grid-template-columns: 1fr !important; grid-template-rows: auto !important; }
  .banner-item { grid-column: span 1 !important; height: 280px !important; }
  .product-layout { grid-template-columns: 1fr !important; }
}

/* 768px altı (Telefon) */
@media (max-width: 768px) {
  .section-padding { padding: 40px 0; }
  .product-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
  .hero-title { font-size: 2.2rem !important; }
  .service-bar { grid-template-columns: repeat(2, 1fr) !important; gap: 20px; }
  .cat-circle { width: 85px; height: 85px; }
  
  .cart-item { flex-direction: column; align-items: flex-start !important; padding: 20px 0; }
  .cart-item-qty { width: 100%; text-align: left; margin: 10px 0; }
  .cart-item-price { width: 100%; text-align: right; font-size: 1.1rem; color: var(--primary); }
  
  .admin-table { display: block; overflow-x: auto; }
}

/* 480px altı (Küçük Telefonlar) */
@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr !important; }
  .logo { font-size: 1.3rem !important; }
  .hero-title { font-size: 1.8rem !important; }
}
