.product-order-photos {
    margin-top: 18px;
    max-width: 100%;
}

.product-order-photos--category-page {
    margin-top: 22px;
    margin-bottom: 60px;
}

.product-order-photos__title {
    font-size: 1.35em;
    font-weight: 700;
    margin: 0 0 12px;
    line-height: 1.2;
}

.product-order-photos__strip {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
}

.product-order-photos__strip--mobile {
    display: none;
}

.product-order-photos__item {
    flex: 1 1 0;
    min-width: 0;
    max-width: 160px;
    max-height: 160px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 1;
    background: #eee;
    border: 0;
    padding: 0;
    cursor: pointer;
    display: block;
}

.product-order-photos__item img {
    width: 100%;
    height: 100%;
    max-height: 160px;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.product-order-photos__more-flag {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.48);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: clamp(14px, 2.8vw, 22px);
    line-height: 1;
    pointer-events: none;
    border-radius: inherit;
}

#categoryOrderPhotosModal.cat-order-photo-modal .modal-dialog {
    position: absolute;
    left: 50%;
    top: 50%;
    right: auto;
    margin: 0 !important;
    width: 100%;
    max-width: 540px;
    -webkit-transform: translate(-50%, -50%) !important;
    -ms-transform: translate(-50%, -50%) !important;
    -o-transform: translate(-50%, -50%) !important;
    transform: translate(-50%, -50%) !important;
    -webkit-transition: none !important;
    -o-transition: none !important;
    transition: none !important;
}

@media (min-width: 768px) {
    #categoryOrderPhotosModal.cat-order-photo-modal .modal-dialog {
        max-width: 560px;
    }
}

#categoryOrderPhotosModal .modal-content {
    border: 0;
    border-radius: 26px;
    box-shadow: 0 20px 56px rgba(0, 0, 0, 0.22), 0 8px 24px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

#categoryOrderPhotosModal .cat-order-photo-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 22px 24px 10px;
    border-bottom: 0;
}

#categoryOrderPhotosModal .modal-title {
    font-family: "Montserrat";
    margin: 0;
    flex: 1;
    font-size: 18px;
    font-weight: 700;
    color: #111;
    line-height: 1.3;
    padding-right: 6px;
}

#categoryOrderPhotosModal .cat-order-photo-modal__close {
    float: none;
    margin: 0;
    padding: 0 4px;
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
    color: #888;
    opacity: 1;
    text-shadow: none;
}

#categoryOrderPhotosModal .cat-order-photo-modal__close:hover,
#categoryOrderPhotosModal .cat-order-photo-modal__close:focus {
    color: #444;
    background-color: white;
    opacity: .5;
}

#categoryOrderPhotosModal .modal-body {
    padding: 8px 24px 24px;
}

.cat-order-photo-modal__figure {
    position: relative;
    margin: 0 auto;
    max-width: 100%;
    text-align: center;
    padding: 0 12px;
    box-sizing: border-box;
}

.cat-order-photo-modal__img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    max-height: min(68vh, 500px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 16px;
    vertical-align: middle;
}

.cat-order-photo-modal__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 0;
    background: #ececec;
    color: #3a3a3a;
    font-size: 22px;
    cursor: pointer;
    padding: 0;
    z-index: 2;
}

.cat-order-photo-modal__arrow:hover {
    background: #f5f5f5;
    color: #111;
}

.cat-order-photo-modal__arrow--prev {
    left: -8px;
}

.cat-order-photo-modal__arrow--next {
    right: -8px;
}

.cat-order-photo-modal__footer {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

#categoryOrderPhotosModal .cat-order-photo-modal__btn-details,
#categoryOrderPhotosModal .cat-order-photo-modal__btn-buy {
    font-family: "Montserrat";
    flex: 0 1 auto;
    min-width: 148px;
    padding: 13px 32px;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.25;
    border-radius: 999px;
    text-align: center;
    text-decoration: none !important;
    transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

#categoryOrderPhotosModal .cat-order-photo-modal__btn-details {
    background: #fff !important;
    color: #2d6a46 !important;
    border: 1.5px solid #2d6a46 !important;
    box-shadow: none;
}

#categoryOrderPhotosModal .cat-order-photo-modal__btn-details:hover,
#categoryOrderPhotosModal .cat-order-photo-modal__btn-details:focus {
    background: #f2f8f4 !important;
    color: #1e4d32 !important;
    border-color: #1e4d32 !important;
}

#categoryOrderPhotosModal .cat-order-photo-modal__btn-buy {
    background: #2d6a46 !important;
    border: 1.5px solid #2d6a46 !important;
    color: #fff !important;
}

#categoryOrderPhotosModal .cat-order-photo-modal__btn-buy:hover,
#categoryOrderPhotosModal .cat-order-photo-modal__btn-buy:focus {
    background: #245038 !important;
    border-color: #245038 !important;
    color: #fff !important;
}

@media (max-width: 767px) {
    .product-order-photos__strip--desktop {
        display: none !important;
    }

    .product-order-photos__strip--mobile {
        display: flex !important;
    }

    .product-order-photos__strip {
        gap: 6px;
    }

    .product-order-photos__strip--mobile {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .product-order-photos__strip--mobile .product-order-photos__item {
        width: 160px;
        max-width: 160px;
        max-height: 160px;
        min-width: 0;
    }

    .product-order-photos__item {
        border-radius: 8px;
    }
}

@media (max-width: 600px) {
    .product-order-photos__strip {
        gap: 5px;
    }

    .cat-order-photo-modal__arrow {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .cat-order-photo-modal__arrow--prev {
        left: 4px;
    }

    .cat-order-photo-modal__arrow--next {
        right: 4px;
    }
}
