﻿/* === NAVIGATION === */

.nav {
  display: flex;
  gap: 20px;
}

/* Hamburger gizli (desktop) */
.menu-toggle {
  display: none;
}

/* MOBİL */
@media (max-width: 768px) {

  .menu-toggle {
    display: block;
  }

  .nav {
    display: none;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
  }

  .nav.open {
    display: flex;
  }

}

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

body {
  font-family: system-ui, sans-serif;
  color: #222;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: auto;
  padding: 20px;
}

/* HEADER */
.header {
  border-bottom: 1px solid #eee;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 600;
  text-decoration: none;
  color: #000;
}

.menu-toggle {
  font-size: 24px;
  background: none;
  border: 0;
  cursor: pointer;
}

.nav a {
  margin-left: 20px;
  text-decoration: none;
  color: #000;
}

/* BREADCRUMB */
.breadcrumb {
  font-size: 14px;
  margin: 20px 0;
  color: #666;
}

.breadcrumb a {
  color: #666;
  text-decoration: none;
}

.breadcrumb span {
  color: #000;
  font-weight: 500;
}

/* PRODUCT DETAIL */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin: 40px 0;
}

/* === SWIPE GALERİ (JS YOK) === */
.product-gallery {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.product-gallery figure {
  flex: 0 0 100%;
  scroll-snap-align: start;
  margin: 0;
}

.product-gallery img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  background: #f6f6f6;
}

/* PRODUCT INFO */
.product-info h1 {
  font-size: 28px;
  margin-bottom: 15px;
}

.product-info p {
  margin-bottom: 20px;
  line-height: 1.6;
}

.specs {
  width: 100%;
  margin-bottom: 20px;
  border-collapse: collapse;
}

.specs th,
.specs td {
  padding: 8px;
  border-bottom: 1px solid #eee;
  text-align: left;
}

.btn {
  display: inline-block;
  padding: 12px 20px;
  background: #000;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
}

/* RELATED PRODUCTS (GRID) */
.related {
  margin-top: 60px;
}

.related h2 {
  margin-bottom: 20px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.related-grid a {
  text-decoration: none;
  color: #000;
  text-align: center;
}

.related-grid img {
  width: 100%;
  border-radius: 6px;
}

.related-grid span {
  display: block;
  margin-top: 10px;
  font-size: 14px;
}

/* FOOTER */
.footer {
  margin-top: 60px;
  padding: 20px 0;
  border-top: 1px solid #eee;
  text-align: center;
  font-size: 14px;
}

/* MOBİL */
@media (max-width: 900px) {

  .product-detail {
    grid-template-columns: 1fr;
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav a {
    display: block;
    margin: 10px 0;
  }

}

/* === SWIPE GALERİ === */
.swipe-gallery {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.swipe-gallery img {
  flex: 0 0 100%;
  max-width: 100%;
  height: 320px;
  object-fit: contain;
  scroll-snap-align: center;
  border-radius: 8px;
}

.swipe-gallery::-webkit-scrollbar {
  display: none;
}

.swipe-gallery {
  scrollbar-width: none;
}

@media (max-width: 768px) {
  .swipe-gallery img {
    height: 240px;
  }
}

/* === HAMBURGER MENU FINAL === */

/* Desktop */
.nav {
  display: flex;
  gap: 20px;
}

.menu-toggle {
  display: none;
  font-size: 26px;
  background: none;
  border: 0;
  cursor: pointer;
}

/* Mobile */
@media (max-width: 768px) {

  .menu-toggle {
    display: block;
  }

  .nav {
    display: none;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
  }

  .nav.open {
    display: flex;
  }

}

/* === MOBILE HAMBURGER OVERLAY FIX === */

@media (max-width: 768px) {

  .header {
    position: relative;
    z-index: 1000;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border-top: 1px solid #eee;
    padding: 15px 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,.08);
  }

  .nav a {
    margin: 0;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
  }

  .nav a:last-child {
    border-bottom: 0;
  }

}

/* === MOBILE SEARCH FIX === */
.mobile-search {
  width: 100%;
}

.mobile-search input {
  width: 100%;
  display: block;
  box-sizing: border-box;
  padding: 14px 16px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 8px;
}
