/* LIGHTBOX STYLES */

/* Product Content Box Styles */
.product-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.product-title {
    color: #dfdfdf;
    font-family: aktiv-grotesk, sans-serif;
    font-weight: 700;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.product-description {
    color: #f7f7f7;
    font-family: "helvetica-lt-pro", sans-serif;
    font-weight: 300;
    font-style: normal;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 1rem;
    text-align: center;
}

/* Image Grid */
.image-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 1.5rem;
    justify-content: center; /* Centers the images */
    margin-left: auto;
    margin-right: auto;
}

.image-thumbnail {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1 / 1;
    background-color: rgba(16, 85, 117, 0.5);
    border: 1px solid rgba(223, 223, 223, 0.1);
    transition: all 0.3s ease;
    width: 150px; /* or 120px - your choice */
    height: 150px; /* or 120px - your choice */
    flex-shrink: 0; /* Prevents shrinking */
}

.image-thumbnail:hover {
    border-color: rgba(223, 223, 223, 0.3);
    transform: scale(1.05);
}

.image-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.image-thumbnail:hover img {
    opacity: 0.8;
}

/* Lightbox Overlay */
.lightbox-overlay {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(6, 12, 16, 0.95);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-overlay.visible {
    opacity: 1;
}

/* Lightbox Content */
.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    animation: lightboxZoom 0.3s ease;
}

@keyframes lightboxZoom {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

/* Close Button */
.lightbox-close {
    position: absolute;
    top: -40px;
    right: -40px;
    color: #f7f7f7;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 1001;
}

.lightbox-close:hover {
    color: #a5bfcb;
}

/* Navigation Buttons */
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(16, 85, 117, 0.7);
    color: #f7f7f7;
    border: none;
    font-size: 24px;
    padding: 16px 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    z-index: 1001;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: rgba(16, 85, 117, 0.9);
}

.lightbox-prev {
    left: -60px;
}

.lightbox-next {
    right: -60px;
}

/* Caption */
.lightbox-caption {
    position: absolute;
    bottom: -40px;
    left: 0;
    right: 0;
    text-align: center;
    color: #f7f7f7;
    font-family: "helvetica-lt-pro", sans-serif;
    font-weight: 300;
    font-size: 14px;
    padding: 10px;
}

/* Responsive Adjustments */
@media screen and (max-width: 768px) {
    .image-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 150px)); /* Changed from 1fr to 150px */
        gap: 8px;
        justify-content: center; /* Ensure centering */
    }
    
    .image-thumbnail {
        max-width: 150px; /* Add max-width constraint */
        max-height: 150px;
    }
    
    /* Rest of your existing styles... */
    .lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 30px;
        background-color: rgba(16, 85, 117, 0.7);
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
    }
    
    .lightbox-prev,
    .lightbox-next {
        font-size: 20px;
        padding: 12px 16px;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-caption {
        position: relative;
        bottom: auto;
        margin-top: 10px;
    }
    
    .product-title {
        font-size: 1.5rem;
    }
}

@media screen and (max-width: 640px) {
    .image-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 120px)); /* Smaller max for this breakpoint */
        gap: 8px;
    }
    
    .image-thumbnail {
        max-width: 120px;
        max-height: 120px;
    }
}

@media screen and (max-width: 480px) {
    .image-grid {
        grid-template-columns: repeat(auto-fit, minmax(60px, 100px)); /* Changed from 1fr to 100px */
        gap: 6px;
    }
    
    .image-thumbnail {
        max-width: 100px;
        max-height: 100px;
    }
    
    .product-title {
        font-size: 1.25rem;
    }
    
    .product-description {
        font-size: 14px;
    }
}

