/* ======== CSS Variables ======== */
:root {
  --es-primary: #1e3c72;
  --es-secondary: #2a5298; /* Mavi renk kodu */
  --es-accent: #ff6b35;
  --es-bg: #f8fafc;
  --es-card: #fff;
  --es-muted: #6b7280;
  --es-kamp: #2a5298; /* Kamp için mavi renk */
  --es-ant: #16a34a; /* Antrenman için yeşil renk */
  --es-genel: #9333ea; /* Genel kategori için mor renk */
}

/* ======== Base Styles ======== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #0f172a;
  background: var(--es-bg);
}

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

/* ======== Header Styles ======== */
header {
  background: linear-gradient(135deg, var(--es-primary), var(--es-secondary));
  color: white;
  padding: 1rem 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 2rem;
  font-weight: bold;
  color: #fff;
  text-decoration: none;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  color: white;
  text-decoration: none;
  transition: color 0.3s;
  font-weight: 500;
}

.nav-links a:hover {
  color: #ffd700;
}

.mobile-menu {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

/* ======== Products Page Styles ======== */
.es-main {
  padding: 100px 0 40px;
  min-height: 100vh;
}

.es-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Controls */
.es-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 6px 0 14px;
}

.es-filter-section {
  background: #fff;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.es-filter-title {
  margin: 0 0 12px 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--es-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.es-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.es-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1.5px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.3s;
  font-size: 0.9rem;
}

.es-badge.active {
  background: linear-gradient(135deg, #e8f0ff, #eef7ff);
  border-color: #c7dbff;
  color: #0f172a;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.2);
}

.es-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}

.es-tab {
  padding: 10px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  cursor: pointer;
  font-weight: 800;
  transition: all 0.3s;
  font-size: 0.9rem;
}

.es-tab.active {
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-color: transparent;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.es-seg {
  display: inline-flex;
  border: 1.5px solid #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.es-seg button {
  padding: 10px 14px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-weight: 800;
  transition: all 0.3s;
  font-size: 0.9rem;
}

/* Input ve Select Stilleri */
.es-input, .es-select {
  padding: 10px 12px;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  font-weight: 600;
  transition: all 0.3s;
  outline: none;
  font-size: 0.9rem;
}

.es-input:focus, .es-select:focus {
  border-color: var(--es-primary);
  box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
}

.es-input::placeholder {
  color: #9ca3af;
  font-weight: 500;
}

/* Filtre Butonları - Aktif Durumlar */
.es-seg button.active {
  background-color: var(--es-secondary);
  color: white;
}

.es-seg button.active[data-val="Kamp"] {
  background-color: var(--es-kamp);
  color: white;
}

.es-seg button.active[data-val="Antrenman"] {
  background-color: var(--es-ant);
  color: white;
}

.es-seg button.active[data-val="Hepsi"] {
  background-color: #fff3e6;
  color: #9a3412;
}

.es-seg button.active[data-val="Genel"] {
  background-color: var(--es-genel);
  color: white;
}

/* ======== Product Grid ======== */
.es-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.es-card {
  background: var(--es-card);
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.06);
  display: flex;
  flex-direction: column;
  transition: all 0.3s;
  opacity: 0;
}

.es-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.12);
}

.es-media {
  position: relative;
  height: 220px;
  background: #fff;
  border: 2px solid #eef7ff;
  border-radius: 18px 18px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.es-media picture,
.es-media img {
  width: 100%;
  height: 100%;
  display: block;
}

.es-media img {
  object-fit: contain;
  transition: transform 0.3s ease;
}

.es-card:hover .es-media img {
  transform: scale(1.05);
}

.es-brandchip {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 900;
  font-size: 0.8rem;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.es-usage {
  position: absolute;
  top: 10px;
  right: 10px;
  color: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 900;
  font-size: 0.8rem;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* ======== Ürün Kartlarındaki Etiketler ======== */
.es-usage.kamp {
  background-color: var(--es-kamp);
}

.es-usage.ant {
  background-color: var(--es-ant);
}

.es-usage.genel {
  background-color: var(--es-genel);
}

.es-content {
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.es-name {
  font-weight: 900;
  margin-bottom: 4px;
  font-size: 1rem;
  line-height: 1.3;
  color: #1e293b;
}

.es-code {
  font-family: ui-monospace, Consolas, monospace;
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 8px;
  display: inline-block;
  font-size: 0.8rem;
  margin-bottom: 8px;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.es-feat {
  margin: 10px 0 12px;
  padding-left: 18px;
  color: #334155;
  flex-grow: 1;
}

.es-feat li {
  margin: 4px 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

.es-price {
  font-weight: 900;
  color: var(--es-accent);
  margin-top: auto;
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.es-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.es-btn {
  flex: 1;
  padding: 11px 12px;
  border: none;
  border-radius: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.9rem;
  text-align: center;
}

.es-btn.primary {
  background: linear-gradient(135deg, var(--es-primary), var(--es-secondary));
  color: #fff;
}

.es-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.3);
}

.es-btn.ghost {
  background: #fff;
  border: 1.5px solid #e5e7eb;
  color: #334155;
}

.es-btn.ghost:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

/* ======== Modal Styles ======== */
.es-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 50;
  backdrop-filter: blur(4px);
}

.es-modal {
  background: #fff;
  border-radius: 18px;
  max-width: 920px;
  width: 100%;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.es-m-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
}

.es-m-bd {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 20px;
}

.es-m-ft {
  padding: 16px 20px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  background: #f8fafc;
}

.es-x {
  background: transparent;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #64748b;
  padding: 5px;
  border-radius: 6px;
  transition: all 0.3s;
  line-height: 1;
}

.es-x:hover {
  background: #e2e8f0;
  color: #334155;
  transform: rotate(90deg);
}

.es-gallery {
  position: relative;
  height: 360px;
  background: #fff;
  border: 2px solid #f8fafc;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.es-gallery img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.es-gallery:hover img {
  transform: scale(1.05);
}

.es-thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.es-thumbs img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  background: #fff;
  transition: all 0.3s;
}

.es-thumbs img:hover {
  border-color: var(--es-primary);
  transform: scale(1.1);
}

/* ======== Hero Section ======== */
.hero {
  position: relative;
  color: white;
  padding: 150px 0 100px;
  text-align: center;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, rgba(30, 60, 114, 0.85), rgba(42, 82, 152, 0.85)),
              url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><defs><pattern id="sports" patternUnits="userSpaceOnUse" width="100" height="100"><circle fill="%23ffffff" opacity="0.1" cx="50" cy="50" r="25"/><rect fill="%23ffffff" opacity="0.05" x="20" y="20" width="60" height="10" rx="5"/></pattern></defs><rect fill="%231e3c72" width="1200" height="600"/><rect fill="url(%23sports)" width="1200" height="600"/></svg>');
  background-size: cover;
  background-attachment: fixed;
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  animation: slideInUp 1s ease-out;
}

.hero-content p {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  animation: slideInUp 1s ease-out 0.2s both;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin: 3rem 0;
  animation: slideInUp 1s ease-out 0.4s both;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: bold;
  color: #ffd700;
  display: block;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.8;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  animation: slideInUp 1s ease-out 0.6s both;
}

.cta-button {
  display: inline-block;
  background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
  color: white;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: bold;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.cta-button.secondary {
  background: transparent;
  border: 2px solid #fff;
  box-shadow: none;
}

.cta-button.secondary:hover {
  background: #fff;
  color: #1e3c72;
}

/* ======== Footer ======== */
footer {
  background: #1e3c72;
  color: white;
  padding: 2rem 0 1rem;
  margin-top: 50px;
}

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

.footer-section h3 {
  margin-bottom: 1rem;
  color: #ffd700;
}

.footer-section p,
.footer-section li {
  margin-bottom: 0.5rem;
  opacity: 0.9;
}

.footer-section ul {
  list-style: none;
}

.footer-section a {
  color: white;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-section a:hover {
  color: #ffd700;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1rem;
  text-align: center;
  opacity: 0.7;
}

/* ======== Animations ======== */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ======== Loading States ======== */
.loading {
  opacity: 0;
  animation: fadeIn 0.6s ease-out forwards;
}

.es-card:not(.loading) {
  opacity: 1;
  animation: slideInUp 0.6s ease-out forwards;
}

/* ======== Error States ======== */
.error-message {
  padding: 30px;
  background: linear-gradient(135deg, #fef2f2, #fdf2f8);
  border: 1px solid #fecaca;
  border-radius: 18px;
  color: #dc2626;
  text-align: center;
  margin: 20px 0;
  grid-column: 1/-1;
}

.error-message h3 {
  margin-bottom: 10px;
  color: #991b1b;
}

.error-message p {
  margin-bottom: 8px;
}

/* ======== Responsive Design ======== */
@media (max-width: 1024px) {
  .hero-content h1 {
    font-size: 3rem;
  }
  
  .es-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .mobile-menu {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(30, 60, 114, 0.95);
    flex-direction: column;
    padding: 1rem;
    backdrop-filter: blur(10px);
  }

  .nav-links.active {
    display: flex;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1rem;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .es-grid {
    grid-template-columns: 1fr;
  }

  .es-m-bd {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .es-input {
    min-width: 200px;
  }

  .es-select {
    min-width: 180px;
  }

  .es-row {
    justify-content: center;
  }

  .es-controls .es-row:last-child {
    flex-direction: column;
    gap: 12px;
  }
  
  .es-badge, .es-tab, .es-seg button {
    font-size: 0.8rem;
    padding: 8px 12px;
  }
}

@media (max-width: 480px) {
  .es-wrap {
    padding: 15px;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .es-card {
    margin: 0 auto;
    max-width: 300px;
  }

  .es-input, .es-select {
    width: 100%;
    min-width: auto;
  }
  
  .es-modal {
    margin: 10px;
    max-height: 95vh;
  }
  
  .es-gallery {
    height: 250px;
  }
}

/* ======== Utility Classes ======== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }

/* ======== Smooth Scrolling ======== */
html {
  scroll-behavior: smooth;
}

/* ======== Focus States ======== */
*:focus {
  outline: 2px solid var(--es-primary);
  outline-offset: 2px;
}

button:focus,
.es-btn:focus {
  outline: 2px solid var(--es-accent);
}

/* ======== Print Styles ======== */
@media print {
  .es-backdrop,
  .mobile-menu,
  .es-controls {
    display: none !important;
  }
  
  .es-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
}

/* ======== Performance Optimizations ======== */
.es-media img,
.es-gallery img,
.es-thumbs img {
  will-change: transform;
}

.es-card {
  contain: layout;
}

.es-modal {
  contain: layout style;
}

/* Dark mode hazırlığı (gelecekte kullanılabilir) */
@media (prefers-color-scheme: dark) {
  /* Dark mode stilleri burada tanımlanabilir */
}