/* =========================================
   1. LAYOUT
   ========================================= */
.pro365-archive-container, .pro365-listing-container {
    max-width: 1200px; 
    margin: 120px auto 60px; 
    padding: 0 20px;
    font-family: 'Inter', sans-serif; 
    color: #1f2937;
}

/* Hide Default Theme Title */
.single-pro365_listing .entry-title:not(.pro365-title),
.single-pro365_listing .page-title:not(.pro365-title) { 
    display: none !important; 
}

/* =========================================
   2. HERO DISPLAY (MAIN IMG + THUMBS)
   ========================================= */
/* CRITICAL: This section powers the single image + thumbnail strip */
.pro365-full-width-hero {
    width: 100vw;
    margin-left: calc(-50vw + 50%); 
    margin-right: calc(-50vw + 50%);
    position: relative; 
    overflow: hidden;
    z-index: 1; 
    height: 60vh; 
    min-height: 400px;
    background: #000;
}

.pro365-hero-display {
    width: 100%; 
    height: 100%; 
    position: relative;
}

/* MAIN IMAGE */
#pro365-main-hero-img {
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    display: block; 
    margin: 0 !important; 
    padding: 0 !important;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

/* THUMBNAIL STRIP (Floating Bottom) */
.pro365-hero-thumbs-container {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.6);
    padding: 10px;
    border-radius: 50px;
    z-index: 10;
    max-width: 90%;
}

.pro365-hero-thumbs-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
}
.pro365-hero-thumbs-scroll::-webkit-scrollbar { display: none; }

.pro365-hero-thumb {
    width: 60px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s;
    border: 2px solid transparent;
}
.pro365-hero-thumb:hover { opacity: 1; }
.pro365-hero-thumb.active { 
    opacity: 1; 
    border-color: #4f46e5; /* Will be overridden by PHP settings */
    transform: scale(1.1);
}

.pro365-hero-overlay {
    position: absolute; 
    bottom: 0; 
    left: 0; 
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 60px 20px 80px; /* Extra padding for thumbnails */
    color: white; 
    text-align: center; 
    pointer-events: none;
}

.pro365-hero-title { 
    font-size: 2.5rem; 
    font-weight: 800; 
    color: #fff; 
    margin: 0 0 5px 0; 
    text-shadow: 0 2px 10px rgba(0,0,0,0.5); 
}

.pro365-hero-loc { 
    font-size: 1.2rem; 
    opacity: 0.9; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 5px; 
}

/* =========================================
   3. CONTENT GRID
   ========================================= */
.pro365-content-wrapper { 
    display: grid; 
    grid-template-columns: 2fr 1fr; 
    gap: 40px; 
    margin-top: 40px; 
}

@media (max-width: 900px) { 
    .pro365-content-wrapper { grid-template-columns: 1fr; } 
}

.pro365-header-block { 
    margin-bottom: 30px; 
    border-bottom: 1px solid #e5e7eb; 
    padding-bottom: 30px; 
}

.pro365-specs-row { 
    display: flex; 
    gap: 25px; 
    margin-top: 20px; 
    align-items: center; 
}

.pro365-spec { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    color: #374151; 
}

.pro365-status-pill { 
    padding: 5px 12px; 
    border-radius: 20px; 
    font-weight: 700; 
    text-transform: uppercase; 
    font-size: 0.8rem; 
}
.pro365-status-pill.sale { background: #d1fae5; color: #065f46; }
.pro365-status-pill.rent { background: #dbeafe; color: #1e40af; }
.pro365-status-pill.sold { background: #f3f4f6; color: #374151; text-decoration: line-through; }

/* =========================================
   4. SIDEBAR
   ========================================= */
.pro365-sidebar-column { 
    display: flex; 
    flex-direction: column; 
    gap: 20px; 
}

.pro365-sidebar-card { 
    background: #fff; 
    border: 1px solid #e2e8f0; 
    border-radius: 12px; 
    padding: 20px; 
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02); 
}

.pro365-card-header { 
    margin: 0 0 15px 0; 
    font-size: 0.85rem; 
    font-weight: 700; 
    text-transform: uppercase; 
    color: #64748b; 
    border-bottom: 1px solid #f1f5f9; 
    padding-bottom: 8px; 
}

.pro365-price-display { 
    font-size: 1.8rem; 
    font-weight: 800; 
    color: #4f46e5; 
    margin-bottom: 20px; 
}

.pro365-contact-pill { 
    background: #f8fafc; 
    border-radius: 8px; 
    padding: 12px 15px; 
    border: 1px solid #e2e8f0; 
    margin-bottom: 10px; 
    display: flex; 
    align-items: center; 
    transition: background 0.2s; 
}
.pro365-contact-pill:hover { background: #f1f5f9; }

.pro365-big-link, .pro365-contact-pill a { 
    font-size: 1.05rem; 
    font-weight: 600; 
    color: #1e293b !important; 
    text-decoration: none !important; 
}

.pro365-sidebar-map { 
    height: 250px; 
    width: 100%; 
    border-radius: 8px; 
    border: 1px solid #e2e8f0; 
}

.pro365-social-icon { 
    display: inline-flex; 
    justify-content: center; 
    align-items: center; 
    width: 32px; 
    height: 32px; 
    border-radius: 50%; 
    color: white !important; 
    font-size: 13px; 
    font-weight: 700; 
    text-decoration: none; 
}

.pro365-back-link:hover { text-decoration: underline; }

/* =========================================
   5. LIGHTBOX
   ========================================= */
#pro365-lightbox {
    position: fixed; 
    top: 0; left: 0; 
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.9); 
    z-index: 99999; 
    display: flex; 
    justify-content: center; 
    align-items: center;
}
.pro365-lightbox-content { 
    position: relative; 
    max-width: 90%; 
    max-height: 90%; 
}
#pro365-lightbox-img { 
    max-width: 100%; 
    max-height: 80vh; 
    border-radius: 4px; 
    box-shadow: 0 0 20px rgba(0,0,0,0.5); 
}
#pro365-lightbox-close { 
    position: absolute; 
    top: -40px; right: 0; 
    color: white; 
    font-size: 30px; 
    cursor: pointer; 
}
#pro365-lightbox-prev, #pro365-lightbox-next {
    position: absolute; 
    top: 50%; 
    transform: translateY(-50%); 
    color: white; 
    font-size: 40px; 
    cursor: pointer;
    background: rgba(0,0,0,0.3); 
    padding: 10px; 
    border-radius: 4px;
}
#pro365-lightbox-prev { left: -60px; }
#pro365-lightbox-next { right: -60px; }

@media (max-width: 768px) { 
    #pro365-lightbox-prev { left: 0; } 
    #pro365-lightbox-next { right: 0; } 
}

/* =========================================
   6. ARCHIVE GRID, CAROUSEL & CARDS
   ========================================= */
.pro365-shortcode-container { width: 100%; }

/* Archive Grid */
.pro365-archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

/* Shortcode Grid Layouts */
.pro365-layout-grid { display: grid; gap: 30px; }
.pro365-layout-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.pro365-layout-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.pro365-layout-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

@media(max-width:900px){ 
    .pro365-layout-grid.cols-3, .pro365-layout-grid.cols-4 { grid-template-columns: repeat(2, 1fr); } 
}
@media(max-width:600px){ 
    .pro365-layout-grid.cols-2, .pro365-layout-grid.cols-3, .pro365-layout-grid.cols-4 { grid-template-columns: 1fr; } 
}

.pro365-layout-carousel { 
    display: flex; 
    overflow-x: auto; 
    gap: 20px; 
    padding-bottom: 20px; 
    scroll-snap-type: x mandatory; 
}
.pro365-layout-carousel .pro365-card-item { 
    flex: 0 0 300px; 
    scroll-snap-align: start; 
}

.pro365-card-item { 
    background: #fff; 
    border: 1px solid #e5e7eb; 
    border-radius: 12px; 
    overflow: hidden; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.05); 
}
.pro365-card-image { position: relative; }
.pro365-card-image img { 
    width: 100%; 
    height: 200px; 
    object-fit: cover; 
    display: block; 
}
.pro365-card-body { padding: 15px; }
.pro365-card-body h3 { font-size: 1.1rem; margin: 0 0 5px 0; }
.pro365-card-price { font-weight: 800; color: #4f46e5; }

/* BADGES */
.pro365-card-badge {
    position: absolute; top: 10px; right: 10px;
    padding: 4px 10px; border-radius: 12px;
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.pro365-card-badge.sale { background: #d1fae5; color: #065f46; }
.pro365-card-badge.rent { background: #dbeafe; color: #1e40af; }
.pro365-card-badge.sold { background: #f3f4f6; color: #374151; text-decoration: line-through; }

/* =========================================
   SEARCH BAR (STRICT ALIGNMENT FIX)
   ========================================= */
.pro365-search-bar { 
    padding: 20px 0; 
    margin-bottom: 30px; 
}

.pro365-search-inputs { 
    display: flex; 
    gap: 15px; 
    flex-wrap: wrap; 
    align-items: stretch; /* Forces items to fill container height */
    height: 50px; /* Fixed height for the row */
}

.pro365-input-text, 
.pro365-select-wrapper, 
.pro365-search-inputs button {
    height: 100% !important; /* Forces uniform height */
    margin: 0;
    box-sizing: border-box;
}

.pro365-input-text { 
    flex: 1.5; 
    min-width: 250px; 
    padding: 0 15px; 
    border: 1px solid #e5e7eb; 
    border-radius: 8px; 
    color: #374151;
    font-size: 1rem;
}

.pro365-select-wrapper { 
    flex: 1; 
    min-width: 200px; 
    position: relative; 
}

.pro365-select-wrapper select { 
    width: 100%; 
    height: 100%; /* Fill wrapper */
    padding: 0 15px; 
    border: 1px solid #e5e7eb; 
    border-radius: 8px; 
    background: #fff;
    font-size: 1rem;
    appearance: none; 
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23333%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 10px auto;
    cursor: pointer;
}

.pro365-search-inputs button { 
    background-color: #000; 
    color: white; 
    border: 1px solid #000; 
    border-radius: 8px; 
    padding: 0 30px; 
    font-weight: 600; 
    cursor: pointer; 
    text-transform: uppercase;
    flex: 0 0 auto; 
    width: auto;
}

/* Mobile Stack */
@media (max-width: 768px) {
    .pro365-search-inputs { 
        height: auto; 
        flex-direction: column; 
    }
    .pro365-input-text, 
    .pro365-select-wrapper, 
    .pro365-search-inputs button { 
        width: 100%; 
        height: 50px !important; 
        margin-bottom: 10px; 
    }
}

/* Form Styles */
.pro365-submission-container { max-width: 600px; margin: 40px auto; background: #fff; padding: 30px; border: 1px solid #e5e7eb; border-radius: 12px; }
.pro365-form-header { margin: 20px 0 10px 0; border-bottom: 1px solid #eee; padding-bottom: 5px; }
.pro365-form-row, .pro365-form-split { margin-bottom: 15px; }
.pro365-form-split { display: flex; gap: 15px; }
.pro365-form-col { flex: 1; }
.pro365-form input, .pro365-form select, .pro365-form textarea { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 6px; }
.pro365-submit-btn { width: 100%; padding: 12px; background: #4f46e5; color: white; border: none; border-radius: 6px; cursor: pointer; font-weight: bold; margin-top: 10px; }