/* MAP PAGE SPECIFIC */
        .map-layout {
            display: grid;
            grid-template-columns: 2fr 1fr;
            gap: 20px;
            margin-bottom: 20px;
        }

        .map-container {
            background: #3a3a3a;
            border-radius: 15px;
            overflow: hidden;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
            height: 600px;
            position: relative;
        }

        .mock-map {
            width: 100%;
            height: 100%;
            position: relative;
            background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
        }

        .map-grid {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-image:
                linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
                linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
            background-size: 50px 50px;
        }

        /* Map Search Bar */
        .map-search-container {
            position: absolute;
            top: 20px;
            left: 20px;
            right: 20px;
            z-index: 10;
        }

        .map-search-input {
            width: 100%;
            padding: 14px 45px 14px 20px;
            background: rgba(255, 255, 255, 0.95);
            color: #2a2a2a;
            border: 2px solid rgba(102, 126, 234, 0.3);
            border-radius: 12px;
            font-size: 14px;
            font-weight: 500;
            -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        }

        .map-search-input:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
            background: rgba(255, 255, 255, 1);
        }

        .map-search-input::placeholder {
            color: #999;
        }

        .map-search-icon {
            position: absolute;
            right: 15px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 18px;
            pointer-events: none;
        }

        .map-label {
            position: absolute;
            top: 80px;
            left: 20px;
            background: rgba(0, 0, 0, 0.7);
            color: white;
            padding: 10px 20px;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 600;
            -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
        }

        .map-marker {
            position: absolute;
            width: 40px;
            height: 40px;
            background: #4ade80;
            border-radius: 50% 50% 50% 0;
            transform: rotate(-45deg);
            border: 3px solid white;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .map-marker:hover {
            transform: rotate(-45deg) scale(1.3);
            background: #22c55e;
            z-index: 10;
        }

        .map-marker.highlighted {
            background: #3b82f6;
            transform: rotate(-45deg) scale(1.4);
            border-color: #60a5fa;
            box-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
            z-index: 10;
        }

        .map-marker::after {
            content: '';
            position: absolute;
            width: 14px;
            height: 14px;
            background: white;
            border-radius: 50%;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        }

        .marker-1 {
            top: 25%;
            left: 30%;
        }

        .marker-2 {
            top: 40%;
            left: 55%;
        }

        .marker-3 {
            top: 60%;
            left: 35%;
        }

        .marker-4 {
            top: 30%;
            left: 70%;
        }

        .marker-5 {
            top: 70%;
            left: 60%;
        }

        .house-listings {
            background: #3a3a3a;
            border-radius: 15px;
            padding: 0;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
            height: 600px;
            overflow-y: auto;
        }

        .house-listings h3 {
            color: #e0e0e0;
            font-size: 20px;
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 2px solid #555;
        }

        .listings-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding: 20px;
            border-bottom: 2px solid #555;
            position: sticky;
            top: 0;
            background: #3a3a3a;
            z-index: 10;
        }

        .listings-header h3 {
            margin: 0;
            padding: 0 0 0 5px;
            border: none;
        }

        .compare-actions {
            display: flex;
            gap: 10px;
            align-items: center;
        }

        .house-item {
            background: #4a4a4a;
            padding: 15px;
            border-radius: 10px;
            margin: 0 20px 15px 20px;
            border: 2px solid #555;
            transition: all 0.3s ease;
            position: relative;
            overflow: visible;
        }

        .house-item:last-of-type {
            margin-bottom: 20px;
        }

        .compare-btn {
            padding: 8px 16px;
            background: #667eea;
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .compare-btn:hover {
            background: #5568d3;
            transform: translateY(-2px);
        }

        .compare-btn:disabled {
            background: #4a4a4a;
            cursor: not-allowed;
            transform: none;
        }

        .clear-compare-btn {
            padding: 8px 16px;
            background: #ef4444;
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            margin-left: 10px;
        }

        .clear-compare-btn:hover {
            background: #dc2626;
            transform: translateY(-2px);
        }

        .clear-compare-btn.hidden {
            display: none;
        }


        .undo-btn {
            position: fixed;
            bottom: 20px;
            right: 20px;
            padding: 12px 24px;
            background: #4ade80;
            color: #1a1a1a;
            border: none;
            border-radius: 10px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 12px rgba(74, 222, 128, 0.4);
            z-index: 1000;
            opacity: 0;
            transform: translateY(100px);
            pointer-events: none;
        }

        .undo-btn.visible {
            opacity: 1;
            transform: translateY(0);
            pointer-events: auto;
        }

        .undo-btn:hover {
            background: #22c55e;
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(74, 222, 128, 0.5);
        }

        .comparison-image-carousel {
            position: relative;
            width: 100%;
            height: 250px;
            background: #2a2a2a;
            border-radius: 10px;
            overflow: hidden;
            margin-bottom: 20px;
        }

        .carousel-image {
            width: 100%;
            height: 100%;
            display: none;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            justify-content: center;
            align-items: center;
            font-size: 64px;
            color: white;
        }

        .carousel-image.active {
            display: flex;
        }

        .carousel-arrow {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(0, 0, 0, 0.7);
            color: white;
            border: none;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            font-size: 20px;
            cursor: pointer;
            transition: all 0.3s ease;
            z-index: 10;
        }

        .carousel-arrow:hover {
            background: rgba(0, 0, 0, 0.9);
            transform: translateY(-50%) scale(1.1);
        }

        .carousel-arrow.left {
            left: 10px;
        }

        .carousel-arrow.right {
            right: 10px;
        }

        .carousel-dots {
            position: absolute;
            bottom: 15px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 8px;
            z-index: 10;
        }

        .carousel-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.5);
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .carousel-dot.active {
            background: white;
            width: 12px;
            height: 12px;
        }

        .compare-indicator {
            position: absolute;
            top: 10px;
            right: 10px;
            width: 24px;
            height: 24px;
            border: 3px solid #667eea;
            border-radius: 50%;
            background: transparent;
            cursor: pointer;
            transition: all 0.3s ease;
            z-index: 5;
        }

        .compare-indicator.selected {
            background: #667eea;
            border-color: #667eea;
        }

        .compare-indicator.selected::after {
            content: '✓';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: white;
            font-size: 14px;
            font-weight: bold;
        }

        /* COMPARE MODAL OVERLAY */
        .compare-modal-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.92);
            z-index: 10000;
            justify-content: center;
            align-items: center;
            padding: 30px;
        }

        .compare-modal-overlay.active {
            display: flex;
        }

        .compare-modal-content {
            background: #2a2a2a;
            border-radius: 20px;
            width: 100%;
            max-width: 1400px;
            max-height: 90vh;
            overflow-y: auto;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
            display: flex;
            flex-direction: column;
        }

        .compare-modal-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            padding: 25px 40px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-radius: 20px 20px 0 0;
        }

        .compare-modal-header h2 {
            color: white;
            font-size: 24px;
            font-weight: 700;
            margin: 0;
        }

        .compare-modal-close {
            background: rgba(255, 255, 255, 0.2);
            border: 2px solid rgba(255, 255, 255, 0.3);
            color: white;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            font-size: 24px;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            line-height: 1;
        }

        .compare-modal-close:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: rotate(90deg) scale(1.1);
        }

        #comparisonContainer {
            padding: 30px 40px;
        }

        .compare-modal .modal {
            max-width: 1200px;
        }

        .comparison-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
            gap: 20px;
        }

        .comparison-container.two-properties {
            grid-template-columns: 1fr 1fr;
        }

        .comparison-container.three-properties {
            grid-template-columns: repeat(3, 1fr);
        }

        .comparison-property {
            background: #4a4a4a;
            border-radius: 15px;
            padding: 25px;
        }

        .comparison-property h3 {
            color: #e0e0e0;
            font-size: 20px;
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 2px solid #555;
        }

        .comparison-image {
            width: 100%;
            height: 200px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 10px;
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 48px;
            color: white;
            margin-bottom: 20px;
        }

        .comparison-details {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .comparison-row {
            display: flex;
            justify-content: space-between;
            padding: 10px;
            background: #3a3a3a;
            border-radius: 8px;
        }

        .comparison-label {
            color: #b0b0b0;
            font-size: 14px;
            font-weight: 600;
        }

        .comparison-value {
            color: #e0e0e0;
            font-size: 14px;
            font-weight: 600;
        }

        .comparison-price {
            font-size: 24px;
            font-weight: 700;
            color: #4ade80;
            margin-bottom: 15px;
        }

        /* ENLARGED IMAGE VIEWER */
        .image-viewer-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.95);
            z-index: 10002;
            animation: fadeIn 0.3s ease-out;
        }

        .image-viewer-overlay.active {
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .image-viewer-content {
            position: relative;
            max-width: 90%;
            max-height: 90%;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .enlarged-image {
            max-width: 100%;
            max-height: 90vh;
            border-radius: 15px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 200px;
            color: white;
            padding: 100px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
        }

        .image-viewer-arrow {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(255, 255, 255, 0.2);
            color: white;
            border: none;
            width: 60px;
            height: 60px;
            border-radius: 50%;
            font-size: 30px;
            cursor: pointer;
            transition: all 0.3s ease;
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
        }

        .image-viewer-arrow:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: translateY(-50%) scale(1.1);
        }

        .image-viewer-arrow.left {
            left: 30px;
        }

        .image-viewer-arrow.right {
            right: 30px;
        }

        .image-viewer-close {
            position: absolute;
            top: 30px;
            right: 30px;
            background: rgba(255, 255, 255, 0.2);
            color: white;
            border: none;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            font-size: 30px;
            cursor: pointer;
            transition: all 0.3s ease;
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
        }

        .image-viewer-close:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: scale(1.1);
        }

        .image-viewer-counter {
            position: absolute;
            bottom: 30px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0, 0, 0, 0.7);
            color: white;
            padding: 10px 20px;
            border-radius: 20px;
            font-size: 16px;
            font-weight: 600;
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
        }

        .house-item:hover {
            border-color: #888;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
        }

        .house-item.highlighted {
            transform: scale(1.05);
            border-color: #4ade80;
            box-shadow: 0 8px 20px rgba(74, 222, 128, 0.3);
            z-index: 5;
        }

        .house-item.discarded {
            opacity: 0;
            height: 0;
            padding: 0;
            margin: 0;
            overflow: hidden;
            transition: all 0.3s ease;
        }

        .house-address {
            font-size: 16px;
            font-weight: 600;
            color: #e0e0e0;
            margin-bottom: 8px;
        }

        .house-price {
            font-size: 18px;
            font-weight: 700;
            color: #4ade80;
            margin-bottom: 12px;
        }

        .house-activity {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 13px;
            font-weight: 600;
            margin-bottom: 12px;
        }

        .house-activity.high {
            background: rgba(74, 222, 128, 0.2);
            border: 1px solid #4ade80;
            color: #4ade80;
        }

        .house-activity.medium {
            background: rgba(251, 191, 36, 0.2);
            border: 1px solid #fbbf24;
            color: #fbbf24;
        }

        .house-activity.low {
            background: rgba(239, 68, 68, 0.2);
            border: 1px solid #ef4444;
            color: #ef4444;
        }

        .house-actions {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        /* HOUSE DETAILS RIBBON */
        .house-details-ribbon {
            position: absolute;
            right: 0;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(0, 0, 0, 0.85);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            padding: 8px 12px;
            border-radius: 6px 0 0 6px;
            box-shadow: -4px 0 12px rgba(0, 0, 0, 0.4);
            opacity: 0;
            transition: opacity 0.2s ease;
            z-index: 10;
            min-width: 140px;
        }

        .house-item:hover .house-details-ribbon {
            opacity: 1;
        }

        .ribbon-detail {
            display: flex;
            align-items: center;
            gap: 6px;
            color: white;
            font-size: 11px;
            margin-bottom: 4px;
            font-weight: 700;
        }

        .ribbon-detail:last-child {
            margin-bottom: 0;
        }

        .ribbon-icon {
            font-size: 14px;
        }

        /* MAP FILTER SECTION */
        .map-filter-section {
            background: #2a2a2a;
            border-radius: 12px;
            padding: 15px;
            margin-bottom: 15px;
        }

        .filter-mode-toggle {
            display: flex;
            gap: 10px;
            margin-bottom: 15px;
        }

        .filter-mode-btn {
            flex: 1;
            padding: 10px;
            background: #3a3a3a;
            color: #b0b0b0;
            border: 2px solid #3a3a3a;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .filter-mode-btn:hover {
            background: #4a4a4a;
        }

        .filter-mode-btn.active {
            background: #667eea;
            color: white;
            border-color: #667eea;
        }

        .filter-content {
            animation: fadeIn 0.3s ease;
        }

        .filter-content.hidden {
            display: none;
        }

        .client-select-dropdown {
            width: 100%;
            padding: 12px;
            background: #3a3a3a;
            color: #e0e0e0;
            border: 2px solid #4a4a4a;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .client-select-dropdown:hover {
            border-color: #667eea;
        }

        .client-select-dropdown:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        }

        .client-select-dropdown option {
            background: #3a3a3a;
            color: #e0e0e0;
        }

        .custom-filter-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-bottom: 12px;
        }

        .filter-tag {
            padding: 8px 14px;
            background: #3a3a3a;
            color: #b0b0b0;
            border: 2px solid #4a4a4a;
            border-radius: 20px;
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .filter-tag:hover {
            background: #4a4a4a;
            border-color: #667eea;
        }

        .filter-tag.active {
            background: #667eea;
            color: white;
            border-color: #667eea;
        }

        .active-filters {
            min-height: 50px;
            background: #1a1a1a;
            border-radius: 8px;
            margin-top: 12px;
        }

        .active-filter-badge {
            display: inline-block;
            padding: 6px 12px;
            background: #667eea;
            color: white;
            border-radius: 15px;
            font-size: 12px;
            font-weight: 600;
        }

        .clear-filters-btn {
            width: 100%;
            padding: 10px;
            background: #ef4444;
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            margin-top: 12px;
            transition: all 0.3s ease;
        }

        .clear-filters-btn:hover {
            background: #dc2626;
        }

        /* ===========================================
           LUXURY THEME OVERRIDES
           =========================================== */

        body[data-theme^="luxury"] .map-container , body[data-theme="deep-blue"] .map-container {
            background: var(--bg-card);
            box-shadow: var(--shadow-card);
        }

        body[data-theme="luxury-dark"] .map-container {
            border: 1px solid #ffffff;
        }

        body[data-theme^="luxury"] .mock-map , body[data-theme="deep-blue"] .mock-map {
            background: var(--bg-main);
        }

        body[data-theme^="luxury"] .map-grid , body[data-theme="deep-blue"] .map-grid {
            background-image:
                linear-gradient(rgba(var(--text-primary-rgb), 0.08) 1px, transparent 1px),
                linear-gradient(90deg, rgba(var(--text-primary-rgb), 0.08) 1px, transparent 1px);
        }

        body[data-theme^="luxury"] .map-search-input , body[data-theme="deep-blue"] .map-search-input {
            background: var(--bg-card);
            color: var(--text-primary);
            border-color: var(--border-soft);
            box-shadow: var(--shadow-card);
        }

        body[data-theme^="luxury"] .map-search-input:focus , body[data-theme="deep-blue"] .map-search-input:focus {
            border-color: var(--accent-primary);
            box-shadow: 0 6px 16px rgba(var(--accent-primary-rgb), 0.25);
        }

        body[data-theme^="luxury"] .map-search-input::placeholder , body[data-theme="deep-blue"] .map-search-input::placeholder {
            color: var(--text-muted);
        }

        body[data-theme^="luxury"] .map-label , body[data-theme="deep-blue"] .map-label {
            background: var(--text-primary);
            color: var(--bg-main);
        }

        body[data-theme^="luxury"] .map-marker {
            background: var(--text-primary);
        }

        body[data-theme="deep-blue"] .map-marker {
            background: #4ade80;
        }

        body[data-theme^="luxury"] .map-marker:hover , body[data-theme="deep-blue"] .map-marker:hover {
            background: var(--accent-primary);
        }

        body[data-theme="luxury-dark"] .map-marker:hover {
            background: #4ade80;
        }

        body[data-theme^="luxury"] .map-marker.highlighted , body[data-theme="deep-blue"] .map-marker.highlighted {
            background: var(--accent-primary);
            border-color: var(--accent-primary);
            box-shadow: 0 0 16px rgba(var(--accent-primary-rgb), 0.4);
        }

        body[data-theme="luxury-dark"] .map-marker.highlighted {
            background: #22c55e;
            border-color: #22c55e;
            box-shadow: 0 0 16px rgba(34, 197, 94, 0.45);
        }

        body[data-theme^="luxury"] .house-listings , body[data-theme="deep-blue"] .house-listings {
            background: var(--bg-card);
            box-shadow: var(--shadow-card);
        }

        body[data-theme="luxury"] .house-listings {
            background: var(--card-noise), var(--card-bg);
            background-size: 140px 140px, auto;
        }

        body[data-theme^="luxury"] .house-listings h3, body[data-theme="deep-blue"] .house-listings h3,
        body[data-theme^="luxury"] .listings-header h3 , body[data-theme="deep-blue"] .listings-header h3 {
            color: var(--text-primary);
        }

        body[data-theme^="luxury"] .listings-header , body[data-theme="deep-blue"] .listings-header {
            background: var(--bg-card);
            border-bottom-color: var(--border-soft);
        }

        body[data-theme="luxury"] .listings-header {
            background: var(--header-bg);
            border-bottom-color: var(--border-strong);
        }

        body[data-theme="luxury"] .listings-header h3 {
            color: var(--header-text);
        }

        body[data-theme="luxury"] .map-search-input {
            background: var(--input-bg);
            color: var(--input-text);
            border-color: var(--input-border);
            box-shadow: 0 4px 12px rgba(62, 85, 107, 0.12);
        }

        body[data-theme="luxury"] .map-search-input:focus {
            border-color: var(--border-strong);
            box-shadow: 0 0 0 3px rgba(62, 85, 107, 0.18);
        }

        body[data-theme="luxury"] .map-search-input::placeholder {
            color: var(--text-muted);
        }

        /* Office Classic map marker color tuning */
        body[data-theme="luxury"] .map-label {
            background: var(--header-bg);
            color: var(--header-text);
        }

        body[data-theme="luxury"] .map-marker {
            background: var(--btn-primary-bg);
        }

        body[data-theme="luxury"] .map-marker:hover,
        body[data-theme="luxury"] .map-marker.highlighted {
            background: #22c55e;
            border-color: #22c55e;
            box-shadow: 0 0 16px rgba(34, 197, 94, 0.45);
        }

        body[data-theme^="luxury"] .house-item , body[data-theme="deep-blue"] .house-item {
            background: var(--bg-card);
            border-color: var(--border-soft);
            box-shadow: 0 4px 10px rgba(var(--text-primary-rgb), 0.06);
        }

        body[data-theme="luxury"] .house-item {
            background: var(--card-noise), var(--card-bg);
            background-size: 140px 140px, auto;
        }

        body[data-theme^="luxury"] .house-item:hover, body[data-theme="deep-blue"] .house-item:hover,
        body[data-theme^="luxury"] .house-item.highlighted , body[data-theme="deep-blue"] .house-item.highlighted {
            border-color: var(--accent-primary);
            box-shadow: 0 6px 16px rgba(var(--accent-primary-rgb), 0.2);
        }

        /* House item text colors for luxury theme */
        body[data-theme^="luxury"] .house-address {
            color: var(--text-primary);
        }

        body[data-theme^="luxury"] .house-price {
            color: var(--accent-primary);
        }

        body[data-theme="luxury"] .house-price {
            color: var(--text-primary);
        }

        body[data-theme^="luxury"] .house-activity {
            color: var(--text-primary);
        }

        body[data-theme^="luxury"] .house-actions button {
            color: var(--text-primary);
        }

        body[data-theme^="luxury"] .ribbon-detail {
            color: var(--bg-card);
        }

        body[data-theme^="luxury"] .compare-btn , body[data-theme="deep-blue"] .compare-btn {
            background: var(--accent-primary);
            color: #ffffff;
        }

        body[data-theme^="luxury"] .compare-btn:hover , body[data-theme="deep-blue"] .compare-btn:hover {
            background: var(--accent-primary);
        }

        body[data-theme="luxury"] .compare-btn {
            color: var(--btn-primary-text);
            border-color: var(--border-strong);
        }

        body[data-theme^="luxury"] .clear-compare-btn , body[data-theme="deep-blue"] .clear-compare-btn {
            background: transparent;
            color: var(--text-primary);
            border-color: var(--border-soft);
        }

        body[data-theme^="luxury"] .clear-compare-btn:hover , body[data-theme="deep-blue"] .clear-compare-btn:hover {
            border-color: var(--accent-primary);
            background: rgba(var(--accent-primary-rgb), 0.08);
        }

        body[data-theme="luxury"] .clear-compare-btn,
        body[data-theme="luxury"] .clear-filters-btn {
            background: var(--btn-secondary-bg);
            color: var(--btn-secondary-text);
            border-color: var(--border-strong);
        }

        body[data-theme="luxury"] .clear-compare-btn:hover,
        body[data-theme="luxury"] .clear-filters-btn:hover {
            background: var(--card-bg-alt);
        }

        body[data-theme^="luxury"] .compare-indicator.selected , body[data-theme="deep-blue"] .compare-indicator.selected {
            background: var(--accent-primary);
        }

        body[data-theme^="luxury"] .compare-modal-content, body[data-theme="deep-blue"] .compare-modal-content,
        body[data-theme^="luxury"] .compare-modal .modal , body[data-theme="deep-blue"] .compare-modal .modal {
            background: var(--bg-card);
            color: var(--text-primary);
        }

        body[data-theme="luxury"] .compare-modal-content,
        body[data-theme="luxury"] .compare-modal .modal {
            background: var(--card-noise), var(--card-bg);
            background-size: 140px 140px, auto;
        }

        body[data-theme^="luxury"] .map-filter-section , body[data-theme="deep-blue"] .map-filter-section {
            background: var(--bg-card);
            border-color: var(--border-soft);
        }

        body[data-theme="luxury"] .map-filter-section {
            background: var(--card-noise), var(--card-bg);
            background-size: 140px 140px, auto;
        }

        body[data-theme^="luxury"] .client-select-dropdown , body[data-theme="deep-blue"] .client-select-dropdown {
            background: var(--bg-card);
            color: var(--text-primary);
            border-color: var(--border-soft);
        }

        body[data-theme^="luxury"] .client-select-dropdown:hover , body[data-theme="deep-blue"] .client-select-dropdown:hover {
            border-color: var(--accent-primary);
        }

        body[data-theme^="luxury"] .client-select-dropdown:focus , body[data-theme="deep-blue"] .client-select-dropdown:focus {
            border-color: var(--accent-primary);
            box-shadow: 0 0 0 3px rgba(var(--accent-primary-rgb), 0.15);
        }

        body[data-theme^="luxury"] .filter-mode-btn , body[data-theme="deep-blue"] .filter-mode-btn {
            background: transparent;
            color: var(--text-muted);
            border-color: var(--border-soft);
        }

        body[data-theme^="luxury"] .filter-mode-btn:hover , body[data-theme="deep-blue"] .filter-mode-btn:hover {
            background: rgba(var(--accent-primary-rgb), 0.08);
            color: var(--text-primary);
        }

        body[data-theme^="luxury"] .filter-mode-btn.active , body[data-theme="deep-blue"] .filter-mode-btn.active {
            background: var(--accent-primary);
            color: #ffffff;
            border-color: var(--accent-primary);
        }

        body[data-theme^="luxury"] .filter-tag , body[data-theme="deep-blue"] .filter-tag {
            background: transparent;
            color: var(--text-primary);
            border-color: var(--border-soft);
        }

        body[data-theme^="luxury"] .filter-tag:hover , body[data-theme="deep-blue"] .filter-tag:hover {
            border-color: var(--accent-primary);
            background: rgba(var(--accent-primary-rgb), 0.08);
        }

        body[data-theme^="luxury"] .filter-tag.active , body[data-theme="deep-blue"] .filter-tag.active {
            background: var(--accent-primary);
            color: #ffffff;
            border-color: var(--accent-primary);
        }

        body[data-theme="luxury"] .filter-mode-btn,
        body[data-theme="luxury"] .filter-tag {
            border-color: var(--border-strong);
        }

        body[data-theme="luxury"] .filter-mode-btn.active,
        body[data-theme="luxury"] .filter-tag.active {
            color: var(--btn-primary-text);
        }

        body[data-theme^="luxury"] .active-filters , body[data-theme="deep-blue"] .active-filters {
            background: var(--bg-card);
            border: 1px solid var(--border-soft);
        }

        body[data-theme="luxury"] .active-filters {
            background: var(--card-noise), var(--card-bg);
            background-size: 140px 140px, auto;
        }

        body[data-theme^="luxury"] .active-filter-badge , body[data-theme="deep-blue"] .active-filter-badge {
            background: var(--accent-primary);
        }

        body[data-theme^="luxury"] .clear-filters-btn , body[data-theme="deep-blue"] .clear-filters-btn {
            background: var(--accent-strong);
            color: #ffffff;
        }

        body[data-theme^="luxury"] .clear-filters-btn:hover , body[data-theme="deep-blue"] .clear-filters-btn:hover {
            background: var(--accent-strong);
        }

        /* ===========================================
           DEEP BLUE DROPDOWN FIX
           Ensure dropdowns are not clipped by overflow
           =========================================== */

        body[data-theme="deep-blue"] .map-filter-section {
            overflow: visible;
            position: relative;
            z-index: 200;
        }

        body[data-theme="deep-blue"] .filter-content {
            overflow: visible;
        }

        /* Keep house-listings with proper scroll behavior */
        body[data-theme="deep-blue"] .house-listings {
            height: 600px;
            overflow-y: auto;
        }

        body[data-theme="deep-blue"] .house-listings .listings-header {
            position: sticky;
            top: 0;
            z-index: 150;
            background: var(--bg-card);
        }

        body[data-theme="deep-blue"] .client-select-dropdown {
            position: relative;
            z-index: 300;
        }

        /* Searchable dropdown container must allow overflow */
        body[data-theme="deep-blue"] .searchable-dropdown {
            position: relative;
            z-index: 1500;
        }

        /* Dropdown list should appear above all other content */
        body[data-theme="deep-blue"] .searchable-dropdown-list {
            position: absolute;
            z-index: 1501;
            max-height: 250px;
            overflow-y: auto;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
        }

        /* ===========================================
           OFFICE CLASSIC THEME ENHANCEMENTS
           Additional refinements for warm paper theme
           =========================================== */

        /* Comparison modal text colors */
        body[data-theme="luxury"] .comparison-label {
            color: var(--text-muted);
        }

        body[data-theme="luxury"] .comparison-value {
            color: var(--text-primary);
        }

        body[data-theme="luxury"] .comparison-price {
            color: var(--accent-primary);
        }

        body[data-theme="luxury"] .comparison-price {
            color: var(--text-primary);
        }

        body[data-theme="luxury"] .comparison-property h3 {
            color: var(--text-primary);
            border-bottom-color: var(--border-soft);
        }

        body[data-theme="luxury"] .compare-modal-header {
            background: var(--header-bg);
        }

        body[data-theme="luxury"] .compare-modal-header h2 {
            color: var(--header-text);
        }

        /* Image viewer for Office Classic */
        body[data-theme="luxury"] .image-viewer-overlay {
            background-color: rgba(22, 32, 45, 0.95);
        }

        body[data-theme="luxury"] .image-viewer-counter {
            background: var(--bg-card);
            color: var(--text-primary);
        }

        /* Map search icon */
        body[data-theme="luxury"] .map-search-icon {
            color: var(--text-muted);
        }

        /* House details ribbon */
        body[data-theme="luxury"] .house-details-ribbon {
            background: linear-gradient(135deg, var(--btn-primary-bg) 0%, var(--header-bg) 100%);
            color: #ffffff;
            border: 1px solid rgba(247, 245, 240, 0.35);
            box-shadow: -4px 0 14px rgba(62, 85, 107, 0.36);
        }

        body[data-theme="luxury"] .ribbon-detail {
            color: #ffffff;
        }

        body[data-theme="luxury"] .ribbon-icon,
        body[data-theme="luxury"] .ribbon-icon i,
        body[data-theme="luxury"] .ribbon-icon svg {
            color: #ffffff;
            fill: currentColor;
        }

        body[data-theme="luxury"] .house-details-ribbon span,
        body[data-theme="luxury"] .house-details-ribbon .ribbon-detail,
        body[data-theme="luxury"] .house-details-ribbon .ribbon-icon {
            color: #ffffff;
        }

        /* Carousel styles */
        body[data-theme="luxury"] .carousel-arrow {
            background: rgba(var(--text-primary-rgb), 0.7);
        }

        body[data-theme="luxury"] .carousel-arrow:hover {
            background: rgba(var(--text-primary-rgb), 0.9);
        }

        body[data-theme="luxury"] .carousel-dot {
            background: rgba(var(--text-primary-rgb), 0.5);
        }

        body[data-theme="luxury"] .carousel-dot.active {
            background: var(--text-primary);
        }

        /* Undo button */
        body[data-theme="luxury"] .undo-btn {
            background: var(--accent-primary);
            color: #ffffff;
            box-shadow: 0 4px 12px rgba(var(--accent-primary-rgb), 0.4);
        }

        body[data-theme="luxury"] .undo-btn:hover {
            background: var(--accent-strong);
        }

        /* Comparison row backgrounds */
        body[data-theme="luxury"] .comparison-row {
            background: var(--bg-muted);
        }

        body[data-theme="luxury"] .comparison-property {
            border: 1px solid var(--border-soft);
        }

