﻿.collection-browser {
    width: 100%;

}

.collection-section {
    margin: 25px 0;
}

.collection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

    .collection-header h3 {
        margin: 0;
    }

.collection-carousel-wrap {
    position: relative;
    padding: 0 44px;
    box-sizing: border-box;
    overflow: hidden;
}

.collection-carousel {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    width: 100%;
    box-sizing: border-box;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: 8px 0 14px 0;
    background-color: #f0f0f0;
    /* Syntax: box-shadow: horizontal vertical blur spread color inset; */
    box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.collection-card {
    flex: 0 0 calc(25% - 8px);
    max-width: calc(25% - 8px);
    min-width: 0;
    box-sizing: border-box;
    scroll-snap-align: start;
    background-color: #EBF4F6;
}

.collection-card img {
/*    height: 250px;
    width: auto;
*/    flex-shrink: 0;
    border: 1px solid #ccc;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.collection-card:hover img {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.25);
}

    .collection-card a {
        display: block;
        text-decoration: none;
    }

.collection-image-wrap {
    height: clamp(240px, 22vw, 420px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

    .collection-image-wrap img {
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
        display: block;
    }

.collection-title {
    padding: 6px 2px;
    font-size: 14px;
    line-height: 1.3;
    text-align: center;
    background-color: whitesmoke;
    border-radius: 8px;
}

.collection-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 34px;
    height: 58px;
    border: 0;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 38px;
    line-height: 1;
    cursor: pointer;
}

.collection-prev {
    left: 0;
}

.collection-next {
    right: 0;
}

/* Medium desktop / tablet landscape: 3 wide */
@media (max-width: 1199px) {
    .collection-card {
        flex: 0 0 calc(33.333% - 7px);
        max-width: calc(33.333% - 7px);
    }

    .collection-image-wrap {
        height: clamp(220px, 30vw, 380px);
    }
}

/* Tablet portrait / larger mobile portrait: 1 wide */
@media (max-width: 767px) and (orientation: portrait) {
    .collection-carousel-wrap {
        padding: 0 36px;
    }

    .collection-card {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .collection-image-wrap {
        height: min(60vh, 420px);
    }
}

/* Small phones portrait */
@media (max-width: 480px) and (orientation: portrait) {
    .collection-carousel-wrap {
        padding: 0 32px;
    }

    .collection-image-wrap {
        height: min(58vh, 380px);
    }
}
.collection-browser,
.collection-section,
.collection-carousel-wrap,
.collection-carousel {
    max-width: 100%;
    box-sizing: border-box;
}

.collection-carousel-wrap {
    overflow: hidden;
}


/* for displaying all items in responsive grid */
.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(540px, 1fr));
    gap: 24px;
    margin: 0;
    padding: 0;
}

    .collection-grid > span {
        display: contents;
    }

    .collection-grid > br {
        display: none;
    }

.collection-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    background-color: #EBF4F6;
}
/* testing: */
.collection-grid {
    max-width: 100%;
    min-width: 0;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.collection-item {
    min-width: 0;
}

    .collection-item img {
        height: 250px;
        width: auto;
        flex-shrink: 0;
        border: 1px solid #ccc;
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

.collection-item:hover img {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.25);
}

.viewall{
    display:inline;
    text-align:right;
    align-items: end;
    justify-items:end;
}
