/*
Theme Name: Houzez Pro - Real Estate
Theme URI: https://houzezpro.com
Author: Houzez Team
Author URI: https://houzezpro.com
Description: Professional real estate WordPress theme with advanced search, MLS integration, and monetization features
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GPL v2 or later
Text Domain: houzez-pro
Tags: real-estate, property, two-columns, right-sidebar, custom-background, custom-colors, custom-menu, featured-images, theme-options, translation-ready
*/

/* ============================================
   CSS VARIABLES & ROOT STYLES
   ============================================ */
:root {
    --primary-color: #00aaff;
    --primary-dark: #0088cc;
    --primary-light: #33bbff;
    --secondary-color: #1a1a2e;
    --secondary-light: #16213e;
    --accent-color: #ff6b6b;
    --success-color: #51cf66;
    --warning-color: #ffd93d;
    --danger-color: #ff6b6b;
    --text-dark: #2d3748;
    --text-light: #718096;
    --text-muted: #a0aec0;
    --border-color: #e2e8f0;
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.15);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Poppins', sans-serif;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #fff;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p { margin-bottom: 1rem; }

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

/* ============================================
   LAYOUT & CONTAINERS
   ============================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    width: 100%;
    padding: 0 20px;
}

.container-wide {
    max-width: 1400px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col {
    flex: 1;
    padding: 0 15px;
}

/* Grid System */
.grid {
    display: grid;
    gap: 30px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ============================================
   HEADER STYLES
   ============================================ */
.site-header {
    background: var(--bg-white);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.site-header.scrolled {
    box-shadow: var(--shadow-lg);
}

/* Top Header */
.header-top {
    background: var(--secondary-color);
    color: #fff;
    padding: 10px 0;
    font-size: 14px;
}

.header-top-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-contact span {
    margin-right: 20px;
}

.header-contact i {
    margin-right: 5px;
    color: var(--primary-color);
}

.header-social a {
    color: #fff;
    margin-left: 15px;
    transition: var(--transition);
}

.header-social a:hover {
    color: var(--primary-color);
}

.user-actions a {
    color: #fff;
    margin-left: 15px;
    padding: 5px 15px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.user-actions a:hover {
    background: var(--primary-color);
}

/* Main Header */
.header-main {
    padding: 20px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-branding img {
    max-height: 50px;
}

.site-title {
    font-size: 1.75rem;
    margin: 0;
}

.site-title a {
    color: var(--secondary-color);
}

/* Navigation */
.main-navigation ul {
    display: flex;
    align-items: center;
    gap: 30px;
}

.main-navigation a {
    color: var(--text-dark);
    font-weight: 500;
    padding: 10px 0;
    position: relative;
    transition: var(--transition);
}

.main-navigation a:hover,
.main-navigation a.current {
    color: var(--primary-color);
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.main-navigation a:hover::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--secondary-color);
    transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-toggle,
.header-action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-light);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.search-toggle:hover,
.header-action-btn:hover {
    background: var(--primary-color);
    color: #fff;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 15px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    text-decoration: none;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: #fff;
}

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

.btn-secondary:hover {
    background: var(--secondary-light);
    color: #fff;
}

.btn-outline {
    background: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: #fff;
}

.btn-large {
    padding: 15px 40px;
    font-size: 16px;
}

.btn-small {
    padding: 8px 20px;
    font-size: 14px;
}

.btn-block {
    width: 100%;
}

.btn-icon i {
    font-size: 18px;
}

/* ============================================
   PROPERTY CARDS
   ============================================ */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.property-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
}

.property-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.property-card-image {
    position: relative;
    height: 280px;
    overflow: hidden;
}

.property-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.property-card:hover .property-card-image img {
    transform: scale(1.1);
}

.property-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 15px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    z-index: 2;
}

.property-badge.featured {
    background: var(--accent-color);
}

.property-badge.sold {
    background: var(--secondary-color);
}

.property-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 2;
}

.property-action-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.property-action-btn:hover {
    background: var(--primary-color);
    color: #fff;
    transform: scale(1.1);
}

.property-action-btn.active {
    background: var(--primary-color);
    color: #fff;
}

.property-card-content {
    padding: 25px;
}

.property-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.property-price-suffix {
    font-size: 16px;
    color: var(--text-light);
    font-weight: 400;
}

.property-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.property-title a {
    color: var(--secondary-color);
    transition: var(--transition);
}

.property-title a:hover {
    color: var(--primary-color);
}

.property-location {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 14px;
}

.property-location i {
    color: var(--primary-color);
}

.property-features {
    display: flex;
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.property-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-size: 14px;
}

.property-feature i {
    color: var(--primary-color);
    font-size: 16px;
}

.property-feature strong {
    color: var(--text-dark);
    font-weight: 600;
}

/* ============================================
   SEARCH PANEL
   ============================================ */
.search-panel {
    background: var(--bg-white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    margin: 40px 0;
}

.search-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
}

.search-tab {
    padding: 15px 30px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.search-tab:hover {
    background: var(--bg-light);
}

.search-tab.active {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
}

.search-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-dark);
}

.form-control,
.form-select {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 15px;
    transition: var(--transition);
    background: var(--bg-white);
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 170, 255, 0.1);
}

.search-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* Advanced Filters */
.advanced-filters-toggle {
    margin-top: 20px;
    text-align: center;
}

.toggle-advanced {
    background: var(--bg-light);
    border: none;
    padding: 12px 30px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.toggle-advanced:hover {
    background: var(--primary-color);
    color: #fff;
}

.advanced-filters {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid var(--border-color);
}

/* Autocomplete */
.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.autocomplete-item {
    padding: 15px;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 15px;
}

.autocomplete-item:hover {
    background: var(--bg-light);
}

.autocomplete-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--secondary-color);
    color: #fff;
    padding: 60px 0 20px;
    margin-top: 80px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-widget h3,
.footer-widget h4 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-widget ul li {
    margin-bottom: 12px;
}

.footer-widget a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-widget a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    z-index: 999;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
}

.back-to-top.show {
    display: flex;
}

/* ============================================
   NOTIFICATIONS
   ============================================ */
.houzez-notification {
    position: fixed;
    top: 80px;
    right: 30px;
    background: var(--bg-white);
    padding: 20px 25px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    min-width: 300px;
    z-index: 9999;
    transform: translateX(400px);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-left: 4px solid var(--primary-color);
}

.houzez-notification.show {
    transform: translateX(0);
}

.houzez-notification.success {
    border-left-color: var(--success-color);
}

.houzez-notification.error {
    border-left-color: var(--danger-color);
}

.houzez-notification.warning {
    border-left-color: var(--warning-color);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(3, 1fr); }
    .properties-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    
    .container { padding: 0 15px; }
    
    .header-top { display: none; }
    
    .menu-toggle { display: flex; }
    
    .main-navigation ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-white);
        box-shadow: var(--shadow-lg);
        padding: 20px;
    }
    
    .main-navigation ul.active {
        display: flex;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .properties-grid {
        grid-template-columns: 1fr;
    }
    
    .search-form {
        grid-template-columns: 1fr;
    }
    
    .search-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.p-0 { padding: 0 !important; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }
.p-5 { padding: 3rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }
