/* ===================================================================
   診断機能のスタイル
   ================================================================ */

/* ===================================================================
   モーダル基本
   ================================================================ */
.diagnostic-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.diagnostic-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.diagnostic-modal-content {
    position: relative;
    background-color: #fff;
    border-radius: 12px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 60px 40px 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.diagnostic-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 32px;
    color: #666;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.diagnostic-close-btn:hover {
    color: #222;
}

/* ===================================================================
   ステップ表示
   ================================================================ */
.diagnostic-step {
    text-align: center;
    font-size: 14px;
    color: #999;
    margin-bottom: 10px;
    font-weight: 500;
}

/* ===================================================================
   タイトル
   ================================================================ */
.diagnostic-title {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    color: #222;
    margin-bottom: 40px;
}

/* ===================================================================
   質問セクション
   ================================================================ */
.diagnostic-question {
    margin-bottom: 40px;
}

.diagnostic-question:last-of-type {
    margin-bottom: 50px;
}

.diagnostic-question-label {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.diagnostic-multiple-hint {
    font-size: 14px;
    font-weight: 400;
    color: #999;
    margin-left: 8px;
}

/* ===================================================================
   選択肢グリッド
   ================================================================ */
.diagnostic-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* ===================================================================
   選択肢カード
   ================================================================ */
.diagnostic-option {
    background: #fff;
    border: 2px solid #e0e0e0;
    padding: 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.diagnostic-option:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #2d5f4f;
}

.diagnostic-option.selected {
    background-color: #2d5f4f;
    color: #fff;
    border-color: #2d5f4f;
}

/* ===================================================================
   ナビゲーションボタン
   ================================================================ */
.diagnostic-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    gap: 20px;
}

.diagnostic-btn {
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    min-width: 140px;
}

.diagnostic-btn-primary {
    background-color: #2d5f4f;
    color: #fff;
}

.diagnostic-btn-primary:hover {
    opacity: 0.85;
}

.diagnostic-btn-secondary {
    background-color: #fff;
    color: #333;
    border: 2px solid #e0e0e0;
}

.diagnostic-btn-secondary:hover {
    border-color: #2d5f4f;
    color: #2d5f4f;
}

/* ===================================================================
   結果画面
   ================================================================ */
.diagnostic-result {
    padding: 20px 0;
}

.diagnostic-result-title {
    text-align: center;
    font-size: 28px;
    font-weight: 600;
    color: #222;
    margin-bottom: 40px;
}

.diagnostic-no-result {
    text-align: center;
    font-size: 16px;
    line-height: 1.8;
    color: #666;
    padding: 60px 20px;
}

/* ===================================================================
   商品グリッド
   ================================================================ */
.diagnostic-result-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

/* ===================================================================
   商品カード
   ================================================================ */
.diagnostic-product-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.diagnostic-product-image {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 16px;
    background-color: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.diagnostic-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.diagnostic-product-name {
    font-size: 16px;
    font-weight: 600;
    color: #222;
    margin-bottom: 8px;
    line-height: 1.4;
}

.diagnostic-product-price {
    font-size: 18px;
    font-weight: 700;
    color: #2d5f4f;
    margin-bottom: 12px;
}

.diagnostic-product-description {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 12px;
    flex-grow: 1;
}

.diagnostic-product-match {
    font-size: 13px;
    color: #999;
    margin-bottom: 16px;
    font-style: italic;
}

.diagnostic-product-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.diagnostic-product-btn {
    padding: 12px 20px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
}

.diagnostic-cart-btn {
    background-color: #2d5f4f;
    color: #fff;
}

.diagnostic-cart-btn:hover {
    opacity: 0.85;
}

.diagnostic-detail-btn {
    background-color: #fff;
    color: #2d5f4f;
    border: 2px solid #2d5f4f;
}

.diagnostic-detail-btn:hover {
    background-color: #2d5f4f;
    color: #fff;
}

/* ===================================================================
   結果ナビゲーション
   ================================================================ */
.diagnostic-result-navigation {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

/* ===================================================================
   レスポンシブ: SP
   ================================================================ */
@media (max-width: 768px) {
    .diagnostic-modal-content {
        width: 95%;
        padding: 50px 20px 30px;
        max-height: 95vh;
    }
    
    .diagnostic-close-btn {
        top: 10px;
        right: 10px;
        font-size: 28px;
    }
    
    .diagnostic-title {
        font-size: 20px;
        margin-bottom: 30px;
    }
    
    .diagnostic-question {
        margin-bottom: 30px;
    }
    
    .diagnostic-question-label {
        font-size: 16px;
        margin-bottom: 16px;
    }
    
    .diagnostic-options-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .diagnostic-option {
        padding: 16px 12px;
        font-size: 14px;
    }
    
    .diagnostic-navigation {
        flex-direction: column-reverse;
        gap: 12px;
        margin-top: 30px;
    }
    
    .diagnostic-btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 15px;
    }
    
    .diagnostic-result-title {
        font-size: 22px;
        margin-bottom: 30px;
    }
    
    .diagnostic-result-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 40px;
    }
    
    .diagnostic-product-card {
        padding: 16px;
    }
    
    .diagnostic-product-name {
        font-size: 15px;
    }
    
    .diagnostic-product-price {
        font-size: 16px;
    }
    
    .diagnostic-product-description {
        font-size: 13px;
    }
    
    .diagnostic-result-navigation {
        flex-direction: column;
        gap: 12px;
    }
    
    .diagnostic-result-navigation .diagnostic-btn {
        width: 100%;
    }
}
