/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #fff;
    color: #333;
    line-height: 1.5;
    padding: 0 10px;
}

#no-data-tip {
    display: none;
    padding: 20px;
    font-weight: bold;
    justify-content: center;
}

/* Banner区域 */
#banner {
    background-image: url('./robo-adv-900x387.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 58px 20px;
    text-align: center;
    border-radius: 10px;
    margin: 10px 0;
}

#banner h1 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 15px;
}

#banner p {
    font-size: 1rem;
    margin-bottom: 25px;
}

#banner .cta-btn {
    padding: 12px 20px;
    background-color: #2980b9;
    color: white;
    font-size: 1rem;
    border: none;
    border-radius: 30px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

#banner .cta-btn:hover {
    background-color: #3498db;
}

/* 热门推荐区域 */
#recommended-products {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 15px;
}

#recommended-products h2 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
    color: #2c3e50;
}

.recommended-grid {
    display: flex;
    gap: 10px;
    justify-content: start;
    overflow-x: auto;
    padding-bottom: 15px;
}
.recommended-card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    /* width: 250px; */
    /* height: 350px; */
    padding: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
   
}

.recommended-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.recommended-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    line-height: 1.4;
}

.recommended-card p {
    font-size: 0.9rem;
    color: #7f8c8d;
    /* margin-bottom: 15px;
    line-height: 1.5; */
}

.recommended-card .rate {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e67e22;
}

.recommended-card .risk {
    font-size: 0.9rem;
    font-weight: 500;
    color: #16a085;
    margin-top: 10px;
}

.recommended-card-item{
    width: 150px;
    height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.recommended-card-item h3 {
    font-size: 1rem;
}
.recommended-card-item p {
    font-size: 0.8rem;
}
.recommended-card-item > p:first-of-type {
  height: 60px;
}
.recommended-card-item .rate {
    font-size: .9rem;
}
/* 风险类别筛选按钮 */
#category-filter-buttons {
    max-width: 1200px;
    margin: 20px 0 10px;
    text-align: center;
}

.category-buttons {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.category-btn {
    padding: 8px 28px;
    font-size: .8rem;
    font-weight: 500;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.category-btn:hover {
    background-color: #3498db;
    color: white;
}

.low {
    background-color: #2ecc71;
    color: white;
}

.medium {
    background-color: #f39c12;
    color: white;
}

.high {
    background-color: #e74c3c;
    color: white;
}
.search-bar{
    width: 100%;
    box-sizing: border-box;
    padding: 10px 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    margin-bottom: 18px;
}
.search-bar:focus{
    outline: none;   /* 移除聚焦时的轮廓 */
  border: 1px solid #ccc; /* 或者你可以指定一个固定的边框颜色 */
}
/* 产品列表区域 */
#all-products {
    max-width: 1200px;
    margin: 0 auto 0 auto;
}

#all-products h2 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.product-item {
    position: relative;
    background-color: white;
    padding: 12px 12px 30px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    justify-content: space-between;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.product-item h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.product-item .rate , #product-info .rate{
    font-size: .8rem;
    font-weight: 500;
    color: #e67e22;
    margin-bottom: 8px;
}

.product-item .risk , #product-info .risk {
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-bottom: 10px;
}

.product-item .expected-return , #product-info .expected-return{
    font-size: .9rem;
    color: #27ae60;
    font-weight: 600;
}

.mini-chart {
    width: 120px !important;
    height: 120px !important;
    margin-top: 10px;
    background-color: #fff;
    /* border-radius: 5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); */
    position: relative;
}
.mini-chart-tip{
    position: absolute;
    bottom: 8px;
    color: #ccc;
    font-size: 13px;
}
/* 产品详情页面 */
.product-detail-container {
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); */
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.product-detail-container .back-btn {
    background-color: #e74c3c;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    margin-bottom: 20px;
}

.product-detail-container .back-btn:hover {
    background-color: #c0392b;
}

.chart {
    max-width: 100%;
    height: 300px;
    margin-top: 30px;
}