/* Trust Guardian Styles */
.trust-guardian-card {
    transition: all 0.3s ease;
}

.trust-badge {
    animation: fadeInScale 0.3s ease-out forwards;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

:root {
    --brand-orange: #FF6600;
    --brand-orange-hover: #E55A00;
    --brand-green: #059669;
    --brand-green-hover: #047857;
    --surface-white: #FFFFFF;
    --bg-gray: #F9FAFB;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-gray: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-lg: 16px;
    --radius-md: 12px;
}

/* Prevent horizontal scroll on page */
.main-content,
.listing-display-layout,
.image-gallery,
.main-image-container {
    max-width: 100%;
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
}

/* Base Layout */
body {
    background-color: var(--bg-gray);
    color: var(--text-primary);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.main-content {
    max-width: 980px !important;
    margin: 0 auto;
    padding: 0 15px 24px 15px !important;
}

.listing-display-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 28px;
    align-items: start;
    max-width: 980px;
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .listing-display-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* Gallery Refresh */
.listing-primary-column {
    overflow: hidden;
    min-width: 0;
    max-width: 100%;
}

.image-gallery {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 24px;
    position: relative;
    max-width: 100%;
    width: 100%;
}

.main-image-container {
    background: #f8fafc;
    height: 480px !important;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

@media (max-width: 768px) {
    .main-image-container {
        height: 400px !important;
    }
}

.main-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
}

/* Image overlay badges (sold, reserved) */
.image-overlay-badges {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    pointer-events: none;
}

.image-overlay-badges > * {
    pointer-events: auto;
}

/* Favorite button on image - Desktop (Wallapop style) */
.image-fav-btn {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.image-fav-btn:hover {
    background: #f8fafc;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.image-fav-btn i {
    font-size: 18px;
    color: #64748b;
    transition: all 0.2s ease;
}

.image-fav-btn.active i {
    color: #ef4444;
}

.image-fav-btn .count {
    color: #1e293b;
    font-size: 14px;
    font-weight: 600;
}

/* Image counter pill - Desktop (compact badge) */
.image-counter {
    position: absolute;
    bottom: 16px;
    left: 16px;
    background: rgba(30, 41, 59, 0.75);
    backdrop-filter: blur(4px);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0;
    z-index: 10;
}

.image-counter i {
    display: none;
}

.thumbnail-grid {
    padding: 12px;
    gap: 8px !important;
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
}

.thumbnail-grid::-webkit-scrollbar {
    display: none;
}

.thumbnail-item {
    width: 80px !important;
    height: 80px !important;
    border-radius: 8px !important;
    border: 2px solid transparent !important;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.2s;
    overflow: hidden;
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-item.active {
    border-color: var(--brand-orange) !important;
}

/* Sidebar Styling */
.listing-secondary-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 100px;
}

@media (max-width: 1024px) {
    .listing-secondary-column {
        position: static;
    }
}

.sidebar-card {
    background: var(--surface-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    border: none !important;
}

.sidebar-price {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 16px;
}

.btn-chat,
.btn-favorite {
    width: 100%;
    border-radius: 9999px !important;
    padding: 14px 20px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-transform: none !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none !important;
}

.btn-chat {
    background: var(--brand-orange) !important;
    color: white !important;
}

.btn-chat:hover {
    background: var(--brand-orange-hover) !important;
}

.btn-favorite {
    background: #f1f5f9 !important;
    color: #475569 !important;
    margin-top: 12px;
}

.btn-chat:hover,
.btn-favorite:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Main Column Typography */
.listing-primary-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.listing-title-area h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 12px 0;
    line-height: 1.2;
}

/* Section Styling */
.product-description,
.basic-data-section,
.duplicate-listings-section,
.related-ads,
.valuation-section {
    background: var(--surface-white);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    border: none !important;
    margin-bottom: 24px;
}

.description-title,
.basic-data-title,
.related-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px !important;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.description-title::before,
.basic-data-title::before {
    content: '';
    display: block;
    width: 4px;
    height: 24px;
    background: var(--brand-orange);
    border-radius: 2px;
}

.description-content {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.description-content.truncated {
    max-height: 200px;
    overflow: hidden;
    position: relative;
}

.description-content.truncated::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(transparent, white);
    pointer-events: none;
}

.description-read-more {
    display: inline-block;
    margin-top: 12px;
    color: #1877f2;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
}

/* Grids and Items */
.basic-data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.basic-data-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.basic-data-item:last-child {
    border-bottom: none;
}

.basic-data-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.basic-data-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Responsive Fixes */
@media (max-width: 640px) {
    .basic-data-grid {
        grid-template-columns: 1fr;
    }

    .main-content {
        padding: 16px 12px !important;
    }

    .listing-title-area h1 {
        font-size: 22px;
    }
}

/* Mobile Ad Header */
.mobile-listing-top {
    display: none;
    background: var(--surface-white);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
}

@media (max-width: 1024px) {
    .mobile-listing-top {
        display: block;
    }
}

/* Ad Meta Info Styling */
.listing-metadata {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 14px;
    padding: 0 4px;
}

.listing-metadata .meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.listing-metadata .meta-item i {
    color: var(--brand-orange);
    font-size: 16px;
}

/* Related Ads Slider */
.related-slider-container {
    position: relative;
    padding: 0 40px;
    margin-top: 24px;
    overflow: hidden;
}

.related-slider {
    display: flex;
    gap: 24px;
    transition: transform 0.3s ease;
    will-change: transform;
}

.related-slide {
    flex: 0 0 calc((100% - (3 * 24px)) / 4);
    min-width: 0;
}

.related-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    transition: all 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    border: 1px solid #f1f5f9;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: var(--brand-orange);
}

.related-image {
    height: 180px;
    background: #f8fafc;
    overflow: hidden;
    position: relative;
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.related-card:hover .related-image img {
    transform: scale(1.05);
}

.related-content {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.related-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em;
}

.related-card-price {
    font-size: 18px;
    font-weight: 800;
    color: var(--brand-orange);
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: #ffffff;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    color: #1e293b;
    transition: all 0.2s;
}

.slider-btn:hover {
    background: var(--brand-orange);
    color: #ffffff;
}

.slider-btn-prev {
    left: 0;
}

.slider-btn-next {
    right: 0;
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e2e8f0;
    cursor: pointer;
    transition: all 0.2s;
}

.slider-dot.active {
    background: var(--brand-orange);
    width: 24px;
    border-radius: 4px;
}

@media (max-width: 1024px) {
    .related-slide {
        flex: 0 0 calc((100% - (2 * 24px)) / 3);
    }
    .related-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .related-slider-container {
        padding: 0;
    }

    .slider-btn {
        display: none !important;
    }

    .related-slide {
        flex: 0 0 calc((100% - 16px) / 2);
    }

    .related-slider {
        gap: 16px;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
}

@media (max-width: 480px) {
    .related-slide {
        flex: 0 0 100%;
    }
    .related-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ===========================================
   PREMIUM MOBILE REDESIGN - Ad Detail Page
   =========================================== */

/* Default: Hide mobile-only elements on desktop */
.mobile-seller-card {
    display: none;
}

/* Mobile: Reset paddings for immersive experience */
@media (max-width: 768px) {

    /* Make the main site header scroll away on detail pages */
    .header {
        position: relative !important;
        top: auto !important;
    }

    /* Hide bottom nav bar completely on ad detail pages */
    .mobile-footer,
    .mobile-bottom-nav {
        display: none !important;
    }

    .cn-chat {
        transform: translateY(calc(100% + 20px));
        transition: transform 0.3s ease;
    }

    .cn-chat.show-on-scroll {
        transform: translateY(0);
    }

    /* Show mobile seller card */
    .mobile-seller-card {
        display: flex;
    }

    .main-content {
        padding: 0 !important;
        background: #f8fafc;
    }

    .listing-display-layout {
        gap: 0;
    }

    /* Hide desktop sidebar on mobile - will use floating bar instead */
    .listing-secondary-column {
        display: none !important;
    }

    /* ==================
       GALLERY REDESIGN
       ================== */
    .image-gallery {
        border-radius: 0;
        margin-bottom: 0;
        box-shadow: none;
        position: relative;
    }

    .main-image-container {
        height: auto !important;
        aspect-ratio: 4 / 3;
        background: linear-gradient(135deg, #1e293b, #0f172a);
        min-height: 260px;
        max-height: 420px;
    }

    .main-image {
        width: 100% !important;
        height: 100% !important;
        max-width: 100%;
        object-fit: cover !important;
        object-position: center;
        display: block;
    }

    /* Overlay badges repositioning */
    .image-overlay-badges {
        position: absolute;
        top: 12px;
        left: 12px;
        z-index: 10;
    }

    .sold-badge {
        background: linear-gradient(135deg, #ef4444, #dc2626);
        color: white;
        padding: 6px 12px;
        border-radius: 6px;
        font-size: 12px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    }

    /* Favorite button on image - Mobile (Wallapop style) */
    /* Hide image overlay fav button on mobile — nav bar already has it */
    .image-fav-btn {
        display: none !important;
    }

    .image-fav-btn i {
        font-size: 18px;
        color: #64748b;
        transition: all 0.2s ease;
    }

    .image-fav-btn.active i,
    .image-fav-btn:hover i {
        color: #ef4444;
    }

    .image-fav-btn .count {
        color: #1e293b;
        font-size: 13px;
        font-weight: 600;
    }

    /* Image counter pill - Mobile (compact badge) */
    .image-counter {
        position: absolute;
        bottom: 12px;
        left: 12px;
        right: auto;
        width: fit-content;
        background: rgba(30, 41, 59, 0.75);
        color: white;
        padding: 5px 10px;
        border-radius: 6px;
        font-size: 12px;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 0;
        backdrop-filter: blur(8px);
        z-index: 10;
    }

    .image-counter i {
        display: none;
    }

    /* Thumbnail strip - horizontal scroll */
    .thumbnail-grid {
        padding: 12px 16px;
        gap: 10px !important;
        background: #fff;
        border-top: none;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .thumbnail-item {
        width: 64px !important;
        height: 64px !important;
        border-radius: 10px !important;
        scroll-snap-align: start;
        border: 2px solid #e2e8f0 !important;
    }

    .thumbnail-item.active {
        border-color: #1877f2 !important;
        box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.2);
    }

    /* ==================
       MOBILE AD HEADER
       ================== */
    .mobile-listing-top {
        display: block !important;
        background: #ffffff;
        padding: 20px 16px;
        border-radius: 0;
        box-shadow: none;
        margin-bottom: 0;
        border-bottom: 1px solid #f1f5f9;
    }

    .mobile-listing-top h1 {
        font-size: 20px;
        font-weight: 700;
        color: #1e293b;
        line-height: 1.35;
        margin: 0 0 12px 0;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .mobile-listing-top .price {
        font-size: 26px;
        font-weight: 800;
        color: #1e293b;
        letter-spacing: -0.5px;
    }

    /* ==================
       AD META INFO - CHIPS STYLE
       ================== */
    .listing-metadata {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 10px;
        padding: 16px;
        background: #ffffff;
        margin: 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        border-bottom: 1px solid #f1f5f9;
    }

    .listing-metadata::-webkit-scrollbar {
        display: none;
    }

    .listing-metadata .meta-item {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        gap: 6px;
        background: #f8fafc;
        padding: 10px 14px;
        border-radius: 10px;
        font-size: 13px;
        font-weight: 500;
        color: #475569;
        border: 1px solid #e2e8f0;
    }

    .listing-metadata .meta-item i {
        font-size: 14px;
        color: #64748b;
    }

    /* ==================
       CONTENT SECTIONS
       ================== */
    .listing-primary-column {
        gap: 0;
        padding: 0;
    }

    .product-description,
    .basic-data-section,
    .valuation-section,
    .property-details,
    .product-map,
    .category-location-tree,
    .duplicate-listings-section,
    .related-ads,
    .related-search-section {
        border-radius: 0 !important;
        margin-bottom: 0 !important;
        padding: 20px 16px !important;
        box-shadow: none !important;
        border: none !important;
        border-bottom: 8px solid #f1f5f9 !important;
    }

    .description-title,
    .basic-data-title,
    .related-title {
        font-size: 17px;
        margin-bottom: 16px !important;
    }

    .description-content {
        font-size: 15px;
        line-height: 1.6;
    }

    /* Truncated description */
    .description-content.truncated {
        max-height: 150px;
        overflow: hidden;
        position: relative;
    }

    .description-content.truncated::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: linear-gradient(transparent, white);
        pointer-events: none;
    }

    .description-read-more {
        display: inline-block;
        margin-top: 12px;
        color: #1877f2;
        font-weight: 600;
        font-size: 14px;
        text-decoration: none;
    }

    /* Basic data grid mobile */
    .basic-data-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 0 !important;
    }

    .basic-data-grid>div {
        display: contents;
    }

    .basic-data-item {
        padding: 14px 0;
        border-bottom: 1px solid #f1f5f9;
    }

    .basic-data-label {
        font-size: 11px;
        letter-spacing: 0.08em;
    }

    .basic-data-value {
        font-size: 15px;
    }

    /* Property features grid */
    .property-features-grid {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    /* Related ads mobile */
    .related-ads {
        overflow: hidden;
    }

    .related-slider {
        gap: 12px !important;
        padding: 0 16px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .related-slide {
        flex: 0 0 calc(50% - 6px) !important;
        scroll-snap-align: start;
    }

    .related-image {
        height: 140px;
    }

    .related-content {
        padding: 12px;
    }

    .related-card-title {
        font-size: 13px;
        height: auto;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .related-card-price {
        font-size: 16px;
    }
}

/* ===========================================
   STICKY CONTACT BAR - MOBILE ONLY
   =========================================== */
.mobile-contact-bar {
    display: none;
}

@media (max-width: 768px) {
    .mobile-contact-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 9998;
        background: #ffffff;
        box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.1);
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)) 16px;
        align-items: center;
        gap: 12px;
        border-top: 1px solid #f1f5f9;
    }

    .mobile-contact-bar .contact-bar-cta {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 14px 20px;
        border-radius: 12px;
        font-weight: 700;
        font-size: 16px;
        border: none;
        cursor: pointer;
        transition: all 0.2s ease;
        text-decoration: none;
        color: white;
        background: linear-gradient(135deg, #FF6600, #E55A00);
        box-shadow: 0 4px 12px rgba(255, 102, 0, 0.35);
    }

    .mobile-contact-bar .contact-bar-cta:active {
        transform: scale(0.97);
        box-shadow: 0 2px 8px rgba(255, 102, 0, 0.4);
    }

    .mobile-contact-bar .contact-bar-cta i {
        font-size: 18px;
    }

    .mobile-contact-bar .contact-bar-cta.cta-external {
        background: linear-gradient(135deg, #10b981, #059669);
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
    }

    .mobile-contact-bar .contact-bar-cta.cta-external:active {
        box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
    }

    /* Add bottom padding to main content to avoid contact bar overlap */
    .main-content {
        padding-bottom: 80px !important;
    }
}

/* ===========================================
   TOUCH OPTIMIZATIONS
   =========================================== */
@media (max-width: 768px) {

    /* Ensure all interactive elements meet 44px minimum touch target */
    button,
    a,
    .thumbnail-item,
    .meta-item {
        min-height: 44px;
    }

    /* Smooth scroll behavior */
    .thumbnail-grid,
    .listing-metadata,
    .related-slider {
        scroll-behavior: smooth;
    }

    /* Active states for touch feedback */
    .thumbnail-item:active {
        transform: scale(0.95);
    }

    .related-card:active {
        transform: scale(0.98);
    }
}

/* ===========================================
   RICH CARD PLACEHOLDER - MOBILE
   =========================================== */
@media (max-width: 768px) {
    .rich-card-fallback {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100%;
        background: linear-gradient(135deg, #f8fafc, #e2e8f0);
        color: #94a3b8;
        gap: 12px;
    }

    .rich-card-fallback i {
        font-size: 48px;
    }

    .rich-card-fallback p {
        font-size: 14px;
        margin: 0;
    }
}

/* ===========================================
   SELLER INLINE CARD - MOBILE
   =========================================== */
@media (max-width: 768px) {
    .mobile-seller-card {
        display: flex;
        align-items: center;
        gap: 14px;
        background: #ffffff;
        padding: 16px;
        border-bottom: 1px solid #f1f5f9;
    }

    .mobile-seller-card .seller-avatar {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        background: #f1f5f9;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        font-weight: 600;
        color: #64748b;
        overflow: hidden;
        flex-shrink: 0;
    }

    .mobile-seller-card .seller-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .mobile-seller-card .seller-info {
        flex: 1;
        min-width: 0;
    }

    .mobile-seller-card .seller-name {
        font-size: 15px;
        font-weight: 600;
        color: #1e293b;
        margin: 0 0 4px 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-seller-card .seller-stats {
        font-size: 13px;
        color: #64748b;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .mobile-seller-card .seller-stats i {
        color: #fbbf24;
        font-size: 12px;
    }

    .mobile-seller-card .view-profile {
        color: #1877f2;
        font-size: 13px;
        font-weight: 600;
        text-decoration: none;
        flex-shrink: 0;
    }
}

/* ===========================================
   PREMIUM IMAGE LIGHTBOX - Modal
   =========================================== */
.image-lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.98);
    z-index: 10000;
    flex-direction: column;
    backdrop-filter: blur(10px);
}

.image-lightbox-modal.active {
    display: flex;
}

.lightbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    color: white;
    z-index: 10;
}

.lightbox-counter {
    font-size: 16px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 16px;
    border-radius: 20px;
}

.lightbox-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lightbox-content {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
}

.lightbox-slides {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.lightbox-slide {
    min-width: 100%;
    flex: 0 0 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px;
    box-sizing: border-box;
}

.lightbox-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    user-select: none;
}

.lightbox-caption {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    backdrop-filter: blur(4px);
    z-index: 20;
    max-width: 80%;
    text-align: center;
}

.contact-slide {
    flex-direction: column;
    color: white;
    text-align: center;
    gap: 16px;
}

.contact-slide h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.contact-slide p {
    font-size: 16px;
    color: #cbd5e1;
    max-width: 500px;
    margin: 0;
    line-height: 1.6;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
    z-index: 10;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    scale: 1.1;
}

.lightbox-nav.prev {
    left: 40px;
}

.lightbox-nav.next {
    right: 40px;
}

.lightbox-thumbnails {
    height: 120px;
    padding: 20px;
    display: flex;
    justify-content: center;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none;
}

.lightbox-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.lightbox-thumbnail.active {
    opacity: 1;
    border-color: #1877f2;
}

.lightbox-thumbnail:hover {
    opacity: 0.8;
}

.lightbox-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 768px) {
    .lightbox-nav {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .lightbox-nav.prev {
        left: 10px;
    }

    .lightbox-nav.next {
        right: 10px;
    }
}

/* Ad Navigation Bar (Coches.net style) */
.ad-navigation-bar {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 10px 0;
    margin-bottom: 24px;
    position: sticky;
    top: 70px;
    /* Adjusted to sit below the main header */
    z-index: 99;
    /* Lower than header but higher than content */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-left {
    flex: 1;
}

.nav-center {
    flex: 1;
    text-align: center;
}

.nav-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn i,
.nav-btn i,
.nav-back-link i {
    font-weight: 900 !important;
}

.action-btn i {
    font-size: 16px;
}

.action-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #1e293b;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.action-favorite.is-active,
.action-favorite.active {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #e11d48;
}

.action-favorite.is-active i,
.action-favorite.active i {
    color: #e11d48;
}

.action-discard:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

.nav-divider {
    width: 1px;
    height: 24px;
    background: #e2e8f0;
    margin: 0 16px;
}

.nav-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-back-link:hover {
    color: #0f172a;
}

.nav-counter {
    color: #64748b;
    font-size: 14px;
}

.nav-counter strong {
    color: #1e293b;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.nav-btn:hover:not(.nav-btn-disabled) {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #1e293b;
    transform: translateY(-1px);
}

.nav-btn-disabled {
    opacity: 0.5;
    cursor: default;
    background: #f8fafc;
    color: #94a3b8;
}

@media (max-width: 768px) {
    .ad-navigation-bar {
        padding: 4px 0;
        margin-bottom: 0;
        position: sticky;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 9999;
        background: #ffffff;
        border-bottom: 1px solid #e2e8f0;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    }

    /* Ensure parent containers don't break sticky positioning */
    .main-content,
    .page-flex-container {
        overflow: visible !important;
    }

    .ad-navigation-bar .nav-container {
        display: flex !important;
        padding: 0 12px;
        align-items: center;
        justify-content: space-between;
        gap: 0;
    }

    .nav-left {
        flex: 0 0 auto;
    }

    .nav-center {
        display: none;
        /* Hide counter on mobile to save space */
    }

    .nav-right {
        flex: 1;
        justify-content: center;
        gap: 12px;
    }

    .nav-controls {
        flex: 0 0 auto;
        gap: 8px;
    }

    .nav-divider {
        display: none;
    }

    .nav-btn-text,
    .action-text {
        display: none;
        /* Icon-only on mobile */
    }

    .nav-back-link span {
        display: none;
    }

    .nav-back-link {
        padding: 6px;
    }

    .nav-back-link i {
        font-size: 18px;
        padding: 0;
        color: #1e293b;
    }

    .action-btn {
        padding: 6px 10px;
        font-size: 18px;
        border: none;
        background: transparent;
        color: #475569;
        border-radius: 50%;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .action-btn:hover {
        background: #f1f5f9;
        box-shadow: none;
        transform: none;
    }

    .action-btn i {
        font-size: 18px;
    }

    .action-favorite.is-active,
    .action-favorite.active {
        background: transparent;
        border: none;
    }

    .nav-btn {
        padding: 6px;
        border: none;
        background: transparent;
        color: #475569;
        border-radius: 50%;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
    }

    .nav-btn:hover:not(.nav-btn-disabled) {
        background: #f1f5f9;
        box-shadow: none;
        transform: none;
    }
}
