/* ===== VARIABLES & RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: hsl(142, 76%, 36%);
    --primary-hover: hsl(142, 76%, 30%);
    --secondary-color: #333333;
    /* Classic Black/Gray */
    --danger-color: #ef5350;
    --text-primary: #212121;
    --text-secondary: #757575;
    --text-light: #bdbdbd;
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 16px rgba(0, 0, 0, 0.12);
    --radius: 8px;
    /* Standardized radius */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
}

/* ===== NAVBAR ===== */
.navbar {
    background-color: var(--bg-secondary);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 12px 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-brand h1 {
    font-size: 28px;
    color: var(--primary-color);
    font-weight: 700;
    margin: 0;
    cursor: pointer;
}

.btn-clasificados {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-clasificados:hover {
    background-color: #000000;
}

.nav-search {
    flex: 1;
    display: flex;
    gap: 0;
    max-width: 600px;
}

.nav-search input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-right: none;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
}

.nav-search input:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.nav-search button {
    padding: 10px 20px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-left: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 18px;
    transition: background-color 0.2s;
}

.nav-search button:hover {
    background-color: var(--border-color);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-register,
.btn-login {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-register {
    background-color: transparent;
    color: var(--text-primary);
}

.btn-register:hover {
    background-color: var(--bg-primary);
}

.btn-login {
    background-color: var(--secondary-color);
    color: white;
}

.btn-login:hover {
    background-color: #000000;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

#userNameDisplay {
    font-weight: 600;
    color: var(--text-primary);
}

.btn-logout {
    padding: 8px 16px;
    background-color: var(--danger-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.btn-logout:hover {
    background-color: #d32f2f;
}

/* ===== MAIN LAYOUT ===== */
.main-layout {
    max-width: 100%;
    margin: 0;
    padding: 20px 20px 20px 0;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
}

/* ===== SIDEBAR ===== */
.sidebar {
    background-color: var(--bg-secondary);
    padding: 20px;
    border-radius: 0 8px 8px 0;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
    min-height: calc(100vh - 90px);
    /* Fill height minus navbar and gap */
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
}

.btn-create-gratis {
    width: 100%;
    padding: 14px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-create-gratis:hover {
    background-color: var(--primary-hover);
}

.sidebar-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-section:last-child {
    border-bottom: none;
}

/* Sidebar Menu */
.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-item {
    display: block;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s;
}

.sidebar-item:hover {
    background-color: #f3f4f6;
    color: var(--text-primary);
}

.sidebar-item.active {
    background-color: #e6fffa;
    /* Light green background */
    color: var(--primary-color);
    font-weight: 600;
}

.sidebar-section h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.sidebar-section input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
}

.sidebar-section input[type="text"]:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 8px;
}

.category-list a {
    display: block;
    padding: 8px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s;
}

.category-list a:hover {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.category-list a.active {
    background-color: var(--secondary-color);
    color: white;
    font-weight: 600;
}

.price-filter {
    display: flex;
    gap: 8px;
    flex-direction: column;
}

.price-filter input {
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
}

.price-filter button {
    padding: 10px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.price-filter button:hover {
    background-color: #2968c8;
}

.bedroom-filter {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.filter-chip {
    padding: 8px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.filter-chip:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.filter-chip.active {
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

/* ===== FEED CONTAINER ===== */
.feed-container {
    min-height: 600px;
}

.feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.feed-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
}

.sort-options select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    background-color: var(--bg-secondary);
    cursor: pointer;
}

/* ===== PROPERTIES GRID ===== */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.property-card {
    background-color: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.property-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.property-image {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background-color: var(--bg-primary);
}

.property-content {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.property-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.property-title {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.property-location {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.property-features {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

.property-features span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ===== MODALS ===== */
.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 20px;
}

.modal[style*="display: block"] {
    display: flex !important;
}

.modal-content {
    background-color: var(--bg-secondary);
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content.modal-large {
    max-width: 700px;
}

.modal-content.modal-detail {
    max-width: 1100px;
    padding: 0;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    z-index: 10;
}

.close-modal:hover {
    color: var(--text-primary);
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}

/* ===== TYPE SELECTION MODAL ===== */
.modal-type-selection {
    max-width: 700px;
}

.type-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 24px;
}

.type-option {
    background-color: #ffffff;
    padding: 24px 20px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.type-option:hover {
    border-color: #9ca3af;
    background-color: #f9fafb;
}

.type-icon {
    display: none;
}

.type-option h3 {
    font-size: 16px;
    color: #1f2937;
    margin-bottom: 6px;
    font-weight: 600;
}

.type-option p {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
    margin: 0;
}

/* ===== PROPERTY SELECTION MODAL ===== */
.modal-property-selection {
    max-width: 700px;
}

.section-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 12px;
    /* text-transform: uppercase; REMOVED */
    letter-spacing: 0.3px;
}

/* Country Selection */
.country-selection {
    margin-bottom: 32px;
}

.country-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.country-option:hover {
    border-color: #9ca3af;
    background-color: #f9fafb;
}

.country-option.selected {
    border-color: #374151;
    background-color: #f3f4f6;
}

.country-flag {
    width: 32px;
    height: auto;
    border-radius: 3px;
    opacity: 0.9;
}

.country-option span {
    font-size: 15px;
    font-weight: 500;
    color: #1f2937;
}

.checkmark {
    margin-left: auto;
    color: #374151;
    font-size: 18px;
    font-weight: normal;
}

/* Property Type Selection */
.property-type-selection {
    margin-bottom: 28px;
}

.property-types-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.property-type-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 20px 12px;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    min-height: 90px;
}

.property-type-option:hover {
    border-color: #9ca3af;
    background-color: #f9fafb;
}

.property-type-option.selected {
    border-color: #1f2937;
    background-color: #f3f4f6;
    box-shadow: 0 0 0 1px #1f2937;
}

.property-icon {
    display: none;
}

.property-type-option span:last-child {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    line-height: 1.3;
}

/* Continue Button */
.btn-continue {
    width: 100%;
    padding: 14px;
    background-color: #1f2937;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
}

.btn-continue:disabled {
    color: white !important;
}

.btn-continue:hover:not(:disabled) {
    background-color: #111827;
}

.btn-continue:disabled {
    background-color: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
}

/* Property Subtype Options (for optional step) */
.property-subtype-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 20px 12px;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    min-height: 90px;
}

.property-subtype-option:hover {
    border-color: #9ca3af;
    background-color: #f9fafb;
}

.property-subtype-option.selected {
    border-color: #1f2937;
    background-color: #f3f4f6;
    box-shadow: 0 0 0 1px #1f2937;
}

.property-subtype-option span {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    line-height: 1.3;
}

/* Modal Actions (for skip/continue buttons) */
.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-skip {
    flex: 1;
    padding: 14px;
    background-color: #ffffff;
    color: #6b7280;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-skip:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
    color: #374151;
}

.modal-actions .btn-continue {
    flex: 1;
}

/* Skip Button (Single - when no continue button) */
.btn-skip-single {
    width: 100%;
    padding: 14px;
    background-color: #ffffff;
    color: #6b7280;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 24px;
}

.btn-skip-single:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
    color: #374151;
}

/* Offer Type Options */
.offer-types-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.offer-type-option {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    min-height: 80px;
}

.offer-type-option:hover {
    border-color: #9ca3af;
    background-color: #f9fafb;
}

.offer-type-option.selected {
    border-color: #1f2937;
    background-color: #f3f4f6;
    box-shadow: 0 0 0 1px #1f2937;
}

.offer-type-option span {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

/* Bedrooms Selection */
.bedrooms-selection {
    margin-bottom: 28px;
}

.bedrooms-buttons-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.bedroom-btn {
    padding: 16px;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.bedroom-btn:hover {
    border-color: #9ca3af;
    background-color: #f9fafb;
}

.bedroom-btn.selected {
    border-color: #1f2937;
    background-color: #f3f4f6;
    box-shadow: 0 0 0 1px #1f2937;
}

/* Surface Selection */
.surface-selection {
    margin-bottom: 28px;
}

.surface-input-container {
    margin-bottom: 16px;
}

.surface-number-input {
    width: 100%;
    padding: 16px;
    font-size: 18px;
    font-weight: 500;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    text-align: center;
    transition: all 0.2s ease;
}

.surface-number-input:focus {
    outline: none;
    border-color: #1f2937;
    box-shadow: 0 0 0 3px rgba(31, 41, 55, 0.1);
}

.surface-units-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.surface-unit-btn {
    padding: 16px;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
}

.surface-unit-btn:hover {
    border-color: #9ca3af;
    background-color: #f9fafb;
}

.surface-unit-btn.selected {
    border-color: #1f2937;
    background-color: #f3f4f6;
    box-shadow: 0 0 0 1px #1f2937;
}

/* Price Selection (New) */
.price-selection-container {
    margin-bottom: 28px;
}

.price-input-container {
    margin-bottom: 16px;
}

.price-large-input {
    width: 100%;
    padding: 16px;
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    text-align: center;
    transition: all 0.2s ease;
}

.price-large-input:focus {
    outline: none;
    border-color: #1f2937;
    box-shadow: 0 0 0 3px rgba(31, 41, 55, 0.1);
}

.currency-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.currency-option {
    padding: 16px;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.currency-option:hover {
    border-color: #9ca3af;
    background-color: #f9fafb;
}

.currency-option.selected {
    border-color: #1f2937;
    background-color: #f3f4f6;
    box-shadow: 0 0 0 1px #1f2937;
}

.currency-symbol {
    font-weight: 700;
    color: #00a650;
}

/* Location Selection */
.location-selection {
    margin-bottom: 28px;
}

.location-select {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 500;
    color: #1f2937;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-bottom: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.location-select:focus {
    outline: none;
    border-color: #1f2937;
    box-shadow: 0 0 0 3px rgba(31, 41, 55, 0.1);
}

.location-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 500;
    color: #1f2937;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-bottom: 24px;
    transition: all 0.2s ease;
}

.location-input:focus {
    outline: none;
    border-color: #1f2937;
    box-shadow: 0 0 0 3px rgba(31, 41, 55, 0.1);
}

.location-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.maps-placeholder {
    margin-top: 32px;
}

.maps-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    background-color: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 6px;
    color: #6b7280;
    font-size: 14px;
}

/* ===== FORMS ===== */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.input-with-currency {
    display: flex;
    gap: 0;
}

.input-with-currency input {
    flex: 1;
    border-radius: 6px 0 0 6px;
}

.input-with-currency select {
    width: 80px;
    border-left: none;
    border-radius: 0 6px 6px 0;
}

.form-section {
    margin: 24px 0;
    padding: 20px;
    background-color: var(--bg-primary);
    border-radius: 8px;
}

.form-section h3 {
    font-size: 16px;
    margin-bottom: 16px;
}

.form-group-small {
    display: flex;
    flex-direction: column;
}

.form-group-small label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.form-group-small input {
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.char-count {
    text-align: right;
    color: var(--text-light);
    font-size: 12px;
    margin-top: 4px;
}

.image-upload {
    margin: 20px 0;
}

.upload-label {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--bg-primary);
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    color: var(--text-secondary);
}

.upload-label:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

#createImages {
    display: none;
}

/* Custom File Upload */
.file-input-hidden {
    display: none;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
    border: 2px dashed #e5e7eb;
    border-radius: var(--radius);
    background-color: #f9fafb;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.file-upload-label:hover {
    border-color: var(--primary-color);
    background-color: #f0fdf4;
    /* Light green tint */
}

.upload-icon {
    margin-bottom: 12px;
    color: #9ca3af;
}

.upload-text {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.upload-hint {
    font-size: 12px;
    color: var(--text-secondary);
}

.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.preview-item {
    position: relative;
    padding-top: 100%;
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--bg-primary);
}

.preview-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item .remove-image {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

/* ===== BUTTONS ===== */
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-large {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
}

.btn-back {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}

.btn-back:hover {
    color: #1f2937;
}

/* ===== PROPERTY DETAIL MODAL ===== */
.detail-content {
    display: grid;
    grid-template-columns: 350px 1fr;
    min-height: 600px;
}

.detail-sidebar {
    padding: 30px;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    max-height: 90vh;
}

.detail-sidebar h2 {
    font-size: 20px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.detail-price {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.detail-info {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.detail-info p {
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.detail-info strong {
    color: var(--text-primary);
}

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

.detail-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-whatsapp {
    width: 100%;
    padding: 14px;
    background-color: #25d366;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 15px;
}

.btn-whatsapp:hover {
    background-color: #20ba5a;
}

.btn-save,
.btn-share {
    width: 100%;
    padding: 12px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
}

.btn-save:hover,
.btn-share:hover {
    background-color: var(--border-color);
}

.detail-gallery {
    padding: 30px;
    background-color: #fafafa;
    overflow-y: auto;
    max-height: 90vh;
}

.gallery-main {
    width: 100%;
    height: 400px;
    background-color: var(--bg-primary);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.gallery-thumb {
    width: 100%;
    padding-top: 75%;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.gallery-thumb:hover {
    border-color: var(--secondary-color);
}

.gallery-thumb.active {
    border-color: var(--secondary-color);
}

.gallery-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== LOADING & EMPTY STATES ===== */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    font-size: 16px;
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

/* Custom Country Selector */
.custom-country-select {
    position: relative;
    width: 110px;
    margin-right: 12px;
}

.selected-country {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    background-color: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.country-flag-small {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
}

.dropdown-arrow {
    font-size: 10px;
    color: #9ca3af;
    margin-left: auto;
}

.country-options {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    z-index: 100;
    margin-top: 4px;
    max-height: 200px;
    overflow-y: auto;
}

.country-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.country-option:hover {
    background-color: #f3f4f6;
}

/* Professional Spacing Overrides */
.modal-content h2 {
    margin-bottom: 8px !important;
    /* Tighten title spacing */
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-subtitle {
    margin-bottom: 24px !important;
    /* Clear separation from content */
    color: #6b7280;
    font-size: 15px;
    line-height: 1.5;
}

.form-section {
    margin-bottom: 20px !important;
    /* Consistent section spacing */
}

.section-label {
    display: block;
    margin-bottom: 6px !important;
    /* Close to input */
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.btn-add-char {
    width: 100%;
    padding: 12px;
    background-color: white;
    border: 1px dashed #d1d5db;
    border-radius: 6px;
    color: #4b5563;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    /* Align text to left as requested implicitly by example placement */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-add-char:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: #f9fafb;
}

.custom-chars-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    /* Space between chips and button */
}

.custom-chars-container:empty {
    margin-bottom: 0;
}

.btn-publish {
    width: 100%;
    padding: 14px;
    background-color: hsl(142, 76%, 36%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 10px;
}

.btn-publish:hover {
    background-color: var(--primary-hover);
}

.btn-publish:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    background-color: hsl(142, 76%, 36%) !important;
    color: white !important;
    /* Keep color but transparent */
}

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

/* ===== FINAL DETAILS MODAL ===== */
.final-details-form {
    margin-top: 24px;
}

.final-details-form .form-section {
    margin-bottom: 28px;
    padding: 0;
    background-color: transparent;
}

.final-details-form .form-section h3 {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.final-details-form .form-section p {
    font-size: 13px;
    color: #9ca3af;
    margin-bottom: 12px;
}

/* Image Upload */
.file-input {
    display: block;
    width: 100%;
    padding: 16px;
    background-color: #ffffff;
    border: 2px dashed #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #6b7280;
    text-align: center;
}

.file-input::-webkit-file-upload-button {
    visibility: hidden;
    width: 0;
}

.file-input:hover {
    border-color: #9ca3af;
    background-color: #f9fafb;
}

.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-top: 16px;
}

.image-preview-grid .preview-item {
    position: relative;
    padding-top: 100%;
    border-radius: 6px;
    overflow: hidden;
    background-color: #f3f4f6;
    border: 1px solid #e5e7eb;
}

.image-preview-grid .preview-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-grid .remove-image {
    position: absolute;
    top: 4px;
    right: 4px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.image-preview-grid .remove-image:hover {
    background-color: rgba(0, 0, 0, 0.9);
}

/* WhatsApp Input */
.whatsapp-input-group {
    display: flex;
    gap: 0;
}

.country-code-select {
    width: 110px;
    padding: 14px 12px;
    font-size: 15px;
    font-weight: 500;
    color: #1f2937;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-right: none;
    border-radius: 6px 0 0 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.country-code-select:focus {
    outline: none;
    border-color: #1f2937;
    box-shadow: 0 0 0 3px rgba(31, 41, 55, 0.1);
    z-index: 1;
}

.phone-input {
    flex: 1;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 500;
    color: #1f2937;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0 6px 6px 0;
    transition: all 0.2s ease;
}

.phone-input:focus {
    outline: none;
    border-color: #1f2937;
    box-shadow: 0 0 0 3px rgba(31, 41, 55, 0.1);
}

.phone-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

/* Video Input */
.video-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 500;
    color: #1f2937;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.video-input:focus {
    outline: none;
    border-color: #1f2937;
    box-shadow: 0 0 0 3px rgba(31, 41, 55, 0.1);
}

.video-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

/* Description Textarea */
.description-textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 400;
    color: #1f2937;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    transition: all 0.2s ease;
    resize: vertical;
    min-height: 100px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.5;
}

.description-textarea:focus {
    outline: none;
    border-color: #1f2937;
    box-shadow: 0 0 0 3px rgba(31, 41, 55, 0.1);
}

.description-textarea::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.char-counter {
    text-align: right;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 6px;
}

/* Custom Characteristics */
.custom-chars-container {
    margin-top: 16px;
}

.custom-char-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.char-name-input,
.char-value-input {
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 400;
    color: #1f2937;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.char-name-input {
    flex: 0 0 180px;
}

.char-value-input {
    flex: 1;
}

.char-name-input:focus,
.char-value-input:focus {
    outline: none;
    border-color: #1f2937;
    box-shadow: 0 0 0 3px rgba(31, 41, 55, 0.1);
}

.char-name-input::placeholder,
.char-value-input::placeholder {
    color: #9ca3af;
}

.custom-char-item button {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #ef4444;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-char-item button:hover {
    background-color: #fee2e2;
    border-color: #ef4444;
}

.btn-add-char {
    width: 100%;
    padding: 12px;
    background-color: #ffffff;
    color: #6b7280;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 12px;
}

.btn-add-char:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
    color: #374151;
}

.btn-add-char:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Payment Methods */
.payment-methods-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkbox-option:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

.checkbox-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #1f2937;
}

.checkbox-option label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    margin: 0;
}

/* Publish Button */
.btn-publish {
    width: 100%;
    padding: 16px;
    background-color: #1f2937;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
    margin-top: 32px;
}

.btn-publish:hover {
    background-color: #111827;
}

.btn-publish:disabled {
    background-color: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1400px) {
    .properties-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

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

.main-layout {
    grid-template-columns: 1fr;
}

.sidebar {
    position: fixed;
    left: -280px;
    /* Hide off-screen */
    top: 60px;
    /* Below navbar */
    height: calc(100vh - 60px);
    width: 280px;
    z-index: 999;
    transition: left 0.3s ease;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.sidebar.active {
    left: 0;
}

.btn-create-gratis {
    width: 100%;
    padding: 14px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ... (rest of styles) ... */

/* ===== RESPONSIVE ===== */
@media (max-width: 1400px) {
    .properties-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

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

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

    .sidebar {
        position: relative;
        top: 0;
        border-radius: 8px;
        width: 100%;
        height: auto;
        box-shadow: none;
        z-index: 1;
    }

    .detail-content {
        grid-template-columns: 1fr;
    }

    .detail-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

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

@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
    }

    .nav-search {
        order: 3;
        width: 100%;
        max-width: 100%;
    }

    .properties-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .modal-content.modal-large {
        max-width: 95%;
        padding: 20px;
    }

    .type-options-grid {
        grid-template-columns: 1fr;
    }

    .modal-type-selection {
        max-width: 95%;
    }

    .modal-property-selection {
        max-width: 95%;
    }

    .property-types-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .property-types-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .property-type-option {
        padding: 16px 10px;
        min-height: 75px;
    }

    .property-type-option span:last-child {
        font-size: 12px;
    }

    .property-subtype-option {
        padding: 16px 10px;
        min-height: 75px;
    }

    .property-subtype-option span {
        font-size: 12px;
    }

    .modal-actions {
        flex-direction: column;
        gap: 10px;
    }

    .offer-types-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .offer-type-option {
        min-height: 60px;
        padding: 16px;
    }

    .bedrooms-buttons-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .bedroom-btn {
        padding: 14px;
        font-size: 14px;
    }

    .surface-units-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .surface-unit-btn {
        padding: 14px;
    }

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

    .payment-methods-grid {
        grid-template-columns: 1fr;
    }

    .custom-char-item {
        flex-direction: column;
        align-items: stretch;
    }

    .char-name-input {
        flex: 1;
    }
}

/* ===== PRICE MODAL STYLES ===== */
.price-selection-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 20px;
}

.price-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.price-large-input {
    width: 100%;
    padding: 16px;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    outline: none;
    transition: border-color 0.2s;
}

.price-large-input:focus {
    border-color: var(--primary-color);
}

.currency-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.currency-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.currency-option:hover {
    border-color: var(--text-light);
    background-color: #f9f9f9;
}

.currency-option.selected {
    border-color: var(--primary-color);
    background-color: rgba(37, 211, 102, 0.05);
    /* Very light green */
}

.currency-symbol {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.currency-name {
    font-weight: 500;
    font-size: 16px;
}