:root {
    --primary: #1a365d;
    --primary-dark: #0f2440;
    --accent: #e67e22;
    --accent-dark: #cf6a13;
    --success: #198754;
    --bg-light: #f4f6f8;
    --text: #212529;
    --text-muted: #6c757d;
    --border: #e5e7eb;
    --card-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: var(--bg-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

main { min-height: 60vh; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); }

.logo-mark {
    color: var(--accent);
    font-weight: 800;
}

/* Top bar */
.top-bar {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.75);
    font-size: 0.82rem;
    padding: 6px 0;
}
.top-bar a { color: rgba(255,255,255,0.9); }
.top-bar a:hover { color: var(--accent); }

/* Navbar */
.main-nav {
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
}
.main-nav .nav-link {
    font-weight: 500;
    color: #333 !important;
    padding: 8px 14px !important;
    border-radius: 8px;
    transition: all 0.2s;
}
.main-nav .nav-link:hover {
    background: rgba(230,126,34,0.08);
    color: var(--accent) !important;
}
.main-nav .dropdown-menu {
    border: 0;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    border-radius: 10px;
    padding: 8px;
}
.main-nav .dropdown-item {
    border-radius: 6px;
    padding: 8px 12px;
}
.main-nav .dropdown-item:hover {
    background: var(--bg-light);
}

.btn-warning {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}
.btn-warning:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: white;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}
.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Hero */
.hero-search {
    background: linear-gradient(135deg, #1a365d 0%, #2d5a8c 60%, #e67e22 140%);
    color: white;
    padding: 60px 0;
    margin-bottom: 40px;
    border-radius: 0 0 30px 30px;
    position: relative;
    overflow: hidden;
}
.hero-search::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M0 40L20 20L30 25L40 15L60 30V60H0Z' fill='rgba(255,255,255,0.04)'/%3E%3C/svg%3E");
    opacity: 0.5;
}
.hero-search > .container { position: relative; z-index: 2; }
.hero-search h1 {
    font-weight: 800;
    font-size: 2.4rem;
    margin-bottom: 10px;
}
.hero-search .lead {
    opacity: 0.9;
    margin-bottom: 30px;
}

.search-card {
    background: white;
    color: var(--text);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.search-tabs .nav-link {
    color: #666;
    font-weight: 600;
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    padding: 10px 20px;
}
.search-tabs .nav-link.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    background: transparent;
}

/* Category cards */
.category-card {
    background: white;
    border-radius: 14px;
    padding: 24px 18px;
    text-align: center;
    transition: all 0.3s;
    box-shadow: var(--card-shadow);
    height: 100%;
    border: 1px solid transparent;
    display: block;
    color: inherit;
}
.category-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    color: var(--accent);
}
.category-card i {
    font-size: 2.4rem;
    color: var(--accent);
    margin-bottom: 10px;
    display: block;
}
.category-card strong {
    display: block;
    font-size: 0.95rem;
    color: var(--text);
}
.category-card .text-muted {
    font-size: 0.8rem;
}

/* Listing cards */
.listing-card {
    background: white;
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: var(--card-shadow);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}
.listing-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 40px rgba(0,0,0,0.1);
}
.listing-card .listing-img {
    width: 100%;
    aspect-ratio: 4/3;
    background: linear-gradient(135deg,#e5e7eb,#cbd5e0);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}
.listing-card .listing-img .stretched-link { z-index: 1; }
.listing-card .listing-img .no-image {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 2.5rem;
}
.listing-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: white;
}
.listing-badge.satilik { background: var(--primary); }
.listing-badge.kiralik { background: var(--accent); }
.listing-badge.featured {
    position: absolute;
    top: 10px;
    right: 10px;
    left: auto;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}
.favorite-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    color: #dc3545;
    font-size: 1.1rem;
    transition: transform 0.2s;
}
.favorite-btn:hover { transform: scale(1.1); }
.favorite-btn.active { background: #dc3545; color: white; }

.listing-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.listing-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
    line-height: 1.4;
    min-height: 2.6em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.listing-location {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}
.listing-meta {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--border);
}
.listing-meta span { display: flex; align-items: center; gap: 4px; }
.listing-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
    margin-top: auto;
}
.listing-price .currency { font-size: 0.9rem; font-weight: 500; opacity: 0.8; }

/* Content area */
.content-area {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--card-shadow);
}

/* Listing detail */
.listing-gallery img {
    width: 100%;
    border-radius: 12px;
    aspect-ratio: 16/10;
    object-fit: cover;
    background: #eee;
}
.listing-thumbs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-top: 10px;
}
.listing-thumbs img {
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.75;
    transition: opacity 0.2s;
}
.listing-thumbs img:hover, .listing-thumbs img.active { opacity: 1; }

.spec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
}
.spec-item {
    background: var(--bg-light);
    border-radius: 10px;
    padding: 12px 14px;
}
.spec-item .label { font-size: 0.78rem; color: var(--text-muted); display: block; margin-bottom: 2px; }
.spec-item .value { font-weight: 600; }

/* Sidebar */
.sidebar-card {
    background: white;
    border-radius: 14px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    margin-bottom: 20px;
}
.sidebar-card h6 {
    font-weight: 700;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}

/* Admin */
.admin-nav .list-group-item {
    border: 0;
    padding: 10px 14px;
    border-radius: 8px !important;
    margin-bottom: 4px;
    color: var(--text);
    font-weight: 500;
}
.admin-nav .list-group-item.active {
    background: var(--primary);
    color: white;
}
.admin-stat {
    background: white;
    border-radius: 14px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    border-left: 4px solid var(--accent);
}
.admin-stat .num { font-size: 2rem; font-weight: 800; color: var(--primary); }
.admin-stat .lbl { color: var(--text-muted); font-size: 0.85rem; }

/* Footer */
.site-footer {
    background: var(--primary-dark);
    color: white;
    padding: 50px 0 0;
}
.site-footer h5, .site-footer h6 { color: white; }
.site-footer a { color: rgba(255,255,255,0.7); }
.site-footer a:hover { color: var(--accent); }
.site-footer hr { opacity: 0.2; }
.social-link {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    color: white !important;
    border-radius: 50%;
    margin-right: 6px;
    transition: all 0.2s;
}
.social-link:hover {
    background: var(--accent);
    transform: translateY(-2px);
}

/* Cookie consent */
.cookie-consent {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: rgba(15,36,64,0.98);
    color: white;
    padding: 20px 0;
    z-index: 1050;
    backdrop-filter: blur(10px);
}
.cookie-consent a { color: var(--accent); }

/* Back to top */
#backToTop {
    position: fixed;
    bottom: 20px; right: 20px;
    width: 48px; height: 48px;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1040;
    background: var(--accent);
    border: 0;
    color: white;
}
#backToTop.visible { display: flex; }

/* Blog post */
.post-content {
    font-size: 1.08rem;
    line-height: 1.85;
    white-space: pre-line;
}
.post-content p { margin-bottom: 1.2em; }

/* Ads */
.ad-placeholder {
    margin: 20px 0;
    min-height: 90px;
    background: #f8f9fa;
    border: 1px dashed #dee2e6 !important;
}

/* Filters sidebar */
.filter-panel .form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.filter-panel .form-control, .filter-panel .form-select {
    border-radius: 8px;
}

/* Breadcrumbs */
.breadcrumb {
    font-size: 0.85rem;
    padding: 8px 0;
    background: transparent;
}
.breadcrumb-item + .breadcrumb-item::before { color: var(--text-muted); }

/* Responsive tweaks */
@media (max-width: 768px) {
    .hero-search { padding: 40px 0 30px; border-radius: 0 0 20px 20px; }
    .hero-search h1 { font-size: 1.6rem; }
    .content-area { padding: 20px; }
    .main-nav .d-flex { flex-direction: column; width: 100%; }
    .main-nav form { width: 100%; margin: 10px 0; }
}

/* Form enhancements */
.form-control:focus, .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.2rem rgba(230,126,34,0.15);
}

/* Table */
.table thead th {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
}

/* Status badges */
.status-badge {
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 20px;
}
.status-pending { background: #fef3c7; color: #92400e; }
.status-approved { background: #d1fae5; color: #065f46; }
.status-rejected { background: #fee2e2; color: #991b1b; }
.status-sold { background: #e5e7eb; color: #374151; }

/* Fancy empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.empty-state i { font-size: 4rem; opacity: 0.3; display: block; margin-bottom: 16px; }
