/* =============================================
   Product Link Plugin — Rinker風レイアウト
   ============================================= */

.product-link-box {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 16px;
    margin: 1.5em 0;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* 画像エリア */
.product-link-image {
    flex: 0 0 120px;
    width: 120px;
    text-align: center;
}

.product-link-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    object-fit: contain;
}

/* 商品情報エリア */
.product-link-info {
    flex: 1 1 auto;
    min-width: 0;
}

.product-link-name {
    font-size: 0.95em;
    font-weight: bold;
    line-height: 1.5;
    margin: 0 0 6px;
    color: #333;
    /* 長い商品名は3行で省略 */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-link-price {
    font-size: 0.9em;
    color: #c0392b;
    font-weight: bold;
    margin: 0 0 12px;
}

/* ボタン群 */
.product-link-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.product-link-btn {
    display: inline-block;
    padding: 9px 18px;
    border-radius: 4px;
    font-size: 0.875em;
    font-weight: bold;
    text-decoration: none !important;
    text-align: center;
    transition: opacity 0.15s ease, transform 0.1s ease;
    white-space: nowrap;
}

.product-link-btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

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

/* 楽天ボタン（赤） */
.product-link-btn--rakuten {
    background-color: #bf0000;
    color: #fff !important;
    border: none;
}

/* Amazonボタン（オレンジ） */
.product-link-btn--amazon {
    background-color: #ff9900;
    color: #111 !important;
    border: none;
}

/* エラー表示 */
.product-link-error {
    color: #c0392b;
    font-size: 0.875em;
    padding: 8px 12px;
    background: #fdf2f2;
    border-left: 4px solid #c0392b;
    border-radius: 0 4px 4px 0;
    margin: 1em 0;
}

/* ==================== レスポンシブ ==================== */
@media (max-width: 480px) {
    .product-link-box {
        flex-direction: column;
        align-items: center;
    }

    .product-link-image {
        flex: 0 0 auto;
        width: 140px;
    }

    .product-link-info {
        width: 100%;
    }

    .product-link-name {
        -webkit-line-clamp: unset;
    }

    .product-link-buttons {
        justify-content: center;
    }

    .product-link-btn {
        flex: 1 1 140px;
    }
}
