/**
 * Single Property Template Styles
 * Theme-compatible styling for comprehensive property display
 * Uses CSS custom properties to respect theme defaults
 * 
 * @package PhantomRealtyEngine
 * @since 3.0.0
 */

/* CSS Variables using correct PRE brand colors */
:root {
  --primary: var(--wp--preset--color--primary, var(--client-primary, #00385C));
  --secondary: var(--wp--preset--color--secondary, var(--client-accent, #83A549));
  --accent: var(--wp--preset--color--accent, var(--client-accent, #83A549));
  --text: var(--wp--preset--color--foreground, var(--client-text, #1e293b));
  --heading: var(--wp--preset--color--heading, var(--client-text, #1e293b));
  --button: var(--wp--preset--color--primary, var(--client-accent, #83A549));
  --button-text: var(--wp--preset--color--background, var(--client-background, #ffffff));
}

:root {
    /* Typography variables - inherit from theme */
    --pre-font-family: var(--wp--preset--font-family--primary, inherit);
    --pre-heading-font: var(--wp--preset--font-family--heading, inherit);
    --pre-font-size-base: var(--wp--preset--font-size--medium, 1rem);
    --pre-font-size-large: var(--wp--preset--font-size--large, 1.25rem);
    --pre-font-size-xl: var(--wp--preset--font-size--x-large, 1.5rem);
    --pre-font-size-xxl: var(--wp--preset--font-size--xx-large, 2rem);
    
    /* Spacing variables */
    --pre-spacing-xs: var(--wp--preset--spacing--20, 0.5rem);
    --pre-spacing-sm: var(--wp--preset--spacing--30, 0.75rem);
    --pre-spacing-md: var(--wp--preset--spacing--40, 1rem);
    --pre-spacing-lg: var(--wp--preset--spacing--50, 1.5rem);
    --pre-spacing-xl: var(--wp--preset--spacing--60, 2rem);
    --pre-spacing-xxl: var(--wp--preset--spacing--70, 3rem);
    
    /* Border radius */
    --pre-border-radius: var(--wp--custom--border--radius, 8px);
    --pre-border-radius-lg: calc(var(--pre-border-radius) * 1.5);
    
    /* Shadows */
    --pre-shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --pre-shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --pre-shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
}

/* Container and Layout */
.pre-single-property-container {
    max-width: min(1600px, var(--wp--style--global--content-size, 1600px));
    margin: 0 auto;
    padding: 0;

    line-height: var(--wp--custom--line-height--body, 1.6);
    color: var(--client-text, var(--wp--preset--color--foreground, #1e293b));
}

/* HERO SECTION */
.pre-hero-section {
    position: relative;
    width: 100%;
    height: 75vh;
    min-height: 500px;
    max-height: 800px;
    overflow: hidden;
    background-color: var(--client-light, #f8f9fa);
    border-radius: var(--pre-border-radius);
    margin-bottom: var(--wp--preset--spacing--50, 1.5rem);
}

.pre-hero-image {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.pre-hero-featured-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.pre-no-hero-image {
    background: linear-gradient(135deg, var(--client-light, #f8f9fa) 0%, var(--client-border, #e9ecef) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pre-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);
    display: flex;
    align-items: flex-end;
    padding: var(--pre-spacing-xl);
}

.pre-hero-content {
    color: white;
    width: 100%;
}

.pre-hero-content .pre-property-title {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: var(--wp--custom--font-weight--bold, 700);
    margin: 0 0 var(--pre-spacing-sm) 0;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.pre-hero-content .pre-property-address {
    font-size: var(--pre-font-size-large);
    color: rgba(255,255,255,0.9);
    margin-bottom: var(--pre-spacing-md);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.pre-hero-price {
    margin-bottom: var(--pre-spacing-md);
}

.pre-hero-price .pre-price-amount {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: var(--wp--custom--font-weight--bold, 700);
    color: var(--client-accent, var(--wp--preset--color--accent, #83A549));
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.pre-hero-badges {
    display: flex;
    gap: var(--pre-spacing-xs);
    flex-wrap: wrap;
}

/* 4-ICON HORIZONTAL HIGHLIGHTS */
.pre-property-highlights {
    margin-bottom: var(--pre-spacing-xl);
    padding: var(--pre-spacing-lg);
    background: var(--client-light, #f8f9fa);
    border-radius: var(--pre-border-radius-lg);
    box-shadow: var(--pre-shadow-sm);
}

.pre-highlights-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--pre-spacing-md);
    margin: 0 auto;
}

.pre-highlight-item {
    display: flex;
    align-items: center;
    gap: var(--pre-spacing-md);
    padding: var(--pre-spacing-md);
    background: var(--client-background, var(--wp--preset--color--background, #ffffff));
    border-radius: var(--pre-border-radius);
    box-shadow: var(--pre-shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pre-highlight-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--pre-shadow-md);
}

.pre-highlight-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--client-accent, var(--wp--preset--color--accent, #83A549));
    border-radius: 50%;
    flex-shrink: 0;
    color: white;
}

.pre-highlight-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pre-highlight-number {
    font-size: var(--pre-font-size-xl);
    font-weight: var(--wp--custom--font-weight--bold, 700);
    color: var(--client-accent, var(--wp--preset--color--secondary, #83A549));
    line-height: 1.1;
}

.pre-highlight-label {
    font-size: calc(var(--pre-font-size-base) * 0.9);
    color: var(--client-text, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: var(--wp--custom--font-weight--medium, 500);
}

/* Responsive adjustments for highlights */
@media (max-width: 768px) {
    .pre-highlights-container {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--pre-spacing-md);
    }
    
    .pre-highlight-item {
        padding: var(--pre-spacing-sm);
        gap: var(--pre-spacing-sm);
    }
    
    .pre-highlight-icon {
        font-size: 1.5rem;
        width: 50px;
        height: 50px;
    }
    
    .pre-highlight-number {
        font-size: var(--pre-font-size-large);
    }
}

.pre-badge {
    padding: var(--pre-spacing-xs) var(--pre-spacing-md);
    border-radius: var(--pre-border-radius-lg);
    font-size: calc(var(--pre-font-size-base) * 0.9);
    font-weight: var(--wp--custom--font-weight--semibold, 600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
}

.pre-mls-badge {
    background: var(--client-primary, var(--wp--preset--color--primary));
    color: var(--client-background, var(--wp--preset--color--background, #ffffff));
    box-shadow: var(--pre-shadow-sm);
}

.pre-status-badge {
    background: var(--client-accent, var(--wp--preset--color--accent, #83A549));
    color: var(--client-background, var(--wp--preset--color--background, #ffffff));
    box-shadow: var(--pre-shadow-sm);
}

.pre-status-active {
    background: var(--client-accent, var(--wp--preset--color--accent, #83A549));
}

.pre-status-pending {
    background: var(--client-primary, var(--wp--preset--color--primary, #F5A623));
}

.pre-status-sold {
    background: var(--wp--preset--color--vivid-red, #e74c3c);
}

/* Property type badge removed - not needed per user requirements (Issue #5) */

.pre-price-display {
    text-align: right;
}

.pre-price-amount {
    font-size: calc(var(--pre-font-size-xxl) * 1.4);
    font-weight: var(--wp--custom--font-weight--extra-bold, 800);
    color: var(--client-primary, var(--wp--preset--color--primary, #F5A623));
    font-family: var(--pre-heading-font);
}

/* Gallery Styles */
.pre-property-gallery {
    margin-bottom: var(--pre-spacing-xxl);
    border-radius: var(--pre-border-radius-lg);
    overflow: hidden;
    box-shadow: var(--pre-shadow-lg);
    position: relative;
    z-index: 1;
}

.pre-gallery-main {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--pre-spacing-lg);
    max-height: 500px;
}

.pre-main-image {
    position: relative;
    overflow: hidden;
    border-radius: var(--pre-border-radius);
    background: var(--client-light, #f8f9fa);
}

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

.pre-featured-image:hover {
    transform: scale(1.05);
}

.pre-gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    max-height: 500px;
    overflow-y: auto;
}

.pre-gallery-thumb {
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.pre-gallery-thumb:hover {
    border-color: var(--client-primary, var(--wp--preset--color--primary));
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(52, 152, 219, 0.3);
}

.pre-gallery-thumb.active {
    border-color: var(--client-accent, var(--wp--preset--color--secondary, #83A549));
    box-shadow: 0 4px 16px rgba(41, 128, 185, 0.4);
}

.pre-gallery-thumb img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.pre-gallery-thumb:hover img {
    transform: scale(1.1);
}

.pre-gallery-more {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--client-accent, var(--wp--preset--color--accent, #83A549));
    color: white;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
    padding: var(--pre-spacing-sm);
}

.pre-gallery-more:hover {
    background: var(--client-primary, var(--wp--preset--color--primary));
    opacity: 0.9;
}

.pre-no-image {
    background: linear-gradient(135deg, #ecf0f1, #bdc3c7);
}

.pre-no-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #7f8c8d;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Two-Column Row Layouts */
.pre-description-agent-row,
.pre-tabs-calculator-row {
    display: grid;
    grid-template-columns: 2fr 1fr; /* 60/40 split */
    gap: var(--pre-spacing-xxl);
    align-items: start;
    margin-bottom: var(--pre-spacing-xxl);
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
}

.pre-agent-column,
.pre-calculator-column {
    position: sticky;
    top: var(--pre-spacing-lg);
    height: fit-content;
}

/* Property Summary */
.pre-property-summary {
    background: var(--client-light, #f8f9fa);
    padding: var(--pre-spacing-xl);
    border-radius: var(--pre-border-radius-lg);
    margin-bottom: var(--pre-spacing-xxl);
    box-shadow: var(--pre-shadow-md);
    border: 1px solid var(--client-border, #e9ecef);
}

.pre-property-summary h2 {
    color: var(--client-accent, var(--wp--preset--color--secondary, #83A549));
    font-size: var(--pre-font-size-xl);
    margin-bottom: var(--pre-spacing-lg);
    font-weight: var(--wp--custom--font-weight--bold, 700);
    font-family: var(--pre-heading-font);
}

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

.pre-feature {
    display: flex;
    align-items: center;
    gap: var(--pre-spacing-md);
    padding: var(--pre-spacing-lg);
    background: var(--client-background, var(--wp--preset--color--background, #ffffff));
    border-radius: var(--pre-border-radius);
    box-shadow: var(--pre-shadow-sm);
    border: 1px solid var(--client-border, #e9ecef);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pre-feature:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.pre-feature-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--client-primary, var(--wp--preset--color--primary)), var(--client-accent, var(--wp--preset--color--accent)));
    border-radius: 50%;
    color: white;
}

.pre-feature-content {
    flex: 1;
}

.pre-feature-content strong {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--client-accent, var(--wp--preset--color--secondary, #83A549));
    line-height: 1;
}

.pre-feature-content span {
    color: #7f8c8d;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Description */
.pre-property-description {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.pre-property-description h2 {
    color: var(--client-accent, var(--wp--preset--color--secondary, #83A549));
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.pre-description-content {
    font-size: 1.25rem;
    line-height: 1.8;
    color: #555;
}

/* Tabs */
.pre-property-details-tabs {
    background: var(--client-background, var(--wp--preset--color--background, #ffffff));
    border-radius: var(--pre-border-radius-lg);
    overflow: hidden;
    box-shadow: var(--pre-shadow-md);
    border: 1px solid var(--client-border, #e9ecef);
}

.pre-tab-nav {
    display: flex;
    background: var(--client-light, #f8f9fa);
    border-bottom: 1px solid var(--client-border, #e9ecef);
    overflow-x: auto;
}

.pre-tab-button {
    padding: var(--pre-spacing-lg) var(--pre-spacing-xl);
    border: none;
    background: none;
    font-size: 1.1rem;
    font-weight: var(--wp--custom--font-weight--semibold, 600);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
    color: var(--client-text, #64748b);
    font-family: var(--pre-font-family);
}

.pre-tab-button:hover {
    color: var(--client-primary, var(--wp--preset--color--primary));
    background: rgba(var(--client-primary-rgb, 245, 166, 35), 0.05);
}

.pre-tab-button.active {
    border-bottom-color: var(--client-primary, var(--wp--preset--color--primary));
    color: var(--client-primary, var(--wp--preset--color--primary));
    background: var(--client-background, var(--wp--preset--color--background, #ffffff));
    font-weight: var(--wp--custom--font-weight--bold, 700);
}

.pre-tab-content {
    display: none;
    padding: 30px;
}

.pre-tab-content.active {
    display: block;
}

.pre-tab-content h3 {
    color: var(--client-accent, var(--wp--preset--color--secondary, #83A549));
    font-size: 1.6rem;
    margin-bottom: 25px;
    font-weight: 700;
}

/* Details Grid */
.pre-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .pre-details-grid {
        grid-template-columns: 1fr;
    }
}

.pre-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #ecf0f1;
    transition: background 0.2s ease;
}

.pre-detail-item:hover {
    background: rgba(52, 152, 219, 0.02);
    margin: 0 -15px;
    padding: 15px;
    border-radius: 8px;
}

.pre-detail-label {
    font-weight: 600;
    color: #7f8c8d;
    flex: 1;
}

.pre-detail-value {
    font-weight: 600;
    color: var(--client-accent, var(--wp--preset--color--secondary, #83A549));
    text-align: right;
    flex: 1;
}

/* Sidebar */
.pre-sidebar {
    position: sticky;
    top: var(--pre-spacing-lg);
    height: fit-content;
}

.pre-agent-card,
.pre-quick-facts,
.pre-map-container {
    background: var(--client-background, var(--wp--preset--color--background, #ffffff));
    border-radius: var(--pre-border-radius-lg);
    padding: var(--pre-spacing-xl);
    margin-bottom: var(--pre-spacing-xl);
    box-shadow: var(--pre-shadow-md);
    border: 1px solid var(--client-border, #e9ecef);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pre-agent-card:hover,
.pre-quick-facts:hover,
.pre-map-container:hover {
    transform: translateY(-2px);
    box-shadow: var(--pre-shadow-lg);
}

.pre-agent-card h3,
.pre-quick-facts h3,
.pre-map-container h3 {
    color: var(--client-accent, var(--wp--preset--color--secondary, #83A549));
    font-size: var(--pre-font-size-xl);
    margin-bottom: var(--pre-spacing-lg);
    font-weight: var(--wp--custom--font-weight--bold, 700);
    border-bottom: 2px solid var(--client-border, #e9ecef);
    padding-bottom: var(--pre-spacing-xs);
    font-family: var(--pre-heading-font);
}

.pre-agent-image {
    text-align: center;
    margin-bottom: 20px;
}

.pre-agent-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--client-primary, var(--wp--preset--color--primary));
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pre-agent-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.pre-agent-name {
    font-size: 1.3rem;
    margin-bottom: 8px;
    text-align: center;
}

.pre-agent-title {
    color: var(--client-primary, var(--wp--preset--color--primary));
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: center;
}

.pre-agent-license {
    color: #7f8c8d;
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.pre-agent-office {
    color: #7f8c8d;
    font-size: 1rem;
    margin-bottom: 20px;
}

.pre-agent-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.pre-contact-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: var(--client-primary, var(--wp--preset--color--primary, #00385C));
    color: white;
    text-decoration: none;
    border-radius: var(--pre-border-radius);
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
}

.pre-contact-btn i {
    font-size: 1.1rem;
}

.pre-phone-btn {
    background: var(--client-accent, var(--wp--preset--color--accent, #83A549));
    color: var(--client-background, var(--wp--preset--color--background, #ffffff));
    border-color: var(--client-accent, var(--wp--preset--color--accent, #83A549));
}

.pre-email-btn {
    background: var(--client-primary, var(--wp--preset--color--primary));
    color: var(--client-background, var(--wp--preset--color--background, #ffffff));
    border-color: var(--client-primary, var(--wp--preset--color--primary));
}

.pre-contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--pre-shadow-md);
    text-decoration: none;
    opacity: 0.9;
}

.pre-contact-btn:focus {
    outline: 2px solid var(--client-primary, var(--wp--preset--color--primary));
    outline-offset: 2px;
}

/* Quick Facts */
.pre-facts-list {
    margin-top: 20px;
}

.pre-fact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #ecf0f1;
    transition: background 0.2s ease;
}

.pre-fact:hover {
    background: rgba(52, 152, 219, 0.02);
    margin: 0 -10px;
    padding: 12px 10px;
    border-radius: 6px;
}

.pre-fact-label {
    font-weight: 600;
    color: #7f8c8d;
}

.pre-fact-value {
    font-weight: 600;
    color: var(--client-accent, var(--wp--preset--color--secondary, #83A549));
}

/* Map Container */
.pre-map-placeholder {
    height: 200px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #7f8c8d;
    border: 2px dashed #bdc3c7;
}

.pre-address-display {
    margin-top: 10px;
    font-weight: 600;
    color: var(--client-accent, var(--wp--preset--color--secondary, #83A549));
    text-align: center;
}

/* Remarks Section */
.pre-remarks-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    border-left: 4px solid var(--client-primary, var(--wp--preset--color--primary));
}

.pre-remarks-section h4 {
    color: var(--client-accent, var(--wp--preset--color--secondary, #83A549));
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.pre-remarks-content {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #555;
}

/* Mortgage Calculator */
.pre-mortgage-calculator {
    background: var(--client-background, var(--wp--preset--color--background, #ffffff));
    border-radius: var(--pre-border-radius-lg);
    padding: var(--pre-spacing-xl);
    margin-bottom: var(--pre-spacing-xl);
    box-shadow: var(--pre-shadow-md);
    border: 1px solid var(--client-border, #e9ecef);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pre-mortgage-calculator:hover {
    transform: translateY(-2px);
    box-shadow: var(--pre-shadow-lg);
}

.pre-mortgage-calculator h3 {
    color: var(--client-accent, var(--wp--preset--color--secondary, #83A549));
    font-size: var(--pre-font-size-xl);
    margin-bottom: var(--pre-spacing-lg);
    font-weight: var(--wp--custom--font-weight--bold, 700);
    border-bottom: 2px solid var(--client-border, #e9ecef);
    padding-bottom: var(--pre-spacing-xs);
    font-family: var(--pre-heading-font);
}

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

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

.pre-calc-input-group label {
    font-weight: var(--wp--custom--font-weight--semibold, 600);
    color: var(--client-accent, var(--wp--preset--color--secondary, #83A549));
    font-size: calc(var(--pre-font-size-base) * 0.9);
}

.pre-calc-input-group input,
.pre-calc-input-group select {
    padding: var(--pre-spacing-sm) var(--pre-spacing-md);
    border: 2px solid var(--client-border, #e9ecef);
    border-radius: var(--pre-border-radius);
    font-size: var(--pre-font-size-base);
    font-family: var(--pre-font-family);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: var(--client-background, var(--wp--preset--color--background, #ffffff));
}

.pre-calc-input-group input:focus,
.pre-calc-input-group select:focus {
    outline: none;
    border-color: var(--client-primary, var(--wp--preset--color--primary));
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.pre-calc-button {
    width: 100%;
    padding: 12px;
    background: var(--client-primary, var(--wp--preset--color--primary));
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pre-calc-button:hover {
    background: var(--client-accent, var(--wp--preset--color--accent));
    transform: translateY(-1px);
    box-shadow: var(--pre-shadow-md);
}

.pre-calc-button:active {
    transform: translateY(0);
    box-shadow: var(--pre-shadow-sm);
}

.pre-calc-results {
    margin-top: var(--pre-spacing-lg);
    padding: var(--pre-spacing-lg);
    background: var(--client-light, #f8f9fa);
    border-radius: var(--pre-border-radius);
    border: 2px solid var(--client-accent, var(--wp--preset--color--accent, #83A549));
}

.pre-calc-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--pre-spacing-sm) 0;
    border-bottom: 1px solid var(--client-border, #e9ecef);
}

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

.pre-calc-label {
    font-weight: var(--wp--custom--font-weight--semibold, 600);
    color: var(--client-accent, var(--wp--preset--color--secondary, #83A549));
}

.pre-calc-value {
    font-weight: var(--wp--custom--font-weight--bold, 700);
    color: var(--client-accent, var(--wp--preset--color--accent, #83A549));
    font-size: var(--pre-font-size-large);
}

/* Similar Properties Carousel */
.pre-similar-properties {
    margin-top: var(--pre-spacing-xxl);
    padding: var(--pre-spacing-xxl) var(--pre-spacing-md);
    background: var(--client-light, #f8f9fa);
    border-radius: var(--pre-border-radius-lg);
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
}

.pre-similar-header {
    text-align: center;
    margin-bottom: var(--pre-spacing-xl);
}

.pre-similar-header h2 {
    font-size: var(--pre-font-size-xxl);
    font-weight: var(--wp--custom--font-weight--bold, 700);
    color: var(--client-accent, var(--wp--preset--color--secondary, #83A549));
    margin-bottom: var(--pre-spacing-sm);
    font-family: var(--pre-heading-font);
}

.pre-similar-header p {
    color: var(--client-text, #64748b);
    font-size: var(--pre-font-size-large);
}

.pre-carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--pre-border-radius-lg);
}

.pre-carousel-track {
    display: flex;
    transition: transform 0.3s ease;
    gap: var(--pre-spacing-lg);
}

.pre-carousel-item {
    flex: 0 0 calc(25% - var(--pre-spacing-lg));
    min-width: 0;
}

.pre-property-link {
    display: block;
    background: var(--client-background, var(--wp--preset--color--background, #ffffff));
    border-radius: var(--pre-border-radius-lg);
    overflow: hidden;
    box-shadow: var(--pre-shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.pre-property-link:hover {
    transform: translateY(-4px);
    box-shadow: var(--pre-shadow-lg);
    text-decoration: none;
    color: inherit;
}

.pre-property-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.pre-property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.pre-no-image {
    width: 100%;
    height: 100%;
    background: var(--client-light, #f8f9fa);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--client-text, #64748b);
    font-weight: var(--wp--custom--font-weight--semibold, 600);
}

.pre-property-price-overlay {
    position: absolute;
    top: var(--pre-spacing-md);
    right: var(--pre-spacing-md);
    background: var(--client-accent, var(--wp--preset--color--accent, #83A549));
    color: var(--client-background, var(--wp--preset--color--background, #ffffff));
    padding: var(--pre-spacing-xs) var(--pre-spacing-sm);
    border-radius: var(--pre-border-radius);
    font-weight: var(--wp--custom--font-weight--bold, 700);
    font-size: calc(var(--pre-font-size-base) * 0.9);
    box-shadow: var(--pre-shadow-sm);
}

.pre-property-info {
    padding: var(--pre-spacing-lg);
}

.pre-property-info h4 {
    font-size: var(--pre-font-size-large);
    font-weight: var(--wp--custom--font-weight--bold, 700);
    color: var(--client-accent, var(--wp--preset--color--secondary, #83A549));
    margin-bottom: var(--pre-spacing-sm);
    line-height: 1.3;
    font-family: var(--pre-heading-font);
}

.pre-property-features {
    display: flex;
    gap: var(--pre-spacing-sm);
    flex-wrap: wrap;
}

.pre-property-features span {
    font-size: calc(var(--pre-font-size-base) * 0.9);
    color: var(--client-text, #64748b);
    font-weight: var(--wp--custom--font-weight--semibold, 600);
    background: var(--client-light, #f8f9fa);
    padding: 2px var(--pre-spacing-xs);
    border-radius: var(--pre-border-radius);
}

.pre-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--client-background, var(--wp--preset--color--background, #ffffff));
    border: 2px solid var(--client-border, #e9ecef);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: var(--wp--custom--font-weight--bold, 700);
    color: var(--client-accent, var(--wp--preset--color--secondary, #83A549));
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--pre-shadow-md);
    z-index: 10;
}

.pre-carousel-btn:hover:not(:disabled) {
    background: var(--client-primary, var(--wp--preset--color--primary));
    color: var(--client-background, var(--wp--preset--color--background, #ffffff));
    border-color: var(--client-primary, var(--wp--preset--color--primary));
    transform: translateY(-50%) scale(1.1);
}

.pre-carousel-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pre-carousel-prev {
    left: -25px;
}

.pre-carousel-next {
    right: -25px;
}

.pre-no-similar {
    text-align: center;
    padding: var(--pre-spacing-xxl);
    color: var(--client-text, #64748b);
    font-size: var(--pre-font-size-large);
}

/* Responsive carousel adjustments */
@media (max-width: 1024px) {
    .pre-carousel-item {
        flex: 0 0 calc(50% - var(--pre-spacing-md));
    }
    
    .pre-carousel-prev {
        left: -20px;
    }
    
    .pre-carousel-next {
        right: -20px;
    }
}

@media (max-width: 768px) {
    .pre-carousel-item {
        flex: 0 0 calc(100% - var(--pre-spacing-sm));
    }
    
    .pre-carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .pre-carousel-prev {
        left: -15px;
    }
    
    .pre-carousel-next {
        right: -15px;
    }
    
    .pre-similar-properties {
        padding: var(--pre-spacing-xl) var(--pre-spacing-sm);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .pre-single-property-container {
        padding: var(--pre-spacing-md);
    }
    
    .pre-description-agent-row,
    .pre-tabs-calculator-row {
        grid-template-columns: 1fr;
        gap: var(--pre-spacing-xl);
    }
    
    .pre-agent-column,
    .pre-calculator-column {
        position: static;
    }
}

@media (max-width: 768px) {
    .pre-property-header {
        flex-direction: column;
        gap: var(--pre-spacing-lg);
        text-align: center;
    }
    
    .pre-property-title {
        font-size: var(--pre-font-size-xl);
    }
    
    .pre-price-amount {
        font-size: calc(var(--pre-font-size-xl) * 1.2);
    }
    
    .pre-gallery-main {
        grid-template-columns: 1fr;
        max-height: none;
    }
    
    .pre-features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--pre-spacing-md);
    }
    
    .pre-tab-nav {
        flex-wrap: wrap;
    }
    
    .pre-tab-button {
        flex: 1;
        min-width: auto;
        padding: var(--pre-spacing-md) var(--pre-spacing-lg);
        font-size: calc(var(--pre-font-size-base) * 0.9);
    }
    
    .pre-details-grid {
        grid-template-columns: 1fr;
    }
    
    .pre-detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--pre-spacing-xs);
    }
}

@media (max-width: 480px) {
    .pre-property-title {
        font-size: 1.6rem;
    }
    
    .pre-price-amount {
        font-size: 1.8rem;
    }
    
    .pre-features-grid {
        grid-template-columns: 1fr;
    }
    
    .pre-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pre-tab-button {
        font-size: 0.8rem;
        padding: 12px 15px;
    }
    
    .pre-property-summary,
    .pre-property-description,
    .pre-tab-content,
    .pre-agent-card,
    .pre-quick-facts,
    .pre-map-container {
        padding: 20px;
    }
}

/* Print Styles */
@media print {
    .pre-single-property-container {
        max-width: none;
        padding: 0;
    }
    
    .pre-contact-btn {
        display: none;
    }
    
    .pre-tab-nav {
        display: none;
    }
    
    .pre-tab-content {
        display: block;
        page-break-inside: avoid;
    }
    
    .pre-gallery-thumb {
        display: none;
    }
    
    .pre-main-image {
        max-height: 300px;
    }
}

/* Animation for loading states */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pre-property-summary,
.pre-property-description,
.pre-property-details-tabs,
.pre-agent-card,
.pre-quick-facts,
.pre-map-container {
    animation: fadeIn 0.6s ease-out;
}

/* Loading placeholder styles */
.pre-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Theme Compatibility */
/* Ensure proper integration with WordPress block themes */
.pre-single-property-container * {
    box-sizing: border-box;
}

/* Respect theme's link colors */
a:not(.pre-contact-btn):not(.pre-tab-button) {
    color: var(--wp--preset--color--link, var(--client-primary, var(--wp--preset--color--primary, #00385C)));
    text-decoration: underline;
}

a:not(.pre-contact-btn):not(.pre-tab-button):hover {
    color: var(--wp--preset--color--link-hover, var(--client-accent, var(--wp--preset--color--secondary, #83A549)));
}

/* Ensure headings respect theme typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--pre-heading-font);
    color: inherit;
    margin: revert;
}

/* Accessibility improvements */
.pre-tab-button:focus,
.pre-contact-btn:focus,
.pre-gallery-thumb:focus {
    outline: 2px solid var(--wp--preset--color--contrast, var(--client-primary, var(--wp--preset--color--primary, #00385C)));
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .pre-badge,
    .pre-contact-btn {
        border: 2px solid currentColor;
    }
    
    .pre-detail-item {
        border-bottom-color: var(--client-text, var(--wp--preset--color--foreground, #1e293b));
    }
    
    .pre-feature {
        border: 2px solid var(--client-border, #e9ecef);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Feature Sections Styling */
.pre-feature-section {
    margin-bottom: var(--pre-spacing-xl);
    background: var(--client-light, #f8f9fa);
    border: 1px solid var(--client-border, #e9ecef);
    border-radius: var(--pre-border-radius);
    overflow: hidden;
}

.pre-feature-section h4 {
    margin: 0;
    padding: var(--pre-spacing-md) var(--pre-spacing-lg);
    background: var(--client-primary, var(--wp--preset--color--primary));
    color: white;
    font-size: var(--pre-font-size-large);
    font-weight: 600;
    border-bottom: 1px solid var(--client-border, #e9ecef);
}

.pre-feature-section .pre-details-grid {
    padding: var(--pre-spacing-lg);
    margin: 0;
}

.pre-feature-section .pre-detail-item {
    padding: var(--pre-spacing-sm) 0;
    border-bottom: 1px solid rgba(var(--client-border, #e9ecef), 0.3);
}

.pre-feature-section .pre-detail-item:last-child {
    border-bottom: none;
}

.pre-feature-section .pre-detail-label {
    font-weight: 600;
    color: var(--client-accent, var(--wp--preset--color--secondary, #83A549));
}

.pre-feature-section .pre-detail-value {
    color: var(--client-text, var(--wp--preset--color--foreground, #1e293b));
}

/* Tab content enhanced styling */
.pre-tab-content h3 {
    margin-bottom: var(--pre-spacing-xl);
    padding-bottom: var(--pre-spacing-md);
    border-bottom: 2px solid var(--client-primary, var(--wp--preset--color--primary));
    color: var(--client-accent, var(--wp--preset--color--secondary, #83A549));
}

/* Enhanced grid layout for feature sections */
.pre-feature-section .pre-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--pre-spacing-md);
}

@media (max-width: 768px) {
    .pre-feature-section .pre-details-grid {
        grid-template-columns: 1fr;
    }
    
    .pre-feature-section h4 {
        padding: var(--pre-spacing-sm) var(--pre-spacing-md);
        font-size: var(--pre-font-size-base);
    }
}

/* Floating Action Buttons */
.floating-actions {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
}

.fab-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: var(--client-primary, var(--wp--preset--color--primary, #F5A623));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--pre-shadow-lg);
    font-size: 20px;
}

.fab-btn:hover {
    background: var(--pre-secondary-color, #4a90a4);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.15);
}

.fab-btn:active {
    transform: translateY(0);
}

.fab-btn.favorited {
    background: #e74c3c;
}

.fab-btn.favorited:hover {
    background: #c0392b;
}

/* Print styles - hide floating buttons when printing */
@media print {
    .floating-actions {
        display: none;
    }
}

/* Mobile adjustments for floating buttons */
@media (max-width: 768px) {
    .floating-actions {
        right: 15px;
        bottom: 15px;
    }
    
    .fab-btn {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }
}