/* AGROLINE - MASTER STYLE DOSYASI (FINAL) */

/* --- 1. GENEL AYARLAR --- */
:root {
    --primary: #2ecc71;      /* Canlı Yeşil */
    --secondary: #27ae60;    /* Koyu Yeşil (Marka Rengi) */
    --dark: #2c3e50;         /* Koyu Lacivert/Gri */
    --light: #ecf0f1;        /* Açık Gri */
    --text: #333;            /* Metin Rengi */
    --bg: #f9f9f9;           /* Sayfa Arka Planı */
}

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

body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    color: var(--text); 
    line-height: 1.6; 
    background: var(--bg); 
    display: flex; 
    flex-direction: column; 
    min-height: 100vh; 
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* --- 2. HEADER & NAVİGASYON --- */
header { 
    background: #fff; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
}

.navbar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.8rem 20px; /* Logo için padding ayarlandı */
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

/* Logo Resmi */
.logo-img img {
    height: 50px; /* Logo yüksekliği sınırlandı */
    width: auto;
}

.nav-links { display: flex; gap: 25px; }
.nav-links a { 
    color: var(--dark); 
    font-weight: 600; 
    font-size: 0.95rem; 
    padding: 5px 0;
}
.nav-links a:hover, .nav-links a.active { 
    color: var(--primary); 
    border-bottom: 2px solid var(--primary);
}

.hamburger { 
    display: none; 
    cursor: pointer; 
    font-size: 1.5rem; 
    color: var(--dark);
}

/* --- 3. ORTAK BİLEŞENLER --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.page-header { 
    background: var(--secondary); 
    color: #fff; 
    padding: 40px 0; 
    text-align: center; 
    margin-bottom: 40px; 
}
.page-header h1 { margin: 0; font-size: 2.2rem; }
.page-header p { opacity: 0.9; margin-top: 5px; font-size: 1.1rem; }

.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: 2.2rem; color: var(--dark); margin-bottom: 10px; }
.line { width: 60px; height: 4px; background: var(--primary); margin: 0 auto; }

.btn { 
    display: inline-block; 
    padding: 12px 30px; 
    background: var(--primary); 
    color: #fff; 
    border-radius: 50px; 
    font-weight: bold; 
    text-transform: uppercase; 
    font-size: 0.9rem; 
    border: none; 
    cursor: pointer; 
}
.btn:hover { background: var(--secondary); transform: translateY(-2px); }

/* --- 4. SLIDER (MANŞET) --- */
.slider-container {
    width: 100%;
    height: 600px;
    overflow: hidden;
    position: relative;
    background: #2c3e50;
}

.slide {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex; align-items: center; justify-content: center; text-align: center;
}
.slide.active { opacity: 1; z-index: 1; }

.slide img {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    filter: brightness(0.5); /* Yazıların okunması için karartma */
}

.slide-content {
    position: relative; z-index: 2; color: #fff; padding: 20px;
    transform: translateY(20px); transition: transform 1s ease;
}
.slide.active .slide-content { transform: translateY(0); }

.slide-title { font-size: 3.5rem; font-weight: 800; margin-bottom: 20px; text-shadow: 2px 2px 10px rgba(0,0,0,0.5); line-height: 1.2; }
.slide-desc { font-size: 1.3rem; margin-bottom: 30px; color: #f1f1f1; }

.slider-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2); color: #fff; border: none;
    width: 50px; height: 50px; border-radius: 50%;
    cursor: pointer; z-index: 10; font-size: 1.5rem;
    display: flex; align-items: center; justify-content: center; transition: 0.3s;
}
.slider-btn:hover { background: rgba(255, 255, 255, 0.5); }
.prev-btn { left: 20px; }
.next-btn { right: 20px; }

/* --- 5. ÜRÜN & KATEGORİ DÜZENİ --- */
.shop-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* Sidebar (Sol Menü) */
.sidebar {
    flex: 0 0 260px; /* Sabit Genişlik */
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    position: sticky;
    top: 100px;
}

.cat-header {
    font-size: 1.1rem; color: var(--dark); font-weight: 800;
    margin-top: 20px; margin-bottom: 10px; padding-bottom: 5px;
    border-bottom: 2px solid #eee; text-transform: uppercase;
}
.cat-header:first-child { margin-top: 0; }

.cat-btn {
    display: block; width: 100%; text-align: left;
    background: none; border: none; padding: 8px 15px;
    cursor: pointer; font-size: 0.95rem; color: #666;
    border-radius: 5px; transition: 0.3s; font-weight: 500; margin-bottom: 5px;
}
.cat-btn:hover, .cat-btn.active { background: var(--light); color: var(--primary); padding-left: 20px; font-weight: 700; }
.sub-cat { margin-left: 15px; font-size: 0.9rem; border-left: 2px solid #eee; }
.sub-cat:hover, .sub-cat.active { border-left-color: var(--primary); }

/* Ürün Izgarası (Sağ Alan) */
.shop-content { flex: 1; }

.grid-products {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Varsayılan 4 Sütun */
    gap: 25px;
    width: 100%;
}

/* Ürün Kartı */
.product-card {
    background: #fff; border: 1px solid #e1e1e1; border-radius: 8px;
    overflow: hidden; transition: transform 0.3s, box-shadow 0.3s;
    display: flex; flex-direction: column; height: 100%;
}
.product-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }

.p-img { height: 220px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: #f9f9f9; border-bottom: 1px solid #eee; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }

.p-info { padding: 15px; flex-grow: 1; display: flex; flex-direction: column; }
.p-cat { color: var(--secondary); font-size: 0.75rem; font-weight: bold; text-transform: uppercase; margin-bottom: 5px; }
.p-title { font-size: 1.1rem; margin-bottom: 10px; font-weight: 700; color: var(--dark); }
.p-desc { font-size: 0.9rem; color: #666; margin-bottom: 10px; }

/* Filtreleme Gizle/Göster */
.filter-item { display: none; }
.show { display: flex; }

/* --- 6. HABERLER VE GENEL GRID --- */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.news-card {
    background: #fff; border-radius: 8px; overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); transition: 0.3s; border: 1px solid #eaeaea;
    display: flex; flex-direction: column; height: 100%;
}
.news-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }

.news-img { height: 200px; background: #f4f4f4; overflow: hidden; }
.news-img img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.news-card:hover .news-img img { transform: scale(1.05); }

.news-content { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.news-date { font-size: 0.85rem; color: #888; margin-bottom: 8px; }
.news-title { font-size: 1.2rem; font-weight: 700; color: var(--dark); margin-bottom: 10px; }
.news-excerpt { font-size: 0.9rem; color: #666; margin-bottom: 20px; flex: 1; }
.read-more-btn { color: var(--secondary); font-weight: 600; font-size: 0.9rem; }

/* --- 7. REFERANSLAR & LIGHTBOX --- */
.client-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px; margin-bottom: 80px;
}

.client-box {
    background: #fff; border: 1px solid #e1e1e1; border-radius: 12px; height: 160px;
    display: flex; align-items: center; justify-content: center; padding: 30px;
    transition: 0.3s; cursor: zoom-in; position: relative;
}
.client-box:hover { border-color: var(--primary); box-shadow: 0 10px 25px rgba(46, 204, 113, 0.15); transform: translateY(-5px); }

.client-box img {
    max-width: 100%; max-height: 100%; object-fit: contain;
    filter: grayscale(100%); opacity: 0.7; transition: 0.4s;
}
.client-box:hover img { filter: grayscale(0%); opacity: 1; transform: scale(1.05); }

/* Müşteri Yorumları */
.testimonials-section { background: #fff; padding: 60px 40px; border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.03); border: 1px solid #f0f0f0; }
.t-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; }
.t-card { background: #f9fdfa; padding: 30px; border-radius: 10px; border-left: 4px solid var(--primary); }
.t-text { font-style: italic; color: #555; margin-bottom: 20px; }
.t-user { display: flex; align-items: center; gap: 15px; padding-top: 20px; border-top: 1px solid #eee; }
.t-avatar { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; }
.t-info h4 { margin: 0; font-size: 1rem; color: var(--dark); }
.t-info span { font-size: 0.85rem; color: var(--secondary); }

/* Lightbox (Açılır Pencere) */
.lightbox { display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.9); justify-content: center; align-items: center; opacity: 0; transition: opacity 0.3s; }
.lightbox.active { display: flex; opacity: 1; }
.lightbox-content { max-width: 80%; max-height: 80%; border-radius: 5px; animation: zoomIn 0.3s; }
.lightbox-close { position: absolute; top: 20px; right: 35px; color: #f1f1f1; font-size: 40px; cursor: pointer; }
@keyframes zoomIn { from {transform:scale(0)} to {transform:scale(1)} }

/* --- 8. FOOTER & DİĞER --- */
.search-box { width: 100%; max-width: 500px; margin: 0 auto 30px; display: block; padding: 15px; border: 2px solid #ddd; border-radius: 50px; outline: none; text-align: center; }
.search-box:focus { border-color: var(--primary); }

.table-responsive { overflow-x: auto; background: #fff; border-radius: 10px; box-shadow: 0 5px 20px rgba(0,0,0,0.05); }
table { width: 100%; border-collapse: collapse; min-width: 700px; }
th { background: var(--dark); color: #fff; padding: 15px; text-align: left; }
td { padding: 15px; border-bottom: 1px solid #eee; }

footer { background: var(--dark); color: #fff; padding: 60px 0 20px; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; }
.footer-col h3 { color: var(--primary); margin-bottom: 20px; font-size: 1.2rem; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a:hover { color: #fff; }
.copyright { text-align: center; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; margin-top: 40px; color: #777; font-size: 0.9rem; }

/* --- 9. MEDYA SORGULARI (MOBİL/TABLET) --- */
@media (max-width: 1200px) {
    .grid-products { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
    .shop-layout { flex-direction: column; } /* Mobilde sidebar üste */
    .sidebar { width: 100%; position: static; margin-bottom: 30px; }
    .grid-products { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .hamburger { display: block; z-index: 1002; }

    /* 1. GİZLEME KURALI */
    .nav-links { 
        display: none; 
        visibility: hidden;
        
        position: absolute; 
        top: 60px; 
        left: 0; 
        width: 100%; 
        background: #fff; 
        flex-direction: column; 
        padding: 20px 0; 
        box-shadow: 0 5px 10px rgba(0,0,0,0.1); 
        z-index: 1000;
        text-align: left;
        border-top: 1px solid #eee;
    }
    
    /* 2. GÖSTERME KURALI */
    .nav-links.active { 
        display: flex !important; 
        visibility: visible !important;
        flex-direction: column;
    }
    
    /* --- KRİTİK DÜZELTME: LİSTE VE LİST ÖĞELERİNİ DİKEY ZORLA --- */
    
    /* Ana menü UL'yi dikey akışa zorla */
    .nav-links .main-nav-list {
        display: block; 
        width: 100%;
        gap: 0; /* Yatay boşluğu sıfırla */
    }
    
    /* LI'ları tam genişliğe ve dikey sıralamaya zorla */
    .main-nav-list > li {
        display: block; 
        width: 100%;
        padding: 0; /* Yatay padding'i sıfırla */
        border-bottom: 1px solid #f0f0f0;
    }
    
    /* Linklerin tam satırı kaplamasını sağla */
    .main-nav-list a {
        display: block;
        padding: 10px 20px; /* Yeni dikey padding ver */
        text-align: left;
        border-bottom: none !important; /* Çift border olmasın */
    }
    
    /* Alt Menü (Dropdown) */
    .submenu-list {
        position: static; /* Mobilde akışı bozmasın */
        width: 100%;
        box-shadow: none;
        border-top: none;
    }
    
    .submenu-list a {
        padding-left: 40px; /* Girinti */
        font-size: 0.95rem;
    }
    /* --- KRİTİK DÜZELTME BİTİŞİ --- */
    
    /* Diğer mobil menü kuralları devam etmeli */
}