/* カスタムHTMLテキストのスタイル */
.akp-custom-html {
    position: absolute;
    top: 8px;
    left: 38px; /* PRバッジとの間隔を狭く */
    background-color: #fff;
    color: #333;
    font-size: 12px;
    font-weight: normal;
    padding: 2px 6px;
    border-radius: 3px;
    z-index: 10;
    max-width: calc(100% - 46px); /* 左右の余白を確保 */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.akp-custom-html a {
    color: #0066c0;
    text-decoration: none;
}

.akp-custom-html a:hover {
    color: #c45500;
    text-decoration: underline;
}

/* タブレットサイズ対応 */
@media (max-width: 1024px) {
    .akp-custom-html {
        font-size: 11px;
        padding: 2px 5px;
    }
}

/* スマホサイズ対応 - 文字を小さくする */
@media (max-width: 768px) {
    .akp-custom-html {
        font-size: 10px;
        padding: 2px 5px;
        top: 10px;
        left: 45px;
        max-width: calc(100% - 55px);
    }
}

/* 小さいスマホサイズ対応 - さらに文字を小さく */
@media (max-width: 480px) {
    .akp-custom-html {
        font-size: 9px;
        padding: 2px 4px;
        /* 小さいスマホでは縦並びにする場合 */
        position: relative;
        top: auto;
        left: auto;
        margin-top: 32px; /* PRバッジの下に配置 */
        margin-left: 10px;
        margin-right: 10px;
        max-width: calc(100% - 20px);
    }
}

/* 超小型スマホ (320px以下) */
@media (max-width: 320px) {
    .akp-custom-html {
        font-size: 8px;
        padding: 1px 3px;
    }
}

/* その他の既存スタイルは省略 (元のstyle.cssの内容をそのまま保持) */
/* ここに元のstyle.cssの内容を全てコピーしてください */

/* Amazon商品表示の基本スタイル */
.amazon-products {
    margin-top: 20px;
    margin-bottom: 20px;
}

.akp-product {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

/* PRバッジのスタイル */
.akp-pr-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background-color: #fff;
    color: #9e9e9e;
    font-size: 12px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 3px;
    z-index: 10;
    letter-spacing: 0.5px;
}

.akp-pr-badge a {
    color: #9e9e9e;
    text-decoration: none;
}

.akp-pr-badge a:hover {
    color: #757575;
    text-decoration: underline;
}

.akp-image {
    flex-shrink: 0;
    margin-right: 15px;
    padding-top: 60px;
}

.akp-image img {
    width: 120px;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    max-width: 120px;
}

.akp-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.akp-title {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 10px;
    padding-top: 30px;
}

.akp-title a {
    color: #232f3e;
    text-decoration: none;
}

.akp-title a:hover {
    text-decoration: underline;
}

.akp-release-date {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.akp-release-date span {
    font-weight: bold;
    color: #232f3e;
}

.akp-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.akp-btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 13px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid;
    min-width: 100px;
}

.akp-btn-external {
    color: #fff;
}

.akp-btn-external:hover {
    opacity: 0.85;
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Container Queries対応 */
.amazon-products {
    container-type: inline-size;
}

@container (max-width: 400px) {
    .akp-product {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 12px;
    }
    
    .akp-image {
        align-self: center;
        margin-right: 0;
        margin-bottom: 10px;
        padding-top: 0;
    }
    
    .akp-image img {
        width: 120px;
        max-width: 120px;
    }
    
    .akp-info {
        text-align: left;
    }
    
    .akp-title {
        text-align: center;
        font-size: 14px;
        line-height: 1.4;
        margin-bottom: 15px;
        padding-top: 0;
    }
    
    .akp-release-date {
        text-align: center;
        margin-bottom: 15px;
        font-size: 13px;
    }
    
    .akp-buttons {
        flex-direction: column;
        gap: 6px;
        margin-top: 15px;
    }
    
    .akp-btn {
        width: 100%;
        padding: 8px 14px;
        font-size: 13px;
        min-width: auto;
    }
}

/* スマホサイズ対応 */
@media (max-width: 768px) {
    .akp-product {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
        text-align: center;
    }
    
    .akp-image {
        align-self: center;
        margin-right: 0;
        margin-bottom: 10px;
        padding-top: 0;
    }
    
    .akp-image img {
        width: 150px;
        max-width: 150px;
    }
    
    .akp-info {
        text-align: left;
    }
    
    .akp-title {
        font-size: 15px;
        line-height: 1.4;
        text-align: center;
        margin-bottom: 15px;
        padding-top: 0;
    }
    
    .akp-release-date {
        text-align: center;
        margin-bottom: 20px;
    }
    
    .akp-buttons {
        flex-direction: column;
        gap: 8px;
        margin-top: 20px;
    }
    
    .akp-btn {
        width: 100%;
        padding: 10px 16px;
        font-size: 14px;
        min-width: auto;
    }
    
    .akp-pr-badge {
        top: 10px;
        left: 10px;
        font-size: 11px;
        padding: 3px 7px;
    }
}

/* 小さいスマホサイズ対応 */
@media (max-width: 480px) {
    .amazon-products {
        margin-top: 15px;
        margin-bottom: 15px;
    }
    
    .akp-product {
        padding: 12px;
        gap: 12px;
        margin-bottom: 15px;
    }
    
    .akp-image img {
        width: 120px;
        max-width: 120px;
    }
    
    .akp-title {
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    .akp-release-date {
        font-size: 13px;
        margin-bottom: 15px;
    }
    
    .akp-btn {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .akp-buttons {
        gap: 6px;
        margin-top: 15px;
    }
}