/* ======================
   RESET & GLOBAL
====================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

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

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

a {
  color: inherit;
  text-decoration: none;
}

/* ======================
   LAYOUT
====================== */
.container {
  max-width: 1200px;
  margin: auto;
  padding: 20px;
}

/* ======================
   HEADER & NAV
====================== */
.header {
  border-bottom: 1px solid #eee;
  position: relative;
}

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

.site-logo img {
  max-width: 180px;
}

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

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

.nav a {
  white-space: nowrap;
}

/* ======================
   DROPDOWN
====================== */
.has-dropdown {
  position: relative;
}

.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid #eee;
  box-shadow: 0 10px 25px rgba(0,0,0,.08);
  flex-direction: column;
  z-index: 1000;
}

.dropdown a {
  padding: 10px 14px;
  border-bottom: 1px solid #eee;
}

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

/* Desktop hover */
@media (min-width: 769px) {
  .has-dropdown:hover .dropdown {
    display: flex;
  }
}

/* ======================
   MOBILE NAV
====================== */
@media (max-width: 768px) {

  .menu-toggle {
    display: block;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    flex-direction: column;
    align-items: flex-start; /* 🔑 SOLA YASLI */
    gap: 12px;
    padding: 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,.08);
    z-index: 1000;
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    width: 100%;
  }

  .dropdown {
    position: static;
    border: 0;
    box-shadow: none;
    padding-left: 12px;
    width: 100%;
  }

  .has-dropdown.open .dropdown {
    display: flex;
  }
}

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

.breadcrumb a {
  color: #666;
}

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

@media (max-width: 768px) {
  .product-detail {
    grid-template-columns: 1fr;
  }
}

/* ======================
   PRODUCT GALLERY
====================== */
.product-gallery {
  max-width: 520px;
}

.main-image img {
  width: 100%;
  height: 420px;
  object-fit: contain;
  background: #f6f6f6;
  border-radius: 8px;
}

.thumbnails {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  justify-content: center;
  overflow-x: auto;
}

.thumbnails img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  background: #f6f6f6;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .main-image img {
    height: 260px;
  }

  .thumbnails img {
    width: 64px;
    height: 64px;
  }
}

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

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

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

.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;
  border-radius: 4px;
}

/* ======================
   RELATED PRODUCTS
====================== */
.related-products {
  margin-top: 40px;
}

.related-grid {
  display: grid;
  gap: 16px;
}

/* Desktop – otomatik */
@media (min-width: 769px) {
  .related-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

/* Mobile – 2'li */
@media (max-width: 768px) {
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.related-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
}

.related-card img {
  height: 160px;
  object-fit: contain;
  background: #f7f7f7;
  border-radius: 6px;
}

.related-card span {
  margin-top: auto;
  font-size: 13px;
  padding-top: 6px;
}

/* ======================
   FOOTER
====================== */
.site-footer {
  border-top: 1px solid #eee;
  margin-top: 60px;
  padding: 40px 20px 20px;
  font-size: 14px;
}

.footer-grid {
  max-width: 1200px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-bottom {
  text-align: center;
  margin-top: 30px;
  color: #666;
}

/* ================================
   ALT KATEGORİ VİTRİNİ (HUB)
================================ */

.category-hub {
  max-width: 1200px;
  margin: auto;
  padding: 12px;
}

.category-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

/* Tablet */
@media (min-width: 768px) {
  .category-hub-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .category-hub-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.hub-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  text-align: center;
  transition: box-shadow .2s ease;
}

.hub-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

.hub-card figure {
  margin: 0;
  aspect-ratio: 1 / 1;
  background: #f6f6f6;
}

.hub-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hub-card h2 {
  font-size: 15px;
  font-weight: 500;
  padding: 10px;
}

/* ================================
   ÜRÜN LİSTESİ GRID
================================ */

.product-section {
  max-width: 1200px;
  margin: auto;
  padding: 12px;
}

.product-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

/* Tablet */
@media (min-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.product-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow .2s ease;
}

.product-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

.product-card a {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card figure {
  margin: 0;
  aspect-ratio: 1 / 1;
  background: #f6f6f6;
}

.product-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-card h2 {
  font-size: 14px;
  font-weight: 500;
  padding: 8px;
  line-height: 1.4;
  flex-grow: 1;
}

.price {
  padding: 0 8px 10px;
  font-weight: 600;
  font-size: 14px;
  color: #000;
}
