/* 商品比較ブロック - メインスタイル */
.product-comparison-block {
    max-width: 1000px;
    margin: 30px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.product-comparison-container {
    padding: 24px;
}

/* ランキングバッジ */
.product-ranking {
    margin-bottom: 12px;
}

.ranking-badge {
    display: inline-block;
    background: linear-gradient(135deg, #F4B942 0%, #E6A935 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(244, 185, 66, 0.3);
}

/* ブランド名 */
.product-brand {
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 500;
}

/* 商品タイトル */
.product-title {
    font-size: 22px;
    font-weight: bold;
    color: #333;
    margin: 0 0 24px 0;
    line-height: 1.4;
}

/* メインコンテンツエリア */
.product-content {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 32px;
    margin-bottom: 24px;
    align-items: start;
}

@media (max-width: 768px) {
    .product-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* 画像セクション */
.product-image-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.product-image {
    width: 100%;
    max-width: 280px;
    height: 220px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #eee;
    background: #fafafa;
    margin-bottom: 16px;
}

.product-image-placeholder {
    width: 100%;
    max-width: 280px;
    height: 220px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    background: #f9f9f9;
    margin-bottom: 16px;
}

.product-view-button {
    text-align: center;
}

.view-product-btn {
    background: #666;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-bottom: 8px;
}

.view-product-btn:hover {
    background: #555;
}

.source-info {
    font-size: 12px;
    color: #888;
}

/* 詳細セクション */
.product-details-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 価格セクション */
.price-section {
    margin-bottom: 4px;
}

.price-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-label::after {
    content: 'ⓘ';
    color: #999;
    font-size: 14px;
}

.price-main {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.price-amount {
    font-size: 28px;
    font-weight: bold;
    color: #d63031;
}

.original-price {
    font-size: 14px;
    color: #666;
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 4px;
}

/* 購入ボタン */
.purchase-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.purchase-btn {
    display: block;
    padding: 16px 20px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.3;
    text-align: center;
    color: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.purchase-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: white;
    text-decoration: none;
}

.purchase-btn:active {
    transform: translateY(0);
}

/* ECサイト別のカラー */
.yahoo-btn {
    background: linear-gradient(135deg, #6001D2 0%, #4A00A0 100%);
    box-shadow: 0 2px 8px rgba(96, 1, 210, 0.3);
}

.yahoo-btn:hover {
    background: linear-gradient(135deg, #5000B8 0%, #3D0088 100%);
}

.rakuten-btn {
    background: linear-gradient(135deg, #BF0000 0%, #A00000 100%);
    box-shadow: 0 2px 8px rgba(191, 0, 0, 0.3);
}

.rakuten-btn:hover {
    background: linear-gradient(135deg, #A50000 0%, #880000 100%);
}

.amazon-btn {
    background: linear-gradient(135deg, #FF9900 0%, #E6850E 100%);
    box-shadow: 0 2px 8px rgba(255, 153, 0, 0.3);
    position: relative;
}

.amazon-btn:hover {
    background: linear-gradient(135deg, #E6850E 0%, #CC7300 100%);
}

.sale-label {
    position: absolute;
    top: -8px;
    right: 8px;
    background: #ff4757;
    color: white;
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: bold;
}

.btn-price {
    font-size: 16px;
    font-weight: bold;
    opacity: 0.9;
}

/* 商品説明 */
.product-description {
    margin: 24px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #F4B942;
}

.product-description h4 {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin: 0 0 12px 0;
}

.product-description p {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    margin: 0;
}

/* 商品仕様 */
.product-specifications {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
}

.spec-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid #eee;
}

.spec-row:last-child {
    border-bottom: none;
}

.spec-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    border-right: 1px solid #eee;
    min-height: 48px;
}

.spec-item:last-child {
    border-right: none;
}

.spec-item-empty {
    display: none;
}

.spec-label {
    background: #f8f9fa;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    border-right: 1px solid #eee;
    display: flex;
    align-items: center;
}

.spec-value {
    padding: 12px;
    font-size: 14px;
    color: #333;
    line-height: 1.4;
    display: flex;
    align-items: center;
}

/* 展開ボタン */
.expand-button {
    text-align: center;
    margin-top: 16px;
}

.expand-btn {
    background: none;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.expand-btn:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .product-comparison-container {
        padding: 16px;
    }
    
    .product-title {
        font-size: 18px;
    }
    
    .price-amount {
        font-size: 24px;
    }
    
    .spec-row {
        grid-template-columns: 1fr;
    }
    
    .spec-item {
        grid-template-columns: 1fr;
        border-right: none;
        border-bottom: 1px solid #eee;
    }
    
    .spec-item:last-child {
        border-bottom: none;
    }
    
    .spec-item-empty {
        display: none;
    }
    
    .spec-label {
        border-right: none;
        border-bottom: 1px solid #eee;
        background: #f0f0f0;
    }
    
    .purchase-buttons {
        gap: 10px;
    }
}

/* エディタ用スタイル */
.product-comparison-block-editor {
    border: 2px dashed #0073aa;
    background: #f0f6fc;
    padding: 20px;
    margin: 10px 0;
    border-radius: 8px;
}

.product-comparison-block-editor::before {
    content: "商品比較ブロック（プレビュー）";
    display: block;
    font-size: 12px;
    color: #0073aa;
    font-weight: bold;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}