/* Tasarım Sistemi Değişkenleri (Karanlık Mod Varsayılan) */
:root {
  --bg-color: #121212;
  --bg-secondary: #1A1A1A;
  --text-color: #F5F5F5;
  --text-muted: #9CA3AF;
  --brand-red: #D32F2F;
  --brand-red-hover: #B71C1C;
  --border-color: #333333;
}

/* Aydınlık Mod Değişkenleri */
body.light-mode {
  --bg-color: #F9FAFB;
  --bg-secondary: #FFFFFF;
  --text-color: #111827;
  --text-muted: #4B5563;
  --brand-red: #E53935;
  --brand-red-hover: #C62828;
  --border-color: #E5E7EB;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', sans-serif; 
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.4s ease, color 0.4s ease;
  line-height: 1.6;
}

/* --- ORTAK SINIFLAR --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 5%; }
.text-center { text-align: center; }
.text-red { color: var(--brand-red); }
.text-muted { color: var(--text-muted); }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.rounded-img { border-radius: 4px; width: 100%; height: auto; display: block; }
.max-width-md { max-width: 600px; }

/* --- HEADER VE MENÜ --- */
header { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 5%; background-color: var(--bg-secondary); border-bottom: 1px solid var(--border-color); position: relative; z-index: 1000; }
header ul { list-style: none; display: flex; gap: 2rem; }
header a { color: var(--text-color); text-decoration: none; font-size: 0.95rem; font-weight: 500; transition: color 0.3s ease; }
header a:hover { color: var(--brand-red); }

/* --- BUTONLAR VE TEMA BUTONU --- */
button, .btn-primary, .btn-secondary { cursor: pointer; font-family: inherit; font-weight: 600; font-size: 0.95rem; display: inline-flex; align-items: center; justify-content: center; padding: 1rem 2.5rem; border-radius: 4px; transition: all 0.3s ease; text-decoration: none; }
.btn-primary { background-color: var(--brand-red); color: #fff; border: none; }
.btn-primary:hover { background-color: var(--brand-red-hover); transform: translateY(-2px); }
.btn-secondary { background-color: transparent; color: var(--text-color); border: 1px solid var(--text-color); margin-left: 1rem; }
.btn-secondary:hover { background-color: var(--text-color); color: var(--bg-color); }

.theme-toggle-btn { background-color: transparent; border: none; color: var(--text-color); width: 40px; height: 40px; padding: 0; display: flex; align-items: center; justify-content: center; }
.theme-toggle-btn:hover { color: var(--brand-red); transform: scale(1.1); }

/* --- HERO (ANA SAYFA) VE İÇ SAYFA BAŞLIKLARI --- */
.hero-section { min-height: 80vh; display: flex; align-items: center; padding: 0 5%; position: relative; overflow: hidden; }
.split-layout { display: flex; justify-content: space-between; align-items: center; width: 100%; gap: 3rem; }
.content-left { flex: 1; z-index: 10; }
.content-left span { font-size: 0.85rem; letter-spacing: 2px; margin-bottom: 1rem; display: block; color: var(--brand-red); }
.content-left h1 { font-size: 3.5rem; line-height: 1.1; margin-bottom: 1.5rem; }
.content-right { flex: 1; position: relative; display: flex; justify-content: center; }
.hero-image { max-width: 100%; height: auto; z-index: 2; animation: float 6s ease-in-out infinite; }
.glow-effect-red { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 400px; height: 400px; background-color: var(--brand-red); filter: blur(120px); opacity: 0.25; z-index: 1; border-radius: 50%; }

@keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-15px); } 100% { transform: translateY(0px); } }

.page-header { padding: 5rem 0 3rem; background-color: var(--bg-secondary); border-bottom: 1px solid var(--border-color); margin-bottom: 3rem; }
.page-header h1 { font-size: 3rem; margin-bottom: 1rem; }
.page-header p { font-size: 1.1rem; }

/* --- ÜRÜNLER GRID --- */
.grid-layout-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2.5rem; }
.product-card { background-color: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 4px; overflow: hidden; transition: all 0.3s ease; }
.product-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.4); }
.card-image-wrapper { overflow: hidden; }
.card-image-wrapper img { 
    width: 100%; 
    height: 250px;       /* Tüm ürün görsellerini standart bir yüksekliğe sabitler */
    max-height: 250px;   /* Maksimum sınırı belirler */
    object-fit: cover;   /* Görselin en-boy oranını bozmadan belirlenen alanı tam doldurmasını sağlar (kırpma yapabilir) */
    display: block; 
    transition: transform 0.5s ease; 
}
.product-card:hover .card-image-wrapper img { transform: scale(1.05); }
.card-body { padding: 2rem; }
.card-body h3 { font-size: 1.4rem; margin-bottom: 1rem; color: var(--text-color); }
.btn-text { color: var(--brand-red); text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 0.5rem; transition: color 0.3s ease; }

/* --- ZAMAN ÇİZELGESİ (TIMELINE) --- */
.timeline-section { padding: 4rem 0; }
.timeline { position: relative; max-width: 800px; margin: 0 auto; }
.timeline::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: var(--border-color); transform: translateX(-50%); }
.timeline-item { position: relative; margin-bottom: 3rem; width: 50%; padding: 0 40px; }
.timeline-item:nth-child(odd) { left: 0; text-align: right; }
.timeline-item:nth-child(even) { left: 50%; text-align: left; }
.timeline-dot { position: absolute; top: 0; width: 16px; height: 16px; background: var(--brand-red); border: 4px solid var(--bg-color); border-radius: 50%; z-index: 5; }
.timeline-item:nth-child(odd) .timeline-dot { right: -8px; }
.timeline-item:nth-child(even) .timeline-dot { left: -8px; }
.timeline-content h3 { color: var(--brand-red); font-size: 1.3rem; margin-bottom: 0.5rem; }

/* --- REFERANSLAR --- */
.logo-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 2rem; padding-bottom: 3rem; }
.logo-item { width: 180px; background: var(--bg-secondary); border: 1px solid var(--border-color); padding: 2rem; display: flex; justify-content: center; transition: all 0.3s ease; border-radius: 4px; }
.logo-item img { max-width: 100%; filter: grayscale(1); transition: all 0.3s ease; opacity: 0.6; }
.logo-item:hover { border-color: var(--brand-red); }
.logo-item:hover img { filter: grayscale(0); opacity: 1; }

.testimonials-section { padding: 5rem 0; background: var(--bg-secondary); border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); }
.testimonial-card { background: var(--bg-color); padding: 2.5rem; border: 1px solid var(--border-color); border-radius: 4px; }
.quote { font-style: italic; font-size: 1rem; margin-bottom: 1.5rem; color: var(--text-color); }
.author strong { color: var(--brand-red); display: block; font-size: 1.1rem; }

/* --- İLETİŞİM FORMU --- */
.contact-section { padding: 3rem 0 5rem; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; }
.form-group { margin-bottom: 1.5rem; }
.form-group input, .form-group textarea { width: 100%; padding: 1rem; background: var(--bg-secondary); border: 1px solid var(--border-color); color: var(--text-color); border-radius: 4px; outline: none; transition: border-color 0.3s ease; font-family: inherit; font-size: 1rem; }
.form-group input:focus, .form-group textarea:focus { border-color: var(--brand-red); }
.info-item { margin-bottom: 2rem; }
.info-item strong { color: var(--brand-red); display: block; font-size: 1.1rem; margin-bottom: 0.5rem; }

/* --- FOOTER --- */
.site-footer { background-color: #0A0A0A; border-top: 1px solid var(--border-color); padding: 5rem 0 0; margin-top: 18rem; }
body.light-mode .site-footer { background-color: var(--bg-secondary); }
.footer-container { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; max-width: 1200px; margin: 0 auto; padding: 0 5% 3rem; }
.footer-col h3 { color: var(--text-color); margin-bottom: 1.5rem; font-size: 1.2rem; }
.footer-col p, .footer-col li { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 0.8rem; }
.footer-col ul { list-style: none; }
.footer-col a { color: var(--text-muted); text-decoration: none; transition: color 0.3s ease; }
.footer-col a:hover { color: var(--brand-red); }
.footer-bottom { text-align: center; padding: 1.5rem; border-top: 1px solid var(--border-color); font-size: 0.85rem; color: var(--text-muted); }

/* ==============================================================
   LOGO VE İKON GÖSTERİM KONTROLLERİ (GARANTİLİ)
   ============================================================== */
body:not(.light-mode) .logo-light { display: none !important; }
body:not(.light-mode) .moon-icon { display: none !important; }
body:not(.light-mode) .sun-icon { display: block !important; }

body.light-mode .logo-dark { display: none !important; }
body.light-mode .sun-icon { display: none !important; }
body.light-mode .moon-icon { display: block !important; }

/* ==============================================================
   GARANTİLİ HAMBURGER MENÜ VE AKTİF SAYFA STİLLERİ
   ============================================================== */

/* 1. Aktif Sayfa İşaretçisi */
header a.active {
  color: var(--brand-red) !important;
}

/* 2. Masaüstü Görünüm: Hamburger Gizli */
.actions { display: flex; align-items: center; gap: 1rem; }
.hamburger-btn {
  background: transparent !important; border: none !important; color: var(--text-color);
  cursor: pointer; width: 44px; height: 44px;
  display: none !important; 
  align-items: center; justify-content: center; padding: 0;
}
.hamburger-btn svg { width: 28px; height: 28px; display: block; }

/* ==============================================================
   1. NAVBAR DROPDOWN (AÇILIR MENÜ) STİLLERİ
   ============================================================== */
header ul li.dropdown {
    position: relative;
}

header ul li.dropdown .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    min-width: 220px;
    padding: 0; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    flex-direction: column;
    gap: 0; 
    z-index: 1100;
    border-radius: 4px;
}

header ul li.dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 15px; 
    background: transparent;
}

header ul li.dropdown:hover .dropdown-menu { display: flex; }
header ul li.dropdown .dropdown-menu li { width: 100%; margin: 0; }

header ul li.dropdown .dropdown-menu a {
    display: block;
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

header ul li.dropdown .dropdown-menu a:hover {
    background-color: var(--bg-color);
    color: var(--brand-red);
    padding-left: 1.8rem; 
}

/* ==============================================================
   2. KURUMSAL İÇ SAYFA ALT MENÜSÜ (SUBMENU)
   ============================================================== */
.page-submenu {
    display: flex;
    justify-content: center;
    gap: 0.9rem;
    margin-top: -2rem; 
    margin-bottom: 4rem;
    position: relative;
    z-index: 20;
}

.page-submenu a {
    padding: 0.9rem 1.8rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.page-submenu a:hover { border-color: var(--brand-red); color: var(--brand-red); transform: translateY(-3px); }
.page-submenu a.active { background-color: var(--brand-red); color: #FFFFFF !important; border-color: var(--brand-red); box-shadow: 0 6px 15px rgba(211, 47, 47, 0.3); }

/* ==============================================================
   KATALOG: SOL MENÜ + SAĞ ÜRÜN IZGARASI (TEMA UYUMLU)
   ============================================================== */
.catalog-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.sidebar-menu {
    width: 280px;
    flex-shrink: 0;
    background: var(--bg-secondary); /* Tema rengine bağlandı */
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid var(--border-color); /* Tema rengine bağlandı */
}

.sidebar-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--brand-red);
    color: var(--text-color);
}

.category-list, .subcategory-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list > li {
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.2s ease;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.category-list > li:hover {
    background-color: var(--border-color);
    color: var(--brand-red);
}

.category-list > li.active {
    background-color: var(--brand-red);
    color: white;
}

.subcategory-list {
    margin-bottom: 0.5rem;
}

.subcategory-list > li {
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-muted); /* Tema rengine bağlandı */
    transition: all 0.2s ease;
    position: relative;
}

.subcategory-list > li::before {
    content: '';
    position: absolute;
    left: 1.2rem;
    top: -10px;
    width: 10px;
    height: calc(100% + 10px);
    border-left: 2px solid var(--border-color); /* Tema rengine bağlandı */
    border-bottom: 2px solid var(--border-color);
    border-bottom-left-radius: 4px;
    transform: translateY(-50%);
}

.subcategory-list > li:hover { color: var(--brand-red); }
.subcategory-list > li.active { color: var(--brand-red); font-weight: 700; }


.subcategory-list.sub-level-2 > li { padding-left: 3.5rem; }
.subcategory-list.sub-level-2 > li::before { left: 2.2rem; }

.products-area { flex-grow: 1; }

@media (max-width: 768px) {
    .split-layout, .contact-grid, .footer-container { grid-template-columns: 1fr; flex-direction: column; text-align: center; }
    .content-left h1 { font-size: 2.5rem; }
    .btn-secondary { margin-left: 0; margin-top: 1rem; }
    .timeline::before { left: 0; }
    .timeline-item { width: 100%; text-align: left !important; padding-left: 35px; }
    .timeline-item:nth-child(even) { left: 0; }
    .timeline-item:nth-child(odd) .timeline-dot, .timeline-item:nth-child(even) .timeline-dot { left: -6px; }
    .info-item { text-align: left; }
    
    .hamburger-btn { display: flex !important; }
    header nav:not(.nav-open) ul { display: none !important; }
  
    #main-nav {
        position: absolute; top: 100%; left: 0; width: 100%;
        background-color: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 10px 20px rgba(0,0,0,0.5);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s ease-in-out;
    }

    #main-nav.nav-open { clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%); }
    #main-nav.nav-open ul { display: flex !important; flex-direction: column; padding: 2rem 5%; gap: 1.5rem; text-align: center; }

    header ul li.dropdown .dropdown-menu {
        position: static; display: block; background: transparent; border: none; box-shadow: none; padding-left: 1.5rem; margin-top: 0;
    }
    header ul li.dropdown > a::after { display: none; }
    
    .page-submenu { flex-direction: column; margin-top: 1rem; padding: 0 5%; }
    .page-submenu a { text-align: center; }

    /* Katalog Mobilde Alt Alta Gelmesi */
    .catalog-layout { flex-direction: column; }
    .sidebar-menu { width: 100%; }
}

.dynamic-cat-item {
    position: relative;
    padding: 0.6rem 1rem;
    cursor: pointer;
    font-size: 0.95rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    margin-bottom: 0.2rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
}

.dynamic-cat-item.depth-0 {
    font-weight: 600;
    margin-top: 0.5rem;
}

.dynamic-cat-item:hover {
    background-color: var(--border-color);
    color: var(--brand-red);
}

.dynamic-cat-item.active {
    background-color: var(--brand-red);
    color: white;
    font-weight: 700;
}

.l-arrow {
    position: absolute;
    top: 0;
    width: 12px;
    height: 55%;
    border-left: 2px solid var(--border-color);
    border-bottom: 2px solid var(--border-color);
    border-bottom-left-radius: 4px;
    pointer-events: none;
}

.dynamic-cat-item.active .l-arrow {
    border-color: rgba(255, 255, 255, 0.4);
}

/* ==============================================================
   ÜRÜN DETAY SAYFASI (GALERİ VE İÇERİK)
   ============================================================== */
.product-detail-layout {
    display: flex;
    gap: 4rem;
    align-items: flex-start;
    padding: 2rem 0 5rem;
}

.product-gallery {
    flex: 1;
    min-width: 0; /* Flexbox taşmasını önler */
}

.main-image-container {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.main-image-container img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.thumbnail-list {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.thumbnail-item {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    overflow: hidden;
    flex-shrink: 0;
    transition: all 0.2s ease;
    background-color: var(--bg-secondary);
}

.thumbnail-item:hover {
    border-color: var(--text-muted);
}

.thumbnail-item.active {
    border-color: var(--brand-red);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    flex: 1;
}

.product-category-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background-color: rgba(211, 47, 47, 0.1);
    color: var(--brand-red);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.product-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    line-height: 1.2;
}

.product-code {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-family: monospace;
}

.product-description {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    color: var(--text-color);
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.product-technical-detail {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-muted);
    white-space: pre-wrap;
}

@media (max-width: 768px) {
    .product-detail-layout {
        flex-direction: column;
        gap: 2rem;
    }
}


header .logo-area img,
.footer-col img[class*="logo-"] {
    max-width: 250px;    /* Logonun alabileceği maksimum genişlik */
    max-height: 80px;    /* Logonun alabileceği maksimum yükseklik */
    object-fit: contain; /* Logonun esnemeden, kendi oranıyla alana sığmasını sağlar */
    width: 100%;         /* Küçük ekranlarda daralabilmesi için */
}