/* themes.css */

/* Define CSS variables for each theme */
/* 
  Available Fonts:
  --font-poppins: 'Poppins', sans-serif;
  --font-lora: 'Lora', serif;
  --font-oswald: 'Oswald', sans-serif;
  --font-nunito: 'Nunito', sans-serif;
*/

/* 1. Moderno Minimalista */
.theme-theme1 {
    --site-bg: #f3f4f6;
    --card-bg: #ffffff;
    --card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --card-shadow-hover: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --card-radius: 0.5rem;
    --card-border: 1px solid transparent;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --accent-color: var(--user-primary, #4f46e5);
    --accent-hover: var(--user-secondary, #4338ca);
    --border-color: var(--user-tertiary, #e5e7eb);
    --font-family-headings: 'Poppins', sans-serif;
    --font-family-body: 'Poppins', sans-serif;
    --detail-image-radius: 0.5rem;
}
.theme-theme1 .property-card:hover {
    transform: translateY(-5px);
}

/* 2. Escuro Luxuoso */
.theme-theme2 {
    --site-bg: #111827;
    --card-bg: #1f2937;
    --card-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --card-shadow-hover: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --card-radius: 0.75rem;
    --card-border: 1px solid #374151;
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --accent-color: var(--user-primary, #f59e0b); /* amber-500 */
    --accent-hover: var(--user-secondary, #d97706);
    --border-color: var(--user-tertiary, #374151);
    --font-family-headings: 'Lora', serif;
    --font-family-body: 'Poppins', sans-serif;
    --detail-image-radius: 0.75rem;
}
.theme-theme2 .property-card:hover {
    border-color: var(--accent-color);
    transform: scale(1.02);
}


/* 3. Corporativo Confiável */
.theme-theme3 {
    --site-bg: #eef2ff; /* indigo-50 */
    --card-bg: #ffffff;
    --card-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --card-shadow-hover: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --card-radius: 0.375rem; /* rounded-md */
    --card-border: 1px solid #e5e7eb;
    --text-primary: #1e3a8a; /* blue-900 */
    --text-secondary: #4b5563; /* coolGray-600 */
    --accent-color: var(--user-primary, #1d4ed8); /* blue-700 */
    --accent-hover: var(--user-secondary, #1e40af);
    --border-color: var(--user-tertiary, #d1d5db);
    --font-family-headings: 'Poppins', sans-serif;
    --font-family-body: 'Poppins', sans-serif;
    --detail-image-radius: 0.375rem;
}
.theme-theme3 .property-card:hover {
    border-color: var(--accent-color);
}

/* 4. Vibrante e Ousado */
.theme-theme4 {
    --site-bg: #f1f5f9; /* coolGray-100 */
    --card-bg: #ffffff;
    --card-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --card-shadow-hover: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --card-radius: 1rem; /* rounded-xl */
    --card-border: 1px solid transparent;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --accent-color: var(--user-primary, #d946ef); /* fuchsia-500 */
    --accent-hover: var(--user-secondary, #c026d3);
    --accent-gradient: linear-gradient(to right, var(--user-secondary, #ec4899), var(--user-primary, #d946ef));
    --border-color: var(--user-tertiary, #e2e8f0);
    --font-family-headings: 'Oswald', sans-serif;
    --font-family-body: 'Nunito', sans-serif;
    --detail-image-radius: 1rem;
}
.theme-theme4 .property-card .card-price {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.theme-theme4 .property-card:hover {
    transform: scale(1.05) rotate(1deg);
}
.theme-theme4 .property-card:hover img {
    filter: brightness(1.1);
}


/* 5. Clássico Elegante */
.theme-theme5 {
    --site-bg: #fdfbf7;
    --card-bg: #ffffff;
    --card-shadow: 0 2px 5px rgba(0,0,0,0.08);
    --card-shadow-hover: 0 4px 12px rgba(0,0,0,0.12);
    --card-radius: 0.25rem;
    --card-border: 1px solid #e5e5e5;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --accent-color: var(--user-primary, #885f43);
    --accent-hover: var(--user-secondary, #6d4c35);
    --border-color: var(--user-tertiary, #eeeeee);
    --font-family-headings: 'Lora', serif;
    --font-family-body: 'Lora', serif;
    --detail-image-radius: 0.25rem;
}
.theme-theme5 .property-card:hover {
    transform: translateY(-3px);
}


/* 6. Tropical Arejado */
.theme-theme6 {
    --site-bg: #f0fdf4; /* green-50 */
    --card-bg: #ffffff;
    --card-shadow: 0 4px 8px rgba(0,0,0,0.05);
    --card-shadow-hover: 0 8px 16px rgba(0,0,0,0.1);
    --card-radius: 1rem;
    --card-border: 1px solid transparent;
    --text-primary: #166534; /* green-800 */
    --text-secondary: #52525b;
    --accent-color: var(--user-primary, #0ea5e9); /* sky-500 */
    --accent-hover: var(--user-secondary, #0284c7);
    --border-color: var(--user-tertiary, #dcfce7); /* green-100 */
    --font-family-headings: 'Nunito', sans-serif;
    --font-family-body: 'Nunito', sans-serif;
    --detail-image-radius: 1.5rem;
}
.theme-theme6 .property-card:hover {
    transform: rotate(-1deg) scale(1.03);
}

/* 7. Urbano Industrial */
.theme-theme7 {
    --site-bg: #d1d5db;
    --card-bg: #f9fafb;
    --card-shadow: none;
    --card-shadow-hover: none;
    --card-radius: 0; /* Sharp corners */
    --card-border: 2px solid #4b5563;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --accent-color: var(--user-primary, #ef4444); /* red-500 */
    --accent-hover: var(--user-secondary, #dc2626);
    --border-color: var(--user-tertiary, #9ca3af);
    --font-family-headings: 'Oswald', sans-serif;
    --font-family-body: 'Poppins', sans-serif;
    --detail-image-radius: 0;
}
.theme-theme7 .property-card:hover {
    border-color: var(--accent-color);
    background-color: #fff;
}

/* 8. Rústico Aconchegante */
.theme-theme8 {
    --site-bg: #fefce8; /* yellow-50 */
    --card-bg: #fffbeb; /* yellow-100 */
    --card-shadow: none;
    --card-shadow-hover: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --card-radius: 0.5rem;
    --card-border: 1px solid #fde68a;
    --text-primary: #78350f; /* amber-900 */
    --text-secondary: #92400e; /* amber-800 */
    --accent-color: var(--user-primary, #16a34a); /* green-600 */
    --accent-hover: var(--user-secondary, #15803d);
    --border-color: var(--user-tertiary, #fde68a); /* amber-200 */
    --font-family-headings: 'Lora', serif;
    --font-family-body: 'Nunito', sans-serif;
    --detail-image-radius: 0.5rem;
}
.theme-theme8 .property-card:hover img {
    filter: sepia(0.2) saturate(1.2);
}


/* 9. Clean & Clear (Flat) */
.theme-theme9 {
    --site-bg: #ffffff;
    --card-bg: #ffffff;
    --card-shadow: none;
    --card-shadow-hover: none;
    --card-radius: 0.5rem;
    --card-border: 1px solid #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --accent-color: var(--user-primary, #0ea5e9); /* sky-500 */
    --accent-hover: var(--user-secondary, #0284c7);
    --border-color: var(--user-tertiary, #cbd5e1);
    --font-family-headings: 'Poppins', sans-serif;
    --font-family-body: 'Poppins', sans-serif;
    --detail-image-radius: 0.25rem;
}
.theme-theme9 .property-card:hover {
    border-color: var(--accent-color);
    background-color: #f8fafc;
}

/* 10. Artístico Criativo (Neon) */
.theme-theme10 {
    --site-bg: #0c0a09;
    --card-bg: #1c1917;
    --card-shadow: 0 0 5px #f472b6, 0 0 10px #f472b6;
    --card-shadow-hover: 0 0 15px #f472b6, 0 0 30px #f472b6;
    --card-radius: 0.75rem;
    --card-border: 1px solid #f472b6;
    --text-primary: #f5f5f4;
    --text-secondary: #a8a29e;
    --accent-color: var(--user-primary, #a5f3fc); /* cyan-200 */
    --accent-hover: var(--user-secondary, #67e8f9);
    --border-color: var(--user-tertiary, #44403c);
    --font-family-headings: 'Oswald', sans-serif;
    --font-family-body: 'Poppins', sans-serif;
    --detail-image-radius: 0.75rem;
}
.theme-theme10 .property-card .card-price {
    text-shadow: 0 0 5px var(--accent-color), 0 0 10px var(--accent-color);
}
.theme-theme10 .property-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-color), 0 0 30px var(--accent-color);
}
.theme-theme10 .image-gallery-container > img {
    box-shadow: 0 0 15px var(--accent-color);
}


/* ==================================== */
/*          BASE & GLOBAL STYLES        */
/* ==================================== */

body {
    background-color: var(--site-bg);
}

.public-site-main-content {
    background-color: var(--site-bg);
    color: var(--text-primary);
}

.property-card {
    background-color: var(--card-bg);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease-in-out;
    border: var(--card-border);
}

.property-card-image {
    border-radius: var(--card-radius) var(--card-radius) 0 0;
}

.property-card:hover {
    box-shadow: var(--card-shadow-hover);
}

.property-card img {
    transition: all 0.3s ease-in-out;
}

.property-card .card-title {
    color: var(--text-primary);
    font-family: var(--font-family-headings);
}
.property-card .card-location,
.property-card .card-details {
    color: var(--text-secondary);
    font-family: var(--font-family-body);
}
.property-card .card-price {
    color: var(--accent-color);
    font-family: var(--font-family-headings);
    font-weight: 700;
}
.property-card .card-details {
    border-top: 1px solid var(--border-color);
}


/* ==================================== */
/*         HOME PAGE LAYOUTS            */
/* ==================================== */

/* Grid View (Default) */
.property-list-container.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

/* List View */
.property-list-container.list-view {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.list-view .property-card-image {
    border-radius: var(--card-radius) var(--card-radius) 0 0;
}

@media (min-width: 768px) {
    .list-view .property-card-image {
      border-radius: var(--card-radius) 0 0 var(--card-radius);
    }
}


/* Search Form */
.search-container {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    transition: background-color 0.3s ease;
}
.search-container h2 {
    color: var(--text-primary);
    font-family: var(--font-family-headings);
}
.search-container label, .search-container span {
    color: var(--text-secondary);
    font-family: var(--font-family-body);
}
.search-container input, .search-container select {
    background-color: var(--site-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

/* Search Form with Background */
.search-with-bg {
    /* background-color and backdrop-filter are now inline styles */
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.search-with-bg h2,
.search-with-bg label,
.search-with-bg span {
    color: #ffffff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}
.search-with-bg input,
.search-with-bg select {
    background-color: rgba(255, 255, 255, 0.9);
    border-color: transparent;
    color: #111827;
}
.theme-theme2 .search-with-bg input,
.theme-theme2 .search-with-bg select,
.theme-theme10 .search-with-bg input,
.theme-theme10 .search-with-bg select {
     background-color: rgba(31, 41, 55, 0.8); /* gray-800 */
     color: #f9fafb;
}


/* ==================================== */
/*      PROPERTY DETAIL PAGE LAYOUTS    */
/* ==================================== */

.property-detail-page {
    background-color: var(--card-bg);
    color: var(--text-primary);
}
.property-detail-page h1, .property-detail-page h2 {
    font-family: var(--font-family-headings);
}
.property-detail-page p, .property-detail-page div, .property-detail-page span {
    font-family: var(--font-family-body);
}

.image-gallery-container img {
    border-radius: var(--detail-image-radius);
    transition: all 0.3s ease-in-out;
}

/* Modern Layout (Default for most themes) */
.property-detail-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
@media (min-width: 1024px) { /* lg */
    .property-detail-layout {
        grid-template-columns: 2fr 1fr;
    }
    .property-detail-layout .image-gallery-container {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
    }
    .property-detail-layout .property-info-container {
        grid-column: 1 / 2;
        grid-row: 2 / 3;
    }
    .property-detail-layout .contact-form-container {
        grid-column: 2 / 3;
        grid-row: 1 / 3;
        position: sticky;
        top: 2rem;
        align-self: start;
    }
}

/* Classic Layout (e.g., theme5, theme8) */
.theme-theme5 .property-detail-layout,
.theme-theme8 .property-detail-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
@media (min-width: 1024px) {
    .theme-theme5 .property-detail-layout .contact-form-container,
    .theme-theme8 .property-detail-layout .contact-form-container {
        position: static;
    }
}


/* Styles for Theme Preview Component */
.theme-preview-container .property-card a {
    pointer-events: none; /* Disable links inside preview */
}

.theme-preview-bg {
    background-color: var(--site-bg);
}

.theme-preview-search {
    background-color: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-primary);
}