.main-container {
    margin: 0;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: auto;
    width: 1168px;
    height: auto;
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;

}

/* Header */
.header-container {
    display: flex;
    margin-bottom: 2rem;
}

.header-container img {
    width: 330px;
}

/* Description */
.description-container h1 {
    margin: 0;
    padding: 0;
    color: rgba(0, 70, 142, 1);
}

.description-container p {
    margin-top: 1rem;
    width: 90%;
}

/* Title */
.title-container {
    width: 100%;
    align-self: flex-start;
    color: rgba(0, 70, 142, 1);
    margin-bottom: 2rem;
}

/* Model Viewer */
.model-viewer-container {
    width: 49%;
    position: relative;
}

.model-viewer-container p {
    margin-bottom: 1rem;
    margin-top: 0rem;
}

.model-viewer-container iframe {
    width: 99%;
    height: 585px;
    border-radius: 18px;
    border: 2px solid rgb(233, 232, 232);
    transition: .3s;
}

/* Selection Container "Huidige Selection =...."*/
.selection-container {
    display: flex;
    margin-top: 1rem;
    width: 98%;
}

.selection-container p {
    margin-top: 0.5rem;
}

.pause-button {
    cursor: pointer;
    background: none;
    border: none;
    width: 45px;
    height: 45px;
}

.selection-container img {
    float: center;
    width: 2rem;
}

.current-selection {
    width: 40rem;
}

/* Filters Buttons */
.filters-buttons-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-left: 1.7rem;
}

.filters-buttons-container button {
    background-color: transparent;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 18px;
    margin-bottom: .6rem;
    transition: color 0.3s;
    cursor: pointer;
    position: relative;
    padding-bottom: 10px;
    color: #000000;
}

.filters-buttons-container button::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 90%;
    height: 2px;
    background-color: rgb(235, 235, 235); /* default gray */
    transition: background-color 0.3s;
}

.filters-buttons-container button.active {
    color: rgba(0, 70, 142, 1); /* active text color */
}

.filters-buttons-container button.active::after {
    background-color: black; /* active underline */
}


/* Content Layout */
.content-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    transition: .3s;
}

/* Color Container */
.color-group-container {
    position: relative;
    border-left: 2px solid rgb(235, 235, 235);
    padding-left: 1rem;
    /* transition: all 0.3s ease-in-out; */
    width: 35rem;
    height: 90%;
}

/* Expand Button */
.expand-button {
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(240, 240, 240, 1);
    color: white;
    border: none;
    width: 40px;
    height: 50px;
    font-size: 18px;
    cursor: pointer;
    transition: 0.3s;
    border-radius: 24px 0 0 24px;
}

.expand-button img {
    width: 75%;
    height: 100%;
    object-fit: contain;
}

.expand-button:hover {
    background-color: rgb(214, 214, 214);
}

.color-container {
    margin: 0;
    padding: 0;
    position: relative;
    box-sizing: border-box;
}

.color-container.fullscreen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.content-container {
    position: relative;
}

.group-container {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 5px;
    margin-top: 2rem;
    border-radius: 5px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-color: rgba(0, 70, 142, 1) transparent;  
    scrollbar-width: none;
}

/* wrapper: anchors the buttons so they do NOT move with the scroll */
.scroll-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 0.6rem; /* adjust spacing between groups if you want */
  display: block;
}

/* ensure the group still behaves as before */
.scroll-wrapper .group-container {
  width: 100%;
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  gap: 10px;
  padding: 5px;
}

/* buttons anchored to wrapper edges */
.scroll-left,
.scroll-right {
  position: absolute;
  top: 5%;
  transform: translateY(-50%);
  z-index: 100;
  border: none;
  background: transparent; 
  padding: 6px 8px;
  cursor: pointer;
  color: rgba(0, 70, 142, 1);
  font-size: 16px;
  transition: .3s;
}
.scroll-left:hover,
.scroll-right:hover {
  color: rgb(0, 93, 185);
}

.scroll-left { left: 495px; }
.scroll-right { right: 1px; }


.group-container-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.color-container.fullscreen .color-group-container {
    width: 100%;
    flex-grow: 1;
    overflow: hidden;
    max-height: 100%;
    transition: .5s;
}

.color-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
    height: 140px;
    margin-right: .5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: white;
    cursor: pointer;
    transition: box-shadow 0.3s;
    position: relative; /* needed for overlay positioning */
}

.color-card.selected {
    border: 2px solid #00468e;
    transition: all 0.2s ease-in-out;
}

/* Overlay image when selected */
.color-card.selected::after {
    content: "";
    position: absolute;
    top: 30%;
    left: 50%;
    width: 35px;
    height: 35px;
    background: url("./images/CheckMarkBelisol.png") no-repeat center center;
    background-size: contain;
    transform: translate(-50%, -50%);
    pointer-events: none; /* so clicks still hit the card */
}

.color-card:hover {
    box-shadow: 7px 7px 20px rgba(0, 0, 0, 0.1);
}

.color-card p {
    margin: 2px 0;
    font-size: 11px;
    width: 90%;
    height: 90%;
    color: rgba(0, 70, 142, 1);
}

.color-card img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    margin-bottom: 5px;
}

.color-cards-container {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
}


/* Search bar */
.search-container {
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 2px solid rgba(128, 128, 128, 0.1);
    width: 100%;
    margin-top: 2rem;
    max-width: 500px; 
    gap: 10px; 
}

.search-container input {
    flex: 1; 
    min-width: 150px; 
    padding: 8px;
    font-size: 14px;
    border-radius: 5px;
    border: gray 1px solid;
}

.search-container button {
    padding: 8px 12px;
    font-size: 14px;
    white-space: nowrap; 
    cursor: pointer;
    padding: .7rem;
    border: none;
    border-radius: 24px;
    color: white;
    background-color: rgba(0, 70, 142, 1);
}

.loader-container {
    position: absolute;
    top: 50%;            
    left: 50%;           
    transform: translate(-50%, -50%);
    width: 100%;
    height: auto;
    opacity: 1;
    border-radius: 18px;
    transition: opacity 1.5s ease-out;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.loader-container img {
    width: 100%;
}

/* responsiveness */
@media (max-width: 1167px) {
    .main-container {
        width: 90%;
    }

    .color-container {
        width: 75%;
    }

    .search-container input {
        width: 70%;
    }

    .model-viewer-container iframe {
        height: 450px;
    }

    .color-group-container {
        width: 31rem;
        height: 80%;
    }
    .scroll-left { left: 420px; }
}

@media (max-width: 1100px) {

    .color-container {
        width: 70%;
    }

    .search-container input {
        width: 70%;
    }

    .model-viewer-container iframe {
        height: 400px;
        width: 95%;
    }

    .color-group-container {
        width: 28rem;
    }

    .scroll-left { left: 370px; }

}

@media (max-width: 1005px) {

    .color-container {
        width: 68%;
    }

    .search-container input {
        width: 70%;
    }

    .model-viewer-container iframe {
        height: 350px;
    }

    .color-group-container {
        width: 25rem;
    }
    .scroll-left { left: 330px; }
}

@media (max-width: 943px) {
    .color-container {
        width: 65%;
    }

    .model-viewer-container p {
        font-size: 13px;
    }

    .search-container input {
        width: 65%;
    }

    .model-viewer-container iframe {
        height: 330px;
    }

    .color-group-container {
        width: 23rem;
    }
    .scroll-left { left: 300px; }
}

@media (max-width: 828px) {
    .color-container {
        width: 63%;
    }

    .model-viewer-container p {
        font-size: 12px;
    }

    .search-container input {
        width: 60%;
    }

    .model-viewer-container iframe {
        height: 320px;
    }

    .color-group-container {
        width: 20rem;
    }
        
    .scroll-left { left: 250px; }

}

@media (max-width: 781px) {
    .color-container {
        width: 60%;
    }

    .search-container input {
        width: 50%;
    }

    .header-container img {
        width: 280px;
    }
}

@media (max-width: 734px) {
    .color-container {
        width: 90%;
    }

    .search-container {
        width: 90%;
    }

    .header-container {
        margin-bottom: .5rem;
    }

    .header-container img {
        width: 250px;
    }

    .description-container h1 {
        font-size: 26px;
    }

    .description-container p {
        font-size: 15px;
    }

    .filters-buttons-container {
        margin-left: .5rem;
    }

    .filters-buttons-container button{
        font-size: 15px;
    }

    .scroll-left { left: 240px; }
    .scroll-right { right: 15px; }
}

@media (max-width: 675px) {
    .color-container {
        width: 90%;
    }

    .search-container {
        width: 85%;
    }

    .model-viewer-container p {
        font-size: 10px;
    }

    .filters-buttons-container{
        width: 80%;
    }
    .scroll-left { left: 230px; }
    .scroll-right { right: 30px; }
}


@media (max-width: 647px) {
    .content-container {
        flex-direction: column;
        align-items: center;
    }

    .filters-buttons-container {
        width: 80%;
    }

    .search-container {
        width: 90%;
    }

    .color-group-container {
        width: 100%;
    }

    .model-viewer-container {
        width: 100%;
        text-align: center;
    }
    .pause-button {
        margin-top: 1rem;
    }
    
    .color-container {
        width: 100%;
        margin-top: 1rem;
    }

    .search-container button {
        width: 90px;
        font-size: 12px;
    }

    .model-viewer-container p {
        font-size: 13px;
    }

    .header-container {
        margin-bottom: .5rem;
    }

    .header-container img {
        width: 220px;
    }

    .description-container h1 {
        font-size: 24px;
    }

    .description-container p {
        font-size: 12px;
    }

    .model-viewer-container iframe {
        height: 300px;
    }

    .scroll-left { left: 400px; }
    .scroll-right { right: 15px; }

}

@media (max-width: 531px) {
    .scroll-left { left: 370px; }
    .scroll-right { right: 15px; }
}

@media (max-width: 485px) {
    .scroll-left { left: 330px; }
    .scroll-right { right: 10px; }
}

@media (max-width: 440px) {
    .scroll-left { left: 280px; }
    .scroll-right { right: 10px; }
}