/* ============================================================
   FirmaAtlas — Firmalar Sayfası Düzeltme
   Filtre sidebar + kart grid
============================================================ */

/* ─── SAYFA LAYOUT ─────────────────────────────────── */
.firms-page-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 28px;
    align-items: start;
    padding: 32px 0 60px;
}

/* ─── FİLTRE SIDEBAR ───────────────────────────────── */
.filter-sidebar {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    position: sticky;
    top: 80px;
}

.filter-sidebar h3 {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #64748b;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

/* Sektör radio butonları — düzgün liste */
.sector-filters {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
}

.sector-filters label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: .875rem;
    color: #374151;
    transition: all .15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sector-filters label:hover {
    background: #f1f5f9;
    color: #1a56db;
}

.sector-filters input[type="radio"]:checked + label,
.sector-filters label:has(input:checked) {
    background: rgba(26,86,219,.08);
    color: #1a56db;
    font-weight: 600;
}

.sector-filters input[type="radio"] {
    accent-color: #1a56db;
    flex-shrink: 0;
}

/* Şehir select */
.filter-group {
    margin-bottom: 16px;
}

.filter-group label {
    display: block;
    font-size: .78rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 6px;
}

.filter-group select {
    width: 100%;
    height: 40px;
    padding: 0 32px 0 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: .875rem;
    color: #1e293b;
    background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2364748b' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") no-repeat right 10px center;
    appearance: none;
    outline: none;
    cursor: pointer;
    transition: all .15s;
}

.filter-group select:focus {
    border-color: #1a56db;
    box-shadow: 0 0 0 3px rgba(26,86,219,.1);
}

/* Puan radio */
.rating-filters {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.rating-filters label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .85rem;
    color: #374151;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
}

.rating-filters label:hover { background: #f1f5f9; }
.rating-filters input { accent-color: #1a56db; }

/* Premium checkbox */
.premium-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .875rem;
    color: #374151;
    cursor: pointer;
    padding: 8px 10px;
    background: rgba(245,158,11,.06);
    border: 1px solid rgba(245,158,11,.2);
    border-radius: 8px;
    margin-bottom: 16px;
}

.premium-filter input { accent-color: #f59e0b; }

/* Filtrele butonu */
.btn-filter {
    width: 100%;
    height: 42px;
    background: linear-gradient(135deg, #1a56db, #3b82f6);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: .875rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    box-shadow: 0 4px 12px rgba(26,86,219,.3);
}

.btn-filter:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(26,86,219,.4);
}

/* ─── SONUÇ ALANI ──────────────────────────────────── */
.firms-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 10px;
}

.firms-count {
    font-size: .9375rem;
    color: #374151;
}

.firms-count strong {
    color: #1a56db;
    font-size: 1.1rem;
}

.firms-sort select {
    height: 38px;
    padding: 0 32px 0 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 9px;
    font-size: .845rem;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2364748b' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") no-repeat right 10px center;
    appearance: none;
    cursor: pointer;
    outline: none;
    color: #374151;
}

/* ─── FİRMA KARTLARI GRİD ─────────────────────────── */
.firms-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ─── BOŞ DURUM ────────────────────────────────────── */
.firms-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 16px;
    border: 1px dashed #cbd5e1;
}

.firms-empty svg,
.firms-empty img {
    margin: 0 auto 16px;
    opacity: .3;
    width: 80px;
}

.firms-empty h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
}

.firms-empty p {
    font-size: .9rem;
    color: #64748b;
    margin-bottom: 20px;
}

/* Mobil filtre butonu */
.btn-mobile-filter {
    display: none;
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 90;
    background: #1a56db;
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: .6rem 1.5rem;
    font-size: .875rem;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(26,86,219,.4);
    cursor: pointer;
}

@media (max-width: 900px) {
    .firms-page-layout { grid-template-columns: 1fr; }
    .filter-sidebar { position: static; display: none; }
    .filter-sidebar.open { display: block; }
    .btn-mobile-filter { display: flex; align-items: center; gap: .4rem; }
    .firms-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 580px) {
    .firms-grid { grid-template-columns: 1fr; }
}

/* ─── MEVCUT BOOTSTRAP YAPISI İÇİN OVERRIDE ───────── */
/* firms/index.php Bootstrap col yapısı kullandığından */

.filter-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
}

.filter-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.filter-panel-title {
    font-size: .82rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #0d1b3e !important;
    margin: 0 !important;
}

.filter-clear {
    font-size: .78rem;
    color: #ef4444;
    text-decoration: none;
    font-weight: 600;
}

.filter-group {
    margin-bottom: 18px;
}

.filter-group-title {
    font-size: .76rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: .4px !important;
    color: #64748b !important;
    margin-bottom: 8px !important;
}

/* Radio filter options — dikey liste, taşmayı önle */
.filter-options {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 220px;
    overflow-y: auto;
}

.filter-option {
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 8px;
    cursor: pointer;
    font-size: .845rem !important;
    color: #374151 !important;
    transition: background .15s;
}

.filter-option:hover { background: #f1f5f9; }

.filter-option input[type="radio"],
.filter-option input[type="checkbox"] {
    accent-color: #1a56db;
    flex-shrink: 0;
    width: 15px;
    height: 15px;
}

.filter-option span { line-height: 1.3; }

/* Select override */
.filter-select {
    width: 100% !important;
    height: 40px !important;
    padding: 0 32px 0 12px !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 10px !important;
    font-size: .875rem !important;
    background: #f8fafc !important;
}

.filter-select:focus {
    border-color: #1a56db !important;
    box-shadow: 0 0 0 3px rgba(26,86,219,.1) !important;
}

/* Filtrele butonu */
.btn-filter-submit,
button[type="submit"].btn.btn-primary.w-100 {
    width: 100% !important;
    height: 42px !important;
    background: linear-gradient(135deg, #1a56db, #3b82f6) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 12px rgba(26,86,219,.3) !important;
    transition: all .2s !important;
}

/* Sonuç başlığı */
.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.results-info {
    font-size: .9375rem;
    color: #374151;
}

.results-info strong { color: #1a56db; }

/* Sıralama select */
.sort-select {
    height: 38px !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 9px !important;
    font-size: .845rem !important;
    padding: 0 32px 0 10px !important;
}

/* Boş durum */
.empty-state h5 { color: #0d1b3e !important; }
