/* ===== LIGHTBOX STYLES - VINTAGE EDITION ===== */

.clickable-image {
    cursor: pointer !important;
}

body.no-scroll {
    overflow: hidden !important;
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(26, 23, 20, 0.95);
    /* Very dark warm brown/black */
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s ease;
}

.lightbox.active {
    opacity: 1;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.lightbox-container {
    position: relative;
    width: 95vw;
    max-width: 1300px;
    height: 90vh;
    max-height: 800px;
    display: flex;
    background: #fdfbf7;
    /* Vintage frame exactly like the cards */
    border: 12px solid #2c2925;
    outline: 2px solid #c5a059;
    box-shadow:
        15px 25px 60px rgba(0, 0, 0, 0.6),
        inset 0 0 0 2px #c5a059;
    overflow: hidden;
}

.lightbox-content {
    display: flex;
    width: 100%;
    height: 100%;
    padding: 0;
}

.lightbox-image-container {
    position: relative;
    flex: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    overflow: hidden;
    border-right: 6px solid #2c2925;
    /* Divider */
}

/* Loader elegante per il lightbox */
.lightbox-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid rgba(197, 160, 89, 0.2);
    border-top-color: #c5a059;
    animation: spin 1s linear infinite;
    z-index: 4;
    display: none;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.lightbox-image {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    animation: lightboxZoom 0.5s ease-out;
    transition: opacity 0.4s ease;
    z-index: 2;
}

.lightbox-info {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    padding: 40px;
    background: #fffbf0;
    position: relative;
    z-index: 2;
    overflow: hidden;
    height: 100%;
}

.lightbox-title {
    font-family: var(--font-heading, 'Playfair Display', serif);
    font-size: 2.2rem;
    font-weight: 700;
    color: #111;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 25px;
    text-align: center;
}

.lightbox-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 2px;
    background: #c5a059;
    margin: 20px auto 0;
}

.lightbox-description {
    font-family: var(--font-body, 'Georgia', serif);
    font-size: 1.15rem;
    line-height: 1.8;
    color: #333;
    font-style: italic;
    margin-bottom: 25px;
    text-align: justify;
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
}

/* Custom scrollbar for description */
.lightbox-description::-webkit-scrollbar {
    width: 4px;
}

.lightbox-description::-webkit-scrollbar-track {
    background: rgba(197, 160, 89, 0.05);
}

.lightbox-description::-webkit-scrollbar-thumb {
    background: rgba(197, 160, 89, 0.3);
    border-radius: 2px;
}

.lightbox-price {
    font-family: var(--font-heading, 'Playfair Display', serif);
    font-size: 2rem;
    font-weight: 800;
    color: #800020;
    /* Burgundy */
    border-top: 3px solid #800020;
    padding-top: 20px;
    align-self: stretch;
    text-align: center;
    display: block;
    margin-top: auto;
}

/* Contact Info in Lightbox (when no price) */
.lightbox-price.contact-mode {
    border-top: 2px solid var(--color-gold-muted);
    padding-top: 15px;
    font-size: 1rem;
    color: var(--color-bg-deep);
}

.contact-info-lightbox {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.contact-prompt {
    font-family: var(--font-body);
    font-style: italic;
    color: #666;
    margin-bottom: 5px;
}

.contact-info-lightbox a {
    color: #800020;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: var(--font-heading);
    font-size: 1.2rem;
}

.contact-info-lightbox a:hover {
    color: var(--color-gold-bright);
    transform: translateY(-2px);
}

.lightbox-nav-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 100;
}

.lightbox-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.lightbox-dot.active {
    background: var(--color-gold-bright);
    border-color: var(--color-gold-bright);
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.6);
}

.lightbox-dot:hover {
    background: rgba(255, 255, 255, 0.6);
}

/* Compact version for when price is present */
.lightbox-price.with-price {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    border-top: 3px solid #800020;
    padding-top: 20px;
}

.price-value {
    font-size: 2rem;
    font-weight: 800;
    color: #800020;
}

.contact-info-lightbox.compact {
    border-top: 1px solid rgba(197, 160, 89, 0.3);
    padding-top: 10px;
    width: 100%;
}

.contact-info-lightbox.compact .contact-prompt {
    font-size: 0.85rem;
    margin-bottom: 5px;
    color: #888;
}

.contact-info-lightbox.compact .contact-links {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.contact-info-lightbox.compact a {
    font-size: 1.05rem;
}

.contact-info-lightbox.compact .separator {
    color: var(--color-gold-muted);
    opacity: 0.4;
    font-family: serif;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    color: #2c2925;
    border: none;
    width: 44px;
    height: 44px;
    font-size: 36px;
    font-weight: 400;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2001;
    font-family: sans-serif;
    user-select: none;
}

.lightbox-close:hover {
    color: #800020;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    pointer-events: none;
    z-index: 10;
}

.lightbox-nav-btn {
    pointer-events: auto;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    color: #000;
    border: 2px solid #c5a059;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.22rem;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    font-family: serif;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    user-select: none;
}

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

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

.lightbox-nav-btn:hover {
    background: #c5a059;
    color: #fff;
}

@keyframes lightboxZoom {
    0% {
        transform: scale(0.95);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* RESPONSIVE LIGHTBOX */
@media (max-width: 1024px) {
    .lightbox-nav-btn.prev {
        left: 20px;
    }

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

    .lightbox-container {
        flex-direction: column;
        width: 95vw;
        height: auto;
        max-height: 95vh;
        border-width: 8px;
        overflow-y: auto; /* Allow the entire card to scroll on mobile */
        -webkit-overflow-scrolling: touch;
    }

    .lightbox-content {
        flex-direction: column;
        height: auto;
    }

    .lightbox-image-container {
        flex: none;
        height: 45vh; /* Fixed percentage height for image area */
        min-height: 250px;
        border-right: none;
        border-bottom: 6px solid #2c2925;
    }

    .lightbox-info {
        flex: none;
        padding: 25px 20px;
        height: auto;
        min-height: auto;
    }

    .lightbox-title {
        font-size: 1.6rem;
        margin-bottom: 12px;
    }

    .lightbox-title::after {
        margin-top: 10px;
    }

    .lightbox-description {
        font-size: 1rem;
        margin-bottom: 20px;
        overflow-y: visible; /* Description doesn't need its own scroll if container scrolls */
        padding-right: 0;
        max-height: none;
        flex: none;
    }

    .lightbox-price {
        font-size: 1.5rem;
        padding-top: 15px;
    }

    .lightbox-price.with-price {
        padding-top: 15px;
        gap: 8px;
    }

    .price-value {
        font-size: 1.6rem;
    }

    .lightbox-close {
        color: #fff;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
        background: rgba(0, 0, 0, 0.2);
        border-radius: 50%;
        top: 10px;
        right: 10px;
    }

    .lightbox-close:hover {
        color: #c5a059;
    }

    .lightbox-nav-btn {
        width: 44px;
        height: 44px;
        font-size: 1.6rem;
        background: rgba(255, 255, 255, 0.7);
    }

    .contact-info-lightbox.compact .contact-links {
        flex-direction: column;
        gap: 8px;
    }

    .contact-info-lightbox.compact .separator {
        display: none;
    }
}

.dashboard-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.dashboard-thumbnail:hover {
    transform: scale(1.05);
    border-color: #7209b7;
    box-shadow: 0 4px 15px rgba(114, 9, 183, 0.3);
}