/* ========================================
   楽天商品カード - スタイルシート
   ======================================== */

/* カルーセル全体のコンテナ */
.rakuten-diagnosis-carousel-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 20px auto;
    padding: 0;
    box-sizing: border-box;
    overflow: visible;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* カルーセルのスライド部分 */
.rakuten-diagnosis-carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.rakuten-diagnosis-carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.rakuten-diagnosis-carousel-item {
    flex: 0 0 100%;
    width: 100%;
    box-sizing: border-box;
}

/* 商品カード本体 */
.rakuten-diagnosis-product-card {
    display: flex;
    border: none;
    border-radius: 0;
    overflow: hidden;
    margin: 0 auto;
    background: #fff;
    box-shadow: none;
    transition: all 0.3s ease;
    max-width: 600px;
    width: 100%;
    box-sizing: border-box;
}

.rakuten-diagnosis-product-card:hover {
    box-shadow: none;
    transform: none;
}

/* 商品画像エリア */
.rakuten-diagnosis-card-image {
    width: 150px;
    min-width: 150px;
    height: 150px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f8f8;
    position: relative;
    padding: 10px;
    box-sizing: border-box;
}

.rakuten-diagnosis-card-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.rakuten-diagnosis-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.rakuten-diagnosis-card-image:hover img {
    transform: scale(1.05);
}

.rakuten-diagnosis-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #999;
    font-size: 14px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

/* 商品情報エリア */
.rakuten-diagnosis-card-content {
    flex: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.rakuten-diagnosis-card-title {
    font-size: 13px !important;
    font-weight: 700 !important;
    margin: 0 0 8px 0 !important;
    line-height: 1.4 !important;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    padding: 0 !important;
    border: none !important;
    background: none !important;
}

.rakuten-diagnosis-card-title a {
    color: #333 !important;
    text-decoration: none !important;
    transition: color 0.3s ease;
    font-size: inherit !important;
    font-weight: inherit !important;
}

.rakuten-diagnosis-card-title a:hover {
    color: #bf0000 !important;
}

.rakuten-diagnosis-card-description {
    font-size: 12px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rakuten-diagnosis-card-shop {
    font-size: 11px;
    color: #888;
    margin-bottom: 8px;
}

.rakuten-diagnosis-card-price {
    font-size: 20px;
    font-weight: bold;
    color: #bf0000;
    margin-bottom: 12px;
    text-shadow: 0 1px 2px rgba(191, 0, 0, 0.1);
}

/* ボタンエリア */
.rakuten-diagnosis-card-buttons {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.rakuten-diagnosis-card-button {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.rakuten-diagnosis-button-primary {
    background: linear-gradient(135deg, #bf0000 0%, #a00000 100%);
    color: white;
}

.rakuten-diagnosis-button-primary:hover {
    background: linear-gradient(135deg, #a00000 0%, #8b0000 100%);
    color: white;
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(191, 0, 0, 0.3);
    transform: translateY(-2px);
}

.rakuten-diagnosis-button-secondary {
    background: linear-gradient(135deg, #FF9900 0%, #e68a00 100%);
    color: white;
}

.rakuten-diagnosis-button-secondary:hover {
    background: linear-gradient(135deg, #e68a00 0%, #cc7a00 100%);
    color: white;
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(255, 153, 0, 0.3);
    transform: translateY(-2px);
}

/* カルーセルナビゲーション */
.rakuten-diagnosis-carousel-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 0;
    padding: 15px 10px;
    background: #f8f8f8;
    border-radius: 0;
    border-top: 1px solid #e0e0e0;
}

.rakuten-diagnosis-carousel-button {
    background: #bf0000;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}

.rakuten-diagnosis-carousel-button:hover {
    background: #a00000;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(191, 0, 0, 0.3);
}

/* カウンター */
.rakuten-diagnosis-carousel-counter {
    font-size: 14px;
    color: #666;
    font-weight: bold;
    min-width: 60px;
    text-align: center;
}

/* ドット */
.rakuten-diagnosis-carousel-dots {
    display: flex;
    gap: 8px;
    align-items: center;
}

.rakuten-diagnosis-carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.rakuten-diagnosis-carousel-dot.active {
    background: #bf0000;
    transform: scale(1.3);
}

.rakuten-diagnosis-carousel-dot:hover {
    background: #a00000;
}

/* 楽天クレジット */
.rakuten-diagnosis-credit {
    text-align: center;
    padding: 10px;
    margin-top: 0;
    font-size: 11px;
    color: #999;
    background: #fafafa;
    border-radius: 0 0 8px 8px;
    border-top: 1px solid #e0e0e0;
}

.rakuten-diagnosis-credit a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.rakuten-diagnosis-credit a:hover {
    color: #bf0000;
    text-decoration: underline;
}

/* ========================================
   レスポンシブ対応
   ======================================== */

/* タブレット */
@media screen and (max-width: 768px) {
    .rakuten-diagnosis-carousel-wrapper {
        padding: 0 5px;
    }
    
    .rakuten-diagnosis-product-card {
        max-width: 100%;
    }
}

/* スマートフォン */
@media screen and (max-width: 600px) {
    .rakuten-diagnosis-carousel-wrapper {
        padding: 0;
    }
    
    .rakuten-diagnosis-product-card {
        flex-direction: column;
        max-width: 100%;
    }
    
    .rakuten-diagnosis-card-image {
        width: 100%;
        min-width: 100%;
        height: 200px;
        padding: 15px;
    }
    
    .rakuten-diagnosis-card-content {
        padding: 15px;
    }
    
    .rakuten-diagnosis-card-title {
        font-size: 13px !important;
        -webkit-line-clamp: 2;
        margin-bottom: 10px !important;
    }
    
    .rakuten-diagnosis-card-description {
        font-size: 12px;
        -webkit-line-clamp: 3;
    }
    
    .rakuten-diagnosis-card-buttons {
        flex-direction: column;
    }
    
    /* カルーセルナビゲーションをスマホ用に調整 */
    .rakuten-diagnosis-carousel-nav {
        gap: 10px;
        padding: 12px 8px;
    }
    
    .rakuten-diagnosis-carousel-button {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    
    .rakuten-diagnosis-carousel-counter {
        font-size: 13px;
        min-width: 50px;
    }
    
    .rakuten-diagnosis-carousel-dots {
        gap: 6px;
    }
    
    .rakuten-diagnosis-carousel-dot {
        width: 8px;
        height: 8px;
    }
}

/* 小さいスマートフォン */
@media screen and (max-width: 400px) {
    .rakuten-diagnosis-card-title {
        font-size: 11px !important;
    }
    
    .rakuten-diagnosis-card-price {
        font-size: 18px;
    }
    
    .rakuten-diagnosis-card-button {
        font-size: 11px;
        padding: 8px 12px;
    }
}