/**
 * WPAP Replacer - アフィリエイトカードスタイル
 */

/* カードコンテナ */
.wpap-replacer-card {
    display: block;
    max-width: 600px;
    margin: 20px auto;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.wpap-replacer-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* リンクスタイルのリセット */
.wpap-replacer-card a {
    display: flex;
    text-decoration: none;
    color: inherit;
}

@media (max-width: 480px) {
    .wpap-replacer-card a {
        flex-direction: column;
    }
}

/* 画像エリア */
.wpap-card-image {
    flex: 0 0 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: 15px;
    border-right: 1px solid #f0f0f0;
}

@media (max-width: 480px) {
    .wpap-card-image {
        flex: none;
        border-right: none;
        border-bottom: 1px solid #f0f0f0;
        padding: 20px;
    }
}

.wpap-card-image img {
    max-width: 150px;
    max-height: 150px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.wpap-replacer-card:hover .wpap-card-image img {
    transform: scale(1.05);
}

.wpap-card-no-image {
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    color: #999;
    font-size: 14px;
    border-radius: 8px;
}

/* コンテンツエリア */
.wpap-card-content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* タイトル */
.wpap-card-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wpap-replacer-card:hover .wpap-card-title {
    color: #ff9900;
}

/* 価格 */
.wpap-card-price {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 700;
    color: #b12704;
}

/* 在庫状況 */
.wpap-card-availability {
    margin: 0 0 12px 0;
    font-size: 13px;
    color: #007600;
}

/* エラーメッセージ */
.wpap-card-error-message {
    margin: 0 0 12px 0;
    font-size: 13px;
    color: #d32f2f;
}

/* エラーカードスタイル */
.wpap-replacer-card.wpap-card-error {
    border-color: #ffcdd2;
    background: linear-gradient(145deg, #fff 0%, #fff5f5 100%);
}

/* ボタン */
.wpap-card-button {
    display: inline-block;
    margin-top: auto;
    padding: 10px 24px;
    background: linear-gradient(180deg, #f7dfa5 0%, #f0c14b 100%);
    border: 1px solid #a88734;
    border-radius: 4px;
    color: #111;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    align-self: flex-start;
}

.wpap-card-button:hover {
    background: linear-gradient(180deg, #f5d78e 0%, #eeb933 100%);
}

/* Amazonロゴ風のアクセント */
.wpap-card-button::after {
    content: ' →';
    font-size: 12px;
}

/* 管理画面でのプレビュー用 */
.wp-admin .wpap-replacer-card {
    max-width: 100%;
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
    .wpap-replacer-card {
        background: linear-gradient(145deg, #2d2d2d 0%, #242424 100%);
        border-color: #444;
    }
    
    .wpap-card-image {
        background: #333;
        border-color: #444;
    }
    
    .wpap-card-title {
        color: #e0e0e0;
    }
    
    .wpap-card-no-image {
        background: #444;
        color: #888;
    }
}
