.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    column-gap: 2rem;
    row-gap: 4rem;
}

.card {
    display: flex;
    flex-direction: column; 
}

.card * {
    text-decoration: none;
    color: var(--clr-primary-400);
}

.card img {
    width: 100%;
    aspect-ratio: 1 / 1.4;
    object-fit: cover;
}

.card .desc {
    margin-top: 8px;
}

.card .name {
    font-weight: var(--fw-regular);
    white-space: nowrap;
    overflow: hidden; 
    text-overflow: ellipsis;
}

.card .code {
    font-weight: var(--fw-bold);
}

.card .price {
    font-weight: var(--fw-regular);
}

.card .colordiv {
    display: flex;
}

.card .colorspan {
    width: 1.8em;
    height: 1.8em;
    margin-right: 4px;
    border: 1px solid #bdbdbd;
    cursor: pointer;
}

@media (max-width: 768px) {
    .card-container {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 1rem;
    }
}

/* swiperjs */
.swiper {
    aspect-ratio: 1 / 1.4;

    --swiper-navigation-top-offset: 50%;
    --swiper-navigation-sides-offset: 10px;
}

.swiper [class^="swiper-button-"] {
    display: none;
    color: gray;
}

.swiper [class^="swiper-button-"]::after{
    font-size: 16px;
}

.swiper:hover [class^="swiper-button-"] {
    display: flex;
}

/* filter */
#filter-toggle {
    cursor: pointer;
    font-size: var(--fs-large);
    font-weight: var(-fw-semi-bold);
}