.njm-lamino-swatchbook {
    clear: both;
    margin: 28px 0;
}

.njm-lamino-swatchbook__header {
    align-items: baseline;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    margin: 0 0 16px;
}

.njm-lamino-swatchbook h2 {
    font-size: 1.35rem;
    margin: 0 0 18px;
}

.njm-lamino-swatchbook__group {
    margin: 0 0 24px;
}

.njm-lamino-swatchbook__group:last-child {
    margin-bottom: 0;
}

.njm-lamino-swatchbook__group h3 {
    font-size: 1.05rem;
    line-height: 1.3;
    margin: 0;
}

.njm-lamino-swatchbook__header p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.njm-lamino-carousel {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
}

.njm-lamino-carousel__viewport {
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-color: #f5a623 #ececec;
    scrollbar-width: thin;
}

.njm-lamino-carousel__viewport::-webkit-scrollbar {
    height: 8px;
}

.njm-lamino-carousel__viewport::-webkit-scrollbar-track {
    background: #ececec;
    border-radius: 999px;
}

.njm-lamino-carousel__viewport::-webkit-scrollbar-thumb {
    background: #f5a623;
    border-radius: 999px;
}

.njm-lamino-carousel__track {
    display: flex;
    gap: 14px;
    padding: 0 0 14px;
}

.njm-lamino-carousel__button,
.njm-lamino-modal__nav,
.njm-lamino-modal__close {
    align-items: center;
    background: #fff;
    border: 1px solid #d8d8d8;
    border-radius: 999px;
    color: #242424;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    justify-content: center;
    transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.njm-lamino-carousel__button {
    font-size: 30px;
    height: 42px;
    line-height: 1;
    width: 42px;
}

.njm-lamino-carousel__button:hover,
.njm-lamino-carousel__button:focus-visible,
.njm-lamino-modal__nav:hover,
.njm-lamino-modal__nav:focus-visible,
.njm-lamino-modal__close:hover,
.njm-lamino-modal__close:focus-visible {
    background: #fff8ed;
    border-color: #f5a623;
    outline: none;
}

.njm-lamino-carousel__button:disabled {
    cursor: default;
    opacity: 0.28;
}

.njm-lamino-swatch {
    flex: 0 0 calc((100% - 70px) / 6);
    margin: 0;
    min-width: 118px;
}

.njm-lamino-swatch__button {
    background: transparent;
    border: 0;
    color: inherit;
    cursor: pointer;
    display: block;
    font: inherit;
    padding: 0;
    text-align: left;
    width: 100%;
}

.njm-lamino-swatch__button:hover,
.njm-lamino-swatch__button:focus,
.njm-lamino-swatch__button:active {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    color: inherit;
}

.njm-lamino-swatch__button:hover .njm-lamino-swatch__title,
.njm-lamino-swatch__button:focus-visible .njm-lamino-swatch__title {
    color: #f5a623;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.njm-lamino-swatch__button:focus-visible {
    outline: 2px solid rgba(245, 166, 35, 0.45);
    outline-offset: 3px;
}

.njm-lamino-swatch__image {
    align-items: center;
    aspect-ratio: 1 / 1;
    background: #f7f7f7;
    border: 1px solid #e2e2e2;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.njm-lamino-swatch__image img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.njm-lamino-swatch__image--empty {
    background: repeating-linear-gradient(45deg, #f7f7f7, #f7f7f7 8px, #ececec 8px, #ececec 16px);
}

.njm-lamino-swatch__title {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 7px 0 2px;
    overflow-wrap: anywhere;
}

.njm-lamino-swatch__code {
    color: #666;
    display: block;
    font-size: 0.78rem;
    line-height: 1.3;
}

.njm-lamino-modal-open {
    overflow: hidden;
}

.njm-lamino-modal {
    align-items: center;
    display: none;
    inset: 0;
    justify-content: center;
    padding: 24px;
    position: fixed;
    z-index: 999999;
}

.njm-lamino-modal.is-open {
    display: flex;
}

.njm-lamino-modal__backdrop {
    background: rgba(0, 0, 0, 0.72);
    inset: 0;
    position: absolute;
}

.njm-lamino-modal__dialog {
    align-items: center;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.25);
    display: grid;
    gap: 16px;
    grid-template-columns: 48px minmax(0, 760px) 48px;
    max-height: min(820px, calc(100vh - 48px));
    max-width: min(980px, calc(100vw - 48px));
    padding: 22px;
    position: relative;
    width: 100%;
}

.njm-lamino-modal__close {
    font-size: 28px;
    height: 38px;
    position: absolute;
    right: 12px;
    top: 12px;
    width: 38px;
    z-index: 2;
}

.njm-lamino-modal__nav {
    font-size: 34px;
    height: 48px;
    width: 48px;
}

.njm-lamino-modal__figure {
    margin: 0;
    min-width: 0;
    text-align: center;
}

.njm-lamino-modal__image {
    background: #f7f7f7;
    display: block;
    margin: 0 auto;
    max-height: calc(100vh - 220px);
    max-width: 100%;
    object-fit: contain;
}

.njm-lamino-modal figcaption {
    margin-top: 14px;
}

.njm-lamino-modal__title,
.njm-lamino-modal__code {
    display: block;
}

.njm-lamino-modal__title {
    font-size: 1.15rem;
    line-height: 1.3;
}

.njm-lamino-modal__code {
    color: #666;
    margin-top: 3px;
}

@media (max-width: 900px) {
    .njm-lamino-swatch {
        flex-basis: calc((100% - 42px) / 4);
    }
}

@media (max-width: 640px) {
    .njm-lamino-swatchbook__header {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .njm-lamino-carousel {
        gap: 8px;
        grid-template-columns: 34px minmax(0, 1fr) 34px;
    }

    .njm-lamino-carousel__button {
        font-size: 25px;
        height: 34px;
        width: 34px;
    }

    .njm-lamino-swatch {
        flex-basis: calc((100% - 14px) / 2);
        min-width: 128px;
    }

    .njm-lamino-modal {
        padding: 12px;
    }

    .njm-lamino-modal__dialog {
        gap: 10px;
        grid-template-columns: 38px minmax(0, 1fr) 38px;
        max-height: calc(100vh - 24px);
        max-width: calc(100vw - 24px);
        padding: 54px 12px 16px;
    }

    .njm-lamino-modal__nav {
        font-size: 28px;
        height: 38px;
        width: 38px;
    }

    .njm-lamino-modal__image {
        max-height: calc(100vh - 210px);
    }
}
