@charset "UTF-8";

/* ポップアップモーダル用CSS */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(3px);
}

.modal-content {
    position: absolute;
    margin: 20px auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: auto;
    animation: modalSlideIn 0.3s ease-out;
    box-sizing: border-box;
    background: transparent;
}

.modal img {
    max-width: 100%;        /* ★横幅100%制限 */
    max-height: 75vh;       /* ★縦幅75vhで余裕確保 */
    width: auto !important; /* ★jQuery干渉防止 */
    height: auto !important;
    display: block;         /* ★インライン空白除去 */
    margin: 0 auto;         /* ★中央揃え */
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    object-fit: contain;    /* ★縦横比維持 */
}

.close {
    position: absolute;
    top: 25px;
    right: 250px;
    color: white;
    font-size: 35px;
    font-weight: bold;
    background: rgba(0,0,0,0.7);
    width: 40px;
    height: 40px;
    line-height: 39px;
    text-align: center;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 1001;
}

.close:hover {
    background: rgba(255,0,0,0.8);
    transform: scale(1.1);
}

.goods-clickable {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.goods-clickable:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 10px rgba(0,0,0,0.3);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@media only screen and (max-width: 769px) {

    .close {
        top: 0;
        right: 0;
        font-size: 20px;
        width: 25px;
        height: 25px;
        line-height: 25px;
    }
}

@media only screen and (min-width: 770px) and (max-width: 1024px) {
    .close {
        top: 20px;
        right: 40px;
        font-size: 32px;
        width: 38px;
        height: 38px;
        line-height: 36px;
    }
}
