/* Genel stiller */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #f5f5f7;
  color: #2d3436;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: white;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.75rem 0;
}

.logo h1 {
  margin: 0;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  color: #2d3436;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link.active,
.nav-link:hover {
  background: #e74c3c;
  color: #fff !important;
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-icons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #f5f5f7;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.icon-link:hover {
  background: #ffecec;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(231, 76, 60, 0.25);
}

/* Butonlar */
.btn-primary,
.btn-secondary,
.btn-small,
.btn-outline {
  border: none;
  cursor: pointer;
  font-family: inherit;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.45rem 1.1rem;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease,
    transform 0.1s ease;
}

.btn-primary {
  background: #e74c3c;
  color: #fff;
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.35);
}

.btn-primary:hover {
  background: #c0392b;
  box-shadow: 0 6px 16px rgba(192, 57, 43, 0.45);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #fff;
  color: #e74c3c;
  border: 1px solid rgba(231, 76, 60, 0.4);
}

.btn-secondary:hover {
  background: #ffecec;
}

.btn-small {
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
}

.btn-outline {
  background: transparent;
  border: 1px solid #dfe6e9;
  color: #2d3436;
}

.btn-outline:hover {
  background: #f5f5f7;
}

.btn-full {
  width: 100%;
  justify-content: center;
  text-align: center;
}

/* Hero */
.hero {
  padding: 3rem 0 2rem;
  background: linear-gradient(135deg, #ffecec, #ffffff);
}

.hero-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  color: #636e72;
  margin-bottom: 1.5rem;
}

.hero-slider {
  position: relative;
  max-width: 900px;
  margin: 1.75rem auto 0;
}

.hero-slides {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
  background: #fff;
}

.hero-slide {
  display: none;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 1.75rem;
  justify-content: center;
}

.hero-slide.active {
  display: flex;
}

.hero-slide-image {
  flex: 0 0 100%;
  border-radius: 16px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 260px;
}

.hero-slide-image--togg {
  background-image: url("https://images.pexels.com/photos/112460/pexels-photo-112460.jpeg?auto=compress&cs=tinysrgb&w=800");
}

.hero-slide-image--byd {
  background-image: url("https://images.pexels.com/photos/1402787/pexels-photo-1402787.jpeg?auto=compress&cs=tinysrgb&w=800");
}

.hero-slide-image--tesla {
  background-image: url("https://images.pexels.com/photos/799443/pexels-photo-799443.jpeg?auto=compress&cs=tinysrgb&w=800");
}

.hero-slide-image--mg {
  background-image: url("https://images.pexels.com/photos/97079/pexels-photo-97079.jpeg?auto=compress&cs=tinysrgb&w=800");
}

.hero-slide-image--bmw {
  background-image: url("https://images.pexels.com/photos/210019/pexels-photo-210019.jpeg?auto=compress&cs=tinysrgb&w=800");
}

.hero-slide-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #2d3436;
}

.hero-slide-nav--prev {
  left: -18px;
}

.hero-slide-nav--next {
  right: -18px;
}

.hero-slide-nav:hover {
  background: #e74c3c;
  color: #fff;
}

.hero-dots {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 0.9rem;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  padding: 0;
}

.hero-dot.active {
  background: #e74c3c;
}

/* Araç alanı ve sol menü */
.vehicles {
  padding: 2rem 0 3rem;
}

.vehicles-layout {
  align-items: flex-start;
}

.sidebar {
  max-height: 80vh;
  overflow-y: auto;
}

.sidebar-menu,
.sidebar-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-item {
  margin-bottom: 0.2rem;
}

.sidebar-link,
.submenu-link {
  display: block;
  padding: 0.35rem 0.25rem;
  font-size: 0.85rem;
  color: #2d3436;
  border-radius: 6px;
}

.sidebar-link:hover,
.submenu-link:hover {
  background: #ffecec;
}

.checkbox-option {
  position: relative;
  padding-left: 1.4rem;
}

.checkbox-option::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 3px;
  border: 1px solid #dfe6e9;
  background: #fff;
}

.checkbox-option.selected::before {
  background: #e74c3c;
  border-color: #e74c3c;
}

.checkbox-option.selected::after {
  content: "✓";
  position: absolute;
  left: 0.18rem;
  top: 50%;
  transform: translateY(-58%);
  font-size: 0.6rem;
  color: #fff;
}

.sidebar-item.has-submenu > .sidebar-link,
.sidebar-item.has-submenu > .submenu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.sidebar .arrow {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}

/* Alt menüler: başlangıçta kapalı */
.sidebar .submenu {
  display: none;
  padding-left: 0.75rem;
  border-left: 1px dashed rgba(0, 0, 0, 0.08);
  margin-top: 0.15rem;
}

.sidebar-item.open > .submenu {
  display: block;
}

.sidebar-item.open > .sidebar-link .arrow,
.sidebar-item.open > .submenu-link .arrow {
  transform: rotate(180deg);
}

.vehicles-content {
  flex: 1;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.filter-btn {
  border-radius: 999px;
  border: 1px solid #dfe6e9;
  padding: 0.35rem 0.9rem;
  background: #fff;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.filter-btn.active,
.filter-btn:hover {
  background: #e74c3c;
  border-color: #e74c3c;
  color: #fff;
}

.vehicles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.vehicle-card {
  background: #fff;
  border-radius: 14px;
  padding: 1rem 1.1rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.vehicle-card-image {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 0.6rem;
  background: #f5f5f7;
}

.vehicle-card-image img {
  width: 100%;
  display: block;
  object-fit: cover;
  max-height: 220px;
}

.vehicle-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.vehicle-card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.vehicle-card-price {
  font-weight: 700;
  color: #e74c3c;
  font-size: 0.95rem;
}

.vehicle-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: #636e72;
}

.vehicle-card-description {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  color: #2d3436;
}

.vehicle-card-footer {
  margin-top: 0.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

.vehicle-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: #f5f5f7;
  font-size: 0.75rem;
  color: #636e72;
}

/* Modallar */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.open {
  display: flex;
}

.modal-content {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.favorites-modal-content {
  max-width: 700px;
}

.notifications-modal-content {
  max-width: 650px;
}

.messages-modal-content {
  max-width: 750px;
}

.close-modal {
  position: absolute;
  top: 0.75rem;
  right: 0.9rem;
  font-size: 1.4rem;
  cursor: pointer;
  color: #636e72;
}

.close-modal:hover {
  color: #2d3436;
}

/* Tabs (bildirimler & mesajlar) */
.notifications-tabs,
.messages-tabs,
.login-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1rem;
  border-radius: 999px;
  background: #f5f5f7;
  padding: 0.15rem;
}

.tab-btn {
  flex: 1;
  border-radius: 999px;
  border: none;
  background: transparent;
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
  cursor: pointer;
  color: #636e72;
  font-weight: 500;
}

.tab-btn.active {
  background: #fff;
  color: #e74c3c;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.notifications-tab-content,
.messages-tab-content {
  display: none;
}

.notifications-tab-content.active,
.messages-tab-content.active {
  display: block;
}

/* Formlar */
.auth-form,
.compose-form,
#postAdForm {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
}

.auth-form .form-group,
.compose-form .form-group,
#postAdForm .form-group {
  width: 100%;
}

@media (min-width: 768px) {
  #postAdForm .form-group {
    width: calc(50% - 0.625rem);
  }

  #postAdForm .form-group:nth-last-child(-n + 3) {
    width: 100%;
  }
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 0.25rem;
  color: #636e72;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid #dfe6e9;
  font-family: inherit;
  font-size: 0.9rem;
}

.form-group textarea {
  resize: vertical;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
}

.forgot-password {
  font-size: 0.8rem;
  color: #e74c3c;
}

.forgot-password:hover {
  text-decoration: underline;
}

/* İstatistikler ve footer basit düzen */
.stats {
  padding: 2rem 0;
  background: #fff;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 1.4rem;
  font-weight: 700;
  color: #e74c3c;
}

.stat-label {
  font-size: 0.85rem;
  color: #636e72;
}

.footer {
  background: #111;
  color: #dfe6e9;
  padding: 2rem 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.footer-section h4 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section li {
  font-size: 0.8rem;
  margin-bottom: 0.25rem;
}

.footer-section a {
  color: #dfe6e9;
}

.footer-section a:hover {
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  font-size: 0.75rem;
  color: #b2bec3;
}

.form-errors {
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: #ffecec;
  color: #c0392b;
  font-size: 0.85rem;
}

.form-errors ul {
  margin: 0;
  padding-left: 1.2rem;
}

.form-errors li {
  margin-bottom: 0.1rem;
}

/* Görsel galerisi */
.image-gallery-modal {
  max-width: 900px;
}

.image-gallery-main {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-gallery-main img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  background: #000;
}

.image-gallery-thumbs {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.image-gallery-thumb {
  width: 70px;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.7;
  border: 2px solid transparent;
}

.image-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-gallery-thumb.active {
  opacity: 1;
  border-color: #e74c3c;
}

@media (max-width: 768px) {
  .header-content {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .vehicles-layout {
    flex-direction: column;
  }

  .sidebar {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .search-box {
    border-radius: 16px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


