/* ===== Affiliate Auto Post — フロントエンド記事スタイル ===== */

/* 商品情報テーブル */
.aap-product-info {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 14px;
}

.aap-product-info th,
.aap-product-info td {
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    text-align: left;
    vertical-align: top;
    line-height: 1.6;
}

.aap-product-info th {
    background: #f7f7f7;
    font-weight: 600;
    width: 120px;
    white-space: nowrap;
    color: #444;
}

/* サンプルギャラリー */
.aap-sample-gallery {
    margin: 2em 0;
}

.aap-sample-gallery h3 {
    font-size: 16px;
    margin-bottom: .75em;
    color: #333;
}

.aap-sample-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}

.aap-sample figure {
    margin: 0;
    overflow: hidden;
    border-radius: 4px;
    background: #f0f0f0;
    aspect-ratio: 16 / 9;
}

.aap-sample img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}

.aap-sample img:hover {
    transform: scale(1.04);
}

/* CTAボックス */
.aap-cta-box {
    text-align: center;
    margin: 2.5em 0 1.5em;
}

.aap-btn {
    display: inline-block;
    padding: 14px 36px;
    background: #e60033;
    color: #fff !important;
    font-size: 16px;
    font-weight: 700;
    border-radius: 4px;
    text-decoration: none !important;
    letter-spacing: .04em;
    transition: background .2s, transform .2s;
    box-shadow: 0 3px 8px rgba(230, 0, 51, .3);
}

.aap-btn:hover {
    background: #c0002b;
    transform: translateY(-1px);
    box-shadow: 0 5px 12px rgba(230, 0, 51, .35);
}

/* レスポンシブ */
@media (max-width: 480px) {
    .aap-sample-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .aap-product-info th { width: 90px; }
}

/* ===== 月間ランキング記事スタイル ===== */

.aap-ranking-list {
    margin: 2em 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.aap-rank-item {
    display: grid;
    grid-template-columns: 56px 160px 1fr;
    gap: 16px;
    align-items: center;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,.05);
    transition: box-shadow .2s;
}

.aap-rank-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

/* TOP3は強調 */
.aap-rank-item--1 { border-left: 4px solid #f5c518; }
.aap-rank-item--2 { border-left: 4px solid #a8a9ad; }
.aap-rank-item--3 { border-left: 4px solid #cd7f32; }

.aap-rank-no {
    font-size: 28px;
    text-align: center;
    font-weight: 900;
    line-height: 1;
}

.aap-rank-thumb img.aap-rank-img {
    width: 160px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.aap-rank-title {
    font-size: 15px;
    margin: 0 0 8px;
    line-height: 1.5;
}
.aap-rank-title a {
    color: #1a1a1a;
    text-decoration: none;
}
.aap-rank-title a:hover { text-decoration: underline; }

.aap-rank-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    font-size: 13px;
    color: #555;
}

.aap-rank-clicks { font-weight: 600; }

.aap-btn--small {
    display: inline-block;
    padding: 7px 18px;
    background: #e60033;
    color: #fff !important;
    font-size: 13px;
    font-weight: 700;
    border-radius: 4px;
    text-decoration: none !important;
    transition: background .2s;
}
.aap-btn--small:hover { background: #c0002b; }

.aap-ranking-footer {
    font-size: 12px;
    color: #888;
    margin-top: 2em;
    padding-top: 1em;
    border-top: 1px solid #eee;
}

/* フィルタ有効バッジ */
.aap-filter-active { color: #00a32a !important; }

@media (max-width: 600px) {
    .aap-rank-item {
        grid-template-columns: 44px 1fr;
        grid-template-rows: auto auto;
    }
    .aap-rank-thumb { display: none; }
}
