/* ===== Modern Professional B2B Design - Efe Motor ===== */
/* Beyaz Motor Temalı Renk Paleti */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.9);
  --text-primary: #1a1a1a;
  --text-secondary: #6b7280;
  --accent: #1a3666;
  --accent-hover: #154257;
  --border: rgba(0, 0, 0, 0.1);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.2);
}

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

html {
  height: 100%;
}

body {
  margin: 0;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #f5f5f5 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  margin-top: 40px;
}

/* ===== HEADER ===== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-glass);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  width: 100%;
  overflow: visible;
}

.app-header .container {
  max-width: 90%;
  margin: 0 auto;
  padding: 11px 22px;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  overflow: visible;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  min-height: 60px;
  width: 100%;
  box-sizing: border-box;
  gap: 12px;
  flex-wrap: nowrap;
}


.brand {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.5px;
  flex-shrink: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}

.brand a {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
}

.brand-logo {
  height: 75px;
  width: auto;
  max-height: 75px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.brand-text {
  background: linear-gradient(135deg, #000000 0%, #000000 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: var(--text-primary);
}

.brand-short {
  display: none;
}

@media (max-width: 768px) {
  .brand-logo {
    height: 32px;
    max-height: 32px;
  }

  .brand a {
    gap: 8px;
  }

  .brand-full {
    display: none;
  }

  .brand-short {
    display: inline;
  }
}

.topnav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  flex-shrink: 0;
}

.topnav a,
.topnav span {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;

  transition: all 0.3s ease;
  white-space: nowrap;
  font-size: 14px;
}



.login-btn {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #fff !important;
  border: none;
  padding: 10px 24px !important;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(26, 54, 102, 0.2);
  text-decoration: none;
  display: inline-block;
}

.login-btn:hover {
  background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 54, 102, 0.4);
  color: #fff !important;
}

/* ===== CART ===== */
.cart-wrapper {
  position: relative;
  z-index: 1001;
}

.cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.cart-btn:hover {
  background: rgba(26, 54, 102, 0.1);
}

.cart-btn:hover .cart-icon {
  color: var(--accent);
}

.cart-icon {
  width: 20px;
  height: 20px;
  margin-right: 8px;
  display: inline-block;
  vertical-align: middle;
  color: var(--text-primary);
  transition: color 0.3s ease;
  flex-shrink: 0;
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent);
  color: #fff !important;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  line-height: 1.4;
  display: none;
  /* Varsayılan olarak gizli - sadece sepette ürün varken görünür */
}

.cart-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  min-width: 420px;
  max-width: 480px;
  display: none;
  z-index: 1002;
  backdrop-filter: blur(20px);
  overflow: hidden;
  margin-top: 4px;
}

.cart-wrapper:hover .cart-dropdown,
.cart-wrapper.show .cart-dropdown {
  display: block;
  animation: cartDropdownFadeIn 0.2s ease-out;
}

@keyframes cartDropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cart-header {
  padding: 20px 24px;
  border-bottom: 2px solid var(--bg-secondary);
  background: linear-gradient(135deg, rgba(26, 54, 102, 0.05) 0%, rgba(26, 54, 102, 0.02) 100%);
}

.cart-header h4 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-header h4::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 8px;
  vertical-align: middle;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='%231a1a1a' viewBox='0 0 16 16'%3E%3Cpath d='M0 1.5A.5.5 0 0 1 .5 1H2a.5.5 0 0 1 .485.379L2.89 3H14.5a.5.5 0 0 1 .491.592l-1.5 8A.5.5 0 0 1 13 12H4a.5.5 0 0 1-.491-.408L2.01 3.607 1.61 2H.5a.5.5 0 0 1-.5-.5zM3.102 4l1.313 7h8.17l1.313-7H3.102zM5 14a1 1 0 1 1 0 2 1 1 0 0 1 0-2zm9 0a1 1 0 1 1 0 2 1 1 0 0 1 0-2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.cart-items {
  max-height: 400px;
  overflow-y: auto;
  padding: 12px 0;
}

.cart-items::-webkit-scrollbar {
  width: 6px;
}

.cart-items::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}

.cart-items::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.cart-item {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 16px;
  transition: all 0.2s ease;
  position: relative;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item:hover {
  background: var(--bg-secondary);
}

.cart-item-number {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
}

.cart-item-content {
  flex: 1;
  min-width: 0;
}

.cart-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.cart-item-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.4;
  flex: 1;
  margin: 0;
}

.cart-item-remove {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(26, 54, 102, 0.1);
  color: #1a3666;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  transition: all 0.2s ease;
  padding: 0;
}

.cart-item-remove:hover {
  background: rgba(26, 54, 102, 0.2);
  transform: scale(1.1);
}

.cart-item-details {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.cart-item-sku {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.cart-item-quantity-badge {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(26, 54, 102, 0.1);
  color: var(--accent);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.cart-item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.cart-item-unit-price {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
}

.cart-item-price-amount {
  font-weight: 700;
  color: var(--accent);
  font-size: 18px;
}

.cart-empty {
  padding: 48px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  width: 100%;
}

.cart-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.cart-empty-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.cart-empty-subtext {
  font-size: 13px;
  color: var(--text-secondary);
}

.cart-footer {
  padding: 20px 24px;
  border-top: 2px solid var(--border);
  background: linear-gradient(135deg, rgba(26, 54, 102, 0.05) 0%, rgba(26, 54, 102, 0.02) 100%);
}

.cart-total {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.cart-total-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.cart-total-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  text-align: right;
  flex-shrink: 0;
}

.checkout-btn {
  display: block;
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #1a3666;
  text-align: center;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(26, 54, 102, 0.2);
}

.checkout-btn::before {
  content: '→';
  color: white;
  margin-right: 5px;
  font-size: 18px;
}

.checkout-btn:hover {
  background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26, 54, 102, 0.4);
}

/* ===== USER MENU ===== */
.user-menu-wrapper {
  position: relative;
  z-index: 1001;
}

.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.user-menu-btn:hover {
  background: rgba(26, 54, 102, 0.1);
  color: var(--accent);
}

.user-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.user-name-short {
  font-weight: 500;
  font-size: 14px;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0;
  min-width: 260px;
  box-shadow: var(--shadow-xl);
  display: none;
  z-index: 1002;
  backdrop-filter: blur(20px);
  animation: slideDown 0.2s ease-out;
  overflow: hidden;
}

.user-menu-wrapper:hover .user-menu-dropdown,
.user-menu-wrapper.show .user-menu-dropdown {
  display: block;
}

.user-profile-section {
  padding: 20px;
  background: linear-gradient(135deg, rgba(26, 54, 102, 0.05) 0%, rgba(26, 54, 102, 0.02) 100%);
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.user-avatar svg {
  width: 32px;
  height: 32px;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-full-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  border-radius: 0;
  margin: 0;
  background: transparent;
  text-align: left;
  font-weight: 500;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
}

.user-menu-item:hover {
  background: rgba(26, 54, 102, 0.1);
  color: var(--accent);
  padding-left: 24px;
}

.user-menu-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.user-menu-logout {
  border-top: 1px solid var(--border);
  margin-top: 4px;
  padding-top: 12px;
  color: #1a3666;
  font-weight: 600;
}

.user-menu-logout:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #1a3666;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== ADMIN MENU ===== */
.admin-menu-wrapper {
  position: relative;
  z-index: 1001;
}

.admin-menu-btn {
  background: rgba(26, 54, 102, 0.1);
  border: 1px solid var(--accent);
  padding: 10px 18px;
  border-radius: 10px;
  transition: all 0.3s ease;
  font-weight: 600;
  color: var(--accent) !important;
}

.admin-menu-btn:hover {
  background: rgba(26, 54, 102, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 54, 102, 0.3);
}

.admin-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 0;
  min-width: 200px;
  box-shadow: var(--shadow-xl);
  display: none;
  z-index: 1002;
  backdrop-filter: blur(20px);
  animation: slideDown 0.2s ease-out;
}

.admin-menu-wrapper:hover .admin-menu-dropdown {
  display: block;
}

.admin-menu-dropdown a {
  display: block;
  padding: 12px 20px;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  border-radius: 0;
  margin: 0;
  background: transparent;
  text-align: left;
  font-weight: 500;
  font-size: 14px;
}

.admin-menu-dropdown a:hover {
  background: rgba(26, 54, 102, 0.1);
  color: var(--accent);
  padding-left: 24px;
}

/* ===== MEGA MENU ===== */
.mega-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: visible;
  padding: 12px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
  position: relative;
}

.mega-bar::-webkit-scrollbar {
  height: 6px;
}

.mega-bar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 3px;
}

.mega-bar::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.mega-bar::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

.mega-item {
  position: relative;
  z-index: 1001;
}

.mega-item:hover {
  z-index: 2001;
}

.mega-button {
  background: #ffffff;
  color: var(--text-primary);
  border: 1px solid var(--border);
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 14px;
}

.mega-button:hover {
  background: rgba(26, 54, 102, 0.15);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 54, 102, 0.2);
}

.mega-panel {
  position: fixed;
  transform: translateX(-50%);
  min-width: 600px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  display: none;
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(20px);
  animation: slideDown 0.3s ease-out;
  z-index: 2000;
  max-height: 80vh;
  overflow-y: auto;
}

.mega-item:hover .mega-panel {
  display: block;
}

.mega-item {
  position: relative;
  z-index: 1001;
}

.mega-item:hover {
  z-index: 2001;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mega-item:hover .mega-panel {
  display: block;
}

.mega-columns {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.mega-link {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-size: 14px;
}

.mega-link:hover {
  color: var(--accent);
  background: rgba(26, 54, 102, 0.1);
  padding-left: 16px;
}

/* ===== MAIN LAYOUT ===== */
main {
  padding: 32px 0;
  width: 100%;
  box-sizing: border-box;
}

.main-layout {
  display: grid;
  grid-template-columns: minmax(240px, 20%) 1fr;
  gap: 20px;
  max-width: 92%;
  margin: 0 auto;
  padding: 0 0px;
  margin-top: 48px;
  flex: 1;
}

.main-content {
  max-width: 100%;
  padding: 0 24px;
}

main.container {
  flex: 1;
}

/* ===== SIDEBAR ===== */
.sidebar {
  background: var(--bg-card);
  padding: 24px;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  height: fit-content;
  max-height: calc(100vh - 140px);
  position: sticky;
  top: 110px;
  margin-top: 73px;
  display: flex;
  flex-direction: column;
}

.sidebar ul,
.sidebar>div {
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  min-height: 0;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.sidebar ul::-webkit-scrollbar,
.sidebar>div::-webkit-scrollbar {
  width: 6px;
}

.sidebar ul::-webkit-scrollbar-track,
.sidebar>div::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.02);
  border-radius: 3px;
}

.sidebar ul::-webkit-scrollbar-thumb,
.sidebar>div::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 3px;
}

.sidebar h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
  flex-shrink: 0;
}

.sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.category-item {
  padding: 10px 0;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  border-radius: 8px;
  margin: 2px 0;
  text-align: left !important;
}

.category-item:hover {
  background: transparent;
}

.category-item.active {
  background: transparent;
  border-left: 3px solid var(--accent);
  padding-left: 13px;
}

.category-item.active .category-name {
  color: var(--accent);
  font-weight: 600;
}

.category-toggle {
  display: inline-block;
  width: 20px;
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
  transition: transform 0.2s ease;
}

.category-spacer {
  display: inline-block;
  width: 20px;
}

.category-name {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
  text-align: left !important;
  display: inline-block;
  vertical-align: top;
  max-width: calc(100% - 24px);
  line-height: 1.3;
}

.category-name:hover {
  color: var(--accent);
}

.category-children {
  margin-left: 8px;
  padding-left: 3px;
  border-left: 2px solid var(--border);
  margin-top: 4px;
}

/* ===== CONTENT ===== */
.content {
  background: transparent;
  padding: 0;
  width: 100%;
  max-width: 100%;
}

.content-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}

.header-title-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
}

/* Mobil Kategori Menüsü - Varsayılan Gizli (Desktop) */
.mobile-category-toggle {
  display: none;
}

.mobile-category-menu {
  display: none;
}

/* Desktop'ta normal görünüm */
@media (min-width: 769px) {
  .content-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .header-title-wrapper {
    width: auto;
  }
}

.header-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  max-width: 100%;
  min-width: 300px;
}

.content h3 {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

/* ===== FILTER ===== */
.product-filter {
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 200px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

.product-filter:hover {
  border-color: var(--accent);
}

.product-filter:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26, 54, 102, 0.1);
}

/* ===== SEARCH BOX ===== */
.search-box-wrapper {
  position: relative;
  flex: 1;
  min-width: 300px;
}

.search-box {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 16px;
  color: var(--text-secondary);
  font-size: 18px;
  pointer-events: none;
  z-index: 1;
  width: 18px;
  height: 18px;
  display: block;
}

.search-icon::before {
  content: '';
  display: block;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 50%;
  position: absolute;
  top: 0;
  left: 0;
}

.search-icon::after {
  content: '';
  display: block;
  width: 8px;
  height: 2px;
  background: currentColor;
  position: absolute;
  bottom: 0;
  right: -2px;
  transform: rotate(45deg);
  border-radius: 1px;
}

.search-box input {
  flex: 1;
  padding: 12px 16px 12px 48px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.3s ease;
  width: 100%;
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26, 54, 102, 0.1);
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 8px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.search-results::-webkit-scrollbar {
  width: 6px;
}

.search-results::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.search-result-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: var(--bg-secondary);
}

.search-result-item .product-name {
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
}

.search-result-item .product-sku {
  font-size: 12px;
  color: var(--text-secondary);
  margin-left: 12px;
}

.search-result-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
}

/* ===== BREADCRUMB ===== */
.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-radius: 10px;
  border: 1px solid var(--border);
  flex-wrap: wrap;
  font-size: 14px;
}

.breadcrumb-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 500;
}

.breadcrumb-nav a.breadcrumb-home {
  color: var(--accent);
  font-weight: 600;
}

.breadcrumb-nav a.breadcrumb-link {
  color: var(--text-primary);
}

.breadcrumb-nav a.breadcrumb-link:hover {
  color: var(--accent);
  background: rgba(26, 54, 102, 0.08);
}

.breadcrumb-nav a.breadcrumb-current {
  color: var(--text-primary);
  font-weight: 600;
  cursor: default;
}

.breadcrumb-separator {
  color: var(--text-secondary);
  margin: 0 4px;
  user-select: none;
}

.products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 25px;
}

/* Cart-empty mesajı için products içinde tam ortalama */
.products>.cart-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  width: 100%;
}

/* Mobilde kesinlikle tek sütun - ÖNCE BU KURAL ÇALIŞSIN */
@media (max-width: 768px) {
  .products {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0;
    margin: 0;
  }

  .products .card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
    margin: 0;
  }
}

/* ===== PRODUCT CARDS ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #3b82f6);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(26, 54, 102, 0.3);
}

.card:hover::before {
  transform: scaleX(1);
}

.product-image-placeholder {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 14px;
  position: relative;
  overflow: hidden;
}

.product-image-placeholder::before {
  content: '📷';
  font-size: 48px;
  opacity: 0.3;
}

.card h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.4;
  min-height: 44px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.muted {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 12px;
  font-weight: 400;
}

.price {
  font-size: 24px;
  font-weight: 800;
  color: var(--accent);
  margin: 16px 0;
  display: flex;
  align-items: baseline;
  gap: 4px;
}



/* ===== BUTTONS ===== */
button,
.btn {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #ffffff !important;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  width: 100%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(26, 54, 102, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

button:hover,
.btn:hover {
  background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26, 54, 102, 0.4);
}

.product-add-btn:hover {
  background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 20px rgba(26, 54, 102, 0.4) !important;
}

button:active,
.btn:active {
  transform: translateY(0);
}

/* ===== DIALOG/LOGIN ===== */
dialog {
  border: none;
  border-radius: 20px;
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  max-width: 420px;
  width: 90%;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
}

dialog h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text-primary);
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-primary);
  font-size: 14px;
}

input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text-primary);
  font-size: 15px;
  transition: all 0.3s ease;
  margin-bottom: 16px;
}

input[type="email"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(26, 54, 102, 0.1);
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.actions button[value="cancel"] {
  background: rgb(173, 10, 10);
  color: var(--text-primary);
  box-shadow: none;
}

.actions button[value="cancel"]:hover {
  background: rgb(173, 10, 10);
}

.error {
  color: #1a3666;
  font-size: 14px;
  margin-top: 12px;
  padding: 8px 12px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .main-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .sidebar {
    position: static;
    max-height: none;
    top: auto;
  }

  .cart-dropdown {
    min-width: 380px;
    max-width: 420px;
  }
}

/* Tablet ve küçük ekranlar - MOBİL İLK YAKLAŞIMI */
@media (max-width: 768px) {
  .container {
    padding: 0 12px;
    margin-top: 16px;
  }

  .app-header .container {
    padding: 0 12px;
  }

  .app-header {
    position: sticky;
    top: 0;
    z-index: 1000;
  }


  .header-inner {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 10px 0;
    min-height: 56px;
    align-items: center;
  }

  .brand {
    font-size: 15px;
    flex: 0 1 auto;
    max-width: calc(100% - 180px);
    overflow: hidden;
    font-weight: 700;
  }

  .brand-logo {
    height: 28px !important;
    max-height: 28px !important;
    flex-shrink: 0;
  }

  .brand a {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    max-width: 100%;
  }

  .brand-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topnav {
    gap: 6px;
    flex-wrap: nowrap;
    width: auto;
    justify-content: flex-end;
    flex-shrink: 0;
  }

  .topnav span {
    display: none;
    /* Mobilde "Merhaba, email" metnini gizle */
  }

  .user-name-short {
    display: none;
    /* Mobilde sadece icon göster */
  }

  .user-menu-btn {
    padding: 6px 8px;
    gap: 4px;
  }

  .user-icon {
    width: 18px;
    height: 18px;
  }

  .user-menu-dropdown {
    right: 0;
    left: auto;
    min-width: 240px;
  }

  .topnav a {
    font-size: 12px;
    padding: 8px 10px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .login-btn {
    padding: 8px 16px !important;
    font-size: 12px !important;
  }

  .admin-menu-btn {
    padding: 6px 8px;
    font-size: 10px;
    white-space: nowrap;
    border-radius: 8px;
  }

  #logoutBtn {
    padding: 6px 10px !important;
    font-size: 11px !important;
    white-space: nowrap;
  }

  .cart-btn {
    padding: 6px 8px;
    white-space: nowrap;
    border-radius: 8px;
  }

  .cart-icon {
    width: 14px;
    height: 14px;
    margin-right: 2px;
  }

  .cart-count {
    font-size: 9px;
    padding: 1px 4px;
    min-width: 14px;
    top: -2px;
    right: -2px;
  }

  .cart-dropdown {
    position: fixed;
    top: 60px;
    right: 12px;
    left: 12px;
    min-width: auto;
    max-width: 100%;
    max-height: calc(100vh - 80px);
    margin-top: 0;
  }

  .cart-item {
    padding: 12px 16px;
    gap: 12px;
  }

  .cart-item-remove {
    width: 26px !important;
    height: 26px !important;
    font-size: 15px !important;
    min-width: 26px;
    flex-shrink: 0;
  }

  .main-layout {
    padding: 0 12px;
    margin-top: 16px;
    gap: 16px;
  }

  .sidebar {
    display: none;
    /* Mobilde sidebar gizle */
  }

  .sidebar h3 {
    font-size: 16px;
    margin-bottom: 16px;
  }

  .content {
    order: 1;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .content-header {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
  }

  .header-title-wrapper {
    width: 100%;
    justify-content: space-between;
    align-items: center;
  }

  /* Mobil Kategori Butonu */
  .mobile-category-toggle {
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-height: 44px;
  }

  .mobile-category-toggle:hover {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    border-color: var(--accent);
    color: var(--accent);
  }

  .mobile-category-toggle.active {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    border-color: var(--accent);
    color: var(--accent);
  }

  .mobile-category-icon {
    font-size: 18px;
  }

  .mobile-category-text {
    font-size: 14px;
  }

  .mobile-category-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
  }

  .mobile-category-toggle.active .mobile-category-arrow {
    transform: rotate(180deg);
  }

  /* Mobil Kategori Menüsü */
  .mobile-category-menu {
    display: block !important;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: max-height 0.4s ease, padding 0.4s ease;
    margin-bottom: 0;
  }

  .mobile-category-menu.open {
    max-height: 70vh;
    padding: 16px;
    margin-bottom: 12px;
    overflow-y: auto;
    box-shadow: var(--shadow-md);
  }

  .mobile-category-menu.open::-webkit-scrollbar {
    width: 6px;
  }

  .mobile-category-menu.open::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
  }

  .mobile-category-menu.open::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
  }

  .mobile-category-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .mobile-category-menu .category-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
  }

  .mobile-category-menu .category-item:last-child {
    border-bottom: none;
  }

  .mobile-category-menu .category-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    display: block;
    padding: 8px 0;
    transition: color 0.2s ease;
  }

  .mobile-category-menu .category-name:hover,
  .mobile-category-menu .category-item.active .category-name {
    color: var(--accent);
    font-weight: 600;
  }

  .mobile-category-menu .category-children {
    margin-left: 16px;
    margin-top: 8px;
    padding-left: 12px;
    border-left: 2px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .mobile-category-menu .category-item.expanded .category-children {
    max-height: 1000px;
    padding-top: 8px;
  }

  .mobile-category-menu .category-toggle {
    display: inline-block;
    width: 24px;
    font-size: 11px;
    color: var(--text-secondary);
    text-align: center;
    margin-right: 6px;
    cursor: pointer;
    transition: transform 0.2s ease;
    vertical-align: middle;
  }

  .mobile-category-menu .category-item.expanded .category-toggle {
    transform: rotate(0deg);
  }

  .mobile-category-menu .category-item:not(.expanded) .category-toggle {
    transform: rotate(-90deg);
  }

  .mobile-category-menu .category-spacer {
    display: inline-block;
    width: 28px;
  }

  .content h3 {
    font-size: 18px;
    margin: 0;
  }

  .header-filters {
    width: 100%;
    flex-direction: column;
    gap: 10px;
    min-width: auto;
    max-width: 100%;
  }

  .product-filter {
    width: 100%;
    min-width: auto;
    font-size: 14px;
    padding: 10px 14px;
  }

  .search-box-wrapper {
    width: 100%;
    min-width: auto;
  }

  .search-box input {
    font-size: 14px;
    padding: 10px 14px 10px 42px;
  }

  /* ÜRÜNLER KESINLIKLE TEK SÜTUN */
  .products {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  .card {
    padding: 16px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    margin: 0 auto;
  }

  .card h4 {
    font-size: 15px;
    min-height: auto;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .muted {
    font-size: 12px;
    word-wrap: break-word;
  }

  .price {
    font-size: 22px;
    margin: 12px 0;
  }

  .product-image-placeholder {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  button,
  .btn {
    width: 100%;
    box-sizing: border-box;
  }

  button,
  .btn {
    padding: 12px 16px;
    font-size: 13px;
    min-height: 44px;
  }

  .breadcrumb-nav {
    padding: 10px 12px;
    font-size: 12px;
    gap: 6px;
    margin-bottom: 16px;
  }

  .breadcrumb-separator {
    margin: 0 2px;
  }

  .footer-inner {
    padding: 0 12px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-section h4 {
    font-size: 16px;
  }

  .mega-bar {
    flex-wrap: wrap;
  }

  main {
    padding: 16px 0;
  }

  dialog {
    width: 90%;
    max-width: 360px;
    padding: 24px;
  }

  dialog h3 {
    font-size: 20px;
  }

  .admin-menu-dropdown {
    right: 0;
    left: auto;
    min-width: 160px;
  }
}

/* Küçük mobil cihazlar - TEK SÜTUN ZORUNLU */
@media (max-width: 480px) {
  .container {
    padding: 0 10px;
    margin-top: 12px;
  }

  .app-header .container {
    padding: 0 10px;
  }

  .header-inner {
    padding: 8px 0;
    gap: 6px;
    min-height: 52px;
  }

  .brand {
    font-size: 14px;
    max-width: calc(100% - 160px);
  }

  .brand-logo {
    height: 24px !important;
    max-height: 24px !important;
  }

  .brand a {
    gap: 4px;
  }

  .topnav {
    gap: 4px;
  }

  .topnav a {
    font-size: 11px;
    padding: 6px 8px;
  }

  .login-btn {
    padding: 6px 12px !important;
    font-size: 11px !important;
  }

  .admin-menu-btn {
    padding: 6px 8px;
    font-size: 10px;
  }

  .cart-btn {
    padding: 6px 8px;
  }

  .cart-icon {
    width: 14px;
    height: 14px;
    margin-right: 2px;
  }

  .cart-count {
    font-size: 9px;
    padding: 1px 4px;
    min-width: 14px;
    top: -2px;
    right: -2px;
  }

  .cart-dropdown {
    right: 10px;
    left: 10px;
    top: 56px;
    max-height: calc(100vh - 70px);
  }

  .cart-header {
    padding: 14px;
  }

  .cart-header h4 {
    font-size: 15px;
  }

  .cart-item {
    padding: 12px 14px;
    gap: 10px;
  }

  .cart-item-number {
    width: 26px;
    height: 26px;
    font-size: 11px;
  }

  .cart-item-name {
    font-size: 12px;
  }

  .cart-item-sku {
    font-size: 10px;
  }

  .cart-item-price-amount {
    font-size: 15px;
  }

  .cart-item-remove {
    width: 22px !important;
    height: 22px !important;
    font-size: 13px !important;
    min-width: 22px;
    flex-shrink: 0;
  }

  .cart-footer {
    padding: 14px;
  }

  .cart-total {
    font-size: 16px;
  }

  .checkout-btn {
    padding: 12px;
    font-size: 13px;
  }

  .main-layout {
    padding: 0 10px;
    margin-top: 12px;
    gap: 12px;
  }

  .sidebar {
    padding: 12px;
    border-radius: 10px;
  }

  .sidebar h3 {
    font-size: 14px;
    margin-bottom: 12px;
  }

  .category-name {
    font-size: 13px;
  }

  .content h3 {
    font-size: 16px;
  }

  .header-filters {
    gap: 8px;
  }

  .product-filter {
    padding: 10px 12px;
    font-size: 13px;
  }

  .search-box input {
    padding: 10px 12px 10px 40px;
    font-size: 13px;
  }

  .search-icon {
    left: 12px;
  }

  /* KESINLIKLE TEK SÜTUN - ASLA YAN YANA OLMAZ */
  .products {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .card {
    padding: 14px;
    border-radius: 12px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    margin: 0;
  }

  .card h4 {
    font-size: 14px;
    min-height: auto;
    margin-bottom: 10px;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .muted {
    font-size: 11px;
    margin-bottom: 8px;
    word-wrap: break-word;
  }

  .price {
    font-size: 20px;
    margin: 10px 0;
  }

  .product-image-placeholder {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  button,
  .btn {
    padding: 12px 14px;
    font-size: 12px;
    min-height: 44px;
    width: 100% !important;
    box-sizing: border-box;
  }

  .breadcrumb-nav {
    padding: 8px 10px;
    font-size: 11px;
    gap: 4px;
    margin-bottom: 12px;
  }

  .breadcrumb-nav a {
    padding: 3px 6px;
  }

  .footer-inner {
    padding: 0 10px;
  }

  .footer-content {
    gap: 18px;
  }

  .app-footer {
    padding: 24px 0 16px;
    margin-top: 24px;
  }

  .footer-section h4 {
    font-size: 14px;
    margin-bottom: 10px;
  }

  .footer-section p,
  .footer-section a {
    font-size: 11px;
  }

  dialog {
    padding: 18px;
    width: 90%;
    max-width: 300px;
  }

  dialog h3 {
    font-size: 16px;
    margin-bottom: 16px;
  }

  label {
    font-size: 12px;
    margin-bottom: 6px;
  }

  input[type="email"],
  input[type="password"] {
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 12px;
  }

  .actions {
    gap: 6px;
    margin-top: 16px;
  }

  .actions button {
    padding: 10px 14px;
    font-size: 12px;
  }

  .admin-menu-dropdown {
    min-width: 140px;
  }

  .admin-menu-dropdown a {
    padding: 8px 12px;
    font-size: 11px;
  }

  .search-results {
    max-height: 280px;
  }

  .search-result-item {
    padding: 10px 12px;
  }

  .search-result-item .product-name {
    font-size: 12px;
  }

  .search-result-item .product-sku {
    font-size: 10px;
  }
}

/* Çok küçük ekranlar (landscape telefonlar vb.) */
@media (max-width: 360px) {

  /* KESINLIKLE TEK SÜTUN */
  .products {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }

  .brand {
    font-size: 12px;
    max-width: calc(100% - 140px);
  }

  .brand-logo {
    height: 20px !important;
    max-height: 20px !important;
  }

  .brand a {
    gap: 4px;
  }

  .brand-text {
    font-size: 10px;
  }

  .topnav a {
    font-size: 10px;
    padding: 6px 6px;
  }

  .admin-menu-btn {
    font-size: 9px;
    padding: 6px 6px;
  }

  .cart-btn {
    padding: 6px 6px;
  }

  .card {
    padding: 12px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .product-image-placeholder {
    width: 100% !important;
    max-width: 100% !important;
  }

  .sidebar {
    padding: 10px;
  }

  .container {
    padding: 0 8px;
  }

  .app-header .container {
    padding: 0 8px;
  }
}

/* Touch device optimizasyonları */
@media (hover: none) and (pointer: coarse) {

  button,
  .btn {
    min-height: 44px;
    /* iOS dokunma hedefi minimum boyutu */
    min-width: 44px;
  }

  .cart-btn,
  .admin-menu-btn,
  .topnav a {
    min-height: 40px;
    min-width: 40px;
  }

  .category-name {
    min-height: 36px;
    display: flex;
    align-items: center;
  }

  .search-box input {
    min-height: 44px;
  }

  .product-filter {
    min-height: 44px;
  }

  .card {
    cursor: pointer;
  }

  .card:active {
    transform: scale(0.98);
  }

  button:active,
  .btn:active {
    transform: scale(0.95);
  }
}

/* Landscape orientation optimizasyonları */
@media (max-width: 768px) and (orientation: landscape) {
  .cart-dropdown {
    max-height: calc(100vh - 60px);
  }

  .sidebar {
    max-height: 400px;
    overflow-y: auto;
  }
}

/* Pagination mobil optimizasyonları */
@media (max-width: 768px) {
  #pagination {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #pagination>div {
    flex-wrap: wrap;
    gap: 6px;
  }

  #pagination button {
    min-width: auto;
    padding: 8px 12px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  #pagination button {
    min-width: 36px;
    padding: 8px 10px;
    font-size: 12px;
    height: 36px;
  }

  #pagination .page-numbers {
    gap: 4px;
    margin: 0 8px;
  }

  #pagination .page-numbers button {
    min-width: 32px;
    padding: 0 8px;
  }
}

/* ===== SMOOTH SCROLL ===== */
html {
  scroll-behavior: smooth;
}

/* ===== LOADING STATES ===== */
.card.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* ===== SELECTION ===== */
::selection {
  background: rgba(26, 54, 102, 0.3);
  color: var(--text-primary);
}

/* ===== FOOTER ===== */
.app-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  margin-top: auto;
  padding: 48px 0 24px;
  margin-top: 50px;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.footer-section h4 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.footer-section p {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 8px 0;
  line-height: 1.6;
}

.footer-section a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  margin: 8px 0;
  transition: all 0.2s ease;
}

.footer-section a:hover {
  color: var(--accent);
  padding-left: 4px;
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  color: var(--text-secondary);
  font-size: 13px;
  margin: 0;
}

/* ===== HERO SLIDER ===== */
.content {
  min-width: 0;
  /* CRITICAL: prevents flex item from blowing past viewport width */
}

.hero-slider-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 21 / 9;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
  background: transparent;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border);
}

@media (max-width: 768px) {
  .hero-slider-container {
    aspect-ratio: 16 / 9;
  }
}

.hero-slider-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
  align-items: center;
}

.hero-slide {
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  height: 100%;
  flex-shrink: 0;
  display: block;
}

.hero-slide a {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-slide img {
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: cover;
  /* Cover fills the rectangle seamlessly */
  display: block;
}

.hero-slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  backdrop-filter: blur(4px);
  opacity: 0.7;
}

.hero-slider-btn:hover {
  background: var(--accent);
  opacity: 1;
}

.hero-slider-container:hover .hero-slider-btn {
  opacity: 1;
}

.hero-slider-btn.prev {
  left: 16px;
}

.hero-slider-btn.next {
  right: 16px;
}

.hero-slider-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.3);
  padding: 6px 12px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

.hero-slider-dot {
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

.hero-slider-dot:hover {
  background: rgba(255, 255, 255, 0.8);
}

.hero-slider-dot.active {
  background: white;
  transform: scale(1.3);
}

/* --- MEGA MENU --- */
.mega-nav {
  display: flex;
  align-items: center;
}

.mega-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 32px;
  margin-left: 24px;
}

.mega-item {
  position: static;
  padding: 24px 0;
}

.mega-link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

.mega-item:hover .mega-link,
.mega-link:hover {
  color: var(--accent);
}

.mega-caret {
  transition: transform 0.2s;
  margin-top: 1px;
}

.mega-item.hover-active .mega-caret {
  transform: rotate(180deg);
}

.mega-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  width: 100%;
  display: none;
  z-index: 1000;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border);
  overflow: hidden;
}

.mega-item.has-mega.hover-active .mega-dropdown {
  display: flex;
  animation: megaFadeIn 0.2s ease forwards;
}

@keyframes megaFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mega-sidebar {
  width: 280px;
  background: #f8f9fc;
  border-right: 1px solid var(--border);
  flex-shrink: 0;
}

.mega-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 16px 0;
}

.mega-group-item {
  display: flex;
  align-items: center;
  padding: 12px 24px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-primary);
  font-size: 14px;
  position: relative;
}

.mega-group-item:hover,
.mega-group-item.active {
  background: white;
  font-weight: 600;
  color: var(--accent);
}

.mega-group-item.active::after {
  content: '';
  position: absolute;
  right: -1px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
  z-index: 2;
}

.mega-group-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  margin-right: 12px;
}

.mega-group-caret {
  margin-left: auto;
  opacity: 0.4;
}

.mega-content {
  flex: 1;
  padding: 32px;
  background: white;
  min-height: auto;
  max-height: 80vh;
  overflow-y: auto;
}

.mega-group-content {
  display: none;
}

.mega-group-content.active {
  display: block;
  animation: megaFadeIn 0.3s ease forwards;
}

.mega-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.mega-grid-item {
  text-decoration: none;
  color: var(--text-primary);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s;
}

.mega-grid-item:hover {
  transform: translateY(-4px);
}

.mega-grid-item:hover .mega-item-title {
  color: var(--accent);
}

.mega-img-wrap {
  width: 150px;
  height: 150px;
  max-width: 100%;
  aspect-ratio: 1;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  border: 1px solid var(--border);
  padding: 16px;
}

.mega-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mega-no-img {
  color: #ccc;
  font-size: 13px;
  text-transform: uppercase;
}

.mega-item-title {
  font-size: 14px;
  line-height: 1.4;
  transition: color 0.2s;
  font-weight: 500;
}

/* --- MOBILE MEGA MENU (HAMBURGER) --- */
.mobile-menu-toggle {
  display: none;
}

.mobile-menu-overlay {
  display: none;
}

.mobile-menu-header {
  display: none;
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #ffffff;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-right: 12px;
    border-radius: 8px;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
  }

  .mobile-menu-overlay.active {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
  }

  .mega-nav {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100vh;
    background: white;
    z-index: 9999;
    transition: left 0.3s ease;
    flex-direction: column;
    align-items: stretch;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
  }

  .mega-nav.mobile-open {
    left: 0;
  }

  .mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
  }

  .mobile-menu-title {
    font-weight: 700;
    font-size: 18px;
  }

  .mobile-menu-close {
    background: var(--border);
    color: var(--text-primary);
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
  }

  .header-inner {
    justify-content: space-between;
  }

  .mega-list {
    flex-direction: column;
    margin: 0;
    padding: 0;
    gap: 0;
    overflow-y: auto;
    flex: 1;
  }

  .mega-item {
    padding: 0;
    border-bottom: 1px solid var(--border);
  }

  .mega-link {
    padding: 16px 20px;
    font-size: 16px;
    justify-content: space-between;
    width: 100%;
  }

  .mega-dropdown {
    position: static;
    display: none !important;
    box-shadow: none;
    border: none;
    border-radius: 0;
    background: #f8fafc;
    flex-direction: column;
    animation: none;
  }

  .mega-item.mobile-expanded .mega-dropdown {
    display: flex !important;
  }

  .mega-dropdown .mega-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .mega-dropdown .mega-sidebar ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px;
  }

  .mega-dropdown .mega-group-item {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: white;
    flex: 1 1 auto;
    text-align: center;
    justify-content: center;
  }

  .mega-dropdown .mega-group-caret {
    display: none;
  }

  .mega-dropdown .mega-group-item.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
  }

  .mega-content {
    min-height: auto;
    padding: 16px;
  }

  .mega-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}