/* Craft Detail Page Styles */
.craft-detail-container {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
}

.craft-images-section {
    flex: 1;
    min-width: 300px;
}

.craft-info-section {
    flex: 1;
    min-width: 300px;
}

/* Gallery styles */
.craft-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

/* Lightbox styles - Full screen overlay */
.lightbox {
    display: none;
    position: fixed;
    z-index: 999999 !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Centered image - Flexbox item */
.lightbox-content {
    max-width: 90vw;
    max-height: 75vh;
    width: auto;
    height: auto;
    object-fit: contain;
    animation: zoom 0.3s;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    border-radius: 4px;
}

@keyframes zoom {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Close button - Absolute to viewport */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1000002 !important;
    transition: 0.3s;
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.lightbox-close:hover {
    color: #ff6b6b;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

/* Navigation arrows - Absolute to viewport */
.lightbox-prev,
.lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 40px;
    font-weight: bold;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    user-select: none;
    transition: 0.3s;
    z-index: 1000001 !important;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: rgba(0, 0, 0, 0.8);
    color: #4CAF50;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* Thumbnail strip - Absolute at bottom */
.lightbox-thumbnails {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 12px;
    max-width: 95%;
    overflow-x: auto;
    z-index: 1000001 !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.lightbox-thumbnails::-webkit-scrollbar { height: 4px; }
.lightbox-thumbnails::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.1); }
.lightbox-thumbnails::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.5); border-radius: 2px; }

.lightbox-thumbnail {
    width: 60px;
    height: 45px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s;
    border: 2px solid transparent;
    flex-shrink: 0;
}

.lightbox-thumbnail:hover { opacity: 1; transform: scale(1.05); }
.lightbox-thumbnail.active {
    opacity: 1;
    border-color: #4CAF50;
    transform: scale(1.1);
}

/* Zoom Controls */
.lightbox-zoom-controls {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000002 !important;
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 15px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.lightbox-zoom-separator {
    width: 1px;
    height: 24px;
    background-color: rgba(255, 255, 255, 0.3);
    margin: 0 2px;
}

.lightbox-zoom-controls button {
    background: transparent;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.lightbox-zoom-controls button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Video styles */
.craft-video-desktop { margin-top: 2rem; }
.craft-video-mobile { display: none; }

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .craft-video-desktop { display: none; }
    .craft-video-mobile { display: block; margin-bottom: 2rem; margin-top: 3rem; }
    .craft-gallery { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.5rem; }
    
    /* Mobile Lightbox */
    .lightbox-content {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%);
        max-width: 90vw;
        max-height: 60vh;
        margin: 0 !important;
    }
    
    .lightbox-close {
        top: 15px;
        right: 15px;
        width: 44px;
        height: 44px;
        font-size: 28px;
        background: rgba(0, 0, 0, 0.6);
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 44px;
        height: 44px;
        font-size: 24px;
        padding: 0;
        background: rgba(0, 0, 0, 0.5);
    }
    
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
    
    .lightbox-thumbnails {
        bottom: 15px;
        padding: 8px;
        gap: 8px;
        width: 95%;
    }
    
    .lightbox-thumbnail {
        width: 50px;
        height: 38px;
    }
    
    .lightbox-zoom-controls {
        top: 70px;
        padding: 5px 10px;
    }
    .lightbox-zoom-controls button {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
}

/* Comment section styles */
.comment-card {
    background: #fff;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
