.ec-reviewList {
    max-width: 1000px;
    margin: 0 auto;
}

.ec-reviewBox {
    position: relative;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.ec-reviewHeader {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    padding-right: 0; /* 右側のパディングを削除 */
}

.ec-reviewProduct {
    display: flex;
    gap: 1.5rem;
    flex: 1;
    max-width: 70%;
}

.ec-reviewProduct__image {
    width: 120px;
    height: 120px;
    border-radius: 4px;
    overflow: hidden;
}

.ec-reviewProduct__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ec-reviewProduct__image:hover img {
    transform: scale(1.05);
}

.ec-reviewProduct__info {
    flex: 1;
    margin-bottom: 1rem;
}

.ec-reviewProduct__name {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.ec-reviewProduct__link {
    color: #2963AB;
    text-decoration: none;
    font-weight: bold;
}

.ec-reviewProduct__link:hover {
    text-decoration: underline;
}

.ec-reviewInfo {
    text-align: right;
    min-width: 200px;
    margin-left: auto;
    position: relative; /* 追加：ボタンの位置決めの基準点 */
    padding-bottom: 50px; /* 追加：ボタン用のスペース確保 */
}

.ec-reviewDate {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.ec-reviewRating {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.ec-reviewRating__stars {
    display: flex;
    gap: 2px;
}

.ec-reviewRating .ec-icon {
    color: #ddd;
    font-size: 1.2rem;
}

.ec-reviewRating .ec-icon.active {
    color: #FFD700;
}

.ec-reviewComment {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
}

.ec-reviewComment__label {
    display: block;
    color: #666;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.ec-reviewComment__text {
    margin: 0;
    line-height: 1.6;
    color: #333;
}

.ec-pagerRole {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.ec-reviewTitle {
    margin: 0.5rem 0;
}

.ec-reviewTitle__label {
    color: #666;
    font-size: 0.9rem;
}

.ec-reviewTitle__text {
    font-weight: 600;
    color: #333;
    margin-left: 0.5rem;
}

.ec-pageHeader {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #f8f9fa;
}

.ec-pageHeader__title {
    color: #525263;
    font-size: 24px;
    margin: 0 0 0.5rem;
}

.ec-pageHeader__subtitle {
    color: #666;
    margin: 0;
}

.ec-reviewToggle {
    cursor: pointer;
    position: relative;
    padding: 1rem;
    margin-bottom: 0;
    border-radius: 4px;
}

.ec-reviewToggle::after {
    content: '詳細を表示';
    position: absolute;
    right: 0; /* 変更：右寄せに */
    bottom: 0; /* 変更：評価の下に配置 */
    transform: none; /* 変更：transform を削除 */
    background: #2963AB;
    color: #fff;
    padding: 8px 24px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    z-index: 1; /* ボタンを最前面に */
    min-width: 110px; /* ボタンの最小幅を設定 */
    text-align: center; /* テキストを中央揃え */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ec-reviewToggle.active::after {
    content: '閉じる';
    background: #666;
}

.ec-reviewToggle:hover {
    background: #f0f0f0;
}

.ec-reviewToggle:hover::after {
    background: #1e4c8a;
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
}

.ec-reviewDetail {
    display: none;
    margin-top: 1rem;
    padding-top: 1rem;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    border-top: 1px solid #eee;
    padding: 1rem;
}

/* 商品レビュー用スタイル */
.ec-productReviews {
    margin: 3rem 0;
    padding: 1.5rem;
    background: #f8f8f8;
    border-radius: 5px;
}

.ec-productReviews__average {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.ec-productReviews__averageScore {
    font-size: 1.8rem;
    font-weight: bold;
    margin-right: 0.8rem;
}

.ec-productReviews__stars {
    color: #FFD700;
    font-size: 1.2rem;
    margin-right: 0.8rem;
}

.ec-productReviews__list {
    margin-top: 1.5rem;
}

.ec-productReview {
    padding: 1.2rem;
    margin-bottom: 1rem;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.ec-productReview__header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
}

.ec-productReview__name {
    font-weight: bold;
}

.ec-productReview__date {
    color: #888;
    font-size: 0.9rem;
}

.ec-productReview__rating {
    color: #FFD700;
    margin-bottom: 0.8rem;
}

.ec-productReview__title {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
}

.ec-productReview__comment {
    line-height: 1.6;
}

.ec-productReviews__write {
    margin-top: 2rem;
    text-align: center;
}

.ec-productReviews__empty {
    text-align: center;
    color: #888;
    padding: 2rem;
}

@media screen and (max-width: 768px) {
    .ec-reviewHeader {
        flex-direction: column;
    }

    .ec-reviewProduct {
        flex-direction: column;
        align-items: center;
        text-align: center;
        max-width: 100%;
    }

    .ec-reviewInfo {
        text-align: center;
        width: 100%;
        margin-left: 0;
        text-align: left;
        padding-bottom: 0; /* パディングを削除 */
    }

    .ec-reviewRating {
        justify-content: flex-start;
    }

    .ec-reviewToggle {
        padding: 1rem;
        position: relative;
    }
    
    .ec-reviewToggle::after {
        position: absolute;
        left: 50%; /* 中央配置のため追加 */
        right: auto; /* 右寄せを解除 */
        bottom: -20px; /* ボタンの位置を下に */
        transform: translateX(-50%); /* 中央揃えのため追加 */
        padding: 6px 20px;
        font-size: 12px; /* モバイル時のフォントサイズを調整 */
        min-width: 90px; /* モバイル時のボタン幅を調整 */
        white-space: nowrap; /* テキストの折り返しを防止 */
    }

    .ec-reviewDetail {
        margin-top: 40px; /* ボタンとの間隔を確保 */
    }

    .ec-reviewBox {
        padding-bottom: 2.5rem; /* ボタン用のスペースを確保 */
        margin-bottom: 2rem; /* ボックス間の間隔を調整 */
    }

    .ec-reviewTitle {
        text-align: center;
        margin: 0.75rem 0;
    }
}