/* Custom CSS for RealEstateJewels */

:root {
    /* Core palette */
    --primary-color: #2c3e50;
    --secondary-color: #e74c3c;
    --accent-color: #f39c12;
    --light-bg: #f8f9fa;
    --dark-bg: #0f172a;

    /* Modern gradients */
    --gradient-primary: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    --gradient-secondary: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%);
    --gradient-accent: linear-gradient(135deg, #00b09b 0%, #96c93d 100%);
    --gradient-dark: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);

    /* Surfaces and effects */
    --surface: #ffffff;
    --surface-muted: #f1f5f9;
    --text-color: #1f2937;
    --text-muted: #64748b;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 10px 25px rgba(15, 23, 42, 0.12);
    --shadow-lg: 0 20px 45px rgba(15, 23, 42, 0.18);
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

/* Navigation */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-section h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Category Cards */
.category-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    border-radius: 15px;
    overflow: hidden;
    height: 100%;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.category-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

/* Product Cards */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    border-radius: 10px;
    overflow: hidden;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.product-card .card-img-top {
    height: 250px;
    object-fit: cover;
}

.product-price {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--secondary-color);
}

/* Property Cards */
.property-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    border-radius: 10px;
    overflow: hidden;
    height: 100%;
}

.property-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.property-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

.property-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--secondary-color);
}

.property-features {
    font-size: 0.9rem;
    color: #6c757d;
}

/* Wishlist Button */
.wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.wishlist-btn:hover {
    background: var(--secondary-color);
    color: white;
}

.wishlist-btn.active {
    background: var(--secondary-color);
    color: white;
}

/* Filters */
.filter-section {
    background: var(--light-bg);
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.filter-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Product Details */
.product-gallery {
    border-radius: 10px;
    overflow: hidden;
}

.product-info h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.product-specs {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 10px;
    margin: 1rem 0;
}

/* Property Details */
.property-gallery {
    border-radius: 10px;
    overflow: hidden;
}

.property-info h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.property-details {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 10px;
    margin: 1rem 0;
}

/* Contact Form */
.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Admin Panel */
.admin-sidebar {
    background: var(--dark-bg);
    min-height: 100vh;
    padding: 2rem 0;
}

.admin-sidebar .nav-link {
    color: #adb5bd;
    padding: 0.75rem 1.5rem;
    border-radius: 0;
    transition: all 0.3s ease;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: var(--secondary-color);
    color: white;
}

.admin-content {
    padding: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .category-card .card-img-top,
    .product-card .card-img-top,
    .property-card .card-img-top {
        height: 150px;
    }
    
    .admin-sidebar {
        min-height: auto;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 1.5rem;
    }
    
    .filter-card {
        padding: 1rem;
    }
    
    .contact-form {
        padding: 1rem;
    }
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Google Sign-In Button Styling */
.g_id_signin {
    margin-top: 0.5rem;
}

/* Custom Button Styles */
.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: #1a252f;
    border-color: #1a252f;
}

.btn-secondary {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-secondary:hover {
    background: #c0392b;
    border-color: #c0392b;
}

/* Alert Styling */
.alert {
    border-radius: 10px;
    border: none;
}

/* Table Styling */
.table {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.table thead th {
background: var(--primary-color);
color: white;
border: none;
}

/* Pagination */
.pagination .page-link {
color: var(--primary-color);
border-color: #dee2e6;
}

.pagination .page-item.active .page-link {
background: var(--primary-color);
border-color: var(--primary-color);
}

/* Placeholder Images */
.placeholder-image {
background: linear-gradient(45deg, #f8f9fa, #e9ecef);
display: flex;
align-items: center;
justify-content: center;
color: #6c757d;
font-size: 2rem;
border: 2px dashed #dee2e6;
}

.placeholder-product {
background: linear-gradient(45deg, #fff3cd, #ffeaa7);
}

.placeholder-property {
background: linear-gradient(45deg, #d1ecf1, #bee5eb);
}

/* Enhanced Search Bar */
.navbar .input-group {
min-width: 250px;
}

.navbar .input-group .form-control {
border-radius: 20px 0 0 20px;
border: 1px solid rgba(255,255,255,0.3);
background: rgba(255,255,255,0.1);
color: white;
}

.navbar .input-group .form-control::placeholder {
color: rgba(255,255,255,0.7);
}

.navbar .input-group .form-control:focus {
background: rgba(255,255,255,0.2);
border-color: rgba(255,255,255,0.5);
color: white;
box-shadow: none;
}

.navbar .input-group .btn {
border-radius: 0 20px 20px 0;
border: 1px solid rgba(255,255,255,0.3);
border-left: none;
}

/* Enhanced Admin Panel */
.admin-sidebar {
background: linear-gradient(180deg, var(--dark-bg), #2c3e50);
box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.admin-sidebar .nav-link {
margin: 0.25rem 1rem;
border-radius: 8px;
transition: all 0.3s ease;
}

.admin-sidebar .nav-link:hover {
background: rgba(255,255,255,0.1);
transform: translateX(5px);
}

.admin-sidebar .nav-link.active {
background: var(--secondary-color);
box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Enhanced Cards */
.card {
border: none;
box-shadow: 0 4px 15px rgba(0,0,0,0.08);
transition: all 0.3s ease;
}

.card:hover {
box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card-header {
background: linear-gradient(135deg, var(--primary-color), #34495e);
color: white;
border: none;
border-radius: 10px 10px 0 0 !important;
}

/* Enhanced Buttons */
.btn {
border-radius: 8px;
font-weight: 500;
transition: all 0.3s ease;
}

.btn:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Enhanced Forms */
.form-control, .form-select {
border-radius: 8px;
border: 2px solid #e9ecef;
transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
border-color: var(--primary-color);
box-shadow: 0 0 0 0.2rem rgba(44, 62, 80, 0.25);
}

/* Enhanced Tables */
.table {
border-radius: 10px;
overflow: hidden;
box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.table thead th {
background: linear-gradient(135deg, var(--primary-color), #34495e);
color: white;
border: none;
font-weight: 600;
text-transform: uppercase;
font-size: 0.85rem;
letter-spacing: 0.5px;
}

.table tbody tr:hover {
background: rgba(44, 62, 80, 0.05);
transform: scale(1.01);
transition: all 0.2s ease;
}

/* Enhanced Badges */
.badge {
border-radius: 20px;
font-weight: 500;
padding: 0.5em 1em;
}

/* Loading States */
.btn.loading {
position: relative;
color: transparent;
}

.btn.loading::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 20px;
height: 20px;
border: 2px solid transparent;
border-top: 2px solid currentColor;
border-radius: 50%;
animation: spin 1s linear infinite;
}

/* Enhanced Modals */
.modal-content {
border: none;
border-radius: 15px;
box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.modal-header {
background: linear-gradient(135deg, var(--primary-color), #34495e);
color: white;
border: none;
border-radius: 15px 15px 0 0;
}

/* Enhanced Alerts */
.alert {
border: none;
border-radius: 10px;
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Image Upload Preview */
.image-preview {
max-width: 200px;
max-height: 200px;
border-radius: 10px;
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
margin-top: 10px;
}

/* Statistics Cards */
.border-left-primary {
border-left: 4px solid var(--primary-color) !important;
}

.border-left-success {
border-left: 4px solid #28a745 !important;
}

.border-left-info {
border-left: 4px solid #17a2b8 !important;
}

.border-left-warning {
border-left: 4px solid #ffc107 !important;
}

/* === UI Enhancements Overrides === */
/* Utilities */
.gradient-primary { background: var(--gradient-primary) !important; }
.gradient-secondary { background: var(--gradient-secondary) !important; }
.gradient-accent { background: var(--gradient-accent) !important; }
.text-gradient-primary {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hover-lift { transition: transform .25s ease, box-shadow .25s ease; }
.hover-lift:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.shadow-soft { box-shadow: var(--shadow-sm) !important; }
.rounded-md { border-radius: var(--radius-md) !important; }
.rounded-lg { border-radius: var(--radius-lg) !important; }

/* Navbar */
.navbar.navbar-dark.bg-dark {
    background: var(--gradient-dark) !important;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1020;
    backdrop-filter: saturate(140%) blur(6px);
}
.navbar-brand { font-weight: 700; letter-spacing: .2px; }
.navbar-dark .nav-link {
    color: rgba(255,255,255,0.85) !important;
    transition: color .2s ease, transform .2s ease;
}
.navbar-dark .nav-link:hover, .navbar-dark .nav-link:focus {
    color: #ffffff !important;
    transform: translateY(-1px);
}

/* Hero */
.hero-section {
    background: var(--gradient-primary), radial-gradient(1200px 600px at 10% -20%, rgba(255,255,255,.12), transparent 60%);
    color: white;
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(800px 400px at 120% 0%, rgba(255,255,255,.12), transparent 60%);
    pointer-events: none;
}
.hero-section h1 { font-weight: 800; }

/* Cards */
.category-card { background: rgba(255,255,255,0.9); backdrop-filter: blur(8px); }
.product-card, .property-card { background: var(--surface); border-radius: 12px; }
.product-price { font-weight: 700; color: #e11d48; }
.property-price { font-weight: 700; color: #16a34a; }

/* Filters */
.filter-section { background: var(--surface-muted); }
.filter-card {
    background: rgba(255,255,255,0.9);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(8px);
}

/* Typography */
.product-info h2, .property-info h2 { font-weight: 700; }

/* Forms */
.contact-form { background: rgba(255,255,255,0.95); border-radius: var(--radius-md); box-shadow: var(--shadow-md); backdrop-filter: blur(6px); }

/* Admin */
.admin-sidebar { background: var(--gradient-dark); }

/* Buttons */
.btn { border-radius: 8px; font-weight: 500; transition: all .25s ease; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.btn-primary { background: var(--gradient-primary); border: none; }
.btn-primary:hover { filter: brightness(1.05); }
.btn-secondary { background: var(--gradient-secondary); border: none; }
.btn-secondary:hover { filter: brightness(1.05); }
.btn-outline-light { color: #ffffff; border-color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.08); }
.btn-outline-light:hover { color: #111827; background: #ffffff; border-color: #ffffff; }

/* Responsive tweaks */
@media (max-width: 768px) {
    .hero-section h1 { font-size: 2.25rem; }
    .hero-section p { font-size: 1rem; }
    .navbar .input-group { min-width: 180px; }
}
@media (max-width: 576px) {
    .hero-section { padding: 2.5rem 0; }
    .hero-section h1 { font-size: 1.75rem; }
    .hero-section .btn { width: 100%; max-width: 280px; }
}
/* === Performance and flicker reduction === */
html { background: #fff; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; opacity: 0.999; }
.navbar.navbar-dark.bg-dark { will-change: transform; }
.card { transform: translateZ(0); -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.product-card .card-img-top, .property-card .card-img-top { transform: translateZ(0); }
.hover-lift, .product-card, .property-card, .category-card, .btn, .navbar, .table tbody tr { will-change: transform, box-shadow; }
img { display: block; }
img.card-img-top { width: 100%; }

/* === WhatsApp floating button === */
.whatsapp-float { position: fixed; right: 18px; bottom: 18px; z-index: 1040; }
.whatsapp-float a { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; background-color: #25D366; color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,0.2); transition: transform .2s ease, box-shadow .2s ease; }
.whatsapp-float a:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,0.25); }
.whatsapp-float i { font-size: 26px; line-height: 1; }