/* ==========================================================================
   1. GENEL AYARLAR VE SIFIRLAMA (RESET)
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: #f4f6f9;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* ==========================================================================
   2. HEADER & NAVİGASYON (ÜST MENÜ)
   ========================================================================== */
.site-header {
    background-color: #11141a;
    color: #fff;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 9999; /* Banner ve içeriklerin kesinlikle üstünde kalmalı */
    border-bottom: 1px solid #232833;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo-text { 
    font-size: 24px; 
    font-weight: 800; 
    color: #fff; 
    letter-spacing: 1px; 
}

.red-text { 
    color: #d9232a; 
}

.main-nav ul {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.main-nav ul li {
    position: relative; /* Açılır menünün hizalanması için şart */
}

.main-nav ul li a {
    font-weight: 500;
    font-size: 14px;
    color: #cbd5e1;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.main-nav ul li a:hover {
    color: #d9232a;
}

/* 🚨 DROPDOWN (AÇILIR MENÜ) JİLET GİBİ DÜZELTME TASARIMI */
.main-nav ul li.dropdown .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: #1a1f29; /* Siyah kurumsal arka plan (Okunabilirlik için) */
    width: 200px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    border-radius: 6px;
    padding: 8px 0;
    border: 1px solid #2e3545;
    display: flex;
    flex-direction: column; /* Linkleri alt alta dizer */
    gap: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10000;
}

/* Üzerine gelince yumuşakça açılsın */
.main-nav ul li.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu li {
    width: 100%;
}

.dropdown-menu li a {
    color: #cbd5e1 !important;
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 12px 20px !important;
    font-size: 13px;
    font-weight: 400;
    width: 100%;
    box-sizing: border-box;
    border-bottom: 1px solid #232833;
    transition: all 0.2s ease;
}

.dropdown-menu li:last-child a {
    border-bottom: none;
}

.dropdown-menu li a:hover {
    background-color: #d9232a !important;
    color: #ffffff !important;
    padding-left: 25px !important;
}

/* Header Sağ Taraf İşlemleri */
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.auth-btn {
    background-color: #d9232a;
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 13px;
}

.auth-btn:hover {
    background-color: #b11b21;
}

.user-menu-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #232833;
    padding: 8px 16px;
    border-radius: 30px;
    border: 1px solid #374151;
}

.welcome-txt {
    font-size: 13px;
    color: #f3f4f6;
}

.admin-panel-btn {
    background: #2563eb;
    color: #fff;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.admin-panel-btn:hover {
    background: #1d4ed8;
}

.logout-btn {
    color: #9ca3af;
    font-size: 16px;
    margin-left: 5px;
}

.logout-btn:hover {
    color: #ef4444;
}

/* ==========================================================================
   3. ANA SAYFA HERO BANNER (HIKVISION ESİNTİLİ)
   ========================================================================== */
.hero-banner {
    position: relative;
    background: linear-gradient(rgba(17, 20, 26, 0.85), rgba(17, 20, 26, 0.85)), url('https://placehold.co/1920x600/222/fff?text=EGS+SECURITY+SYSTEMS') no-repeat center center/cover;
    color: white;
    padding: 120px 20px; /* Üst boşluğu artırarak header ile mesafeyi koruduk */
    text-align: center;
    z-index: 1;
}

.hero-content {
    max-width: 800px; 
    margin: 0 auto;
}

.hero-content h2 { 
    font-size: 42px; 
    font-weight: 700; 
    margin-bottom: 20px; 
    color: #fff; 
}

.red-highlight { 
    color: #d9232a; 
}

.hero-content p { 
    font-size: 18px; 
    color: #d1d5db; 
    margin-bottom: 30px; 
    line-height: 1.6; 
}

.hero-buttons { 
    display: flex; 
    gap: 15px; 
    justify-content: center; 
}

.hero-btn { 
    background-color: #d9232a; 
    color: white; 
    padding: 12px 30px; 
    border-radius: 4px; 
    font-weight: 600; 
    font-size: 16px; 
    display: inline-block; 
}

.hero-btn:hover { 
    background-color: #b11b21; 
    transform: translateY(-2px); 
}

.hero-btn.secondary { 
    background-color: transparent; 
    border: 2px solid #fff; 
}

.hero-btn.secondary:hover { 
    background: #fff; 
    color: #11141a; 
}

/* ==========================================================================
   4. BİZİ TANIYIN & HİZMET BÖLÜMLERİ
   ========================================================================== */
.intro-section { 
    padding: 60px 0; 
    background: #fff; 
}

.intro-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 40px; 
    align-items: center; 
}

.section-subtitle { 
    color: #d9232a; 
    font-weight: 700; 
    font-size: 13px; 
    letter-spacing: 2px; 
}

.intro-text h2 { 
    font-size: 30px; 
    margin-top: 10px; 
    color: #11141a; 
}

.intro-text p { 
    color: #555; 
    margin-top: 15px; 
}

.intro-features { 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
}

.feat-box { 
    background: #f8f9fa; 
    padding: 15px; 
    border-radius: 6px; 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    border-left: 4px solid #d9232a; 
}

.feat-box i { 
    font-size: 20px; 
    color: #d9232a; 
}

.feat-box h4 { 
    font-weight: 600; 
    color: #11141a; 
}

/* Hizmet Kartları Alanı */
.services-section { 
    padding: 60px 0; 
    background: #f4f6f9; 
}

.services-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
    gap: 30px; 
    margin-top: 30px; 
}

.service-card { 
    background: #fff; 
    padding: 30px; 
    border-radius: 8px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.03); 
    transition: 0.3s; 
}

.service-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 10px 20px rgba(0,0,0,0.08); 
}

.s-icon { 
    width: 50px; 
    height: 50px; 
    background: #fee2e2; 
    color: #d9232a; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 20px; 
    margin-bottom: 20px; 
}

.service-card h3 { 
    font-size: 19px; 
    color: #11141a; 
    margin-bottom: 12px; 
}

.service-card p { 
    color: #666; 
    font-size: 14px; 
    line-height: 1.6; 
}

/* ==========================================================================
   5. DONANIM VE ÜRÜN VİTRİNİ
   ========================================================================== */
.products-section {
    padding: 60px 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.product-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 12px 25px rgba(0,0,0,0.1); 
}

.product-img img { 
    width: 100%; 
    height: 220px; 
    object-fit: cover; 
    border-bottom: 1px solid #f0f0f0; 
}

.product-info { 
    padding: 20px; 
    display: flex; 
    flex-direction: column; 
    flex-grow: 1; 
}

.product-info h3 { 
    font-size: 18px; 
    color: #11141a; 
    margin-bottom: 10px; 
    font-weight: 600; 
}

.product-info .description { 
    font-size: 13px; 
    color: #6b7280; 
    margin-bottom: 15px; 
    line-height: 1.5; 
}

.price-row { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-top: auto; 
    margin-bottom: 15px; 
}

.price { 
    font-size: 18px; 
    font-weight: 700; 
    color: #d9232a; 
}

.stok { 
    font-size: 12px; 
    font-weight: 600; 
    padding: 2px 8px; 
    border-radius: 12px; 
}

.in-stock { 
    background-color: #ecfdf5; 
    color: #059669; 
}

.product-actions { 
    display: flex; 
    gap: 10px; 
    align-items: center; 
}

.add-to-cart-btn { 
    width: 100%; 
    background-color: #11141a; 
    color: white; 
    border: none; 
    padding: 11px; 
    border-radius: 4px; 
    font-weight: 600; 
    font-size: 14px; 
    cursor: pointer; 
    transition: background 0.3s; 
}

.add-to-cart-btn:hover { 
    background-color: #d9232a; 
}

/* ==========================================================================
   6. İÇERİK ALANI (SÖZLEŞMELER VE DİĞER SAYFALAR)
   ========================================================================== */
.content-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    min-height: 65vh;
}

.page-header {
    text-align: center;
    margin-bottom: 50px;
}

.page-header h1 {
    font-size: 32px;
    color: #11141a;
    font-weight: 700;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.page-header h1::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 4px;
    background-color: #d9232a;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.page-header p {
    color: #6b7280;
    margin-top: 15px;
    font-size: 16px;
}

.vision-mission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.card {
    background: #ffffff;
    padding: 40px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    text-align: center;
    border-top: 4px solid #d9232a;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card-icon {
    font-size: 48px;
    color: #d9232a;
    margin-bottom: 20px;
}

.card h2 {
    margin-bottom: 15px;
    color: #11141a;
    font-size: 22px;
}

.card p {
    color: #4b5563;
    font-size: 14px;
    line-height: 1.7;
}

.legal-text {
    background: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.legal-text h3 {
    margin: 30px 0 12px 0;
    color: #11141a;
    font-size: 18px;
    border-left: 3px solid #d9232a;
    padding-left: 10px;
}

.legal-text p {
    line-height: 1.8;
    color: #4b5563;
    font-size: 15px;
    margin-bottom: 15px;
}

/* ==========================================================================
   7. GİRİŞ VE KAYIT SAYFALARI (AUTH)
   ========================================================================== */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}

.auth-card {
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 450px;
    border-top: 5px solid #d9232a;
}

.auth-card h2 {
    color: #11141a;
    font-size: 26px;
    margin-bottom: 8px;
    text-align: center;
}

.auth-card p {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 30px;
    text-align: center;
}

.auth-card .form-group {
    margin-bottom: 20px;
}

.auth-card .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 13px;
    color: #374151;
}

.auth-card .form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background-color: #f9fafb;
}

.auth-card .form-group input:focus {
    border-color: #d9232a;
    outline: none;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(217,35,42,0.15);
}

.btn-block {
    width: 100%;
    background-color: #d9232a;
    color: #fff;
    padding: 14px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.btn-block:hover {
    background-color: #b11b21;
}

.auth-footer {
    margin-top: 25px;
    text-align: center;
    font-size: 14px;
    color: #4b5563;
}

.auth-footer a {
    color: #d9232a;
    font-weight: 600;
}

/* ==========================================================================
   8. BİLDİRİM VE ALERT KUTULARI
   ========================================================================== */
.alert {
    padding: 14px 16px;
    border-radius: 6px;
    margin-bottom: 25px;
    font-size: 14px;
    font-weight: 500;
}

.alert-danger {
    background-color: #fef2f2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.alert-success {
    background-color: #f0fdf4;
    color: #166534;
    border-left: 4px solid #22c55e;
}

/* ==========================================================================
   9. FOOTER (ALT ALAN)
   ========================================================================== */
.site-footer {
    background-color: #11141a;
    color: #9ca3af;
    padding: 60px 0 20px 0;
    margin-top: 80px;
    border-top: 4px solid #d9232a;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 40px;
}

.footer-col h3 {
    color: #ffffff;
    margin-bottom: 25px;
    font-size: 18px;
    font-weight: 600;
}

.footer-col p {
    font-size: 14px;
    line-height: 1.8;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    font-size: 14px;
}

.footer-col ul li a:hover {
    color: #ffffff;
    padding-left: 5px;
}

.footer-col p i {
    color: #d9232a;
    margin-right: 10px;
    width: 16px;
}

.footer-bottom {
    text-align: center;
    margin-top: 50px;
    padding-top: 25px;
    border-top: 1px solid #1f2937;
    font-size: 13px;
    color: #6b7280;
}

/* ==========================================================================
   10. MOBİL RESPONSIVE AYARLARI
   ========================================================================== */
@media (max-width: 992px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    .main-nav ul li {
        padding: 5px 10px;
    }
    .intro-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 600px) {
    .main-nav ul {
        flex-direction: column;
    }
    .main-nav ul li {
        padding: 8px 0;
    }
    .header-right {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }
    .user-menu-wrapper {
        flex-direction: column;
        gap: 5px;
        border-radius: 10px;
    }
    .legal-text {
        padding: 20px;
    }
    .hero-content h2 {
        font-size: 28px;
    }
}