/* Yahoo!ショッピング商品検索プラグイン - Bootstrap不使用版 */

/* リセット */
.yahoo-search-container * {
    box-sizing: border-box;
}

.yahoo-search-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    color: #212529;
}

/* 検索フォーム */
.yahoo-search-form {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.yahoo-search-form-input {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 0.75rem;
    align-items: center;
}

.yahoo-form-row {
    display: flex;
}

.yahoo-search-form-input input[type="text"],
.yahoo-search-form-input select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    font-size: 1rem;
    background: white;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.yahoo-search-form-input input[type="text"]:focus,
.yahoo-search-form-input select:focus {
    border-color: #ff0033;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(255, 0, 51, 0.25);
}

.yahoo-search-form-input select {
    cursor: pointer;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=UTF-8,%3csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"%3e%3cpath fill="none" stroke="%23343a40" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2 5l6 6 6-6"/%3e%3c/svg%3e');
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
}

.yahoo-search-form-input button {
    padding: 0.75rem 1.5rem;
    background: #ff0033;
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.yahoo-search-form-input button:hover {
    background: #cc0029;
}

.yahoo-search-form-input button:active {
    background: #990020;
}

/* 検索結果情報 */
.yahoo-search-info {
    background: #fff;
    border-left: 4px solid #ff0033;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border-radius: 0.375rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.yahoo-search-info p {
    margin: 0.25rem 0;
    font-size: 0.95rem;
}

/* 商品リスト */
.yahoo-products-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* 商品カード */
.yahoo-product-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1.25rem;
    display: flex;
    gap: 1.5rem;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.yahoo-product-card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* 左側: 商品画像 */
.yahoo-product-left {
    flex-shrink: 0;
    width: 200px;
}

.yahoo-product-left a {
    display: block;
    text-decoration: none;
}

.yahoo-product-image {
    width: 200px;
    height: 200px;
    object-fit: contain;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    display: block;
}

.yahoo-no-image {
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e9ecef;
    color: #6c757d;
    font-size: 0.875rem;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
}

/* 右側: 商品情報 */
.yahoo-product-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* キャッチコピー */
.yahoo-catchcopy {
    font-size: 0.7rem;
    color: #dc3545;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

/* 商品名 */
.yahoo-name {
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
    font-weight: 700;
}

.yahoo-name a {
    color: #212529;
    text-decoration: none;
    transition: color 0.15s ease-in-out;
}

.yahoo-name a:hover {
    color: #ff0033;
}

/* ショップ名 */
.yahoo-shop {
    font-size: 0.7rem;
    color: #6c757d;
    margin: 0;
}

/* 価格セクション */
.yahoo-details {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.25rem;
}

.yahoo-price-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.yahoo-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: #dc3545;
}

/* バッジ */
.yahoo-badge {
    background: #e9ecef;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    color: #495057;
    font-size: 0.7rem;
    font-weight: 500;
    display: inline-block;
}

/* レビューとポイント */
.yahoo-extra {
    display: flex;
    gap: 0.75rem;
    font-size: 0.8rem;
    align-items: center;
}

.yahoo-review {
    color: #ffc107;
    font-weight: 600;
}

.yahoo-point {
    background: #fd7e14;
    color: white;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    display: inline-block;
}

/* 商品リンクボタン */
.yahoo-button {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: #ff0033;
    color: white;
    text-decoration: none;
    border-radius: 0.375rem;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.5rem;
    text-align: center;
    align-self: flex-start;
    transition: background 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.yahoo-button:hover {
    background: #cc0029;
    color: white;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.yahoo-button:active {
    background: #990020;
}

/* ページネーション */
.yahoo-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
    align-items: center;
}

.yahoo-page-link {
    padding: 0.5rem 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    text-decoration: none;
    color: #212529;
    background: white;
    font-size: 0.875rem;
    min-width: 2.5rem;
    text-align: center;
    display: inline-block;
    transition: background 0.15s ease-in-out, border-color 0.15s ease-in-out, color 0.15s ease-in-out;
}

.yahoo-page-link:hover {
    background: #e9ecef;
    border-color: #ff0033;
    color: #ff0033;
}

.yahoo-page-link.active {
    background: #ff0033;
    color: white;
    border-color: #ff0033;
    font-weight: 600;
    pointer-events: none;
    cursor: default;
}

.yahoo-page-prev,
.yahoo-page-next {
    font-weight: 600;
}

.yahoo-page-ellipsis {
    padding: 0.5rem;
    color: #6c757d;
    font-size: 0.875rem;
}

/* エラーメッセージ */
.yahoo-error {
    background: #f8d7da;
    color: #842029;
    padding: 1rem;
    border-radius: 0.375rem;
    border: 1px solid #f5c2c7;
    margin: 1.5rem 0;
}

/* 検索結果なし */
.yahoo-no-results {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
    font-size: 1rem;
}

/* Yahoo!クレジット */
.yahoo-credit {
    text-align: center;
    padding: 2rem 0 1rem;
    margin-top: 2rem;
    border-top: 1px solid #dee2e6;
}

.yahoo-credit a {
    color: #0066c0;
    text-decoration: none;
    font-size: 0.875rem;
}

.yahoo-credit a:hover {
    text-decoration: underline;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .yahoo-search-container {
        padding: 0.75rem;
    }
    
    .yahoo-search-form {
        padding: 1rem;
    }
    
    .yahoo-search-form-input {
        grid-template-columns: 1fr;
    }
    
    .yahoo-product-card {
        flex-direction: column;
        align-items: center;
        padding: 1rem;
    }
    
    .yahoo-product-left {
        width: 100%;
        max-width: 300px;
    }
    
    .yahoo-product-image,
    .yahoo-no-image {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
        max-width: 300px;
    }
    
    .yahoo-product-right {
        width: 100%;
    }
    
    .yahoo-name {
        font-size: 0.95rem;
    }
    
    .yahoo-price {
        font-size: 1.25rem;
    }
    
    .yahoo-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .yahoo-button {
        width: 100%;
    }
}

/* タブレット対応 */
@media (min-width: 769px) and (max-width: 1024px) {
    .yahoo-search-form-input {
        grid-template-columns: 1fr 1fr;
    }
    
    .yahoo-search-form-input button {
        grid-column: span 2;
    }
}