:root {
    --primary-color: #4F46E5;
    --background-color: #F9FAFB;
    --text-dark: #111827;
    --text-light: #6B7280;
    --accent-color: #10B981;
    --border-color: #E5E7EB;
    --font-family: 'Poppins', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--background-color);
    color: var(--text-dark);
    font-family: var(--font-family);
    line-height: 1.6;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.d-none { display: none !important; }
.mb-4 { margin-bottom: 1.5rem; }

/* --- HEADER --- */
.main-header {
    background-color: #fff;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.navbar { display: flex; justify-content: space-between; align-items: center; }
.navbar-brand { font-size: 1.5rem; font-weight: 700; color: var(--primary-color); text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 1rem; }
.btn-primary { background-color: var(--primary-color); color: #fff; font-weight: 600; border: none; padding: 0.6rem 1.2rem; border-radius: 8px; text-decoration: none; transition: background-color 0.2s, box-shadow 0.2s; }
.btn-primary:hover { background-color: #4338CA; box-shadow: 0 4px 15px rgba(79, 70, 229, 0.2); }
.admin-link { font-size: 0.9rem; color: var(--text-light); text-decoration: none; transition: color 0.2s; font-weight: 500; }
.admin-link:hover { color: var(--primary-color); }

/* --- HERO & FILTERS --- */
.hero-section { text-align: center; padding: 3rem 1rem 2rem 1rem; }
.hero-section h1 { font-size: 2.5rem; font-weight: 700; margin-bottom: 0.5rem; }
.hero-section .subtitle { font-size: 1.1rem; color: var(--text-light); margin-bottom: 2rem; }
.filter-bar { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem; background-color: #fff; padding: 1rem; border-radius: 12px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.filter-group { display: flex; align-items: center; gap: 0.5rem; border: 1px solid var(--border-color); border-radius: 8px; padding: 0 0.5rem; }
.filter-group i { color: var(--text-light); }
.filter-group input, .filter-group select { flex-grow: 1; background: transparent; border: none; color: var(--text-dark); font-size: 1rem; padding: 0.75rem 0.5rem; }
.filter-group input:focus, .filter-group select:focus { outline: none; }

/* --- CATEGORY LINKS --- */
.category-links-container { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-bottom: 3rem; }
.category-link { display: flex; align-items: center; gap: 0.5rem; background-color: #fff; border: 1px solid var(--border-color); padding: 0.5rem 1rem; border-radius: 20px; text-decoration: none; color: var(--text-dark); transition: all 0.2s; }
.category-link:hover, .category-link.active { background-color: var(--primary-color); color: #fff; border-color: var(--primary-color); }

/* --- LISTING GRID & CARDS --- */
.listings-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.listing-card { background-color: #fff; border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 4px 6px rgba(0,0,0,0.05); transition: transform 0.2s, box-shadow 0.2s; }
.listing-card:hover { transform: translateY(-5px); box-shadow: 0 10px 15px rgba(0,0,0,0.1); }
.card-img-container { height: 200px; overflow: hidden; position: relative; }
.card-img-container img { width: 100%; height: 100%; object-fit: cover; }
.verified-badge { position: absolute; top: 10px; right: 10px; background-color: var(--accent-color); color: #fff; padding: 0.25rem 0.5rem; font-size: 0.75rem; font-weight: 600; border-radius: 6px; }
.card-content { padding: 1rem; flex-grow: 1; display: flex; flex-direction: column; }
.card-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.25rem; }
.card-rating { display: flex; align-items: center; gap: 0.25rem; color: #FBBF24; margin-bottom: 0.5rem; }
.card-area { color: var(--text-light); margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; }
.card-description { color: var(--text-light); flex-grow: 1; margin-bottom: 1.5rem; font-size: 0.9rem; }
.contact-buttons { display: flex; gap: 0.75rem; margin-top: auto; }
.contact-buttons .btn { flex-grow: 1; background-color: var(--primary-color); color: #fff; border: none; border-radius: 8px; padding: 0.75rem; font-weight: 600; text-decoration: none; text-align: center; }
.contact-buttons .btn-whatsapp { background: #25D366; }

/* --- FOOTER & WIDGET --- */
.main-footer { text-align: center; padding: 2rem 1rem; margin-top: 3rem; background-color: #E5E7EB; border-top: 1px solid #D1D5DB; }
.footer-content { margin-bottom: 0.5rem; }
.footer-content a { color: var(--text-light); text-decoration: none; margin: 0 0.5rem; }
.footer-content a:hover { color: var(--primary-color); }
.copyright { color: #9CA3AF; font-size: 0.85rem; }
.whatsapp-widget { position: fixed; bottom: 20px; right: 20px; background-color: #25D366; color: white; width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2rem; box-shadow: 0 4px 12px rgba(0,0,0,0.2); z-index: 100; }

/* --- MODAL --- */
.modal-wrapper { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 1001; }
.modal-content { background-color: #fff; padding: 2rem; border-radius: 12px; width: 90%; max-width: 500px; position: relative; box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.modal-close-btn { position: absolute; top: 10px; right: 15px; background: none; border: none; font-size: 2rem; cursor: pointer; color: var(--text-light); }
.modal-content h2 { font-size: 1.5rem; font-weight: 600; margin-bottom: 0.5rem; }

/* --- ADMIN & FORMS --- */
.form-container, .admin-container { max-width: 700px; margin: 2rem auto; background-color: #fff; padding: 1.5rem; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.form-container h2, .admin-container h2 { text-align: center; margin-bottom: 1.5rem; font-size: 1.8rem; font-weight: 600; }
.form-subtitle { text-align: center; color: var(--text-light); margin-top: -1rem; margin-bottom: 2rem; }
.form-label { margin-bottom: 0.5rem; font-weight: 500; }
.form-control, .form-select, textarea { display: block; width: 100%; padding: 0.75rem; font-size: 1rem; border: 1px solid var(--border-color); border-radius: 8px; }
.list-group { display: flex; flex-direction: column; gap: 0.5rem; }
.list-group-item { background-color: #F9FAFB; border: 1px solid var(--border-color); border-radius: 8px; padding: 1rem; }
.alert-success { background-color: #D1FAE5; color: #065F46; border-radius: 8px; padding: 1rem; }
.alert-danger { background-color: #FEE2E2; color: #991B1B; border-radius: 8px; padding: 1rem; }

/* --- UTILITIES --- */
.loader-container { display: flex; justify-content: center; padding: 3rem 0; }
.spinner { width: 40px; height: 40px; border: 4px solid #E5E7EB; border-left-color: var(--primary-color); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- RESPONSIVE MEDIA QUERIES --- */
@media (min-width: 768px) {
    .container { padding: 0 2rem; }
    .hero-section h1 { font-size: 3rem; }
    .filter-bar { flex-direction: row; }
    .listings-grid { grid-template-columns: repeat(2, 1fr); }
    .form-container, .admin-container { padding: 2.5rem; }
}
@media (min-width: 992px) {
    .listings-grid { grid-template-columns: repeat(3, 1fr); }
}