/* --- Product Tab Styles --- */
.product-tabs-container {
    margin-top: 20px;
}

.product-tab-buttons {
    display: flex;
    justify-content: space-around; /* 中央揃え・均等配置 */
    border-bottom: 2px solid #eee;
}

.product-tab-button {
    padding: 10px 15px;
    cursor: pointer;
    background: none;
    border: none;
    font-weight: bold;
    color: #777;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px; /* Align with the container's border */
    transition: all 0.3s ease;
}

.product-tab-button.active {
    background-color: #8d6e63; /* 背景をテーマカラーに */
    color: #fff; /* 文字色を白に */
    border-bottom-color: #8d6e63; /* 下線も同色に */
    border-radius: 5px 5px 0 0; /* 少し角を丸める */
}

.product-tab-button:hover:not(.active) {
    color: #333;
}

.product-tab-content-panels {
    padding-top: 20px;
    border: none; /* Override main tab panel border */
}

.product-tab-panel {
    display: none;
}

.product-tab-panel.active {
    display: block;
}

/* --- Product Recommendation Styles --- */
.product-recommendation {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    background-color: #fafafa;
    margin-bottom: 15px; /* Add space between cards */
}

.product-header {
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.product-image-container {
    flex-shrink: 0;
    text-align: center;
}

.product-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.product-info {
    flex-grow: 1;
}

.product-name {
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0 0 5px 0;
}

.product-price {
    font-size: 1rem;
    color: #333;
    margin: 0 0 10px 0;
}

.product-url {
    display: inline-block;
    padding: 8px 15px;
    background-color: #8d6e63;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.product-url:hover {
    background-color: #a1887f;
}

.product-recommendation-grade {
    text-align: center;
    margin-top: 5px; /* Space between image and grade */
}

.product-recommendation-grade span {
    font-size: 0.8rem;
    color: #666;
}

.grade-badge {
    font-size: 2rem;
    font-weight: bold;
    color: #8d6e63;
    line-height: 1;
}

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

.product-stat-bar-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-stat-bar-container label {
    flex-basis: 140px; /* Fixed width for labels */
    flex-shrink: 0;
    font-size: 0.85rem;
    text-align: right;
    color: #555;
}

.product-stat-bar-container .progress-bar {
    flex-grow: 1; /* 幅を自動で埋めるように追加 */
    height: 22px;
    background-color: #f5f0e9;
    position: relative;
}

.product-stat-bar-container .progress-bar-fill {
    background-color: #a1887f;
    height: 100%;
    border-radius: 11px;
}

.product-stat-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #333;
    font-size: 0.8rem;
    font-weight: bold;
}

@media (max-width: 480px) {
    .product-header {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    .product-info {
        text-align: center;
    }
}
