/* Estate Marketplace Custom Styles */

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-glow: rgba(99,102,241,.18);
    --secondary-color: #6c757d;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;
    --dark-color: #0f0f23;
    --light-color: #f0f1ff;
    --body-bg: #f0f4fa;
    --card-bg: #fff;
    --card-border: rgba(99,102,241,.1);
    --section-alt: #e8eaf6;
    --text-dark: #1e1e2e;
    --text-body: #3a3a5c;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f0f4fa !important;
    background-color: #f0f4fa !important;
    color: var(--text-body);
}

main {
    flex: 1;
}

/* Navbar Customization */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar-brand i {
    color: var(--primary-color);
}

/* Card Styles — Every card is EXACTLY the same size, no exceptions */
.card.listing-card {
    transition: transform 0.4s cubic-bezier(.22,1,.36,1), box-shadow 0.4s ease, border-color 0.4s ease;
    background: var(--card-bg) !important;
    border: 1px solid var(--card-border) !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
    width: 100% !important;
    height: 380px !important;
    min-height: 380px !important;
    max-height: 380px !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.04);
    cursor: pointer;
}

.card.listing-card:hover {
    transform: translateY(-8px) scale(1.015);
    box-shadow: 0 20px 50px rgba(18,18,60,.18), 0 8px 20px rgba(99,102,241,.12), 0 2px 6px rgba(0,0,0,.08);
    border-color: rgba(99,102,241,.3) !important;
}

/* Image area — EXACT fixed rectangle */
.card.listing-card .card-img-wrap {
    position: relative !important;
    width: 100% !important;
    height: 200px !important;
    min-height: 200px !important;
    max-height: 200px !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    background: #e8eaf6;
    padding: 0 !important;
    margin: 0 !important;
}

/* Any image inside the card — forced to fill the box */
.card.listing-card .card-img-wrap img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 200px !important;
    min-height: 200px !important;
    max-height: 200px !important;
    object-fit: cover !important;
    object-position: center center !important;
    display: block !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.card.listing-card .card-img-wrap .no-img-placeholder {
    position: absolute !important;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #c7d2fe, #e8eaf6);
    color: #6366f1;
}

/* Card body — EXACT fixed height, fills remaining 180px */
.card.listing-card > .card-body {
    padding: 12px 14px !important;
    display: flex !important;
    flex-direction: column !important;
    height: 180px !important;
    min-height: 180px !important;
    max-height: 180px !important;
    flex: 0 0 180px !important;
    overflow: hidden !important;
}

.card.listing-card .card-title {
    font-size: .88rem !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin-top: 0 !important;
    margin-bottom: 4px !important;
    padding: 0 !important;
    line-height: 1.3 !important;
    max-height: 1.3em !important;
}

.card.listing-card .price-tag {
    font-size: 1.05rem !important;
    margin-bottom: 2px !important;
}

.card.listing-card .card-meta {
    margin-top: auto !important;
}

.card.listing-card .card-meta .btn {
    margin-top: 4px !important;
    flex-shrink: 0 !important;
}

.listing-card .btn-primary,
.listing-card .btn-outline-primary {
    border-radius: 50px;
    font-weight: 600;
    font-size: .85rem;
}

.listing-card .btn-primary {
    background: rgba(18,18,60,.95) !important;
    border: 1px solid rgba(255,255,255,.1) !important;
    box-shadow: 0 3px 10px rgba(18,18,60,.2);
}

.listing-card .btn-primary:hover {
    box-shadow: 0 5px 18px rgba(18,18,60,.3);
    transform: translateY(-1px);
    background: rgba(24,24,80,.95) !important;
}

.listing-card .btn-outline-primary {
    border-color: rgba(18,18,40,.95);
    color: rgba(18,18,40,.95);
}

.listing-card .btn-outline-primary:hover {
    background: rgba(18,18,40,.95);
    border-color: rgba(18,18,40,.95);
    color: #fff;
}

.badge-featured {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, var(--warning-color), #d97706);
    color: #fff;
    padding: 5px 14px;
    border-radius: 50px;
    font-weight: 700;
    font-size: .72rem;
    letter-spacing: .5px;
    text-transform: uppercase;
    box-shadow: 0 3px 10px rgba(245,158,11,.3);
}

/* Sale-type badge on cards */
.badge-sale-type {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 50px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .3px;
    vertical-align: middle;
}
.badge-sale-type.for-sale {
    background: rgba(16,185,129,.12);
    color: #059669;
}
.badge-sale-type.for-rent {
    background: rgba(59,130,246,.12);
    color: #2563eb;
}

/* Search Bar */
.search-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}
.search-section::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(99,102,241,.15) 0%, transparent 50%),
                radial-gradient(circle at 70% 60%, rgba(99,102,241,.1) 0%, transparent 40%);
    pointer-events: none;
}

.search-box {
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(99,102,241,.1);
}

.search-box .form-control,
.search-box .form-select {
    border-radius: 10px;
    border: 1.5px solid #e0e2f0;
    transition: border-color .3s ease, box-shadow .3s ease;
}
.search-box .form-control:focus,
.search-box .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-box .btn-primary {
    background: rgba(18,18,60,.95) !important;
    border: 1px solid rgba(255,255,255,.1) !important;
    border-radius: 10px;
    font-weight: 700;
    box-shadow: 0 3px 12px rgba(18,18,60,.2);
    transition: all .3s ease;
}
.search-box .btn-primary:hover {
    background: rgba(24,24,80,.95) !important;
    box-shadow: 0 5px 20px rgba(18,18,60,.35);
    transform: translateY(-1px);
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.category-card {
    text-align: center;
    padding: 32px 20px 26px;
    background: var(--card-bg);
    border: 2px solid transparent;
    border-radius: 18px;
    transition: all 0.35s cubic-bezier(.22,1,.36,1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(99,102,241,.05), rgba(99,102,241,.01));
    opacity: 0;
    transition: opacity .35s ease;
}

.category-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(99,102,241,.18), 0 4px 12px rgba(0,0,0,.04);
}

.category-card:hover::before {
    opacity: 1;
}

.category-icon-wrap {
    width: 68px;
    height: 68px;
    margin: 0 auto 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(99,102,241,.12), rgba(99,102,241,.06));
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .35s cubic-bezier(.22,1,.36,1);
}

.category-card:hover .category-icon-wrap {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    transform: scale(1.08);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.category-card i {
    font-size: 1.6rem;
    color: var(--primary-color);
    transition: all .3s ease;
}

.category-card:hover i {
    color: #fff;
    transform: scale(1.1);
}

.category-name {
    font-weight: 700;
    font-size: .95rem;
    color: var(--text-dark);
    margin-bottom: 6px;
    position: relative;
}

.category-count {
    font-size: .78rem;
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(99,102,241,.08);
    padding: 3px 12px;
    border-radius: 50px;
    display: inline-block;
    position: relative;
}

/* Buttons */
.btn-whatsapp {
    background: #25D366;
    color: white;
    border: none;
}

.btn-whatsapp:hover {
    background: #128C7E;
    color: white;
}

/* Global primary buttons — dark navy-blue */
.btn-primary {
    background: rgba(18,18,60,.95) !important;
    border: 1px solid rgba(255,255,255,.1) !important;
    color: #fff !important;
}
.btn-primary:hover {
    background: rgba(24,24,80,.95) !important;
    border-color: rgba(99,102,241,.3) !important;
    color: #fff !important;
}

.btn-outline-primary {
    border-color: rgba(18,18,60,.95) !important;
    color: rgba(18,18,60,.95) !important;
    background: transparent !important;
}
.btn-outline-primary:hover {
    background: rgba(18,18,60,.95) !important;
    border-color: rgba(18,18,60,.95) !important;
    color: #fff !important;
}

/* Price Tag */
.price-tag {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Utilities */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Footer */
footer a {
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.social-links a {
    transition: opacity 0.3s ease;
}

.social-links a:hover {
    opacity: 0.7;
}

/* Favorite Button */
.favorite-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(.22,1,.36,1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    text-decoration: none;
}

.favorite-btn i {
    font-size: 1.2rem;
    color: #999;
    transition: all 0.3s ease;
}

.favorite-btn:hover {
    transform: scale(1.15);
    background: white;
    box-shadow: 0 4px 16px rgba(239,68,68,.2);
}

.favorite-btn:hover i {
    color: var(--danger-color);
}

.favorite-btn.favorited i {
    color: var(--danger-color);
}

.favorite-btn.favorited {
    background: white;
}

/* Favorite animation */
@keyframes heartBeat {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.3);
    }
    50% {
        transform: scale(1.1);
    }
}

.favorite-btn.animate i {
    animation: heartBeat 0.6s ease;
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: -100px;
    right: 20px;
    background: white;
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transition: bottom 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    border-left: 4px solid var(--primary-color);
}

.toast-notification.show {
    bottom: 20px;
}

/* Section backgrounds */
.section-light {
    background: var(--section-alt);
}

.section-main {
    background: var(--body-bg);
}

/* Responsive */
@media (max-width: 768px) {
    .search-section {
        padding: 40px 0;
    }
    
    .search-box {
        padding: 20px;
    }

    /* ── Mobile: Amazon/Jumia-style horizontal product cards ── */
    .card.listing-card {
        flex-direction: row !important;
        height: 170px !important;
        min-height: 170px !important;
        max-height: 170px !important;
        border-radius: 12px !important;
    }

    .card.listing-card:hover {
        transform: none;
    }

    .card.listing-card .card-img-wrap {
        width: 160px !important;
        min-width: 160px !important;
        max-width: 160px !important;
        height: 170px !important;
        min-height: 170px !important;
        max-height: 170px !important;
        border-radius: 12px 0 0 12px !important;
        flex-shrink: 0 !important;
        overflow: hidden !important;
    }

    .card.listing-card .card-img-wrap img {
        width: 160px !important;
        height: 170px !important;
        min-height: 170px !important;
        max-height: 170px !important;
        object-fit: cover !important;
        object-position: center center !important;
    }

    .card.listing-card .card-img-wrap .no-img-placeholder {
        width: 160px !important;
        height: 170px !important;
    }

    .card.listing-card > .card-body {
        flex: 1 1 0% !important;
        height: 170px !important;
        min-height: 170px !important;
        max-height: 170px !important;
        padding: 12px 14px !important;
        justify-content: center !important;
        overflow: hidden !important;
    }

    .card.listing-card .card-title {
        font-size: .88rem !important;
        margin-bottom: 4px !important;
        line-height: 1.3 !important;
        max-height: 2.6em !important;
        white-space: normal !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    .card.listing-card .price-tag {
        font-size: 1rem !important;
        margin-bottom: 4px !important;
        font-weight: 800 !important;
    }

    .card.listing-card .card-meta {
        margin-top: 2px !important;
    }

    .card.listing-card .card-meta .btn {
        display: none !important;  /* hide button on mobile — whole card is tappable */
    }

    .card.listing-card .badge {
        font-size: .65rem !important;
        padding: 2px 6px !important;
    }

    .card.listing-card .badge-sale-type {
        font-size: .65rem !important;
        padding: 2px 6px !important;
    }

    .badge-featured {
        top: 6px;
        right: 6px;
        padding: 3px 8px;
        font-size: .6rem;
    }

    .favorite-btn {
        top: 6px !important;
        left: 6px !important;
        width: 28px !important;
        height: 28px !important;
        font-size: .7rem !important;
    }

    /* Make listing grid columns full-width on mobile */
    .listing-grid-mobile .col-sm-6,
    .listing-grid-mobile .col-md-4,
    .listing-grid-mobile .col-lg-3 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    /* Tighter gutter on mobile */
    .listing-grid-mobile.g-4 {
        --bs-gutter-y: 0.6rem !important;
        --bs-gutter-x: 0 !important;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .category-card {
        padding: 22px 14px 18px;
    }
    
    .category-icon-wrap {
        width: 54px;
        height: 54px;
    }
    
    .category-card i {
        font-size: 1.3rem;
    }
    
    .toast-notification {
        right: 10px;
        left: 10px;
        text-align: center;
        justify-content: center;
    }
}

/* ===== LISTING DETAIL PAGE ===== */

/* Hero Banner */
/* Detail Page Header */
.detail-info-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 20px;
    border: 1px solid rgba(0,0,0,.06);
    box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.detail-info-card .detail-tags-row {
    margin-bottom: 12px;
}
.detail-info-card .detail-title {
    margin-bottom: 8px;
}
.detail-price-row {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 10px;
}
.detail-meta-line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: #6b7280;
    font-size: .85rem;
}
.detail-meta-line i {
    font-size: .78rem;
}
.detail-meta-dot {
    color: #d1d5db;
    font-weight: 700;
}
.detail-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.detail-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border-radius: 50px;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .02em;
}
.detail-tag.category { background: rgba(99,102,241,.1); color: #6366f1; }
.detail-tag.featured { background: rgba(245,158,11,.12); color: #d97706; }
.detail-tag.sale-type { background: rgba(16,185,129,.1); color: #059669; }
.detail-tag.negotiable { background: rgba(16,185,129,.12); color: #059669; }

.breadcrumb-modern {
    background: none;
    padding: 0;
    margin: 0;
    font-size: .85rem;
}
.breadcrumb-modern .breadcrumb-item a {
    color: #6366f1;
    text-decoration: none;
    transition: color .2s;
}
.breadcrumb-modern .breadcrumb-item a:hover { color: #4f46e5; }
.breadcrumb-modern .breadcrumb-item.active { color: #6b7280; }
.breadcrumb-modern .breadcrumb-item + .breadcrumb-item::before { color: #9ca3af; }

.detail-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1e1e2e;
    margin: 0;
    line-height: 1.3;
}
.detail-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: #6366f1;
    white-space: nowrap;
}
.detail-price-period {
    font-size: .9rem;
    color: #9ca3af;
    font-weight: 500;
}

/* Content Area */
.detail-content {
    background: #f0f4fa;
}

/* Gallery */
.detail-gallery-card {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
    margin-bottom: 20px;
    position: relative;
    background: #fff;
}
/* Heart icon overlay on gallery */
.detail-gallery-card .favorite-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(6px);
    color: #9ca3af;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,.15);
    text-decoration: none;
}
.detail-gallery-card .favorite-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 16px rgba(0,0,0,.2);
}
.detail-gallery-card .favorite-btn.favorited {
    color: #ef4444;
}
.detail-gallery-card .favorite-btn.favorited .fa-heart {
    color: #ef4444;
}
.detail-gallery-card .favorite-btn .fa-heart {
    transition: color .3s ease;
}
.detail-gallery-card .carousel,
.detail-gallery-card .carousel-inner,
.detail-gallery-card .carousel-item {
    height: 520px;
}
.detail-gallery-img {
    width: 100%;
    height: 520px;
    object-fit: cover;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}
.detail-no-image {
    height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8eaf6, #f0f4fa);
    color: #9ca3af;
    gap: 12px;
}
.gallery-counter {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(18,18,60,.75);
    backdrop-filter: blur(8px);
    color: #fff;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: .8rem;
    font-weight: 600;
}
.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(18,18,60,.5);
    border-radius: 50%;
    padding: 18px;
    background-size: 50%;
}

/* Actions Bar */
.detail-actions-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
/* Override card-overlay positioning for favorite btn inside actions bar */
.detail-actions-bar .favorite-btn {
    position: static;
    width: auto;
    height: auto;
    border-radius: 50px;
    padding: 10px 22px;
    border: 2px solid #e5e7eb;
    background: #fff;
    color: #4b5563;
    font-size: .88rem;
    font-weight: 600;
    box-shadow: none;
    backdrop-filter: none;
    z-index: auto;
}
.detail-actions-bar .favorite-btn i {
    font-size: 1.1rem;
}
.detail-actions-bar .favorite-btn:hover {
    transform: translateY(-2px);
    border-color: #ef4444;
    box-shadow: 0 4px 12px rgba(239,68,68,.15);
    background: #fff;
}
.detail-actions-bar .favorite-btn.favorited {
    border-color: #ef4444;
    background: #fff;
}
.detail-actions-bar .favorite-btn.favorited i {
    color: #ef4444;
}
.detail-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 50px;
    border: 2px solid #e5e7eb;
    background: #fff;
    color: #4b5563;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .3s ease;
    text-decoration: none;
}
.detail-action-btn:hover {
    border-color: #6366f1;
    color: #6366f1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99,102,241,.15);
}
.detail-action-btn.favorited {
    background: #fff;
    border-color: #e5e7eb;
    color: #4b5563;
}
.detail-action-btn.favorited .fa-heart {
    color: #ef4444;
}
.detail-action-btn.favorited:hover {
    border-color: #ef4444;
    color: #4b5563;
}

/* Section Cards */
.detail-section-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,.06);
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,.04);
    transition: box-shadow .3s ease;
}
.detail-section-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,.08);
}
.detail-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 24px;
    background: linear-gradient(135deg, #fafbff, #f5f6ff);
    border-bottom: 1px solid rgba(99,102,241,.08);
}
.detail-section-header i {
    color: #6366f1;
    font-size: 1.1rem;
}
.detail-section-header h5 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e1e2e;
}
.detail-section-body {
    padding: 24px;
}
.detail-description {
    color: #4b5563;
    line-height: 1.75;
    font-size: .95rem;
}

/* Specs Grid */
.detail-specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.spec-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    background: #f8f9fc;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,.04);
    transition: all .25s ease;
}
.spec-item:hover {
    background: #f0f1ff;
    border-color: rgba(99,102,241,.12);
    transform: translateY(-2px);
}
.spec-label {
    font-size: .78rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: .04em;
    display: flex;
    align-items: center;
    gap: 6px;
}
.spec-label i {
    color: #6366f1;
    font-size: .75rem;
}
.spec-value {
    font-size: .95rem;
    font-weight: 600;
    color: #1e1e2e;
}

/* Location */
.detail-location {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}
.location-pin {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(99,102,241,.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6366f1;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Posted Info */
.detail-posted-info {
    font-size: .85rem;
    color: #9ca3af;
    padding: 16px 0 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}
.detail-posted-info i {
    margin-right: 4px;
    color: #6366f1;
    opacity: .6;
}

/* ===== SIDEBAR ===== */
.detail-sidebar-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,.06);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,.04);
    transition: box-shadow .3s ease;
}
.detail-sidebar-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,.08);
}

/* Seller Card */
.seller-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}
.seller-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}
.seller-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(99,102,241,.15);
}
.seller-avatar-placeholder {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #818cf8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
}
.verified-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 22px;
    height: 22px;
    background: #10b981;
    border-radius: 50%;
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: .6rem;
}
.seller-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e1e2e;
    margin: 0 0 4px;
}
.seller-verified-text {
    font-size: .78rem;
    color: #10b981;
    font-weight: 600;
}
.seller-bio {
    font-size: .88rem;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0,0,0,.06);
}

/* Contact Buttons */
.seller-contact {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 12px;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all .3s ease;
    border: none;
    cursor: pointer;
}
.contact-btn.primary-btn {
    background: rgba(18,18,60,.95);
    color: #fff;
}
.contact-btn.primary-btn:hover {
    background: rgba(24,24,80,.95);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(18,18,60,.25);
    color: #fff;
}
.contact-btn.phone-btn {
    background: rgba(99,102,241,.08);
    color: #6366f1;
    border: 1px solid rgba(99,102,241,.15);
}
.contact-btn.phone-btn:hover {
    background: rgba(99,102,241,.15);
    transform: translateY(-2px);
    color: #6366f1;
}
.contact-btn.whatsapp-btn {
    background: rgba(37,211,102,.08);
    color: #25d366;
    border: 1px solid rgba(37,211,102,.15);
}
.contact-btn.whatsapp-btn:hover {
    background: #25d366;
    color: #fff;
    transform: translateY(-2px);
}
.contact-btn.email-btn {
    background: rgba(107,114,128,.06);
    color: #6b7280;
    border: 1px solid rgba(107,114,128,.12);
}
.contact-btn.email-btn:hover {
    background: rgba(107,114,128,.12);
    transform: translateY(-2px);
    color: #4b5563;
}

/* Share Buttons */
.sidebar-card-title {
    font-size: .95rem;
    font-weight: 700;
    color: #1e1e2e;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sidebar-card-title i { color: #6366f1; }
.share-buttons {
    display: flex;
    gap: 10px;
}
.share-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all .3s ease;
    border: none;
    cursor: pointer;
}
.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,.12);
}
.share-btn.facebook { background: #1877f2; color: #fff; }
.share-btn.facebook:hover { background: #166fe5; color: #fff; }
.share-btn.twitter { background: #1da1f2; color: #fff; }
.share-btn.twitter:hover { background: #0d95e8; color: #fff; }
.share-btn.whatsapp-share { background: #25d366; color: #fff; }
.share-btn.whatsapp-share:hover { background: #1fbb58; color: #fff; }
.share-btn.copy-link { background: #f3f4f6; color: #6b7280; }
.share-btn.copy-link:hover { background: #6366f1; color: #fff; }

/* Similar Section */
.detail-similar-section {
    margin-top: 48px;
    padding-top: 40px;
    border-top: 1px solid rgba(0,0,0,.06);
}
.section-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}
.section-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #1e1e2e;
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-title i { color: #6366f1; }
.view-all-link {
    color: #6366f1;
    font-weight: 600;
    font-size: .9rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: gap .3s ease;
}
.view-all-link:hover { gap: 10px; color: #4f46e5; }

/* Detail Page Responsive */
@media (max-width: 768px) {
    .detail-info-card { padding: 18px 20px; }
    .detail-title { font-size: 1.3rem; }
    .detail-price { font-size: 1.25rem; }
    .detail-gallery-card .carousel,
    .detail-gallery-card .carousel-inner,
    .detail-gallery-card .carousel-item { height: 320px; }
    .detail-gallery-img { height: 320px; }
    .detail-specs-grid { grid-template-columns: repeat(2, 1fr); }
    .seller-header { flex-direction: column; text-align: center; }
    .detail-actions-bar { flex-direction: column; }
    .detail-action-btn { justify-content: center; }
    .detail-actions-bar .favorite-btn { justify-content: center; }
    .share-buttons { justify-content: center; }
}

/* ===== MESSAGING / CHAT PAGES ===== */

/* Inbox Header */
.inbox-header {
    margin-bottom: 24px;
}
.inbox-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1e1e2e;
    display: flex;
    align-items: center;
    gap: 10px;
}
.inbox-title i { color: #6366f1; }

/* Inbox List */
.inbox-list {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,.06);
    box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.inbox-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid rgba(0,0,0,.05);
    transition: all .2s ease;
}
.inbox-item:last-child { border-bottom: none; }
.inbox-item:hover {
    background: rgba(99,102,241,.03);
    color: inherit;
}
.inbox-unread {
    background: rgba(99,102,241,.04);
}
.inbox-unread .inbox-name { color: #1e1e2e; }
.inbox-unread .inbox-preview { color: #374151; font-weight: 500; }

/* Inbox Avatar */
.inbox-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}
.inbox-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
}
.inbox-avatar-placeholder {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(99,102,241,.1);
    color: #6366f1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}
.inbox-online-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid #fff;
}

/* Inbox Content */
.inbox-content {
    flex: 1;
    min-width: 0;
}
.inbox-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}
.inbox-name {
    font-size: .92rem;
    font-weight: 700;
    color: #1e1e2e;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.inbox-name i { font-size: .75rem; }
.inbox-time {
    font-size: .75rem;
    color: #9ca3af;
    white-space: nowrap;
    flex-shrink: 0;
}
.inbox-listing-ref {
    font-size: .78rem;
    color: #6366f1;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.inbox-listing-ref i { font-size: .7rem; }
.inbox-preview {
    font-size: .85rem;
    color: #6b7280;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.inbox-badge span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #6366f1;
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
}
.inbox-arrow {
    color: #d1d5db;
    font-size: .85rem;
}
.admin-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(239,68,68,.1);
    color: #ef4444;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .04em;
}

/* Inbox Empty */
.inbox-empty {
    text-align: center;
    padding: 64px 20px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,.06);
}
.inbox-empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(99,102,241,.08);
    color: #6366f1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 20px;
}
.inbox-empty h4 {
    font-weight: 700;
    color: #1e1e2e;
    margin-bottom: 8px;
}
.inbox-empty p {
    color: #6b7280;
    margin-bottom: 20px;
}
.inbox-browse-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 28px;
    border-radius: 50px;
    background: #6366f1;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: .9rem;
    transition: all .3s ease;
}
.inbox-browse-btn:hover {
    background: #4f46e5;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(99,102,241,.3);
}

/* ===== CHAT DETAIL PAGE ===== */

/* Chat Card */
.chat-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,.06);
    box-shadow: 0 4px 24px rgba(0,0,0,.08);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 180px);
    min-height: 500px;
    max-height: 800px;
    position: sticky;
    top: 90px;
}

/* Chat Header */
.chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(0,0,0,.06);
    background: #fff;
}
.chat-back-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    text-decoration: none;
    transition: all .2s ease;
    flex-shrink: 0;
}
.chat-back-btn:hover {
    background: rgba(99,102,241,.08);
    color: #6366f1;
}
.chat-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}
.chat-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.chat-avatar-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(99,102,241,.1);
    color: #6366f1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.chat-user-name {
    font-size: .95rem;
    font-weight: 700;
    color: #1e1e2e;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.chat-user-name i { font-size: .75rem; }
.chat-user-status {
    font-size: .75rem;
    color: #22c55e;
    display: flex;
    align-items: center;
    gap: 5px;
}
.chat-user-status i { font-size: .45rem; }
.chat-header-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.chat-action-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    text-decoration: none;
    transition: all .2s ease;
    font-size: .95rem;
}
.chat-action-icon:hover {
    background: rgba(99,102,241,.08);
    color: #6366f1;
}
.chat-action-icon.whatsapp:hover {
    background: rgba(37,211,102,.08);
    color: #25d366;
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background: linear-gradient(180deg, #f8f9fc 0%, #f0f4fa 100%);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }

.chat-msg {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 8px;
    max-width: 75%;
}
.chat-msg-sent {
    align-self: flex-end;
    flex-direction: row-reverse;
}
.chat-msg-received {
    align-self: flex-start;
}
.chat-msg-avatar {
    flex-shrink: 0;
}
.chat-msg-avatar img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}
.chat-msg-avatar span {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(99,102,241,.1);
    color: #6366f1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
}

/* Chat Bubbles */
.chat-bubble {
    padding: 10px 16px;
    border-radius: 18px;
    word-wrap: break-word;
    position: relative;
}
.chat-bubble p {
    margin: 0;
    font-size: .9rem;
    line-height: 1.5;
}
.chat-msg-sent .chat-bubble {
    background: #6366f1;
    color: #fff;
    border-bottom-right-radius: 4px;
}
.chat-msg-received .chat-bubble {
    background: #fff;
    color: #1e1e2e;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.chat-time {
    font-size: .7rem;
    margin-top: 4px;
    display: block;
}
.chat-msg-sent .chat-time {
    color: rgba(255,255,255,.65);
    text-align: right;
}
.chat-msg-received .chat-time {
    color: #9ca3af;
}

/* Chat Empty */
.chat-empty {
    text-align: center;
    padding: 60px 20px;
    margin: auto;
}
.chat-empty-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(99,102,241,.08);
    color: #6366f1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 16px;
}
.chat-empty h5 { font-weight: 700; color: #1e1e2e; }
.chat-empty p { color: #9ca3af; font-size: .9rem; }

/* Chat Input */
.chat-input {
    padding: 16px 24px;
    border-top: 1px solid rgba(0,0,0,.06);
    background: #fff;
}
.chat-input-form { margin: 0; }
.chat-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f3f4f6;
    border-radius: 50px;
    padding: 6px 6px 6px 20px;
}
.chat-input-wrap input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: .9rem;
    color: #1e1e2e;
    padding: 8px 0;
}
.chat-input-wrap input::placeholder { color: #9ca3af; }
.chat-send-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: #6366f1;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .2s ease;
    flex-shrink: 0;
    font-size: .95rem;
}
.chat-send-btn:hover {
    background: #4f46e5;
    transform: scale(1.08);
}

/* Chat Sidebar Cards */
.chat-sidebar-card {
    background: #fff;
    border-radius: 16px;
    padding: 20px 24px;
    border: 1px solid rgba(0,0,0,.06);
    box-shadow: 0 2px 10px rgba(0,0,0,.04);
    margin-bottom: 20px;
}
.chat-sidebar-title {
    font-size: .9rem;
    font-weight: 700;
    color: #1e1e2e;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}
.chat-sidebar-title i { color: #6366f1; font-size: .85rem; }
.chat-listing-link {
    text-decoration: none;
    color: inherit;
    display: block;
}
.chat-listing-link:hover { color: inherit; }
.chat-listing-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 14px;
}
.chat-listing-img-placeholder {
    width: 100%;
    height: 120px;
    border-radius: 12px;
    background: linear-gradient(135deg, #e8eaf6, #f0f4fa);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    margin-bottom: 14px;
}
.chat-listing-info h6 {
    font-size: .9rem;
    font-weight: 700;
    color: #1e1e2e;
    margin-bottom: 6px;
}
.chat-listing-price {
    font-size: 1rem;
    font-weight: 800;
    color: #6366f1;
    display: block;
    margin-bottom: 8px;
}
.chat-listing-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.chat-contact-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.chat-contact-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .85rem;
    color: #4b5563;
}
.chat-contact-row i {
    width: 18px;
    text-align: center;
    color: #6366f1;
    font-size: .8rem;
}
.chat-contact-row a {
    color: #6366f1;
    text-decoration: none;
}
.chat-contact-row a:hover { text-decoration: underline; }

/* Chat Sidebar Sticky */
.chat-page .col-lg-4 {
    position: sticky;
    top: 90px;
    align-self: flex-start;
}

/* Chat Responsive */
@media (max-width: 992px) {
    .chat-card { height: calc(100vh - 160px); max-height: none; border-radius: 12px; position: static; }
    .chat-page .col-lg-4 { position: static; }
}
@media (max-width: 768px) {
    .chat-card { height: calc(100vh - 140px); min-height: 400px; }
    .chat-header { padding: 12px 16px; }
    .chat-messages { padding: 16px; }
    .chat-input { padding: 12px 16px; }
    .chat-msg { max-width: 88%; }
    .inbox-item { padding: 14px 16px; gap: 12px; }
    .inbox-avatar, .inbox-avatar-placeholder { width: 44px; height: 44px; }
}
