@charset "UTF-8";

/*!
Theme Name: Cocoon Child
Description: Cocoon専用の子テーマ
Theme URI: https://wp-cocoon.com/
Author: わいひら
Author URI: https://nelog.jp/
Template:   cocoon-master
Version:    1.1.3
*/

/************************************
** 子テーマ用のスタイルを書く
************************************/
/*必要ならばここにコードを書く*/

/*モバイル用改行*/
@media screen and (min-width: 768px){
.br-sp {display: none; }
}

/*ページタイトル非表示*/
.entry-title {display:none !important;}

/*フォントファミリー*/
/*font-family: ‘Jost’;*/

/*ヘッダーナビ*/
#navi {padding-bottom:1px;}
#navi-in {font-weight: bold;}
.navi-in > ul {margin:10px 0 20px 0;}
#navi .navi-in>ul>li {height: 20px;
    line-height: 20px;}
#navi li {border-left: 1px solid #fff;height:20px;}
#navi li {border-right: 1px solid #fff;height:20px;}
#navi li+ li {border-left: 0;border-right: 1px solid #fff;height:20px;}

/*スライダー*/
.n2-section-smartslider {background-color:#000000;}

/*見出し*/
.aoiro {color:#134290;}

/*ワッツニュー*/
.tuning_car {color:#333333;font-weight:bold;}
.tuning_car:hover {color:#134290;}
.tuning_pickup {color:#333333;}
.tuning_pickup:hover {color:#134290;}

/*チューニングアーカイブ*/
.photo .attachment-large.size-large {display:block;height:170px;object-fit: cover;margin-bottom: -20px;width: 100%;}

/*チューニング記事*/
.tu_kobetsu_mainphoto img {height: auto;width: 400px;object-fit: cover;}

/*チューニングリスト*/
.top_tuning_list{width:20% !important;}
.top_tuning_list_ul {padding:0;}

.top_tu_car {color:#333333;font-weight:bold;}
.top_tu_car:hover {color:#134290;}
.top_tu_pickup {color:#333333;}
.top_tu_pickup:hover {color:#134290;}

/*中古車*/
.top_uc_list {text-align:center;}
.top_uc_list li {list-style:none;}
.a_uc_txt {color:#333333;}
.a_uc_txt:hover {color:#134290;}

/*中古パーツアーカイブ*/
.top_up_list li {list-style:none;}
.a_up_txt {color:#333333;}
.a_up_txt:hover {color:#134290;}
.a_up_photo .attachment-large.size-large {display:block;height:170px;object-fit: cover;margin-bottom: -20px;width: 100%;}

/*MOREボタン*/
.morebutton:hover {background:#134290;border: 1px solid #134290;}
.morebutton a {color:#333333;}
.morebutton a:hover {color:#FFF;}

/*whatsnew*/
.whatsnew h1, .whatsnew hr, .whatsnew dt {display:none;}
.whatsnew dd{border-bottom:1px solid #3333;}
.whatsnew a {color:#333333;}

/*戻るボタン*/
.ichiran_back a {color:#333333;}
.ichiran_back a:hover {color:#134290;}

/*SNS （IG入り次第消す） */
.fb-page.fb_iframe_widget {
	display:grid;
	justify-content: center;
}

/*問い合わせ*/
.hissu {color:red;font-size:13px;}
.wpcf7-form-control-wrap option {text-align:center;}
.submit {width: 120px;
    margin-left: auto;
    margin-right: auto;
    display: block;}
input[type='submit']{border-radius:7px;background: #fff;}
input[type='submit']:hover{background: #134290;color:#fff;}
.wpcf7-spinner {display:none;}

/*フッター*/
footer {margin:0 !important;padding:0 !important;}
.footer-widgets {margin: 0;
	display: flex;
	justify-content: space-between;}
.footer-left {width:60% !important;}
.footer-right {width:40% !important;}
.footer-right img {display:block !important;}
.footer-center {display:none !important;}
.footer-bottom-content {display:none !important;}
.footer-left, .footer-right {padding:0 !important;}
#media_image-2 {margin:0 !important;}
.site-logo-image.footer-site-logo-image {display:none !important;}
#footer-in {width:auto;}
.footer-bottom {margin:0;padding:0;}
.cf::after {content:none !important;}

.footer_logo_photo img {width:90%;}
.flex {margin-top: 15px;
	display: flex;
    justify-content: center;
    flex-direction: row;
    flex-wrap: nowrap;
    margin-bottom: 20px;}
.footer_navi　{display: block; text-align:center;}
.footer_navi a:hover {color:#6c9bd2 !important;}
/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/
/*1023px以下*/
@media screen and (max-width: 1023px){
  /*必要ならばここにコードを書く*/
}

/*834px以下*/
@media screen and (max-width: 834px){
  /*必要ならばここにコードを書く*/
}

/*480px以下*/
@media screen and (max-width: 480px){
  /*必要ならばここにコードを書く*/
	body.public-page {overflow-x:hidden;}
	.whatsnew {font-size:15px;}
	.site-logo-image.header-site-logo-image {width:200px;}
	
	/*topページ*/
	.slider {display:none;}
	.site-logo-image.header-site-logo-image {width:200px;}
	.top_tu_list ul, .top_uc_list ul, .top_up_list ul {padding:0;}
	.kobetu, .uc_kobetu {display:block !important;}
	.top_tu_pickup {margin-bottom:25px;}
	
	/*チューニングアーカイブ*/
	.tu_kiji img {width:100% !important;}
	.top_tu_car {margin-bottom:20px !important;}
	
	/*中古車アーカイブ*/
	.a_uc_photo{width: 100% !important;margin-bottom: 20px;display: block;}
	
	/*中古パーツアーカイブ*/
	.a_up_txt {margin-bottom:20px !important;}
	
	/*チューニング記事*/
	li.tu_main{display:block !important;}
	.tu_kobetsu_main_txt {width:100% !important;}
	
	/*中古車記事*/
	.ucar- {font-size:18px !important;}
	#mainImage {width: auto !important; height: auto !important;}
	.uc_main {display:block !important; width:100% !important;}
	#imageList {width: auto !important;}
	#imageList ul {padding:0;}
	#imageList li {width:31.5% !important;}
	.uc_kome {margin-bottom:20px;}
	.uc_specdaiji {font-size:18px !important;}

	
	/*中古パーツ記事*/
	.uparts {font-size:18px;}
	.up_main {display:block !important;}
	#imageList li.up_sublist {width:48.5% !important;}
	
	/*フッター*/
	.footer-left, .footer-right{display:none !important;}
	.footer_logo_photo {display:block; text-align:center;}
	.footer_logo_photo img {width:60%;}
	.footer_logo_txt {display:block; text-align:center;}
	.footer_navi {margin-top:20px;}
	.footer_navi a {font-size:18px !important;}
	
	/*ボトムメニュー*/
	.search-menu-button.menu-button, .sidebar-menu-button.menu-button {display:none;}
}


/**
 * =========================================
 * functions.php 最小セキュリティコア
 * =========================================
 */

/**
 * 1. Cookie セキュリティ属性
 */
add_action('init', function () {

  if (is_ssl()) {
    @ini_set('session.cookie_secure', '1');
  }
  @ini_set('session.cookie_httponly', '1');
  @ini_set('session.cookie_samesite', 'Lax');

});


/**
 * 2. WordPress バージョン情報を隠す
 */
remove_action('wp_head', 'wp_generator');


/**
 * 3. 絵文字（emoji）無効化（軽量化・不要）
 */
add_action('init', function () {
  remove_action('wp_head', 'print_emoji_detection_script', 7);
  remove_action('wp_print_styles', 'print_emoji_styles');
});


/**
 * 4. WordPress 同梱 jQuery を必ず使う
 */
add_action('wp_enqueue_scripts', function () {
  wp_enqueue_script('jquery');
}, 1);


/**
 * 5. XML-RPC 無効化（使わない前提）
 */
add_filter('xmlrpc_enabled', '__return_false');


/**
 * 6. ログインエラーメッセージ簡略化
 */
add_filter('login_errors', function () {
  return 'ログイン情報が正しくありません。';
});


// 投稿者IDからユーザー名が漏れるURLアクセス（/?author=1など）をリダイレクトで無効化
if (!is_admin()) {
  if (preg_match('/author=([0-9]*)/i', $_SERVER['QUERY_STRING'])) {
    wp_redirect(home_url());
    exit;
  }
}

// REST API 経由でユーザー情報を取得できないようにする
add_filter('rest_endpoints', function ($endpoints) {
  if (isset($endpoints['/wp/v2/users'])) {
    unset($endpoints['/wp/v2/users']);
  }
  if (isset($endpoints['/wp/v2/users/(?P<id>[\d]+)'])) {
    unset($endpoints['/wp/v2/users/(?P<id>[\d]+)']);
  }
  return $endpoints;
});

// 投稿一覧・記事内の投稿者名を非表示にする
add_filter('cocoon_meta_author_visible', '__return_false');

//metaタグ内の <meta name="author"> を非表示
remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0);
remove_action('wp_head', 'wp_generator');
remove_action('wp_head', 'rsd_link');
remove_action('wp_head', 'wlwmanifest_link');
remove_action('wp_head', 'index_rel_link');
remove_action('wp_head', 'start_post_rel_link', 10, 0);
remove_action('wp_head', 'parent_post_rel_link', 10, 0);
remove_action('wp_head', 'adjacent_posts_rel_link', 10, 0);
remove_action('wp_head', 'wp_shortlink_wp_head', 10, 0);