/* LinkShare Products Styling (Responsive Flexbox Layout with Fixed Image Width) */
.linkshare-products-wrapper {
    margin-bottom: 20px;
}

.linkshare-products-heading {
    font-size: 1.3em; /* 少し小さく */
    margin-bottom: 10px;
}

.linkshare-products-heading a {
    font-size: 0.7em;
    margin-left: 5px;
}

.linkshare-products-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-item {
    display: flex;
    flex-direction: column; /* デフォルトは縦並び */
    border: 1px solid #ccc;
    padding: 15px;
    margin-bottom: 15px;
}

.product-image-container {
    width: 300px; /* スマートフォン表示でも固定幅 */
    margin-right: 0;
    margin-bottom: 10px;
    flex-shrink: 0;
    overflow: hidden; /* 画像がはみ出さないように */
}

.product-image {
    width: 100%; /* コンテナに合わせて縮小・拡大 */
    height: auto;
    display: block;
}

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

.product-title {
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 1em; /* 少し小さく */
}

.product-title a {
    text-decoration: underline;
    color: #333;
}

.product-title a:hover {
    color: #007bff;
}

.merchant-name,
.product-description {
    font-size: 0.8em; /* さらに小さく */
    color: #555;
    margin-bottom: 5px;
}

.product-details-button {
    display: inline-block;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.9em;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

.product-details-button:hover {
    background-color: #0056b3;
    color: white;
    text-decoration: none;
}

/* 768px以上の画面幅の場合に横並びにする */
@media screen and (min-width: 768px) {
    .product-item {
        flex-direction: row; /* 横並び */
    }

    .product-image-container {
        width: 300px; /* タブレット以上でも固定幅 */
        margin-right: 15px;
        margin-bottom: 0;
        overflow: hidden; /* 画像がはみ出さないように */
    }

    .product-title {
        font-size: 1.1em; /* 通常のサイズに戻す */
    }

    .merchant-name,
    .product-description {
        font-size: 0.9em; /* 通常のサイズに戻す */
    }
}