/* Lightbox Modal System - Artwork viewer with purchase options */

.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 20, 25, 0.97);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

.lightbox-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px 20px;
    overflow-y: auto;
}

.lightbox-content {
    max-width: 1400px;
    width: 100%;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 250, 205, 0.2);
    border-radius: 20px;
    padding: 40px;
    position: relative;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s ease 0.1s;
}

.lightbox-overlay.active .lightbox-content {
    transform: scale(1);
    opacity: 1;
}

/* Close button */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 250, 205, 0.3);
    color: #fffacd;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.5em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.lightbox-close:hover,
.lightbox-close:focus {
    background: rgba(255, 250, 205, 0.2);
    border-color: #fffacd;
    transform: rotate(90deg);
}

/* Image section */
.lightbox-image-section {
    position: relative;
}

.lightbox-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 2px solid rgba(255, 250, 205, 0.15);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 250, 205, 0.3);
    color: #fffacd;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.lightbox-nav:hover,
.lightbox-nav:focus {
    background: rgba(255, 250, 205, 0.2);
    border-color: #fffacd;
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.lightbox-nav:disabled:hover {
    transform: translateY(-50%);
}

.lightbox-prev {
    left: -25px;
}

.lightbox-next {
    right: -25px;
}

/* Info section */
.lightbox-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.lightbox-header h2 {
    color: #fffacd;
    font-size: 2em;
    margin-bottom: 10px;
    letter-spacing: 1px;
    text-shadow: 0 0 15px rgba(255, 250, 205, 0.3);
}

.lightbox-category {
    color: #c9b8d9;
    font-size: 1em;
    font-style: italic;
    margin-bottom: 15px;
}

.lightbox-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lightbox-tag {
    background: rgba(255, 250, 205, 0.15);
    color: #fffacd;
    padding: 6px 16px;
    border-radius: 15px;
    font-size: 0.85em;
    letter-spacing: 0.5px;
}

.lightbox-description {
    color: #d9cbe5;
    font-size: 1.05em;
    line-height: 1.8;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 250, 205, 0.1);
    border-bottom: 1px solid rgba(255, 250, 205, 0.1);
}

.lightbox-metadata {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    font-size: 0.9em;
}

.metadata-item {
    color: #b8a9c9;
}

.metadata-label {
    display: block;
    color: #fffacd;
    font-size: 0.85em;
    margin-bottom: 5px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Purchase section */
.lightbox-purchase {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 250, 205, 0.15);
    border-radius: 15px;
    padding: 25px;
    margin-top: auto;
}

.purchase-title {
    color: #fffacd;
    font-size: 1.2em;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.purchase-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.purchase-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(255, 250, 205, 0.05);
    border: 1px solid rgba(255, 250, 205, 0.1);
    border-radius: 8px;
    color: #d9cbe5;
    font-size: 0.95em;
    transition: all 0.3s ease;
}

.purchase-option:hover {
    background: rgba(255, 250, 205, 0.1);
    border-color: rgba(255, 250, 205, 0.3);
}

.option-name {
    font-weight: bold;
}

.option-price {
    color: #90ee90;
    font-size: 1.1em;
}

.purchase-actions {
    display: flex;
    gap: 12px;
}

.btn-primary,
.btn-secondary {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 25px;
    font-size: 0.95em;
    font-weight: bold;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: Georgia, serif;
}

.btn-primary {
    background: #fffacd;
    color: #0f1419;
}

.btn-primary:hover,
.btn-primary:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 250, 205, 0.4);
}

.btn-secondary {
    background: rgba(255, 250, 205, 0.1);
    color: #fffacd;
    border: 2px solid #fffacd;
}

.btn-secondary:hover,
.btn-secondary:focus {
    background: rgba(255, 250, 205, 0.2);
    transform: translateY(-2px);
}

/* Availability badge */
.availability-badge {
    display: inline-block;
    padding: 6px 15px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: bold;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.availability-badge.available {
    background: rgba(76, 175, 80, 0.2);
    border: 2px solid rgba(76, 175, 80, 0.5);
    color: #90ee90;
}

.availability-badge.sold-out {
    background: rgba(244, 67, 54, 0.2);
    border: 2px solid rgba(244, 67, 54, 0.5);
    color: #ff6b6b;
}

.availability-badge.limited {
    background: rgba(255, 193, 7, 0.2);
    border: 2px solid rgba(255, 193, 7, 0.5);
    color: #ffd54f;
}

/* Responsive layout */
@media (max-width: 1024px) {
    .lightbox-content {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 30px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .lightbox-container {
        padding: 70px 15px 15px;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2em;
    }

    .lightbox-prev {
        left: 10px;
        top: 50%;
    }

    .lightbox-next {
        right: 10px;
        top: 50%;
    }
}

@media (max-width: 768px) {
    .lightbox-content {
        padding: 20px;
        border-radius: 15px;
    }

    .lightbox-header h2 {
        font-size: 1.5em;
    }

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

    .lightbox-metadata {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .purchase-actions {
        flex-direction: column;
    }

    .lightbox-nav {
        width: 35px;
        height: 35px;
        font-size: 1em;
    }
}

/* Keyboard navigation indicator */
.lightbox-overlay:focus-within .lightbox-nav:focus {
    outline: 3px solid rgba(255, 250, 205, 0.6);
    outline-offset: 2px;
}

/* Prevent body scroll when lightbox is open */
body.lightbox-open {
    overflow: hidden;
}
