/* ═══════════════════════════════════════════════════════════
   SHARED LISTING DETAIL LAYOUT
   Used by: Bookable, Services, Events, Ad Page, Quick Ad, Blog
   Provides consistent 2-column grid + sidebar styling
   ═══════════════════════════════════════════════════════════ */

/* ── Page Wrapper ── */
.listing-detail-page {
    padding: 40px 0;
    background: #f8f9fa;
    min-height: 80vh;
}

/* ── 2-Column Grid ── */
.listing-detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: start;
}

/* ── Main Content Column ── */
.listing-detail-main {
    min-width: 0; /* prevent grid blowout */
}

/* ── Sidebar Column (sticky) ── */
.listing-detail-sidebar {
    position: sticky;
    top: 20px;
}

/* ── Hero Section ── */
.listing-hero {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.listing-hero img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}
.listing-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
    color: #fff;
}
.listing-hero-overlay h1 {
    font-size: 30px;
    font-weight: 700;
    margin: 0 0 10px;
    line-height: 1.3;
}
.listing-hero-meta {
    font-size: 14px;
    opacity: 0.9;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}
.listing-hero-meta i {
    margin-right: 5px;
}

/* ── Content Card ── */
.listing-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
.listing-card h3 {
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
    color: #333;
}
.listing-card h3 i {
    color: #667eea;
    margin-right: 8px;
}
.listing-card p {
    line-height: 1.8;
    color: #555;
}

/* ── Primary CTA Button ── */
.listing-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(102,126,234,0.3);
}
.listing-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102,126,234,0.4);
    color: #fff;
    text-decoration: none;
}
.listing-cta-btn.cta-green {
    background: linear-gradient(135deg, #059669, #10b981);
    box-shadow: 0 4px 15px rgba(5,150,105,0.3);
}
.listing-cta-btn.cta-green:hover {
    box-shadow: 0 6px 20px rgba(5,150,105,0.4);
}
.listing-cta-btn.cta-orange {
    background: linear-gradient(135deg, #F26122, #f59e0b);
    box-shadow: 0 4px 15px rgba(242,97,34,0.3);
}
.listing-cta-btn.cta-orange:hover {
    box-shadow: 0 6px 20px rgba(242,97,34,0.4);
}

/* ═══════════════════════════════════════
   SIDEBAR COMPONENTS
   ═══════════════════════════════════════ */

/* ── Sidebar Card ── */
.listing-sidebar-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    overflow: hidden;
}
.listing-sidebar-header {
    padding: 18px 20px;
    font-weight: 700;
    font-size: 15px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.listing-sidebar-header i {
    color: #667eea;
}
.listing-sidebar-body {
    padding: 15px 20px;
}

/* ── Vendor Info Card ── */
.listing-vendor-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
}
.listing-vendor-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    flex-shrink: 0;
}
.listing-vendor-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.listing-vendor-info strong {
    display: block;
    font-size: 15px;
    color: #333;
    margin-bottom: 3px;
}
.listing-vendor-info small {
    color: #999;
    font-size: 12px;
}
.listing-vendor-link {
    display: block;
    text-align: center;
    padding: 10px 20px;
    margin: 0 20px 15px;
    border-radius: 8px;
    background: #f0f0ff;
    color: #667eea;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    transition: background 0.2s;
}
.listing-vendor-link:hover {
    background: #e0e0ff;
    color: #5a6fd6;
    text-decoration: none;
}

/* ── "More from Vendor" Items ── */
.listing-more-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}
.listing-more-item:last-child {
    border-bottom: none;
}
.listing-more-item:hover {
    text-decoration: none;
    color: inherit;
}
.listing-more-item:hover .listing-more-title {
    color: #667eea;
}
.listing-more-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f0f0f0;
}
.listing-more-title {
    font-weight: 600;
    font-size: 13px;
    color: #333;
    margin-bottom: 4px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}
.listing-more-meta {
    font-size: 11px;
    color: #999;
}
.listing-more-price {
    font-weight: 700;
    color: #059669;
    font-size: 13px;
}

/* ── Related Listings Grid ── */
.listing-related-section {
    margin-top: 30px;
}
.listing-related-section h3 {
    font-weight: 700;
    font-size: 20px;
    margin-bottom: 20px;
    color: #333;
}
.listing-related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.listing-related-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    display: block;
}
.listing-related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    text-decoration: none;
    color: inherit;
}
.listing-related-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}
.listing-related-card .card-body {
    padding: 15px;
}
.listing-related-card .card-body h5 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.listing-related-card .card-body small {
    color: #999;
    font-size: 12px;
}

/* ── Empty State ── */
.listing-sidebar-empty {
    text-align: center;
    padding: 20px;
    color: #aaa;
    font-size: 13px;
}
.listing-sidebar-empty i {
    display: block;
    font-size: 28px;
    margin-bottom: 8px;
    color: #ddd;
}

/* ── Ad Slot in Sidebar ── */
.listing-ad-slot {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    padding: 25px 20px;
    text-align: center;
    margin-bottom: 20px;
}
.listing-ad-slot .ad-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #aaa;
    margin-bottom: 10px;
}
.listing-ad-slot img {
    max-width: 100%;
    border-radius: 8px;
}

/* ── Similar Listings Section (shared partial) ── */
.similar-listings-section .section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    position: relative;
    padding-bottom: 10px;
}
.similar-listings-section .section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: #f26122;
    border-radius: 2px;
}
.similar-listing-card .card {
    transition: all 0.3s ease;
    border-radius: 10px;
    overflow: hidden;
}
.similar-listing-card:hover .card {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12) !important;
}
.similar-listing-card .card-img-wrapper {
    overflow: hidden;
}
.similar-listing-card .card-img-top {
    transition: transform 0.3s ease;
}
.similar-listing-card:hover .card-img-top {
    transform: scale(1.05);
}
.similar-listing-card .card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 992px) {
    .listing-detail-grid {
        grid-template-columns: 1fr;
    }
    .listing-detail-sidebar {
        position: static;
    }
    .listing-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 576px) {
    .listing-detail-page {
        padding: 20px 0;
    }
    .listing-hero img {
        height: 250px;
    }
    .listing-hero-overlay h1 {
        font-size: 22px;
    }
    .listing-related-grid {
        grid-template-columns: 1fr;
    }
    .listing-card {
        padding: 20px;
    }
    /* Similar listings on mobile */
    .similar-listings-section .col-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    .similar-listing-card .card-img-wrapper {
        height: 100px;
    }
    .similar-listing-card .card-img-top,
    .similar-listing-card .card-img-placeholder {
        height: 100px !important;
    }
}
