/* NerdEstayt Plugin Styles */

/* --- Archive / Shortcode Page --- */
.nerdestayt-archive-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    /* Sidebar and main content */
    gap: 40px;
    margin: 20px 0;
}

.nerdestayt-filter-sidebar {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    height: fit-content;
}

.nerdestayt-filter-sidebar h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #6f42c1;
    font-size: 20px;
}

.filter-group {
    margin-bottom: 15px;
}

.filter-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 14px;
}

.filter-group input[type="text"],
.filter-group input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    box-sizing: border-box;
}

.filter-submit-btn,
.filter-reset-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

.filter-submit-btn {
    background-color: #6f42c1;
    color: white;
}

.filter-submit-btn:hover {
    background-color: #5a2d91;
}

.filter-reset-btn {
    background-color: #6c757d;
    color: white;
}

.filter-reset-btn:hover {
    background-color: #5a6268;
}

.nerdestayt-properties-main .no-results {
    padding: 20px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
}

.nerdestayt-loader {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #6f42c1;
}


/* --- Property Grid & Cards --- */
.nerdestayt-properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.property-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

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

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

.no-image-available {
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

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

.property-status {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 12px;
    text-transform: uppercase;
    color: white;
}

.property-status.for-rent {
    background-color: #f4a261;
}

.property-status.for-sale {
    background-color: #6f42c1;
}

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

.property-type {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-weight: 500;
}

.property-icon {
    margin-right: 8px;
    font-size: 16px;
}

.property-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.property-title a {
    color: #6f42c1;
    text-decoration: none;
}

.property-title a:hover {
    text-decoration: underline;
}


.property-price {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.price-suffix {
    font-size: 14px;
    color: #666;
}

.property-address {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 15px;
}

.property-details {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.4;
    margin-top: auto;
}

.property-details-btn {
    display: inline-block;
    background-color: #6f42c1;
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    transition: background-color 0.3s ease;
    text-align: center;
}

.property-details-btn:hover {
    background-color: #5a2d91;
    color: white;
    text-decoration: none;
}

/* --- Single Property Page Styles --- */
.single-property {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header (Full Width) */
.property-header-full {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.property-title-section h1 {
    font-size: 32px;
    color: #6f42c1;
    margin: 0 0 10px 0;
}

.property-meta-inline {
    display: flex;
    gap: 20px;
    align-items: center;
}

.property-price-header {
    text-align: right;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #6f42c1;
    min-width: 200px;
}

.property-price-header .property-price-large {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

/* Main 2-column layout */
.property-main-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

/* Left Column */
.property-left-column {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.property-featured-image {
    width: 100%;
}

.property-featured-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 8px;
    transition: opacity 0.3s ease;
}

.no-image-placeholder {
    width: 100%;
    height: 500px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 18px;
    border-radius: 8px;
}

.property-description h3,
.property-features h3 {
    color: #6f42c1;
    margin-bottom: 15px;
    font-size: 24px;
}

.property-features {
    margin-top: 30px;
}

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

.feature-item {
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 5px;
    display: flex;
    align-items: center;
}

.feature-item::before {
    content: "✓";
    color: #28a745;
    font-weight: bold;
    margin-right: 8px;
}

/* Right Column */
.property-right-column {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.property-right-column-box {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
}

.property-right-column-box h3 {
    color: #6f42c1;
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 20px;
}

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

.gallery-thumb {
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.3s ease, opacity 0.3s ease;
}

.gallery-thumb:hover {
    opacity: 0.8;
    border-color: #6f42c1;
}

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

.meta-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #dee2e6;
}

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

.meta-icon {
    margin-right: 10px;
    font-size: 18px;
    width: 25px;
    text-align: center;
}

.meta-label {
    font-weight: 600;
    margin-right: 10px;
    min-width: 80px;
}

/* Agent Contact Form */
#agent-contact-form .form-group {
    margin-bottom: 15px;
}

#agent-contact-form label {
    display: none;
}

/* Using placeholders */
#agent-contact-form input,
#agent-contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    box-sizing: border-box;
}

#agent-contact-form button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    background-color: #28a745;
    color: white;
}

#agent-contact-form button:hover {
    background-color: #218838;
}

#agent-contact-form button:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.form-message {
    padding: 10px;
    margin-top: 15px;
    border-radius: 4px;
    text-align: center;
    display: none;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Admin Styles */
.gallery-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.gallery-item {
    position: relative;
    display: inline-block;
}

.gallery-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.remove-gallery-image {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white !important;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.remove-gallery-image:hover {
    background: #c82333;
    color: white !important;
}

/* Responsive Design */
@media (max-width: 900px) {

    .nerdestayt-archive-container,
    .property-main-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nerdestayt-properties-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .features-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .property-content {
        padding: 20px;
    }

    .property-title {
        font-size: 20px;
    }

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

    .single-property {
        padding: 10px;
    }

    .property-featured-image img,
    .no-image-placeholder {
        height: 300px;
    }

    .property-title-section h1 {
        font-size: 24px;
    }

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