/* ===== Global ===== */ body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; margin: 0; background: #f8f9fa; color: #222; font-size: 16px; -webkit-font-smoothing: antialiased; } header { background: #007bff; color: white; padding: 0.5rem; text-align: center; font-weight: 600; font-size: 1rem; user-select: none; } main { padding: 1rem; max-width: 1800px; margin: auto; background: white; border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05); box-sizing: border-box; /* Added */ } /* ===== Filters ===== */ #filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1rem; align-items: start; } .filter-group { background: #f1f5fb; padding: 12px; border-radius: 10px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05); } .filter-group h3 { margin: 0 0 0.5rem; font-size: 1.1rem; font-weight: 600; color: #1f2937; } .filter-dropdown, .filter-input { padding: 0.5rem; font-size: 0.9rem; border: 1px solid #ccc; border-radius: 6px; width: 100%; box-sizing: border-box; margin-bottom: 0.6rem; } .filter-dropdown:focus, .filter-input:focus { outline: none; border-color: #007bff; box-shadow: 0 0 6px rgba(0, 123, 255, 0.5); } /* ===== Column Toggles ===== */ #columnToggles { display: flex; flex-wrap: nowrap; overflow-x: auto; padding: 10px; background: #f1f5fb; border-radius: 10px; margin-bottom: 1rem; box-sizing: border-box; /* Added */ } #columnToggles label { margin-right: 12px; white-space: nowrap; font-size: 0.9rem; } #columnToggles input { margin-right: 4px; } /* ===== Table Container ===== */ #tableContainer { width: 100%; max-width: 100vw; overflow-x: auto; /* ✅ Allow horizontal scroll */ box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05); border-radius: 12px; background: white; padding: 1rem; margin: 0 auto; box-sizing: border-box; position: relative; } /* ===== Table Styles ===== */ table { width: 100%; border-collapse: separate; border-spacing: 0 8px; min-width: 900px; font-size: 0.9rem; } th, td { padding: 0.75rem 1.2rem; text-align: center; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; } th { font-weight: 600; background: #f1f5fb; position: sticky; top: 0; z-index: 2; } td { background: #fff; border-radius: 8px; transition: background-color 0.15s; } tbody tr:hover td { background-color: #e6f0ff; box-shadow: 0 2px 6px rgba(0, 102, 255, 0.15); cursor: pointer; } /* ===== Price Column ===== */ td.price { font-weight: 700; color: #004c85; } /* ===== Card View on Desktop ===== */ #tableContainer.card-view { display: grid !important; grid-template-columns: 1fr; gap: 1.5rem; padding: 1rem 0; overflow-x: visible; box-sizing: border-box; } /* Tablets: 2 columns */ @media (min-width: 768px) { #tableContainer.card-view { grid-template-columns: repeat(2, 1fr); } } /* Desktops: 4 columns */ @media (min-width: 1024px) { #tableContainer.card-view { grid-template-columns: repeat(4, 1fr); } } /* Hide table in card view */ #tableContainer.card-view table { display: none; } /* Property card unified styling */ #tableContainer.card-view .property-card { padding: 0; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); background: white; display: flex; flex-direction: column; max-width: 100%; min-height: 420px; margin: 0 auto; width: 100%; /* Fill grid cell width */ box-sizing: border-box; } /* Image styles */ .property-card img { width: 100%; height: auto; object-fit: cover; aspect-ratio: 16 / 9; max-height: 220px; display: block; border-top-left-radius: 12px; border-top-right-radius: 12px; border-bottom-left-radius: 0; border-bottom-right-radius: 0; margin: 0 0 0.8rem 0; } .property-card > *:not(img) { padding-left: 1rem; padding-right: 1rem; padding-top: 0; padding-bottom: 0; } /* Property card hover effect */ #tableContainer.card-view .property-card:hover { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15); } /* Property card contents */ #tableContainer.card-view .property-card h2 { margin: 0 0 0.3rem 0; font-size: 1.25rem; color: #000000; } #tableContainer.card-view .property-card .location { font-size: 0.9rem; color: #64748b; margin-bottom: 0.8rem; } #tableContainer.card-view .property-card .price { font-size: 1.15rem; font-weight: 700; color: #0d54c9; margin-bottom: 0.8rem; } #tableContainer.card-view .property-card .price .purpose-text { font-size: 0.85rem; color: #6b7280; font-weight: 400; } #tableContainer.card-view .property-card .details { display: flex; flex-wrap: wrap; gap: 4px 4px; margin-bottom: 1rem; color: #374151; font-size: 0.9rem; } #tableContainer.card-view .property-card .details div { display: flex; align-items: center; gap: 3px; white-space: nowrap; min-width: 40px; justify-content: flex-start; margin-right: 4px; } #tableContainer.card-view .property-card .details div:nth-child(3), #tableContainer.card-view .property-card .details div:nth-child(4), #tableContainer.card-view .property-card .details div:nth-child(5) { margin-right: 12px; } /* Bottom bar normal flow on desktop */ #tableContainer.card-view .property-card .bottom-bar { display: flex; justify-content: space-between; align-items: center; padding-top: 0.75rem; border-top: 1px solid #e2e8f0; position: relative; } /* Agent & button styling */ #tableContainer.card-view .property-card .agent { font-size: 0.9rem; color: #1e40af; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70%; } #tableContainer.card-view .property-card .agent a { color: #1e40af; text-decoration: none; font-weight: 600; } #tableContainer.card-view .property-card .agent a:hover { text-decoration: underline; } #tableContainer.card-view .property-card button.copy-btn { background: transparent; border: none; color: #0d54c9; font-size: 18px; cursor: pointer; padding: 0; flex-shrink: 0; } #tableContainer.card-view .property-card button.copy-btn:hover { color: #0742a3; } /* ===== Mobile Styles ===== */ @media (max-width: 768px) { /* Make sure property card bottom padding is enough for the bottom bar */ #tableContainer .property-card { padding-bottom: 5rem; position: relative; } #tableContainer .property-card .bottom-bar { position: absolute; bottom: 0; left: 0; right: 0; height: 48px; padding: 0 1rem; border-top: 1px solid #e2e8f0; background: white; display: flex; justify-content: space-between; align-items: center; box-sizing: border-box; border-radius: 0 0 12px 12px; margin: 0; } /* Ensure agent text and button have zero margin/padding so they truly center */ #tableContainer .property-card .bottom-bar .agent { margin: 0; padding: 0; line-height: 1.2; } #tableContainer .property-card .bottom-bar button.copy-btn { margin: 0; padding: 0; line-height: 1; } } /* Extra mobile stacking for very narrow screens */ @media (max-width: 600px) { .property-card .details { flex-direction: row; flex-wrap: wrap; gap: 1px; } } /* NEW: Fix image aspect ratio and consistent height */ .property-card img { width: 100%; height: auto; object-fit: cover; aspect-ratio: 16 / 9; max-height: 220px; display: block; border-top-left-radius: 12px; border-top-right-radius: 12px; border-bottom-left-radius: 0; border-bottom-right-radius: 0; margin-bottom: 0.8rem; } @media (min-width: 769px) { .filter-toggle-container { display: flex; align-items: flex-start; gap: 40px; } #filterOptions { flex: 1; } #columnToggles { display: grid !important; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(5, auto); gap: 12px 24px; width: 500px; padding: 20px; background: #f1f5fb; border-radius: 10px; margin-left: auto; margin-right: auto; box-shadow: 0 0 10px rgba(0, 0, 0, 0.05); } #columnToggles label { font-size: 1rem; } } .view-toggle { padding: 0.5rem 1rem; margin: 0 0.25rem; cursor: pointer; border: 1px solid #ccc; background-color: #f0f0f0; color: #333; border-radius: 6px; transition: background-color 0.2s ease, color 0.2s ease; } .view-toggle.active { background-color: #007bff; color: white; border-color: #007bff; font-weight: bold; } #viewToggleContainer button { padding: 6px 12px; margin-right: 5px; border: 1px solid #ccc; background: #f0f0f0; cursor: pointer; transition: all 0.2s ease; } #viewToggleContainer button.active { background: #007bff; color: white; border-color: #007bff; } /* ===== Card View on Desktop ===== */ #tableContainer.card-view { display: grid !important; grid-template-columns: 1fr; gap: 1.5rem; padding: 1rem; /* ensure enough padding inside container */ overflow-x: hidden; /* prevent horizontal scroll */ box-sizing: border-box; width: 100%; max-width: 100%; /* prevent container growing too wide */ } /* Tablets: 2 columns */ @media (min-width: 768px) { #tableContainer.card-view { grid-template-columns: repeat(2, 1fr); } } /* Desktops: 4 columns */ @media (min-width: 1024px) { #tableContainer.card-view { grid-template-columns: repeat(4, 1fr); } } /* Hide table in card view */ #tableContainer.card-view table { display: none; } /* Property cards */ #tableContainer.card-view .property-card { margin: 0 auto; /* center cards */ width: 100%; /* fill grid column width */ max-width: 100%; /* never exceed grid column width */ box-sizing: border-box; padding: 0; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); background: white; display: flex; flex-direction: column; min-height: 420px; } /* Remove any horizontal margins on cards */ #tableContainer.card-view .property-card { margin-left: 0; margin-right: 0; } /* Make sure images inside cards don't cause overflow */ .property-card img { width: 100%; height: auto; object-fit: cover; aspect-ratio: 16 / 9; max-height: 220px; border-top-left-radius: 12px; border-top-right-radius: 12px; margin-bottom: 0.8rem; display: block; box-sizing: border-box; } /* Prevent any extra horizontal padding inside cards that can cause overflow */ .property-card > *:not(img) { padding-left: 1rem; padding-right: 1rem; padding-top: 0; padding-bottom: 0; box-sizing: border-box; } #tableContainer.card-view .property-card { display: flex; flex-direction: column; } #tableContainer.card-view .property-card .bottom-bar { margin-top: auto; /* This ensures the bottom-bar stays at the bottom */ padding-bottom: 15px; } @media (min-width: 768px) { #propertyFilters { display: grid; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, auto); gap: 0.5rem; width: 100%; /* full width of parent container */ max-width: 1400px; /* increase max-width from 1200px to 1400px or more */ min-width: 100px; /* fixed width */ margin: 0 auto; /* center horizontally */ padding: 0 1rem; box-sizing: border-box; } #propertyFilters h3 { grid-column: 1 / -1; /* span from the first column to the last */ margin-bottom: 0rem; /* optional spacing below the heading */ } /* Keep #filters as you had */ #filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 1rem; margin-bottom: 1rem; align-items: start; } /* Then specifically for #propertyFilters: */ #propertyFilters { grid-column: span 2; /* make it span 2 columns */ max-width: 350px; /* or whatever width you want */ width: 100%; margin: 0; padding: 0 1rem; box-sizing: border-box; } } #sizeFilters input { width: 100%; /* or a specific px/rem width */ min-width: 125px; } #priceFilters input { width: 100%; /* or a specific px/rem width */ min-width: 125px; } #loadingOverlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255,255,255,0.9); display: flex; justify-content: center; align-items: center; z-index: 9999; } .loader { border: 6px solid #f3f3f3; border-top: 6px solid #007bff; border-radius: 50%; width: 48px; height: 48px; animation: spin 1s linear infinite; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } .hidden { display: none !important; } #loadingOverlay { transition: opacity 0.3s ease; } #loadingOverlay.hidden { opacity: 0; pointer-events: none; } /* ===== Table Styles ===== */ table { width: 100%; border-collapse: separate; border-spacing: 0 8px; min-width: 900px; font-size: 0.9rem; } th, td { padding: 0.75rem 1.2rem; text-align: center; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; } th { font-weight: 600; background: #f1f5fb; position: sticky; top: 0; z-index: 2; } /* Add alternating row colors */ tbody tr:nth-child(even) td { background: #f8fafc; /* Light gray for even rows */ } tbody tr:nth-child(odd) td { background: #ffffff; /* White for odd rows */ } td { border-radius: 8px; transition: background-color 0.15s; } /* Hover effect - will override the alternating colors */ tbody tr:hover td { background-color: #e6f0ff !important; /* Important to override nth-child */ box-shadow: 0 2px 6px rgba(0, 102, 255, 0.15); cursor: pointer; } /* ===== Price Column ===== */ td.price { font-weight: 700; color: #004c85; }