.carousel-container {
    position: relative;
}

.carousel-images {
    position: relative;
    overflow: hidden;
    width: 889px;
    height: 550px;
    margin-left: -74px;
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
    /* background-color: #a0c0e0; */
}

/* PC/タブレット用 (695px以上で適用) */
@media (min-width: 695px) {
    .carousel-container {
        /* 親要素の左端から画面左端まで移動し、さらに74px左に突き出す */
        margin-left: calc(-50vw + 50% - 5.42vw); /* 74px / 1365px ≈ 5.42vw */
    }

    .carousel-images {
        width: 65.13vw; /* 889px / 1365px ≈ 65.13% */
        max-width: 889px; /* 最大サイズを制限 */
        aspect-ratio: 889 / 550; /* 縦横比を保持 */
        height: auto; /* aspect-ratioで高さを自動計算 */
        margin-left: 0; /* containerで位置調整するため0に */
    }
    #upcycle .upcycle-wrap .text-area .detail-btn {
        padding-top: 9.5rem;
    }
}

.slide-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.slide-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
}

/* 最初のスライドとアクティブなスライドを表示 */
.slide-item:first-child,
.slide-item.active {
    opacity: 1;
    z-index: 10;
}

/* ナビゲーションボタンのデザイン */
@media (min-width: 695px) {
    .carousel-nav {
        text-align: left;
        position: absolute;
        left: 135px; /* 画面左端から135px = 74px + 135px = 5.42vw + 9.89vw = calc(5.42vw + 9.89vw) */
        bottom: -49.61px; /* 画像の下端から49.61px下 */
        width: auto;
    }
}

.nav-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid #039639;
    background-color: #ffffff;
    margin: 0 20px;
    cursor: pointer;
    transition: background-color 0.3s;
    padding: 0;
    box-sizing: border-box;
    line-height: 1;
    font-size: 0;
}

/* アクティブなボタンの色を切り替え */
.nav-dot.active {
    background-color: #039639;
}

/* スマホ用レイアウト (694px 以下で適用) */
@media (max-width: 694px) {
    .carousel-container {
        width: 100%;
        overflow: hidden; 
        border-top-left-radius: 0;
        border-top-right-radius: 20px;
        border-bottom-right-radius: 20px;
        border-bottom-left-radius: 0;
    }
    .carousel-images {
        width: calc(100vw - 19px);/* 右空白：19px)*/ 
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
        border-top-right-radius: 20px;
        border-bottom-right-radius: 20px;
        margin-left: 0;
        height: 30rem; /* 例: 395px の幅に合わせた高さ（元の比率に基づく） */
    }

    /* 画像自体のスタイル */
    .slide-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    /* ナビゲーションボタンの位置を調整 */
    .carousel-nav {
            text-align: left;
            position: relative;
            left: 19px;
            width: auto;
            bottom:0;
    }
    .nav-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        border: 1px solid #039639;
        background-color: #ffffff;
        margin-right: 10px;
        margin-left: 10px;
        margin-top:25px;
        cursor: pointer;
        transition: background-color 0.3s;
        padding: 0;
        box-sizing: border-box;
        line-height: 1;
        font-size: 0;
    }
    #upcycle .upcycle-wrap .text-area .detail-btn {
        padding-top: 30px;
    }
}