/* Work Detail Page Styles */

/* Work detail container */
.work-detail-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 40px 120px;
}

/* Work detail layout */
.work-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 60px;
    margin-bottom: 60px;
    align-items: start;
}

/* Left column - Images */
.work-detail-images {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
    max-width: 100%;
}

.work-main-image {
    width: 100%;
    max-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
    cursor: zoom-in;
    position: relative;
}

.work-main-image img {
    max-width: 100%;
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: opacity 0.2s ease, transform 0.25s ease;
}

.work-main-image:hover img {
    transform: scale(1.01);
}

.work-main-image .placeholder {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

/* Image carousel */
.work-carousel {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 8px;
    min-width: 0;
    max-width: 100%;
    width: 100%;
}

.work-carousel::-webkit-scrollbar {
    height: 6px;
}

.work-carousel::-webkit-scrollbar-track {
    background: var(--bg-gray);
    border-radius: 3px;
}

.work-carousel::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.carousel-item {
    flex: 0 0 100px;
    width: 100px;
    height: 100px;
    background: var(--bg-gray);
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.2s ease, border-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
}

.carousel-item:hover {
    opacity: 0.85;
    transform: scale(1.03);
}

.carousel-item.active {
    border-color: var(--text-dark);
    opacity: 1;
}

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

.carousel-item .placeholder {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
    padding: 10px;
}

/* Right column - Information */
.work-detail-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
    min-width: 0;
}

.work-detail-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin: 0;
}

.work-detail-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.work-spec-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.work-spec-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.work-spec-value {
    font-size: 1.05rem;
    color: var(--text-primary);
    font-weight: 500;
}

.work-detail-divider {
    width: 100%;
    height: 1px;
    background: var(--border-color);
    margin: 5px 0;
}

.work-detail-description {
    display: flex;
    flex-direction: column;
    gap: 6px;
    line-height: 1.8;
    color: var(--text-secondary);
    font-size: 1.05rem;
    white-space: pre-line;
    word-break: break-word;
}

.work-detail-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    width: 200px;
    max-width: 100%;
    text-align: center;
}

.work-availability-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.work-availability-badge.available {
    background-color: #d4edda;
    color: #155724;
}

.work-availability-badge.unavailable {
    background-color: #f8d7da;
    color: #721c24;
}

.work-detail-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
    width: 200px;
    max-width: 100%;
}

.work-detail-actions .cta-button {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    display: inline-block;
    width: 100%;
    max-width: 100%;
    text-align: center;
}

/* Back button */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    margin-bottom: 30px;
    transition: color 0.3s ease;
}

.back-button:hover {
    color: var(--primary-color);
}

.back-button::before {
    content: "←";
    font-size: 1.4rem;
}

/* Responsive design */
@media (max-width: 968px) {
    .work-detail-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .work-detail-container {
        padding: 30px 20px 80px;
    }

    .work-detail-title {
        font-size: 2.2rem;
    }

    .work-detail-price {
        width: 100%;
        max-width: 100%;
    }

    .work-detail-actions {
        width: 100%;
        max-width: 100%;
    }

    .work-detail-actions .cta-button {
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 640px) {
    .work-detail-container {
        padding: 20px 15px 60px;
    }

    .work-detail-title {
        font-size: 1.8rem;
    }

    .work-detail-specs {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .work-detail-actions .cta-button {
        width: 100%;
    }
}

/* Lightbox Modal */
body.lightbox-open {
    overflow: hidden;
}

.work-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    background-color: rgba(18, 18, 18, 0.94);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

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

.lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: zoom-out;
}

.lightbox-dialog {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2002;
}

.lightbox-dialog img {
    max-width: 90vw;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    user-select: none;
    transition: opacity 0.2s ease;
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 28px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: var(--text-white);
    font-size: 28px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2010;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.08);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: var(--text-white);
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2010;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
    user-select: none;
}

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

.lightbox-prev {
    left: 28px;
}

.lightbox-next {
    right: 28px;
}

.lightbox-counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-white);
    font-size: 0.9rem;
    letter-spacing: 1px;
    padding: 6px 16px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    z-index: 2010;
    user-select: none;
}

@media (max-width: 768px) {
    .lightbox-close {
        top: 16px;
        right: 16px;
        width: 38px;
        height: 38px;
        font-size: 22px;
    }

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

    .lightbox-prev {
        left: 12px;
    }

    .lightbox-next {
        right: 12px;
    }

    .lightbox-counter {
        bottom: 16px;
        font-size: 0.8rem;
    }
}

