.product-modal-panel {
    overflow: hidden;
}

.product-modal-image {
    position: relative;
    height: min(78vh, 720px);
    min-height: 520px;
    overflow: hidden;
}

.product-modal-arrow {
    z-index: 3;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 50%;
    background: rgba(17, 17, 17, 0.76);
    color: #fff;
    font-size: 28px;
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(10px);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.product-modal-arrow:hover {
    border-color: #111;
    background: #111;
    color: #fff;
    transform: translateY(-50%) scale(1.06);
}

.product-modal-arrow.prev {
    left: 22px;
}

.product-modal-arrow.next {
    right: 22px;
}

.product-modal-image-count {
    right: 18px;
    bottom: 18px;
    left: auto;
    z-index: 3;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, 0.46);
    background: rgba(17, 17, 17, 0.72);
    font-weight: 900;
    transform: none;
    backdrop-filter: blur(10px);
}

.product-modal-thumbs[hidden] {
    display: none;
}

.product-modal-thumbs {
    position: absolute;
    left: 18px;
    bottom: 16px;
    z-index: 4;
    display: flex;
    gap: 7px;
}

.product-modal-thumbs button {
    width: 42px;
    height: 52px;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.72);
    background: #fff;
    cursor: pointer;
    overflow: hidden;
    opacity: 0.72;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2);
    transition: border-color 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
}

.product-modal-thumbs button.active,
.product-modal-thumbs button:hover {
    border-color: #111;
    opacity: 1;
    transform: translateY(-1px);
}

.product-modal-thumbs img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.product-modal-content {
    overflow: auto;
}

@media (max-width: 768px) {
    .product-modal-panel {
        overflow: auto;
    }

    .product-modal-image {
        height: clamp(210px, 38dvh, 320px);
        min-height: 0;
    }

    .product-modal-content {
        overflow: visible;
    }
}

@media (max-width: 480px) {
    .product-modal-image {
        height: clamp(210px, 32dvh, 280px);
    }

    .product-modal-arrow {
        width: 38px;
        height: 38px;
        font-size: 24px;
    }

    .product-modal-arrow.prev {
        left: 14px;
    }

    .product-modal-arrow.next {
        right: 14px;
    }

    .product-modal-image-count {
        right: 12px;
        bottom: 10px;
        padding: 7px 10px;
        font-size: 10px;
    }

    .product-modal-thumbs {
        left: 12px;
        bottom: 10px;
        gap: 5px;
    }

    .product-modal-thumbs button {
        width: 34px;
        height: 42px;
        border-width: 1px;
    }
}
