/* =========================================================
   Listigoo - Modern Ad Details Page Styles
   Professional, responsive, RTL/LTR friendly
   ========================================================= */

:root {
    --ad-primary: #0d6efd;
    --ad-primary-dark: #0b5ed7;
    --ad-success: #25d366;
    --ad-danger: #dc3545;
    --ad-warning: #ffc107;
    --ad-info: #0dcaf0;
    --ad-text: #1f2937;
    --ad-muted: #6b7280;
    --ad-border: #e5e7eb;
    --ad-bg: #f3f4f6;
    --ad-card-bg: #ffffff;
    --ad-radius: 1rem;
    --ad-radius-sm: 0.625rem;
    --ad-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    --ad-shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.1);
    --ad-transition: all 0.25s ease;
    --ad-gradient-primary: linear-gradient(135deg, #0d6efd 0%, #6ea8fe 100%);
    --ad-gradient-success: linear-gradient(135deg, #25d366 0%, #1da851 100%);
    --ad-gradient-danger: linear-gradient(135deg, #dc3545 0%, #a71d2a 100%);
}

.ad-details-page {
    background: var(--ad-bg);
    padding-top: 1rem;
    padding-bottom: 3rem;
    min-height: 100vh;
}

/* =============================================
   Breadcrumb - Enhanced
   ============================================= */
.ad-breadcrumb-wrap {
    padding: 0.85rem 0;
    background: #fff;
    border-bottom: 1px solid var(--ad-border);
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.ad-breadcrumb-wrap .breadcrumb {
    margin-bottom: 0;
    font-size: 0.875rem;
    background: transparent;
    display: flex;
    flex-wrap: wrap;
    padding: 0;
}

.ad-breadcrumb-wrap .breadcrumb-item {
    display: flex;
    align-items: center;
    color: var(--ad-muted);
}

.ad-breadcrumb-wrap .breadcrumb-item + .breadcrumb-item::before {
    content: "\f054";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.65rem;
    color: #adb5bd;
    padding: 0 0.5rem;
}

[dir="rtl"] .ad-breadcrumb-wrap .breadcrumb-item + .breadcrumb-item::before {
    content: "\f053";
}

.ad-breadcrumb-wrap .breadcrumb-item a {
    color: var(--ad-muted);
    text-decoration: none;
    transition: var(--ad-transition);
    font-weight: 500;
}

.ad-breadcrumb-wrap .breadcrumb-item a:hover {
    color: var(--ad-primary);
    text-decoration: underline;
}

.ad-breadcrumb-wrap .breadcrumb-item.active {
    color: var(--ad-text);
    font-weight: 600;
    max-width: 260px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =============================================
   Cards - Enhanced Professional
   ============================================= */
.ad-card {
    background: var(--ad-card-bg);
    border-radius: var(--ad-radius);
    border: 1px solid var(--ad-border);
    box-shadow: var(--ad-shadow);
    margin-bottom: 1.25rem;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.ad-card:hover {
    box-shadow: var(--ad-shadow-lg);
    border-color: rgba(13, 110, 253, 0.15);
}

.ad-card-body {
    padding: 1.5rem;
}

.ad-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--ad-text);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ad-card-title i {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(13, 110, 253, 0.08);
    border-radius: 10px;
}

/* =============================================
   Ad Header / Title Card - Enhanced
   ============================================= */
.ad-title-section {
    padding: 1.5rem 1.75rem;
    background: linear-gradient(135deg, #fafbff 0%, #ffffff 100%);
    border-bottom: 3px solid rgba(13, 110, 253, 0.1);
}

.ad-title-section h1 {
    font-size: clamp(1.35rem, 3vw, 1.85rem);
    font-weight: 800;
    line-height: 1.3;
    color: var(--ad-text);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
    word-break: break-word;
}

.ad-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.ad-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.ad-badge.featured {
    background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
    color: #6c4a00;
}

.ad-badge.urgent {
    background: linear-gradient(135deg, #ff7675, #d63031);
    color: #ffffff;
}

.ad-badge.views {
    background: linear-gradient(135deg, #a3d8ff, #74b9ff);
    color: #0b3a5f;
}

.ad-badge.condition {
    background: linear-gradient(135deg, #d1fae5, #a7e8c8);
    color: #065f46;
    text-transform: none;
}

.ad-badge.sold {
    background: linear-gradient(135deg, #dcfce7, #86efac);
    color: #14532d;
}

.ad-badge.expired {
    background: linear-gradient(135deg, #fee2e2, #fca5a5);
    color: #7f1d1d;
}

.ad-meta-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem;
    color: var(--ad-muted);
    font-size: 0.9rem;
    padding-top: 1rem;
    border-top: 1px solid var(--ad-border);
    margin-top: 1rem;
}

.ad-meta-bar span {
    display: inline-flex;
    align-items: center;
}

.ad-meta-bar i {
    color: var(--ad-primary);
    margin-right: 0.35rem;
}

[dir="rtl"] .ad-meta-bar i {
    margin-right: 0;
    margin-left: 0.35rem;
}

.ad-price-section {
    text-align: right;
}

[dir="rtl"] .ad-price-section {
    text-align: left;
}

.ad-price {
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 800;
    color: var(--ad-primary);
    line-height: 1.1;
    text-shadow: 0 2px 0 rgba(13, 110, 253, 0.08);
}

.ad-price-negotiable {
    font-size: 0.875rem;
    color: var(--ad-success);
    font-weight: 600;
    display: block;
}

.ad-price-na {
    font-size: 1.25rem;
    color: var(--ad-muted);
    font-weight: 700;
}

.btn-fav {
    position: relative;
    overflow: hidden;
    min-width: 48px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-fav:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2);
}

.btn-fav .fa-heart {
    transition: transform 0.3s ease;
}

.btn-fav:hover .fa-heart {
    transform: scale(1.2);
}

/* =============================================
   Gallery - Enhanced
   ============================================= */
.ad-gallery-card {
    background: var(--ad-card-bg);
    border-radius: var(--ad-radius);
    border: 1px solid var(--ad-border);
    box-shadow: var(--ad-shadow);
    overflow: hidden;
    margin-bottom: 1.25rem;
    transition: box-shadow 0.3s ease;
}

.ad-gallery-card:hover {
    box-shadow: var(--ad-shadow-lg);
}

.ad-gallery-main {
    position: relative;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: var(--ad-radius) var(--ad-radius) 0 0;
    overflow: hidden;
    height: clamp(300px, 62vh, 600px);
}

.ad-gallery-main .carousel,
.ad-gallery-main .carousel-inner,
.ad-gallery-main .carousel-item {
    height: 100%;
}

.ad-gallery-image-wrap {
    position: relative;
    cursor: zoom-in;
    overflow: hidden;
    border-radius: 0;
    height: 100%;
    width: 100%;
}

.ad-admin-image-toolbar {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    gap: 6px;
    z-index: 20;
    cursor: default;
}

[dir="rtl"] .ad-admin-image-toolbar {
    left: auto;
    right: 12px;
}

.ad-admin-image-toolbar button {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--ad-transition, background 0.2s ease);
    backdrop-filter: blur(4px);
}

.ad-admin-image-toolbar button:hover {
    background: rgba(0, 0, 0, 0.8);
}

.ad-admin-image-toolbar button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ad-gallery-main-img {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    min-width: 100%;
    min-height: 100%;
    max-width: none;
    object-fit: cover !important;
    object-position: center;
    display: block;
    transform: scale(1);
    transition: transform 0.4s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: none;
}

.ad-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.25s ease;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.ad-gallery-nav:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.ad-gallery-nav.prev {
    left: 1rem;
}

.ad-gallery-nav.next {
    right: 1rem;
}

.ad-gallery-counter {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 0.4rem 0.9rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 10;
    backdrop-filter: blur(4px);
}

[dir="rtl"] .ad-gallery-counter {
    right: auto;
    left: 1rem;
}

.ad-gallery-thumbs {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    overflow-x: auto;
    scrollbar-width: thin;
    background: #f8fafc;
}

.ad-gallery-thumbs::-webkit-scrollbar {
    height: 6px;
}

.ad-gallery-thumbs::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.ad-gallery-thumb {
    flex: 0 0 90px;
    height: 70px;
    border-radius: var(--ad-radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.65;
    transition: var(--ad-transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.ad-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ad-gallery-thumb.active,
.ad-gallery-thumb:hover {
    opacity: 1;
    border-color: var(--ad-primary);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.25);
}

/* =============================================
   Lightbox Modal - Enhanced
   ============================================= */
.ad-image-lightbox {
    background: rgba(12, 18, 28, 0.88);
    backdrop-filter: blur(8px);
}

.ad-image-lightbox .modal-dialog {
    margin: 4vh auto;
    width: min(96vw, 1600px);
    max-width: min(96vw, 1600px);
    height: 92vh;
}

.ad-lightbox-dialog {
    height: 100%;
    min-height: 0;
}

.ad-image-lightbox .modal-content {
    background: rgba(10, 14, 22, 0.94);
    border: 0;
    border-radius: 24px;
    height: 100%;
    min-height: 0;
    max-height: none;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.ad-image-lightbox .modal-body {
    position: relative;
    padding: clamp(1rem, 2vw, 1.5rem);
    width: 100%;
    min-height: 0;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: #000;
}

.ad-lightbox-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #000 0%, #111 100%);
}

.ad-image-lightbox img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center;
    display: block;
    border-radius: 14px;
    background: #000;
    transform: scale(1);
    transition: transform 0.25s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: none;
}

.ad-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: rgba(20, 20, 20, 0.6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    transition: var(--ad-transition);
    backdrop-filter: blur(4px);
}

.ad-lightbox-nav:hover {
    background: rgba(20, 20, 20, 0.85);
    transform: translateY(-50%) scale(1.08);
}

.ad-lightbox-prev {
    left: 1rem;
}

.ad-lightbox-next {
    right: 1rem;
}

.ad-lightbox-close {
    position: absolute !important;
    top: 1rem !important;
    right: 1rem !important;
    z-index: 4;
}

[dir="rtl"] .ad-lightbox-close {
    right: auto !important;
    left: 1rem !important;
}

/* Portrait images are zoomed slightly in the gallery only to avoid side black bars. */
.ad-gallery-main-img.ad-portrait-zoom {
    transform: scale(1.26);
}

/* =============================================
   Description - Enhanced
   ============================================= */
.ad-description {
    font-size: 1rem;
    line-height: 1.85;
    color: #374151;
    white-space: pre-line;
    margin-bottom: 0.5rem;
}

.ad-translate-btn {
    margin-top: 1.25rem;
    transition: all 0.25s ease;
}

.ad-translate-btn:hover {
    transform: translateY(-2px);
}

/* =============================================
   Specs / Custom Fields - Enhanced
   ============================================= */
.ad-specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.ad-spec-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1rem;
    background: #f8fafc;
    border-radius: var(--ad-radius-sm);
    border: 1px solid var(--ad-border);
    transition: all 0.25s ease;
    gap: 0.75rem;
}

.ad-spec-item:hover {
    background: #f0f6ff;
    border-color: rgba(13, 110, 253, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.08);
}

.ad-spec-label {
    color: var(--ad-muted);
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.ad-spec-label i {
    color: var(--ad-primary);
    font-size: 0.85rem;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(13, 110, 253, 0.1);
    border-radius: 50%;
    flex-shrink: 0;
}

.ad-spec-value {
    color: var(--ad-text);
    font-weight: 700;
    text-align: right;
    word-break: break-word;
}

[dir="rtl"] .ad-spec-value {
    text-align: left;
}

/* =============================================
   Map - Enhanced
   ============================================= */
.ad-map-card .map-options {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.ad-map-card .map-options .btn {
    flex: 1;
    min-width: 140px;
    font-weight: 600;
    transition: all 0.25s ease;
}

.ad-map-card .map-options .btn:hover {
    transform: translateY(-2px);
}

.ad-map-container {
    position: relative;
    border-radius: var(--ad-radius-sm);
    overflow: hidden;
    height: 380px;
    border: 1px solid var(--ad-border);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.ad-map-iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.ad-map-click-layer {
    position: absolute;
    inset: 0;
    cursor: pointer;
    background: transparent;
}

/* =============================================
   SELLER SIDEBAR - Enhanced (scrolls with page)
   The card flows naturally in the sidebar column and
   moves with the page when scrolling.
   ============================================= */
.ad-sidebar-col {
    position: relative;
}

.ad-seller-card-wrap {
    position: relative;
}

@media (min-width: 992px) {
    .ad-seller-card {
        position: static;
        animation: adSlideIn 0.4s ease both;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
        border-radius: var(--ad-radius);
    }
}

@keyframes adSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ad-seller-card .ad-card {
    border: 1px solid rgba(13, 110, 253, 0.12);
    background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
}

.ad-seller-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--ad-gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2rem;
    margin: 0 auto 1rem;
    box-shadow: 0 8px 24px rgba(13, 110, 253, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.8);
    position: relative;
}

.ad-seller-avatar::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid rgba(13, 110, 253, 0.2);
    animation: adPulse 2s ease-in-out infinite;
}

@keyframes adPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.08); opacity: 0.6; }
}

.ad-seller-name {
    font-size: 1.25rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.25rem;
    color: var(--ad-text);
}

.ad-seller-meta {
    text-align: center;
    color: var(--ad-muted);
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

.ad-seller-actions .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 700;
    padding: 0.85rem 1rem;
    border-radius: var(--ad-radius-sm);
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ad-seller-actions .btn:hover {
    transform: translateY(-2px);
}

.ad-seller-actions .btn-primary {
    background: var(--ad-gradient-primary);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.25);
}

.ad-seller-actions .btn-primary:hover {
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.35);
    transform: translateY(-2px) scale(1.02);
}

.ad-seller-actions .btn-success {
    background: var(--ad-gradient-success);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
}

.ad-seller-actions .btn-success:hover {
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.35);
    transform: translateY(-2px) scale(1.02);
}

.ad-seller-actions .btn-danger {
    background: var(--ad-gradient-danger);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.25);
}

.ad-seller-actions .btn-danger:hover {
    box-shadow: 0 8px 20px rgba(220, 53, 69, 0.35);
    transform: translateY(-2px) scale(1.02);
}

.ad-seller-actions .btn-outline-secondary {
    border-color: var(--ad-border);
    color: var(--ad-text);
    background: #fff;
}

.ad-seller-actions .btn-outline-secondary:hover {
    background: #f8fafc;
    border-color: var(--ad-primary);
    color: var(--ad-primary);
}

.ad-share-menu .dropdown-toggle {
    width: 100%;
}

.ad-share-menu .dropdown-menu {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--ad-border);
    border-radius: 0.75rem;
    padding: 0.5rem;
}

.ad-share-menu .dropdown-item {
    border-radius: 0.5rem;
    padding: 0.65rem 0.85rem;
    font-weight: 500;
}

.ad-share-menu .dropdown-item:hover {
    background: #f0f6ff;
}

/* =============================================
   Safety Tips - Enhanced
   ============================================= */
.ad-safety-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ad-safety-list li {
    position: relative;
    padding-left: 1.6rem;
    margin-bottom: 0.85rem;
    color: var(--ad-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    transition: color 0.2s ease;
}

.ad-safety-list li:hover {
    color: var(--ad-text);
}

[dir="rtl"] .ad-safety-list li {
    padding-left: 0;
    padding-right: 1.6rem;
}

.ad-safety-list li::before {
    content: '\f058';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 0;
    color: var(--ad-success);
    font-size: 0.95rem;
}

[dir="rtl"] .ad-safety-list li::before {
    left: auto;
    right: 0;
}

/* =============================================
   Related Ads - Enhanced
   ============================================= */
.ad-related-section {
    margin-top: 2.5rem;
}

.ad-related-section .section-title {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--ad-text);
    position: relative;
    padding-bottom: 0.75rem;
}

.ad-related-section .section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 48px;
    height: 3px;
    background: var(--ad-gradient-primary);
    border-radius: 3px;
}

[dir="rtl"] .ad-related-section .section-title::after {
    left: auto;
    right: 0;
}

.ad-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}

.ad-related-card {
    background: var(--ad-card-bg);
    border-radius: var(--ad-radius-sm);
    border: 1px solid var(--ad-border);
    overflow: hidden;
    box-shadow: var(--ad-shadow);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    color: inherit;
    display: block;
}

.ad-related-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--ad-shadow-lg);
    border-color: rgba(13, 110, 253, 0.2);
}

.ad-related-card img {
    width: 100%;
    height: 165px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.ad-related-card:hover img {
    transform: scale(1.06);
}

.ad-related-body {
    padding: 1rem;
}

.ad-related-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--ad-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
    transition: color 0.2s ease;
}

.ad-related-card:hover .ad-related-title {
    color: var(--ad-primary);
}

.ad-related-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--ad-primary);
}

/* =============================================
   Sticky mobile CTA - Enhanced
   ============================================= */
.ad-mobile-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--ad-border);
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.1);
    padding: 0.85rem 1rem;
    display: none;
    gap: 0.75rem;
    z-index: 1030;
    border-radius: 1rem 1rem 0 0;
}

.ad-mobile-cta .btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-weight: 700;
    padding: 0.8rem;
    border-radius: 0.9rem;
    transition: all 0.2s ease;
}

.ad-mobile-cta .btn:active {
    transform: scale(0.97);
}

/* =============================================
   Contact Modal - Enhanced
   ============================================= */
#contactModal .modal-content {
    border-radius: 1.25rem;
    border: none;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

#contactModal .modal-header {
    background: var(--ad-gradient-primary);
    color: #fff;
    border-bottom: none;
    padding: 1.25rem 1.5rem;
}

#contactModal .modal-title {
    font-weight: 700;
}

#contactModal .modal-header .btn-close {
    filter: invert(1);
    opacity: 0.8;
    transition: transform 0.3s ease;
}

#contactModal .modal-header .btn-close:hover {
    transform: rotate(90deg);
    opacity: 1;
}

#contactModal .modal-body {
    padding: 1.5rem;
}

#contactModal .form-control {
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    border-color: var(--ad-border);
    transition: all 0.25s ease;
}

#contactModal .form-control:focus {
    border-color: var(--ad-primary);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.12);
}

#contactModal .form-label {
    font-weight: 600;
    color: var(--ad-text);
    margin-bottom: 0.4rem;
}

#contactModal .modal-footer {
    border-top: 1px solid var(--ad-border);
    padding: 1rem 1.5rem;
}

#contactModal .modal-footer .btn {
    border-radius: 0.75rem;
    padding: 0.65rem 1.5rem;
    font-weight: 600;
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 991.98px) {
    .ad-seller-card {
        position: static;
        margin-bottom: 1.25rem;
        animation: none;
    }

    .ad-price-section {
        text-align: left;
        margin-top: 1rem;
    }

    [dir="rtl"] .ad-price-section {
        text-align: right;
    }
}

@media (max-width: 767.98px) {
    .ad-details-page {
        padding-bottom: 5.5rem;
        padding-top: 0.75rem;
    }

    .ad-title-section {
        padding: 1.25rem;
    }

    .ad-title-section h1 {
        font-size: 1.35rem;
    }

    .ad-price {
        font-size: 1.65rem;
    }

    .ad-gallery-main {
        height: 300px;
    }

    .ad-gallery-nav {
        width: 40px;
        height: 40px;
    }

    .ad-gallery-thumb {
        flex: 0 0 72px;
        height: 56px;
    }

    .ad-image-lightbox .modal-body {
        padding: 0.75rem;
    }

    .ad-image-lightbox .modal-dialog {
        margin: 2vh auto;
        width: calc(100vw - 1rem);
        max-width: calc(100vw - 1rem);
        height: 96vh;
    }

    .ad-image-lightbox .modal-content {
        border-radius: 18px;
    }

    .ad-specs-grid {
        grid-template-columns: 1fr;
    }

    .ad-meta-bar {
        gap: 0.75rem;
        font-size: 0.8rem;
    }

    .ad-map-container {
        height: 260px;
    }

    .ad-mobile-cta {
        display: flex;
    }

    .ad-related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .ad-related-card img {
        height: 120px;
    }

    .ad-related-title {
        font-size: 0.85rem;
    }

    .ad-related-price {
        font-size: 0.95rem;
    }

    .ad-lightbox-nav {
        width: 42px;
        height: 42px;
    }

    .ad-lightbox-prev {
        left: 0.5rem;
    }

    .ad-lightbox-next {
        right: 0.5rem;
    }

    .ad-card-body {
        padding: 1.25rem;
    }

    .ad-breadcrumb-wrap .breadcrumb-item.active {
        max-width: 160px;
    }
}

@media (max-width: 359.98px) {
    .ad-related-grid {
        grid-template-columns: 1fr;
    }
}