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

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

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

ul {
  list-style: none;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  outline: none;
}

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

/* Sayfa Düzeni */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Navbar */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: all var(--transition-normal);
}

[data-theme="dark"] header {
  background-color: rgba(24, 24, 34, 0.85);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
  padding: 10px 0;
  gap: 24px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 800;
  font-size: 22px;
  color: var(--primary);
  letter-spacing: -0.5px;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-brand img {
  height: 52px;
  width: auto;
}

.search-bar {
  flex: 0 1 320px;
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 12px 16px 12px 48px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  background-color: var(--bg-light);
  color: var(--text-dark);
  font-size: 14px;
  transition: all var(--transition-fast);
}

.search-bar input:focus {
  border-color: var(--primary);
  background-color: var(--bg-white);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.search-bar i {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

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

.nav-btn {
  background: none;
  border: none;
  color: var(--text-dark);
  cursor: pointer;
  padding: 10px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all var(--transition-fast);
}

.nav-btn:hover {
  background-color: var(--border-color);
  transform: translateY(-2px);
}

.nav-btn i {
  font-size: 20px;
}

.cart-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background-color: var(--primary);
  color: white;
  font-size: 11px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Butonlar */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
}

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

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 15px rgba(179, 29, 29, 0.3);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: var(--secondary);
  color: white;
}

.btn-secondary:hover {
  background-color: var(--secondary-hover);
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-dark);
}

.btn-outline:hover {
  background-color: var(--border-color);
  transform: translateY(-2px);
}

.btn-accent {
  background-color: var(--accent);
  color: var(--secondary);
}

.btn-accent:hover {
  background-color: var(--accent-hover);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
  transform: translateY(-2px);
}

/* Bildirimler (Toasts) */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  background-color: var(--bg-white);
  color: var(--text-dark);
  padding: 16px 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border-left: 5px solid var(--primary);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  transform: translateX(120%);
  animation: slideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  font-weight: 500;
}

.toast.success {
  border-left-color: #2ec4b6;
}

.toast.error {
  border-left-color: var(--primary);
}

@keyframes slideIn {
  to {
    transform: translateX(0);
  }
}

/* Sayfa Çekmecesi (Drawer) / Sepet Yan Panel */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 450px;
  height: 100vh;
  background-color: var(--bg-white);
  box-shadow: var(--shadow-lg);
  z-index: 501;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-normal);
}

.drawer.active {
  transform: translateX(0);
}

.drawer-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-header h3 {
  font-weight: 700;
  font-size: 20px;
}

.drawer-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-dark);
  padding: 8px;
  border-radius: 50%;
  transition: background-color var(--transition-fast);
}

.drawer-close:hover {
  background-color: var(--border-color);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.drawer-footer {
  padding: 24px;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-light);
}

/* Modal Genel Düzeni */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background-color: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: transform var(--transition-normal);
}

.modal-overlay.active .modal {
  transform: scale(1);
}

/* Footer Tasarımı */
footer {
  background-color: var(--secondary);
  color: rgba(255, 255, 255, 0.8);
  padding: 60px 0 30px 0;
  margin-top: 60px;
  border-top: 5px solid var(--primary);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h4 {
  color: white;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  position: relative;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 40px;
  height: 3px;
  background-color: var(--primary);
}

.footer-col p {
  font-size: 14px;
  line-height: 1.8;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col ul a {
  font-size: 14px;
  transition: color var(--transition-fast);
}

.footer-col ul a:hover {
  color: var(--accent);
}

.footer-socials {
  display: flex;
  gap: 12px;
  margin-top: 15px;
}

.footer-socials a {
  width: 36px;
  height: 36px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  color: white;
}

.footer-socials a:hover {
  background-color: var(--primary);
  transform: translateY(-3px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 30px;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

/* Mobil Menü ve Duyarlılık */
.menu-toggle {
  display: none;
}

@media (max-width: 768px) {
  .navbar {
    height: 70px;
  }
  .search-bar {
    order: 3;
    flex: 1 1 100%;
    margin-top: 12px;
    margin-bottom: 8px;
  }
  .navbar {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 0;
  }
  .drawer {
    max-width: 100%;
  }
}

/* Müşteri Giriş Sekmeleri ve Profil Menüsü Stilleri */
.auth-tab {
  transition: all var(--transition-fast);
}
.auth-tab:hover {
  color: var(--primary) !important;
}
.auth-tab.active {
  color: var(--primary) !important;
}
.customer-profile-menu button:hover {
  background-color: rgba(230, 57, 70, 0.1) !important;
}

/* Navigation Dropdowns */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 250px;
  padding: 8px 0;
  z-index: 200;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -15px;
  left: 0;
  width: 100%;
  height: 15px;
  background-color: transparent;
}

.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.nav-dropdown-item {
  position: relative;
  padding: 10px 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-dark);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.nav-dropdown-item:hover {
  background-color: var(--primary-light);
  color: var(--primary);
}

.category-main-title {
  display: flex;
  justify-content: space-between;
  width: 100%;
  align-items: center;
}

/* Submenu (Yandan Açılan Flyout Yapı) */
.nav-submenu {
  display: none;
  flex-direction: column;
  position: absolute;
  left: 99%;
  top: 0;
  width: 250px;
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px 0;
  z-index: 300;
}

[data-theme="dark"] .nav-submenu {
  background-color: #1a1a24;
}

/* Hover köprüsü */
.nav-submenu::before {
  content: '';
  position: absolute;
  top: 0;
  left: -20px;
  width: 20px;
  height: 100%;
  background-color: transparent;
}

.nav-dropdown-item:hover .nav-submenu {
  display: flex;
}

.nav-submenu a {
  display: block;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  width: 100%;
}

.nav-submenu a:hover {
  color: var(--primary) !important;
  background-color: var(--primary-light);
  transform: translateX(4px);
}

/* Header İletişim Kutusu */
.header-contact-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: var(--bg-light);
  transition: all var(--transition-fast);
}

.header-contact-box:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* Floating WhatsApp Butonu */
.whatsapp-float-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: #25d366;
  color: white !important;
  padding: 12px 20px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 14px;
  z-index: 999;
  transition: all var(--transition-normal);
  animation: wa-pulse 2s infinite;
}

.whatsapp-float-btn:hover {
  background-color: #20ba5a;
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
}

.whatsapp-float-btn i {
  font-size: 20px;
}

@keyframes wa-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);
  }
}

/* Ekran Uyumluluğu */
@media (max-width: 992px) {
  .header-contact-box {
    display: none !important;
  }
}

.customer-avatar-mini {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--primary);
  color: white !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

.nav-dropdown-menu.force-hidden {
  display: none !important;
}

/* GLOBAL RESPONSIVE FIXES (Telefon & Tablet) */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

@media (max-width: 768px) {
  .container {
    padding: 0 12px !important;
  }

  .navbar {
    min-height: auto !important;
    padding: 10px 12px !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 10px !important;
  }

  .nav-brand {
    justify-content: center !important;
    width: 100% !important;
    margin-bottom: 2px !important;
  }

  .search-bar {
    width: 100% !important;
    max-width: 100% !important;
    margin: 4px 0 !important;
  }

  .search-bar input {
    padding: 10px 16px 10px 40px !important;
    font-size: 13px !important;
  }

  .nav-links-container {
    margin-left: 0 !important;
    gap: 12px !important;
    font-size: 13px !important;
    width: 100% !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
  }

  .header-contact-box {
    display: none !important;
  }

  .whatsapp-float-btn {
    bottom: 16px !important;
    right: 16px !important;
    padding: 10px 16px !important;
    font-size: 12.5px !important;
  }

  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    text-align: center !important;
  }
}
