:root {
    --lime: #c4d82d;
    --teal: #009e96;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Fugue', system-ui, sans-serif;
    background: #f8f8f8;
    color: #111;
    padding: 60px 20px 100px;
}

/* Headline */
h1 {
    text-align: center;
    margin-bottom: 70px;
    font-weight: 700;
    font-size: 2.8rem;
    color: var(--teal);
}

/* Gallery Grid */
.color-gallery {
    display: grid;
    gap: 30px;
    max-width: 1800px;
    margin: 0 auto;
    /* Use auto-fit or auto-fill to make columns adapt */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    justify-content: center; /* ensures grid itself is centered */
}


@media (min-width: 768px) {
    .color-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1200px) {
    .color-gallery {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Individual card */
.color-card {
    background: #fff;
	min-width: 350px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transition: all 0.4s;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.color-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

/* Slider container and images */
.slider-container {
    height: 300px; /* fixed uniform height */
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.slider-container .swiper {
    height: 100%; /* full height of container */
}

.slider-container .swiper-wrapper {
    height: 100%; /* ensure slides stretch fully */
}

.slider-container .swiper-slide {
    height: 100%; /* make slides fill container */
}

.slider-container .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* crop to container */
    object-position: center;
    display: block;
}

/* Color info at bottom */
.color-info {
    padding: 15px 10px;
    text-align: center;
    background: #fff;
    flex-shrink: 0;
}

.color-name {
    font-size: 1.5rem;
    font-weight: 700;

    margin-bottom: 5px;
}

.color-desc {
    font-size: 0.95rem;
    color: #666;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox .swiper {
    width: 96%;
    max-width: 1600px;
    height: 96vh;
}

.lightbox .swiper-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}




/* FIX: Force correct layout for lightbox slides with download button */
.lightbox .swiper-slide {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;           /* space between image and button */
    background: #000;
    padding: 40px;       /* breathing room around everything */
}

.lightbox .swiper-slide img {
    max-width: 94vw;
    max-height: 76vh;    /* leaves room for button below */
    width: auto;
    height: auto;
    object-fit: contain;
}

.download-btn {
    position: static !important;   /* removes absolute positioning */
    opacity: 1;
    visibility: visible;
    transform: none;
}

/* Close button for lightbox */
.close-lightbox {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 50px;
    color: white;
    cursor: pointer;
    font-weight: 100;
    z-index: 10000;
}

/* Download button inside lightbox */
.download-btn {
    position: absolute;
    bottom: 30px;
    right: 30px;
    background: var(--lime);
    color: #000;
    padding: 14px 32px;
    font-weight: 700;
    text-decoration: none;
    border: 3px solid #fff;
    transition: all 0.3s;
    opacity: 0;
    visibility: hidden;
}

.download-btn:hover {
    background: #fff;
    color: #000;
    border-color: var(--lime);
    transform: scale(1.05);
}

.swiper-slide-active .download-btn {
    opacity: 1;
    visibility: visible;
}

/* Swiper navigation */
.swiper-pagination-bullet-active {
    background: var(--lime) !important;
}

.swiper-button-next,
.swiper-button-prev {
   
    color: white !important;
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

/* Responsive tweaks */
@media (max-width: 767px) {
    .slider-container {
        height: 220px;
    }
    .color-name {
        font-size: 1.2rem;
    }
    .color-desc {
        font-size: 0.85rem;
    }
}





