/* ================================================================
   LISTING DETAILS - NEW LAYOUT (Homes.com Style)
   Toggle-able via #newLayout / #classicLayout
   Prefix: hc- (homes.com inspired)
   ================================================================ */

/* === Layout Toggle Button === */
.hc-toggle-bar {
    display: flex;
    justify-content: flex-end;
    padding: 8px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

.hc-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    color: #214964;
    background: #fff;
    border: 1.5px solid #214964;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s;
}

.hc-toggle-btn:hover {
    background: #214964;
    color: #fff;
}

.hc-toggle-btn i {
    font-size: 12px;
}

/* === Photo Gallery Grid === */
.hc-gallery {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 4px;
    width: 100%;
    max-height: 520px;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
}

.hc-gallery-main {
    position: relative;
    overflow: hidden;
    background: #f1f5f9;
    border-radius: 12px 0 0 12px;
}

.hc-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.hc-gallery-main:hover img {
    transform: scale(1.02);
}

.hc-gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 4px;
    position: relative;
}

.hc-gallery-grid-item {
    position: relative;
    overflow: hidden;
    background: #f1f5f9;
}

.hc-gallery-grid-item:nth-child(2) {
    border-radius: 0 12px 0 0;
}

.hc-gallery-grid-item:nth-child(4) {
    border-radius: 0 0 12px 0;
}

.hc-gallery-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.hc-gallery-grid-item:hover img {
    transform: scale(1.05);
}

/* "View All Photos" overlay button */
.hc-view-all-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: 1.5px solid rgba(255,255,255,0.4);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: all 0.2s;
    z-index: 5;
}

.hc-view-all-btn:hover {
    background: rgba(0, 0, 0, 0.85);
    border-color: #fff;
}

.hc-view-all-btn i {
    margin-right: 4px;
}

/* === Info Bar (Price + Action Icons) === */
.hc-info-section {
    padding: 20px 0 16px;
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
}

.hc-info-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.hc-price-block h2 {
    font-size: 28px;
    font-weight: 800;
    color: #1a2332;
    margin: 0 0 4px;
    line-height: 1.2;
}

.hc-title-block h1 {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 4px;
    line-height: 1.3;
}

.hc-subtitle {
    font-size: 15px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.hc-subtitle .hc-sep {
    color: #cbd5e1;
}

.hc-subtitle a {
    color: #214964;
    text-decoration: none;
    font-weight: 500;
}

.hc-subtitle a:hover {
    text-decoration: underline;
}

.hc-subtitle i {
    font-size: 13px;
    margin-right: 3px;
}

/* Action icons row */
.hc-action-icons {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.hc-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    color: #475569;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.hc-icon-btn:hover {
    border-color: #214964;
    color: #214964;
    background: #f0f7ff;
}

.hc-icon-btn.active {
    background: #214964;
    border-color: #214964;
    color: #fff;
}

.hc-icon-btn.active:hover {
    background: #1a3a50;
}

/* More dropdown */
.hc-more-dropdown {
    position: relative;
    display: inline-block;
}

.hc-more-menu {
    display: none;
    position: absolute;
    top: 48px;
    right: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    min-width: 180px;
    z-index: 100;
    padding: 6px 0;
}

.hc-more-menu.show {
    display: block;
}

.hc-more-menu a,
.hc-more-menu button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}

.hc-more-menu a:hover,
.hc-more-menu button:hover {
    background: #f8fafc;
}

.hc-more-menu i {
    width: 16px;
    text-align: center;
    color: #64748b;
}

/* === Stats bar (Beds/Baths equivalent - for auction: bids, watchers, time) === */
.hc-stats-bar {
    display: flex;
    gap: 0;
    margin: 16px 0;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.hc-stat {
    flex: 1;
    text-align: center;
    padding: 14px 8px;
    border-right: 1px solid #e5e7eb;
}

.hc-stat:last-child {
    border-right: none;
}

.hc-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #1a2332;
    line-height: 1.2;
}

.hc-stat-label {
    font-size: 12px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 2px;
}

/* === Main Content Area === */
.hc-content-wrapper {
    padding-top: 12px;
}

.hc-section {
    padding: 20px 0;
    border-bottom: 1px solid #f1f5f9;
}

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

.hc-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 12px;
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
}

.hc-section-title i {
    color: #214964;
    margin-right: 8px;
    font-size: 16px;
}

/* === Right Column: Bid Box wrapper === */
.hc-bidbox-wrapper {
    position: sticky;
    top: 80px;
}

/* === Share Modal === */
.hc-share-popup {
    display: none;
    position: absolute;
    top: 48px;
    right: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    padding: 16px;
    z-index: 100;
    min-width: 240px;
}

.hc-share-popup.show {
    display: block;
}

.hc-share-popup h4 {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 12px;
}

.hc-share-links {
    display: flex;
    gap: 10px;
}

.hc-share-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #475569;
    font-size: 18px;
    text-decoration: none;
    transition: all 0.2s;
}

.hc-share-link:hover {
    background: #214964;
    color: #fff;
}

.hc-copy-link {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 8px 12px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #475569;
    transition: all 0.15s;
}

.hc-copy-link:hover {
    background: #e8f4ff;
    border-color: #214964;
}

.hc-copy-link i {
    color: #214964;
}

/* === Responsive === */
@media (max-width: 992px) {
    .hc-gallery {
        max-height: 400px;
    }

    .hc-price-block h2 {
        font-size: 24px;
    }

    .hc-title-block h1 {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .hc-gallery {
        grid-template-columns: 1fr;
        max-height: none;
        border-radius: 0;
    }

    .hc-gallery-main {
        border-radius: 0;
        aspect-ratio: 16/10;
    }

    .hc-gallery-grid {
        display: none;
    }

    .hc-view-all-btn {
        /* Show on the main image for mobile */
    }

    .hc-info-top {
        flex-direction: column;
        gap: 12px;
    }

    .hc-action-icons {
        justify-content: flex-start;
    }

    .hc-stats-bar {
        flex-wrap: wrap;
    }

    .hc-stat {
        flex: 1 1 calc(50% - 1px);
    }

    .hc-stat:nth-child(2) {
        border-right: none;
    }

    .hc-stat:nth-child(1),
    .hc-stat:nth-child(2) {
        border-bottom: 1px solid #e5e7eb;
    }

    .hc-price-block h2 {
        font-size: 22px;
    }

    .hc-title-block h1 {
        font-size: 18px;
    }

    .hc-subtitle {
        font-size: 13px;
    }

    .hc-toggle-bar {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hc-gallery-main {
        aspect-ratio: 4/3;
    }

    .hc-icon-btn {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }
}
