/* ============================================
   ortaca.net - Ana Stil Dosyası
   ============================================ */

:root {
    --primary: #103159;
    --primary-dark: #0a1f3a;
    --primary-light: #d6e4f0;
    --secondary: #64748b;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --bg-light: #f8fafc;
    --text-dark: #1e293b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,.08);
    --shadow-lg: 0 4px 12px rgba(0,0,0,.1);
    --radius: 12px;
    --radius-sm: 8px;
}

* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
    background: var(--bg-light);
    line-height: 1.6;
}

/* ---- Navbar ---- */
.navbar { padding: .75rem 0; }
.navbar-brand { font-size: 1.25rem; letter-spacing: -.02em; }
.bg-primary { background-color: var(--primary) !important; }

/* ---- Hero Section ---- */
.hero {
    background: url('https://cdn.ortaca.net/logos/kralmezarlari-2.jpg') center center / cover no-repeat;
    color: white;
    padding: 3rem 0 2.5rem;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(16, 49, 89, 0.7);
}
.hero h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -.03em;
}
.hero .container {
    position: relative;
    z-index: 1;
}
.hero .lead {
    opacity: .85;
    font-size: 1.1rem;
}

/* ---- Search Bar ---- */
.search-box {
    background: white;
    border-radius: var(--radius);
    padding: .5rem;
    box-shadow: var(--shadow-lg);
    max-width: 700px;
    margin: 1.5rem auto 0;
}
.search-box .form-control {
    border: none;
    font-size: 1rem;
    padding: .75rem 1rem;
}
.search-box .form-control:focus {
    box-shadow: none;
}
.search-box .btn {
    border-radius: var(--radius-sm);
    padding: .75rem 1.5rem;
    font-weight: 600;
}

/* ---- Category Cards ---- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}
.category-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1rem;
    text-align: center;
    text-decoration: none;
    color: var(--text-dark);
    transition: all .2s;
    cursor: pointer;
}
.category-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    color: var(--primary);
}
.category-card i {
    font-size: 1.75rem;
    color: var(--primary);
    margin-bottom: .5rem;
    display: block;
}
.category-card span {
    font-size: .85rem;
    font-weight: 600;
    display: block;
}
.category-card .count {
    font-size: .75rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: .25rem;
}

/* ---- Listing Cards ---- */
.listing-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all .2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.listing-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}
.listing-card a {
    text-decoration: none;
    color: inherit;
}
.listing-card .card-img-wrap {
    position: relative;
    padding-top: 65%;
    overflow: hidden;
    background: #f1f5f9;
}
.listing-card .card-img-wrap img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.listing-card .card-img-wrap .no-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-muted);
    font-size: 2rem;
}
.listing-card .card-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.listing-card .card-title {
    font-size: .95rem;
    font-weight: 600;
    margin-bottom: .5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.listing-card .card-meta {
    font-size: .8rem;
    color: var(--text-muted);
    margin-top: auto;
}
.listing-card .card-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: .5rem;
}

/* ---- Highlight Styles ---- */
.listing-pinned {
    border-color: var(--accent) !important;
    border-width: 2px;
    position: relative;
}
.listing-pinned::before {
    content: '📌 Sabit';
    position: absolute;
    top: .5rem;
    right: .5rem;
    background: var(--accent);
    color: white;
    font-size: .7rem;
    font-weight: 700;
    padding: .2rem .5rem;
    border-radius: 4px;
    z-index: 2;
}
.listing-colored {
    background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%) !important;
    border-color: #fbbf24 !important;
}
.listing-showcase {
    border-color: var(--primary) !important;
    border-width: 2px;
}
.listing-showcase::before {
    content: '⭐ Vitrin';
    position: absolute;
    top: .5rem;
    left: .5rem;
    background: var(--primary);
    color: white;
    font-size: .7rem;
    font-weight: 700;
    padding: .2rem .5rem;
    border-radius: 4px;
    z-index: 2;
}
.listing-urgent::after {
    content: '🏷️ Acil';
    position: absolute;
    top: .5rem;
    right: .5rem;
    background: var(--danger);
    color: white;
    font-size: .7rem;
    font-weight: 700;
    padding: .2rem .5rem;
    border-radius: 4px;
    z-index: 2;
}

/* ---- Listing Detail ---- */
.listing-detail .gallery-main {
    width: 100%;
    border-radius: var(--radius);
    overflow: hidden;
    background: #f1f5f9;
    aspect-ratio: 4/3;
}
.listing-detail .gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.listing-detail .gallery-thumbs {
    display: flex;
    gap: .5rem;
    margin-top: .5rem;
    overflow-x: auto;
}
.listing-detail .gallery-thumbs img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color .2s;
}
.listing-detail .gallery-thumbs img.active,
.listing-detail .gallery-thumbs img:hover {
    border-color: var(--primary);
}
.listing-detail .contact-box {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    position: sticky;
    top: 80px;
}
.listing-detail .contact-box .phone-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--success);
}

/* ---- Vitrin Section ---- */
.showcase-section {
    background: linear-gradient(135deg, var(--primary-light) 0%, #eff6ff 100%);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
}
.showcase-section h2 {
    font-size: 1.25rem;
    font-weight: 700;
}

/* ---- Forms ---- */
.form-section {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 1.5rem;
}
.form-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    padding-bottom: .75rem;
    border-bottom: 2px solid var(--primary-light);
}

/* ---- Badges ---- */
.badge-highlight {
    display: inline-block;
    font-size: .7rem;
    font-weight: 600;
    padding: .2rem .5rem;
    border-radius: 4px;
    line-height: 1;
}

/* ---- Stats ---- */
.stat-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
}
.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}
.stat-card .stat-label {
    font-size: .85rem;
    color: var(--text-muted);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .hero { padding: 2rem 0 1.5rem; }
    .hero h1 { font-size: 1.5rem; }
    .category-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: .75rem; }
    .category-card { padding: 1rem .5rem; }
    .category-card i { font-size: 1.25rem; }
    .form-section { padding: 1.25rem; }
    .listing-detail .contact-box { position: static; }
}

/* ---- Misc ---- */
.text-primary { color: var(--primary) !important; }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-warning { background: var(--accent); border-color: var(--accent); }
.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.breadcrumb { font-size: .85rem; }
.divider { height: 1px; background: var(--border); margin: 2rem 0; }
img.lazy { opacity: 0; transition: opacity .3s; }
img.lazy.loaded { opacity: 1; }

/* Alt Kategori Chip'leri */
.subcategory-chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .9rem;
    border-radius: 50px;
    font-size: .82rem;
    font-weight: 500;
    color: #334155;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    transition: all .2s ease;
    white-space: nowrap;
}
.subcategory-chip i {
    font-size: .75rem;
    color: var(--primary);
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 49, 89, .08);
    border-radius: 50%;
    flex-shrink: 0;
}
.subcategory-chip:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(16, 49, 89, .2);
}
.subcategory-chip:hover i {
    color: #fff;
    background: rgba(255, 255, 255, .2);
}
.subcategory-chip.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.subcategory-chip.active i {
    color: #fff;
    background: rgba(255, 255, 255, .2);
}
