/* Extracted from listings/listing_detail.html */
.detail-container {
    animation: slideUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0ea5e9;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 20px;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.05s both;
}

.back-link:hover {
    color: #0284c7;
    transform: translateX(-4px);
}

.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 900px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

.info-section {
    background: var(--card-bg);
    padding: 28px;
    border-radius: 20px;
    border: 2px solid var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.info-section:nth-child(1) { animation-delay: 0.05s; }
.info-section:nth-child(2) { animation-delay: 0.1s; }
.info-section:nth-child(3) { animation-delay: 0.15s; }
.info-section:nth-child(4) { animation-delay: 0.2s; }

.info-section:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.info-section h2, .info-section h3 {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 20px 0;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.01em;
}

.info-section h2::before, .info-section h3::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(135deg, var(--accent) 0%, #0284c7 100%);
    border-radius: 3px;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}

.info-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease, filter 0.2s ease, border-radius 0.2s ease, margin 0.2s ease, padding-left 0.2s ease, padding-right 0.2s ease;
}

.info-row:hover {
    background: rgba(14, 165, 233, 0.03);
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
    border-radius: 8px;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: var(--muted);
    font-size: 14px;
}

.price-highlight {
    font-size: 42px;
    font-weight: 900;
    letter-spacing: -0.02em; color: var(--text); }

.status-badge {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active { background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%); color: #fff; }
.status-sold { background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%); color: #fff; }
.status-pending { background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%); color: #000; }
.status-expired { background: linear-gradient(135deg, #f87171 0%, #ef4444 100%); color: #fff; }

.sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-actions .btn {
    width: 100%;
    text-align: center;
    border-radius: 12px;
    padding: 12px 18px;
}

/* Gallery styles */
.gallery {
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    animation: fadeInUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s both;
}

.gallery-main {
    position: relative;
    aspect-ratio: 4 / 3;
    width: 100%;
    background: var(--hover);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.gallery-main img.active {
    display: block;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    padding: 0 8px;
}

.gallery-btn {
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    color: #fff;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 24px;
}

.gallery-btn:hover {
    background: rgba(14, 165, 233, 0.8);
    transform: scale(1.1);
}

.thumbs {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.thumbs img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.85;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.thumbs img:hover {
    opacity: 1;
    transform: scale(1.05);
}

.thumbs img.active {
    border-color: #0ea5e9;
    opacity: 1;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

.favorite-icon-detail {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
}

.favorite-icon-detail form {
    margin: 0;
}

.favorite-icon-detail button,
.favorite-icon-detail a {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.favorite-icon-detail button:hover,
.favorite-icon-detail a:hover {
    background: rgba(14, 165, 233, 0.8);
    transform: scale(1.1);
}

.favorite-icon-detail svg {
    width: 28px;
    height: 28px;
}

/* Description styles */
.listing-description {
    line-height: 1.8;
    color: var(--text);
}

.listing-description h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 24px 0 12px 0;
    color: var(--text);
}

.listing-description h3:first-child {
    margin-top: 0;
}

.listing-description ul,
.listing-description ol {
    margin: 16px 0;
    padding-left: 28px;
    line-height: 1.8;
}

.listing-description li {
    margin: 8px 0;
}

.listing-description p {
    margin: 12px 0;
}

.listing-description p:first-child {
    margin-top: 0;
}

.listing-description strong,
.listing-description b {
    font-weight: 600;
    color: var(--text);
}

.listing-description em,
.listing-description i {
    font-style: italic;
}

.listing-description u {
    text-decoration: underline;
}

.listing-description > *:last-child {
    margin-bottom: 0;
}

/* Tag styles */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--hover);
    color: var(--text);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    border: 2px solid var(--border);
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tag:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.tag-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid rgba(34, 197, 94, 0.25);
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tag-check:hover {
    background: rgba(34, 197, 94, 0.2);
    transform: translateY(-1px);
}

.tag-check svg {
    width: 18px;
    height: 18px;
}

.report-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--card-bg);
    color: var(--muted);
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 14px;
    border: 2px solid var(--border);
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.report-link:hover {
    border-color: #ef4444;
    color: #ef4444;
    transform: translateY(-1px);
}

.report-link svg {
    width: 16px;
    height: 16px;
}

/* Dark mode styles */
.dark-mode .info-section {
    background: #1e293b;
    border-color: #334155;
}

.dark-mode .info-section h2,
.dark-mode .info-section h3 {
    color: #e2e8f0;
}

.dark-mode .info-row:hover {
    background: rgba(14, 165, 233, 0.08);
}

.dark-mode .gallery {
    background: #1e293b;
    border-color: #334155;
}

.dark-mode .thumbs img {
    border-color: #334155;
}

.dark-mode .thumbs img.active {
    border-color: #0ea5e9;
}

.dark-mode .tag {
    background: #0f172a;
    border-color: #334155;
    color: #cbd5e1;
}

.dark-mode .tag:hover {
    border-color: #0ea5e9;
}

.dark-mode .listing-description {
    color: #cbd5e1;
}

.dark-mode .listing-description h3 {
    color: #e2e8f0;
}

.dark-mode .listing-description p {
    color: #cbd5e1;
}

.dark-mode .listing-description strong,
.dark-mode .listing-description b {
    color: #e2e8f0;
}

.dark-mode .report-link {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}

@media (max-width: 768px) {
    .info-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .info-label {
        font-size: 13px;
    }

    .gallery-main {
        aspect-ratio: 16 / 9;
    }

    .price-highlight {
        font-size: 28px;
    }

    .info-section {
        padding: 20px 16px;
    }
}

@media (max-width: 480px) {
    .price-highlight {
        font-size: 24px;
    }

    .info-section {
        padding: 16px 12px;
    }

    .thumbs img {
        width: 64px;
        height: 48px;
    }
}

/* Gallery ad styles */
.gimg-ad {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background: var(--card-bg);
    padding: 20px;
}

.gthumb-ad {
    width: 80px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--hover);
    color: var(--muted);
    font-size: 12px;
    font-weight: bold;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.85;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gthumb-ad:hover {
    background: var(--border);
    opacity: 1;
    transform: scale(1.05);
}

/* Lightbox/Full-screen gallery styles */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 99999;
    animation: fadeIn 0.3s ease;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    width: 90%;
    height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image-container {
    position: relative;
    max-width: 100%;
    max-height: 100%;
    overflow: hidden;
    cursor: zoom-in;
}

.lightbox-image-container.zoomed {
    cursor: grab;
    overflow: auto;
}

.lightbox-image-container.zoomed:active {
    cursor: grabbing;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    transition: transform 0.3s ease;
    user-select: none;
}

.lightbox-image.zoomed {
    max-width: none;
    max-height: none;
    transform-origin: center;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: none;
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
    z-index: 10001;
}

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

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

.lightbox-nav:hover {
    background: rgba(14, 165, 233, 0.8);
    transform: translateY(-50%) scale(1.1);
}

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

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

.lightbox-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: 50px;
    z-index: 10001;
}

.lightbox-control-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
    font-size: 20px;
}

.lightbox-control-btn:hover {
    background: rgba(14, 165, 233, 0.8);
    transform: scale(1.1);
}

.lightbox-counter {
    color: white;
    display: flex;
    align-items: center;
    padding: 0 12px;
    font-weight: 600;
    font-size: 14px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

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

    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 24px;
    }

    .lightbox-controls {
        bottom: 10px;
        padding: 10px 16px;
        gap: 8px;
    }

    .lightbox-control-btn {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
}

/* Hide reCAPTCHA badge */
.grecaptcha-badge {
    visibility: hidden !important;
}

/* Remove stacking context from .content so lightbox can escape */
.content {
    position: static !important;
    z-index: auto !important;
}
