/* ============================================
   Property Portal - TOASTERUI Glass Morphism
   ============================================ */

:root {
    /* Fallback branding colors (overridden by template) */
    --header-bg: #101035;
    --logo-color: #101035;
    --page-bg: #101035;
    --page-bg-rgb: 16, 16, 53;

    /* Glass elements */
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-bg-hover: rgba(255, 255, 255, 0.12);
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);

    /* Text colors */
    --text-primary: rgba(255, 255, 255, 0.95);
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);

    /* Status colors */
    --status-available: #22c55e;
    --status-under-offer: #eab308;
    --status-sold: #ef4444;
    --status-let: #3b82f6;

    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
}

/* ============================================
   Base Styles
   ============================================ */

.property-portal-app {
    min-height: 100vh;
}

/* ============================================
   Header
   ============================================ */

.portal-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-bg, #101035);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.portal-header-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: var(--spacing-sm) calc(var(--spacing-lg) * 2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
    transition: padding 0.3s ease;
}

.portal-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.portal-logo-img {
    max-height: 60px;
    max-width: 200px;
    object-fit: contain;
    transition: max-height 0.3s ease;
}

/* Scrolled state - smaller header */
.portal-header.scrolled .portal-header-content {
    padding: var(--spacing-xs) calc(var(--spacing-lg) * 2);
}

.portal-header.scrolled .portal-logo-img {
    max-height: 40px;
}

.portal-logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Center section - can hold filters or zone brand */
.portal-zone-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    color: var(--text-secondary);
    font-size: 14px;
    flex: 1;
}

.portal-zone-brand i {
    font-size: 16px;
}

/* Header Filters (in center of header bar) */
.header-filters {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    flex: 1;
}

.filter-icon,
.filter-clear-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    flex-shrink: 0;
}

.filter-clear-btn {
    text-decoration: none;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-clear-btn:hover {
    background: var(--glass-bg-hover);
    color: var(--text-primary);
    transform: scale(1.05);
}

.header-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

/* Search label inside input */
.header-search-label {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-primary);
    font-size: 13px;
    white-space: nowrap;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1;
}

.header-search-label i {
    font-size: 12px;
}

/* Hide label when input is focused or has value */
.header-search-wrapper:focus-within .header-search-label,
.header-search-input:not(:placeholder-shown) ~ .header-search-label {
    opacity: 0;
}

/* Also hide when input has value (JS will add class) */
.header-search-wrapper.has-value .header-search-label {
    opacity: 0;
}

.header-search-input {
    width: 140px;
    height: 36px;
    padding: 0 var(--spacing-sm) 0 75px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 13px;
    transition: all 0.2s ease;
}

.header-search-input::placeholder {
    color: var(--text-muted);
}

.header-search-input:focus {
    outline: none;
    background: var(--glass-bg-hover);
    border-color: rgba(255, 255, 255, 0.25);
    width: 180px;
    padding-left: var(--spacing-sm);
}

.header-filter-select {
    height: 36px;
    padding: 0 24px 0 10px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='rgba(255,255,255,0.5)' d='M5 7L1 3h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

.header-filter-select:focus {
    outline: none;
    background-color: var(--glass-bg-hover);
    border-color: rgba(255, 255, 255, 0.25);
}

.header-filter-select:hover {
    background-color: var(--glass-bg-hover);
}

.header-filter-select option {
    background: #1a1a3e;
    color: #ffffff;
    padding: 8px;
}

.portal-nav {
    display: flex;
    gap: var(--spacing-xs);
    flex-shrink: 0;
}

.nav-button {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.nav-button:hover,
.nav-button.active {
    background: var(--glass-bg-hover);
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* ============================================
   Workspace
   ============================================ */

.portal-workspace {
    padding: var(--spacing-sm) 0 var(--spacing-lg) 0;
}

.portal-content-wrapper {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* ============================================
   Glass Panel
   ============================================ */

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

/* ============================================
   Property List Page
   ============================================ */

.property-list-page {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* Search & Filters - Inline Layout */
.search-filters {
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
}

.search-form-inline {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: nowrap;
}

/* Filter Icon */
.filter-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    flex-shrink: 0;
}

.filter-icon-wrapper i {
    font-size: 24px;
    color: var(--text-primary);
}

/* Search Input - Inline */
.search-input-wrapper-inline {
    position: relative;
    display: flex;
    align-items: center;
    flex: 0 1 200px;
    min-width: 120px;
}

.search-icon-inline {
    position: absolute;
    left: var(--spacing-sm);
    color: var(--text-muted);
    font-size: 14px;
}

.search-input-inline {
    width: 100%;
    height: 48px;
    padding: 0 var(--spacing-md) 0 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
}

.search-input-inline::placeholder {
    color: var(--text-muted);
}

.search-input-inline:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
}

.clear-search-inline {
    position: absolute;
    right: var(--spacing-sm);
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.clear-search-inline:hover {
    color: var(--text-primary);
}

/* Filter Select - Inline (matches text input) */
.filter-select-inline {
    height: 48px;
    padding: 0 var(--spacing-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 100px;
    max-width: 160px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='rgba(255,255,255,0.6)' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.filter-select-inline:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
}

.filter-select-inline:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.filter-select-inline option {
    background: #1a1a3e;
    color: #ffffff;
    padding: 8px;
}

/* Legacy filter styles (keep for compatibility) */
.search-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: var(--spacing-md);
    color: var(--text-muted);
    font-size: 18px;
}

.search-input {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-md) var(--spacing-md) 48px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.2s ease;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
}

.clear-search {
    position: absolute;
    right: var(--spacing-md);
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.clear-search:hover {
    color: var(--text-primary);
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.filter-select {
    padding: var(--spacing-xs) var(--spacing-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
}

.filter-select option {
    background: #1a1a3e;
    color: #ffffff;
}

/* Results Info */
.results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
    padding: 0;
}

.results-count {
    color: var(--text-secondary);
    font-size: 14px;
}

.clear-filters {
    color: var(--text-muted);
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.clear-filters:hover {
    color: var(--text-primary);
}

.sort-select {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    padding: 6px 12px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}

.sort-select:hover,
.sort-select:focus {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

/* ============================================
   Property Grid (2 columns)
   ============================================ */

.property-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
}

@media (max-width: 768px) {
    .property-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
}

/* ============================================
   Property Card
   ============================================ */

.property-card {
    display: block;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.property-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--glass-shadow);
    background: var(--glass-bg-hover);
}

/* Card Carousel */
.property-card-carousel {
    display: block;
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
    text-decoration: none;
    cursor: pointer;
}

.card-carousel-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.card-carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-carousel-slide.active {
    opacity: 1;
}

.card-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.property-card:hover .card-carousel-slide.active img {
    transform: scale(1.02);
}

/* Card Carousel Navigation - Large Glass Style */
.card-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.property-card:hover .card-carousel-nav,
.property-card-carousel:hover .card-carousel-nav {
    opacity: 1;
}

.card-carousel-nav:hover {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

.card-carousel-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.card-carousel-prev {
    left: var(--spacing-md);
}

.card-carousel-next {
    right: var(--spacing-md);
}

/* Card Carousel Dots */
.card-carousel-dots {
    position: absolute;
    bottom: var(--spacing-sm);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.card-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.2s ease;
}

.card-carousel-dot.active,
.card-carousel-dot:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.2);
}

/* Legacy image wrapper (keep for compatibility) */
.property-card-image-wrapper {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
}

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

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

.property-card-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 48px;
}

/* Status Badge */
.status-badge {
    position: absolute;
    top: var(--spacing-sm);
    left: var(--spacing-sm);
    padding: 4px 12px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.status-available {
    color: var(--status-available);
    border: 1px solid var(--status-available);
}

.status-badge.status-under_offer {
    color: var(--status-under-offer);
    border: 1px solid var(--status-under-offer);
}

.status-badge.status-sold_stc,
.status-badge.status-sold {
    color: var(--status-sold);
    border: 1px solid var(--status-sold);
}

.status-badge.status-let_agreed,
.status-badge.status-let {
    color: var(--status-let);
    border: 1px solid var(--status-let);
}

/* Featured Badge */
.featured-badge {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    padding: 4px 12px;
    background: var(--brand-color, #6366f1);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
}

/* Card Details */
.property-card-details {
    display: block;
    padding: var(--spacing-md);
    text-decoration: none;
    color: var(--text-primary);
}

/* Card Layout: Price+Meta left, Address right */
.property-card-layout {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--spacing-md);
}

/* Left side: Price + Meta stacked */
.property-info-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}

/* Price wrapper with optional qualifier */
.property-price-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.property-price-qualifier {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.property-price {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Beds, Baths, Type */
.property-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 14px;
    color: var(--text-secondary);
}

.property-meta i {
    margin-right: 2px;
    color: var(--text-muted);
}

/* Address - 2 lines, right aligned */
.property-address {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    min-width: 0;
    gap: 2px;
}

.address-line-1 {
    font-size: 15px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.address-line-2 {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Legacy styles kept for compatibility */
.property-card-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--spacing-md);
}

.property-address-right {
    font-size: 15px;
    color: var(--text-primary);
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* ============================================
   Pagination
   ============================================ */

/* Pagination wrapper with spacing */
.pagination-wrapper {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
}

.page-link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.page-link-icon:hover {
    background: var(--glass-bg-hover);
    transform: translateY(-1px);
}

.page-link-icon i {
    font-size: 14px;
}

.page-info {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0 var(--spacing-sm);
}

/* ============================================
   Empty State
   ============================================ */

.empty-state {
    text-align: center;
    padding: var(--spacing-2xl);
}

.empty-state i {
    font-size: 64px;
    color: var(--text-muted);
    margin-bottom: var(--spacing-lg);
}

.empty-state h3 {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.empty-state p {
    color: var(--text-secondary);
}

.empty-state a {
    color: var(--text-primary);
}

/* ============================================
   Search Results Dropdown
   ============================================ */

.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: var(--spacing-xs);
    background: rgba(20, 20, 50, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    z-index: 1000;
    display: none;
    max-height: 400px;
    overflow-y: auto;
}

.search-result-item {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.2s ease;
    border-bottom: 1px solid var(--glass-border);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--glass-bg-hover);
}

.search-result-image {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-image i {
    color: var(--text-muted);
    font-size: 24px;
}

.search-result-details {
    flex: 1;
    min-width: 0;
}

.search-result-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.search-result-address {
    font-size: 14px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.search-no-results {
    padding: var(--spacing-lg);
    text-align: center;
    color: var(--text-muted);
}

/* ============================================
   Property Detail Page
   ============================================ */

.property-detail-page {
    max-width: 1600px;
    margin: 0 auto;
}

/* Detail page workspace - no padding for immersive hero */
.detail-workspace {
    padding: 0;
}

.detail-content-wrapper {
    max-width: none;
    padding: 0;
}

/* Back Button (legacy - kept for compatibility) */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.back-button:hover {
    background: var(--glass-bg-hover);
    color: var(--text-primary);
}

/* ============================================
   Glass Panel Hero - TOASTERUI Style
   ============================================ */

.hero-glass-panel {
    position: relative;
    height: calc(100vh - 48px);
    margin: 24px;
    border-radius: 20px;
    overflow: hidden;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
}

/* Floating header overlay - inside glass panel */
.hero-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 24px;
    z-index: 20;
    /* Entrance animation - initially hidden */
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 1s ease, transform 1s ease;
}

.hero-header-overlay.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.hero-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

.hero-logo:hover {
    opacity: 0.85;
}

.hero-logo img {
    max-height: 90px;
    max-width: 280px;
    object-fit: contain;
}

.hero-logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.hero-nav {
    display: flex;
    gap: 8px;
}

.hero-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: white;
    text-decoration: none;
    font-size: 28px;
    opacity: 0.9;
    transition: all 0.2s ease;
}

.hero-nav-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Gallery fills glass panel */
.hero-glass-panel .gallery-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    aspect-ratio: unset;
}

.hero-glass-panel .gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Gallery no-images fills panel */
.hero-glass-panel .gallery-no-images {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: unset;
}

/* Move gallery dots above price bar - with extra padding */
.hero-glass-panel .gallery-dots {
    bottom: 120px;
    /* Entrance animation - initially hidden */
    opacity: 0;
    transition: opacity 1s ease;
}

.hero-glass-panel .gallery-dots.animate-in {
    opacity: 1;
}

/* Gallery counter above price bar */
.hero-glass-panel .gallery-counter {
    bottom: 120px;
}

/* Gallery arrows - larger for tall panel */
.hero-glass-panel .gallery-nav {
    width: 52px;
    height: 52px;
    font-size: 20px;
    background: rgba(var(--page-bg-rgb), 0.5);
    /* Entrance animation - initially hidden */
    opacity: 0;
    transition: opacity 1s ease, transform 1s ease, background 0.2s ease;
}

.hero-glass-panel .gallery-prev {
    transform: translateY(-50%) translateX(-20px);
}

.hero-glass-panel .gallery-next {
    transform: translateY(-50%) translateX(20px);
}

.hero-glass-panel .gallery-nav.animate-in {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* Price bar at bottom of image - no blur */
.hero-price-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: rgba(var(--page-bg-rgb), 0.5);
    border-top: 1px solid rgba(255,255,255,0.1);
    z-index: 20;
    /* Entrance animation - initially hidden */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
}

.hero-price-bar.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.price-bar-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.price-bar-left .price-qualifier-label {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price-bar-left .price-amount {
    font-size: 28px;
    font-weight: 700;
    color: white;
}

.price-bar-left .price-meta {
    font-size: 14px;
    color: rgba(255,255,255,0.8);
}

.price-bar-left .price-meta i {
    margin: 0 2px;
}

.price-bar-right {
    text-align: right;
}

.price-bar-right .address-main {
    font-size: 18px;
    font-weight: 600;
    color: white;
}

/* Content grid after hero - needs padding and spacing */
.property-detail-page .property-content-grid {
    padding: var(--spacing-lg) var(--spacing-lg);
    max-width: 1100px;
    margin: 0 auto;
}

.property-detail-page .related-section {
    padding: 0 var(--spacing-lg) var(--spacing-2xl);
    max-width: 1100px;
    margin: 0 auto;
}

/* ============================================
   Hero Gallery
   ============================================ */

.hero-gallery {
    padding: 0;
    overflow: hidden;
    margin-bottom: var(--spacing-lg);
}

.gallery-container {
    position: relative;
    aspect-ratio: 16 / 9;
    background: rgba(0, 0, 0, 0.2);
}

.gallery-slides {
    width: 100%;
    height: 100%;
}

.gallery-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-slide.active {
    opacity: 1;
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(var(--page-bg-rgb), 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-nav:hover {
    background: rgba(var(--page-bg-rgb), 0.7);
    transform: translateY(-50%) scale(1.1);
}

.gallery-prev {
    left: var(--spacing-md);
}

.gallery-next {
    right: var(--spacing-md);
}

.gallery-dots {
    position: absolute;
    bottom: var(--spacing-md);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--spacing-xs);
}

.gallery-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gallery-dot.active,
.gallery-dot:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.2);
}

.gallery-counter {
    position: absolute;
    bottom: var(--spacing-md);
    right: var(--spacing-md);
    padding: 0;
    background: none;
    border: none;
    font-size: 14px;
    color: white;
    opacity: 0.9;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.gallery-no-images {
    aspect-ratio: 16 / 9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    color: var(--text-muted);
}

.gallery-no-images i {
    font-size: 64px;
}

/* ============================================
   Content Grid
   ============================================ */

.property-content-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: var(--spacing-lg);
}

@media (max-width: 1024px) {
    .property-content-grid {
        grid-template-columns: 1fr;
    }
}

.property-main-content {
    min-width: 0;
}

.property-sidebar {
    position: relative;
}

/* Sticky wrapper for sidebar content */
.sidebar-sticky-wrapper {
    position: sticky;
    top: 24px;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.sticky {
    position: sticky;
    top: 100px;
}

/* ============================================
   Price & Key Facts
   ============================================ */

.property-header-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

@media (max-width: 600px) {
    .property-header-section {
        grid-template-columns: 1fr;
    }
}

.price-panel {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.price-amount {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
}

.price-qualifier {
    font-size: 14px;
    color: var(--text-secondary);
}

.listing-type-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--brand-color, #6366f1);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #ffffff;
    width: fit-content;
}

.key-facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-sm);
}

.fact {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
}

.fact i {
    font-size: 24px;
    color: var(--text-muted);
}

.fact-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.fact-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

/* ============================================
   Address Section
   ============================================ */

.address-section {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
}

.address-section i {
    font-size: 24px;
    color: var(--brand-color, #6366f1);
    margin-top: 2px;
}

.address-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.address-main {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.address-details {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ============================================
   Section Title
   ============================================ */

.section-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--brand-color, var(--text-primary));
    margin-bottom: var(--spacing-md);
}

.section-title i {
    color: var(--brand-color, var(--text-muted));
}

/* ============================================
   Description
   ============================================ */

.property-summary {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.property-description {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-primary);
}

.property-description p {
    margin-bottom: var(--spacing-md);
}

/* ============================================
   Location / Neighbourhood Section
   ============================================ */

.location-section {
    margin-top: var(--spacing-lg);
}

.neighbourhood-description {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-primary);
}

.neighbourhood-description p {
    margin-bottom: var(--spacing-md);
}

/* ============================================
   Room Details Section
   ============================================ */

.rooms-section {
    margin-top: var(--spacing-lg);
}

.rooms-section .section-title {
    margin-bottom: var(--spacing-lg);
}

.rooms-by-floor {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

/* Inner glass panel for each floor */
.floor-panel {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: var(--spacing-lg);
}

.floor-name {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--brand-color);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Vertical list layout instead of grid */
.room-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.room-item {
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.room-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.room-item:first-child {
    padding-top: 0;
}

.room-header {
    margin-bottom: var(--spacing-xs);
}

.room-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--brand-color);
}

.room-dimensions {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-left: var(--spacing-sm);
}

.room-description {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    margin: 0;
}

@media (max-width: 600px) {
    .floor-panel {
        padding: var(--spacing-md);
    }
}

/* ============================================
   Features
   ============================================ */

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
}

/* 2-column features grid for detail page */
.features-grid-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
}

@media (max-width: 600px) {
    .features-grid-2col {
        grid-template-columns: 1fr;
    }
}

/* Single column on wide screens so feature-list 4-col spans full width */
@media (min-width: 1200px) {
    .features-grid-2col {
        grid-template-columns: 1fr;
    }
}

.feature-category-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: var(--spacing-sm);
}

/* Hide "General" category title */
.feature-category-title:empty,
.feature-category-title[data-category="general"] {
    display: none;
}

.feature-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-xs) var(--spacing-lg);
}

@media (max-width: 600px) {
    .feature-list {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 1200px) {
    .feature-list {
        grid-template-columns: repeat(4, 1fr);
    }
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) 0;
    font-size: 16px;
    color: var(--text-primary);
}

.feature-list li i {
    color: var(--brand-color);
    font-size: 32px;
    min-width: 40px;
}

/* ============================================
   Details Grid
   ============================================ */

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--spacing-md);
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.detail-value {
    font-size: 15px;
    color: var(--text-primary);
}

/* EPC Rating Colors */
.epc-rating {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
}

.epc-A { background: #008054; color: #fff; }
.epc-B { background: #19b459; color: #fff; }
.epc-C { background: #8dce46; color: #000; }
.epc-D { background: #ffd500; color: #000; }
.epc-E { background: #fcaa65; color: #000; }
.epc-F { background: #ef8023; color: #fff; }
.epc-G { background: #e9153b; color: #fff; }

/* ============================================
   Floorplan
   ============================================ */

.floorplans {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.floorplan-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.floorplan-image:hover {
    transform: scale(1.02);
}

/* ============================================
   Virtual Tour
   ============================================ */

.virtual-tour-link {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--brand-color, #6366f1);
    border-radius: 8px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.virtual-tour-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.virtual-tour-link i:first-child {
    font-size: 24px;
}

/* ============================================
   Portal Links
   ============================================ */

.portal-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.portal-link {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.portal-link:hover {
    background: var(--glass-bg-hover);
    color: var(--text-primary);
}

/* ============================================
   Enquiry Form
   ============================================ */

.enquiry-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.form-group label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.form-input {
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
}

textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

.submit-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--brand-color, #6366f1);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.submit-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.submit-button i {
    font-size: 18px;
}

/* Enquiry Success/Error */
.enquiry-success,
.enquiry-error {
    text-align: center;
    padding: var(--spacing-lg);
}

.enquiry-success i {
    font-size: 48px;
    color: var(--status-available);
    margin-bottom: var(--spacing-md);
}

.enquiry-success h3 {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.enquiry-success p {
    color: var(--text-secondary);
}

.enquiry-error i {
    font-size: 48px;
    color: var(--status-sold);
    margin-bottom: var(--spacing-md);
}

.enquiry-error p {
    color: var(--text-secondary);
}

/* ============================================
   Agent Info
   ============================================ */

.agent-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
}

.agent-logo {
    max-height: 60px;
    max-width: 160px;
    object-fit: contain;
}

.agent-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.agent-website {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.agent-website:hover {
    color: var(--text-primary);
}

/* ============================================
   Related Properties
   ============================================ */

.related-section {
    margin-top: var(--spacing-xl);
}

.related-section > .section-title {
    padding: 0 var(--spacing-xs);
    margin-bottom: var(--spacing-md);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
}

@media (max-width: 1024px) {
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .related-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Lightbox
   ============================================ */

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-close {
    position: absolute;
    top: var(--spacing-lg);
    right: var(--spacing-lg);
    width: 48px;
    height: 48px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.lightbox-close:hover {
    background: var(--glass-bg-hover);
    transform: scale(1.1);
}

#lightbox-image {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

/* ============================================
   Footer - Shared Zone Footer
   ============================================ */

.site-footer {
    background: var(--header-bg, #101035);
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-agent-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.footer-agent-name {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.footer-agent-details {
    color: rgba(255, 255, 255, 0.6);
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-brand a {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
}

/* ============================================
   Tab Navigation
   ============================================ */

.property-tabs {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.tab-bar {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-lg) 0;
    border-bottom: 1px solid var(--glass-border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 100px;
    max-width: 140px;
}

.tab-btn i {
    font-size: 24px;
    color: var(--brand-color);
}

.tab-btn span {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.tab-btn:hover {
    background: var(--glass-bg-hover);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.tab-btn.active {
    background: var(--glass-bg-hover);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Tab Panels */
.tab-panels {
    margin: 0 auto;
    padding: var(--spacing-lg) 0;
}

.tab-panel {
    display: none;
    max-width: 1100px;
    margin: 0 auto;
}

.tab-panel.active {
    display: block;
}

/* Tab-specific widths */
#tab-description {
    max-width: 1100px;
}

/* Description and Features panels - more padding */
#tab-description .glass-panel {
    padding: var(--spacing-xl) var(--spacing-2xl);
}

/* Strong titles in description - room names */
.property-description strong {
    display: inline;
    font-size: 16px;
    color: var(--brand-color, white);
}

/* Room title line container - add spacing above */
.property-description p:has(strong) {
    margin-top: var(--spacing-2xl);
}

/* First paragraph with strong shouldn't have extra top margin */
.property-description p:first-child:has(strong) {
    margin-top: 0;
}

#tab-gallery {
    max-width: 1100px;
}

#tab-floorplans,
#tab-map,
#tab-epc,
#tab-contact,
#tab-virtual-tour {
    max-width: 1100px;
}

/* Empty Tab Content */
.empty-tab-content {
    text-align: center;
    padding: var(--spacing-2xl);
}

.empty-tab-content i {
    font-size: 64px;
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
}

.empty-tab-content p {
    color: var(--text-secondary);
}

/* ============================================
   Gallery Grid (Tiled)
   ============================================ */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.gallery-tile {
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: var(--glass-bg);
}

.gallery-tile:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.gallery-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-tile:hover img {
    transform: scale(1.05);
}

/* ============================================
   Floorplans Grid
   ============================================ */

.floorplans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.floorplan-tile {
    position: relative;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}

.floorplan-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.floorplan-tile img {
    width: 100%;
    height: auto;
    display: block;
}

.floorplan-caption {
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
}

/* ============================================
   Virtual Tour Container
   ============================================ */

.virtual-tour-container {
    padding: 0;
    overflow: hidden;
}

.virtual-tour-embed {
    position: relative;
    width: 100%;
    min-height: 500px;
}

.virtual-tour-embed iframe {
    width: 100%;
    height: 500px;
    border: none;
    border-radius: 16px;
}

.virtual-tour-link-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-2xl);
    text-align: center;
}

.virtual-tour-link-container i {
    font-size: 64px;
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
}

.virtual-tour-link-container h3 {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.virtual-tour-link-container p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

/* ============================================
   Map Container
   ============================================ */

.map-container {
    padding: 0;
    overflow: hidden;
}

.property-map {
    width: 100%;
    height: 500px;
    border-radius: 16px 16px 0 0;
    background: var(--glass-bg);
}

.map-address {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--glass-bg);
    border-top: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-size: 14px;
}

.map-address i {
    color: var(--brand-color, #6366f1);
    font-size: 18px;
}

/* ============================================
   Enhanced Gallery Lightbox
   ============================================ */

.gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.gallery-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
}

.lightbox-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: var(--spacing-xl);
}

.gallery-lightbox .lightbox-close {
    position: absolute;
    top: var(--spacing-lg);
    right: var(--spacing-lg);
    width: 48px;
    height: 48px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.gallery-lightbox .lightbox-close:hover {
    background: var(--glass-bg-hover);
    transform: scale(1.1);
}

.gallery-lightbox .lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.gallery-lightbox .lightbox-nav:hover {
    background: var(--glass-bg-hover);
    transform: translateY(-50%) scale(1.1);
}

.gallery-lightbox .lightbox-prev {
    left: var(--spacing-lg);
}

.gallery-lightbox .lightbox-next {
    right: var(--spacing-lg);
}

#gallery-lightbox-image {
    max-width: calc(100vw - 160px);
    max-height: calc(100vh - 160px);
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.5);
}

.lightbox-info {
    position: absolute;
    bottom: var(--spacing-xl);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: 10px 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    z-index: 10;
    max-width: calc(100vw - 80px);
}

.lightbox-counter {
    white-space: nowrap;
    flex-shrink: 0;
}

.lightbox-caption {
    color: var(--text-secondary);
    border-left: 1px solid var(--glass-border);
    padding-left: var(--spacing-md);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 400px;
}

.lightbox-dots {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
    max-width: calc(100vw - 80px);
    overflow-x: auto;
    padding: 8px;
}

.lightbox-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.lightbox-dot.active,
.lightbox-dot:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.3);
}

/* ============================================
   EPC Chart
   ============================================ */

.epc-container {
    padding: var(--spacing-xl);
}

.epc-display {
    display: flex;
    gap: var(--spacing-xl);
    align-items: flex-start;
}

.epc-chart {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    max-width: 300px;
}

.epc-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    opacity: 0.5;
    transition: all 0.2s ease;
}

.epc-band.active {
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.epc-band-a { background: #008054; color: #fff; }
.epc-band-b { background: #19b459; color: #fff; }
.epc-band-c { background: #8dce46; color: #000; }
.epc-band-d { background: #ffd500; color: #000; }
.epc-band-e { background: #fcaa65; color: #000; }
.epc-band-f { background: #ef8023; color: #fff; }
.epc-band-g { background: #e9153b; color: #fff; }

.epc-label {
    font-size: 18px;
    font-weight: 700;
}

.epc-range {
    font-size: 12px;
    opacity: 0.8;
}

.epc-info {
    flex: 1;
}

.epc-current {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-lg);
}

.epc-current-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.epc-current-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 12px;
    font-size: 32px;
    font-weight: 700;
}

.epc-description {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* EPC Certificate Link Section */
.epc-certificate-section {
    display: flex;
    justify-content: center;
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--glass-border);
}

.epc-certificate-section:not(.has-rating) {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

.epc-certificate-link {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-xl);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.epc-certificate-link:hover {
    background: var(--glass-bg-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.epc-certificate-link i:first-child {
    font-size: 24px;
    color: var(--brand-color);
}

.epc-certificate-link i:last-child {
    font-size: 12px;
    opacity: 0.7;
}

@media (max-width: 600px) {
    .epc-display {
        flex-direction: column;
    }

    .epc-chart {
        max-width: 100%;
    }
}

/* ============================================
   Contact Tab Container
   ============================================ */

.contact-container {
    display: grid;
    grid-template-columns: 1fr 250px;
    gap: var(--spacing-lg);
    align-items: start;
}

.contact-form-wrapper {
    padding: var(--spacing-xl);
}

.contact-agent-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--spacing-md);
    padding: var(--spacing-xl);
}

.contact-agent-info .agent-logo {
    max-height: 80px;
    max-width: 180px;
    object-fit: contain;
}

.contact-agent-info .agent-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

@media (max-width: 700px) {
    .contact-container {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Social Share Section
   ============================================ */

.social-share-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 32px 0;
    max-width: 1100px;
    margin: 0 auto;
}

.share-label {
    font-size: 14px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.share-icons {
    display: flex;
    gap: 16px;
}

.share-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-size: 20px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.share-icon:hover {
    transform: scale(1.1);
}

.share-facebook:hover { background: #1877f2; color: white; }
.share-twitter:hover { background: #000; color: white; }
.share-whatsapp:hover { background: #25d366; color: white; }
.share-linkedin:hover { background: #0077b5; color: white; }
.share-copy:hover { background: var(--brand-color); color: white; }

/* ============================================
   EPC Certificate Tab
   ============================================ */

.epc-cert-container {
    padding: var(--spacing-xl);
}

.epc-embed {
    width: 100%;
    height: 600px;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: var(--spacing-md);
    background: white;
}

.epc-embed iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.epc-external-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--brand-color);
    text-decoration: none;
    font-size: 14px;
}

.epc-external-link:hover {
    text-decoration: underline;
}

/* ============================================
   Brochure Tab
   ============================================ */

.brochure-container {
    text-align: center;
    padding: var(--spacing-2xl);
}

.brochure-content {
    max-width: 400px;
    margin: 0 auto;
}

.brochure-icon {
    font-size: 64px;
    color: var(--brand-color);
    margin-bottom: var(--spacing-lg);
}

.brochure-content h2 {
    font-size: 24px;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.brochure-content p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
}

.brochure-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--brand-color);
    color: white;
    border-radius: var(--radius-md);
    font-weight: 500;
    text-decoration: none;
    transition: filter 0.2s ease;
}

.brochure-button:hover {
    filter: brightness(1.1);
}

/* ============================================
   Enquiry Section (Full Width, Bottom)
   ============================================ */

.enquiry-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: var(--spacing-2xl) 0;
    display: flex;
    gap: var(--spacing-xl);
    align-items: stretch;
}

.enquiry-form-wrapper {
    flex: 1;
    padding: var(--spacing-xl);
    display: flex;
    flex-direction: column;
}

.enquiry-form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.enquiry-form-grid .form-group-message {
    grid-column: 1 / -1;
}

.agent-info-wrapper {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--spacing-xl);
}

.agent-info-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
    flex: 1;
    justify-content: center;
}

.agent-info-wrapper .agent-logo {
    max-height: 100px;
    max-width: 220px;
    object-fit: contain;
}

.agent-info-wrapper .agent-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.agent-info-wrapper .agent-address {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    white-space: pre-line;
}

.agent-contact-icons {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--glass-border);
    width: 100%;
}

.agent-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-size: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.agent-icon:hover {
    background: var(--glass-bg-hover);
    transform: translateY(-2px);
    color: var(--brand-color, #22c55e);
}

/* ============================================
   Mobile Adjustments
   ============================================ */

@media (max-width: 768px) {
    .portal-header-content {
        padding: var(--spacing-xs) var(--spacing-sm);
        flex-wrap: wrap;
        gap: var(--spacing-xs);
    }

    /* Keep mobile padding when scrolled */
    .portal-header.scrolled .portal-header-content {
        padding: var(--spacing-xs) var(--spacing-sm);
    }

    .portal-logo-img {
        max-height: 32px;
    }

    /* Hide default zone brand text on mobile */
    .portal-zone-brand:not(.header-filters) {
        display: none;
    }

    /* Header filters - wrap to second row on mobile */
    .header-filters {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        gap: 6px;
        padding-top: var(--spacing-xs);
        border-top: 1px solid var(--glass-border);
        margin-top: var(--spacing-xs);
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .filter-icon,
    .filter-clear-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .header-search-label {
        font-size: 11px;
        gap: 4px;
        left: 8px;
    }

    .header-search-label i {
        font-size: 10px;
    }

    .header-search-wrapper {
        flex: 1;
        min-width: 80px;
    }

    .header-search-input {
        width: 100%;
        height: 32px;
        font-size: 12px;
        padding: 0 8px 0 60px;
    }

    .header-search-input:focus {
        width: 100%;
        padding-left: 8px;
    }

    .header-filter-select {
        height: 32px;
        font-size: 12px;
        padding: 0 20px 0 8px;
        background-position: right 6px center;
    }

    .nav-button {
        width: 36px;
        height: 36px;
    }

    .portal-content-wrapper {
        padding: 0 var(--spacing-md);
    }

    /* Detail page - no wrapper padding, sections handle their own */
    .detail-content-wrapper {
        padding: 0;
    }

    /* Remove property-list-page padding on mobile - let content wrapper handle it */
    .property-list-page {
        padding: 0;
    }

    .portal-workspace {
        padding: var(--spacing-md) 0;
    }

    /* Detail page workspace - no padding */
    .detail-workspace {
        padding: 0;
    }

    .glass-panel {
        padding: var(--spacing-md);
        border-radius: 12px;
    }

    .price-amount {
        font-size: 26px;
    }

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

    .fact-value {
        font-size: 20px;
    }

    /* Hide all carousel/gallery arrows on mobile - swipe works */
    .gallery-nav,
    .card-carousel-nav {
        display: none;
    }

    /* Property card layout - keep side-by-side on mobile */
    .property-card-layout {
        gap: var(--spacing-sm);
    }

    /* Stack qualifier above price on mobile */
    .property-price-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .property-price-qualifier {
        font-size: 10px;
    }

    .property-price {
        font-size: 24px;
    }

    .property-meta {
        font-size: 13px;
    }

    /* Address - keep right-aligned on mobile, allow wrapping */
    .address-line-1 {
        font-size: 14px;
        white-space: normal;
        line-height: 1.3;
    }

    .address-line-2 {
        font-size: 12px;
        white-space: normal;
    }

    /* Legacy - keep for compatibility */
    .property-address-right {
        font-size: 13px;
    }

    /* Footer - Mobile */
    .site-footer-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .footer-agent-info {
        flex-direction: column;
        gap: 4px;
    }

    /* ============================================
       Hero Glass Panel - Mobile
       ============================================ */

    .hero-glass-panel {
        height: calc(100vh - 32px);
        height: calc(100dvh - 32px);  /* Dynamic viewport height for mobile browsers */
        margin: var(--spacing-md);
        border-radius: 16px;
    }

    .hero-header-overlay {
        padding: 12px 16px;
    }

    .hero-logo img {
        max-height: 48px;
        max-width: 160px;
    }

    .hero-logo-text {
        font-size: 18px;
    }

    .hero-nav-btn {
        font-size: 24px;
    }

    .hero-glass-panel .gallery-container {
        border-radius: 16px;
    }

    .hero-glass-panel .gallery-dots {
        display: none;
    }

    .hero-glass-panel .gallery-counter {
        bottom: 100px;
    }

    .hero-price-bar {
        padding: 12px 16px;
    }

    .price-bar-left .price-qualifier-label {
        font-size: 10px;
    }

    .price-bar-left .price-amount {
        font-size: 24px;
    }

    .price-bar-left .price-meta {
        font-size: 12px;
    }

    .price-bar-right .address-main {
        font-size: 14px;
    }

    /* Content grid padding on detail page */
    .property-detail-page .property-content-grid {
        padding: 0 var(--spacing-md);
    }

    .property-detail-page .related-section {
        padding: 0 var(--spacing-md);
    }

    /* Tab Navigation - Mobile */
    .property-tabs {
        padding: 0 var(--spacing-md);
    }

    .tab-bar {
        justify-content: flex-start;
        gap: var(--spacing-xs);
        padding: var(--spacing-md) 0;
        padding-bottom: var(--spacing-md);
    }

    .tab-btn {
        padding: var(--spacing-sm) var(--spacing-md);
    }

    .tab-btn i {
        font-size: 20px;
    }

    .tab-btn span {
        font-size: 10px;
    }

    /* Tab Panels - Mobile */
    .tab-panels {
        padding: var(--spacing-md);
    }

    /* Features and Description - reduced horizontal padding on mobile */
    #tab-description .glass-panel {
        padding: var(--spacing-lg) var(--spacing-md);
    }

    /* Gallery Grid - Mobile */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }

    .gallery-tile {
        border-radius: 8px;
    }

    /* Floorplans - Mobile */
    .floorplans-grid {
        grid-template-columns: 1fr;
    }

    /* Map - Mobile */
    .property-map {
        height: 350px;
    }

    /* Virtual Tour - Mobile */
    .virtual-tour-embed {
        min-height: 300px;
    }

    .virtual-tour-embed iframe {
        height: 300px;
    }

    /* Lightbox - Mobile */
    .gallery-lightbox .lightbox-nav {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }

    .gallery-lightbox .lightbox-prev {
        left: var(--spacing-sm);
    }

    .gallery-lightbox .lightbox-next {
        right: var(--spacing-sm);
    }

    #gallery-lightbox-image {
        max-width: calc(100vw - 32px);
        max-height: calc(100vh - 120px);
    }

    .lightbox-dots {
        bottom: 70px;
    }

    .lightbox-info {
        bottom: var(--spacing-md);
        padding: 8px 12px;
        gap: var(--spacing-sm);
        font-size: 12px;
    }

    .lightbox-caption {
        max-width: 200px;
    }

    /* Enquiry Section - Mobile */
    .enquiry-section {
        flex-direction: column;
        gap: var(--spacing-lg);
        padding: var(--spacing-lg) var(--spacing-md);
    }

    .enquiry-form-grid {
        grid-template-columns: 1fr;
    }

    .enquiry-form-wrapper {
        padding: var(--spacing-lg);
    }

    .agent-info-wrapper {
        width: 100%;
        padding: var(--spacing-lg);
    }

    .agent-contact-icons {
        margin-top: var(--spacing-md);
        padding-top: var(--spacing-md);
    }
}
