:root {
    --primary-color: #005596; /* Kale Mavisi */
    --secondary-color: #333;
    --bg-color: #f8f9fa;
    --white: #ffffff;
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', 'Helvetica Neue', sans-serif; }

body { background-color: var(--bg-color); color: var(--secondary-color); min-height: 100vh; display: flex; flex-direction: column; }

/* HEADER */
header {
    background: var(--white); padding: 0 40px; height: 70px; display: flex;
    justify-content: space-between; align-items: center; box-shadow: 0 2px 15px rgba(0,0,0,0.04);
    position: sticky; top: 0; z-index: 100;
}
.logo-area img { height: 35px; margin-right: 15px; }
.user-nav a { color: #666; text-decoration: none; font-weight: 600; font-size: 0.9rem; transition: var(--transition); }
.user-nav a:hover { color: var(--primary-color); }

/* MAIN CONTAINER (Full Width) */
.main-content {
    width: 100%; max-width: 1400px; margin: 0 auto; padding: 40px 20px;
    flex: 1; display: flex; flex-direction: column; align-items: center;
}

/* 1. KATEGORİ SEKMELERİ (ÜST) */
.category-tabs { display: flex; gap: 20px; margin-bottom: 30px; border-bottom: 2px solid #eee; padding-bottom: 10px; width: 100%; justify-content: center; }
.cat-tab {
    padding: 10px 25px; font-size: 1.1rem; font-weight: 600; color: #999; cursor: pointer; position: relative; transition: var(--transition);
}
.cat-tab:hover { color: var(--primary-color); }
.cat-tab.active { color: var(--primary-color); }
.cat-tab.active::after {
    content: ''; position: absolute; bottom: -12px; left: 0; width: 100%; height: 3px; background: var(--primary-color);
}

/* 2. ALT KATEGORİLER (ORTA) */
.subcategory-pills { display: flex; gap: 15px; margin-bottom: 40px; flex-wrap: wrap; justify-content: center; }
.sub-pill {
    padding: 8px 20px; background: var(--white); border: 1px solid #ddd; border-radius: 50px; cursor: pointer; font-size: 0.95rem; transition: var(--transition);
}
.sub-pill:hover { border-color: var(--primary-color); color: var(--primary-color); }
.sub-pill.active { background: var(--primary-color); color: var(--white); border-color: var(--primary-color); box-shadow: 0 4px 10px rgba(0,85,150,0.2); }

/* 3. ÜRÜN GRID */
.products-area { width: 100%; margin-bottom: 50px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.product-card {
    background: var(--white); border-radius: var(--border-radius); overflow: hidden; cursor: pointer;
    border: 2px solid transparent; transition: var(--transition); box-shadow: 0 5px 15px rgba(0,0,0,0.03);
}
.product-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.08); }
.product-card.selected { border-color: var(--primary-color); background: #f0f7ff; }
.product-card img { width: 100%; height: 180px; object-fit: cover; background: #f9f9f9; }
.product-info { padding: 15px; text-align: center; font-weight: 600; font-size: 0.9rem; }

/* 4. YÜKLEME ALANI (GİZLİ BAŞLAR) */
.upload-section {
    width: 100%; max-width: 800px; background: var(--white); padding: 40px;
    border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,0.06);
    text-align: center; display: none; /* JS ile açılacak */
    animation: fadeIn 0.5s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.drop-zone {
    border: 2px dashed #ccc; border-radius: 12px; padding: 40px; margin: 20px 0;
    cursor: pointer; transition: var(--transition); position: relative;
}
.drop-zone:hover { border-color: var(--primary-color); background: #fafafa; }
.drop-zone img { max-height: 300px; max-width: 100%; display: none; border-radius: 8px; margin: 0 auto; }
.action-btn {
    background: var(--primary-color); color: var(--white); border: none; padding: 15px 40px;
    font-size: 1.1rem; border-radius: 8px; cursor: pointer; width: 100%; font-weight: bold;
    transition: var(--transition);
}
.action-btn:hover { background: #003d6b; transform: scale(1.02); }
.action-btn:disabled { background: #ccc; cursor: not-allowed; }

/* MODAL (POPUP SONUÇ) */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); z-index: 1000;
    display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: all 0.3s;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content {
    background: var(--white); width: 90%; max-width: 900px; border-radius: 12px; overflow: hidden;
    position: relative; display: flex; flex-direction: column; max-height: 90vh;
}
.modal-header { padding: 20px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.close-modal { background: none; border: none; font-size: 2rem; cursor: pointer; color: #666; }
.modal-body { padding: 0; overflow: hidden; background: #000; display: flex; justify-content: center; align-items: center; flex: 1; }
.modal-body img { max-width: 100%; max-height: 80vh; object-fit: contain; }
.modal-loading { padding: 50px; text-align: center; color: var(--white); }
.loader { border: 4px solid rgba(255,255,255,0.3); border-top: 4px solid var(--primary-color); border-radius: 50%; width: 50px; height: 50px; animation: spin 1s linear infinite; margin: 0 auto 20px; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }