/* =========================================================
   基本テーマ調整 / 変数
   ========================================================= */
:root{
  --brand: #2A3F59;
  --ribbon-bg: #f3f4f6;
  --badge-order: #e11d48;
  --badge-sale:  #4f46e5;

  --card-pad: 16px;   /* 横・下のカード余白 */
  --img-inset: 8px;   /* 画像内のリボンの内側オフセット */
}

.col-full{
  max-width:100%!important;
  padding:0!important;
}

@media  (max-width: 1024px) {
  .col-full{
    margin-left: 0em!important;
    margin-right: 0em!important;
  }
}

/* ヘッダー */
.site-header{
  max-width:100%!important;
  background-color: var(--brand);
  padding: 40px 5% 10px;
  color:#fff;
}
.site-branding .site-title a{ font-weight:700; color:#fff; }
.site-branding .site-description{ color:#fff; }
.main-navigation ul.menu>li>a,
.main-navigation ul.nav-menu>li>a{ padding:1.618em 1em; color:#fff; }

/* パンくず非表示 */
.storefront-breadcrumb{ display:none; }

/* =========================================================
   ヒーロー帯（※個別デザインのまま残します）
   ========================================================= */
.hero-headset{
  background: var(--hero-img) center/cover no-repeat, #4f636e;
  min-height:220px;
  border-top:4px solid #2e495e;
  border-bottom:4px solid #e7edf2;
  display:grid;
  place-items:center start;
}
.hero-headset__inner{ width:min(1200px,100%); padding-inline:16px; }
.hero-headset__title{
  color:#fff; font-weight:800; font-size:clamp(20px,3.5vw,40px);
  margin:0; transform:translateX(10%); text-shadow:0 2px 6px rgba(0,0,0,.25);
}

/* スマホ（≤640px）も2列表示 */
@media (max-width:640px){
  .woocommerce ul.products,
  ul.products{
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;                 /* モバイルは少し狭めの余白 */
  }
  .woocommerce ul.products li.product,
  ul.products li.product{
    width: auto !important;    /* 旧幅指定の打ち消し */
    margin: 0 !important;      /* 旧float時のマージン打ち消し */
  }
  /* 価格行の右余白を詰めて窮屈さを回避 */
  .product-card-price-row{ margin-right: 0; }
}

.storefront-sorting{ margin-top:50px; }

/* =========================================================
   サイドバー / フィルタ（BeRocket）
   ========================================================= */
.widget-area .widget{ 
    margin: 0 10px;
    max-width: 300px;
    float: right;
}

.site-main{
	margin-right: 7%;
    margin-left: 7%;
}

.bapf_wid_3444,.bapf_wid_3445,.bapf_wid_3446{
  border-bottom: 1px solid #000;
  padding-top: 30px;
  width: 240px;
}
.berocket_single_filter_widget_3397,
.berocket_single_filter_widget_3398{ border-bottom:none!important; }

.bapf_sfilter.bapf_button_berocket .bapf_button{
  width:200px; height:42px; font-size:14px;
  border-radius:20px;	
  background:var(--brand);
  border:1px solid var(--brand);
  border-radius: 20px !important;   /* 青ボタンは丸く */
　margin-bottom: 4px !important;
}
.bapf_sfilter.bapf_button_berocket .bapf_button:hover{
  color:var(--brand); background:#fff; border:1px solid var(--brand);
}

/* =========================================================
   一覧レイアウト
   ========================================================= */
.woocommerce-products-header{ padding-top:50px; }

.shop-layout{
  display:grid;
  grid-template-columns:minmax(240px,280px) 1fr; /* 左:サイドバー / 右:メイン */
  gap:32px;
  align-items:start;
}
.shop-sidebar{
  position:sticky; top:24px; display:block!important;
  align-self:start; z-index:2; min-width:0;
}
.woocommerce ul.products li.product{ float:none; } /* 旧float解除 */
.site-footer{ clear:both; } /* 巻き込み防止 */

.shop-sidebar .br_filters_group,
.shop-sidebar .berocket_aapf_widget,
.shop-sidebar .bapf_body,
.shop-sidebar .bapf_sfilter,
.shop-sidebar form{ display:block!important; visibility:visible!important; }
.shop-sidebar .bapf_loader{ display:none!important; }

/* ====== タブレット（1024px以下）：検索メニューを上、商品を2列 ====== */
@media (max-width:1024px){
  /* レイアウトを1カラム（上：サイドバー＝検索、下：商品） */
  .shop-layout{ grid-template-columns: 1fr; }
  .shop-sidebar{ position: static; } /* sticky無効化 */

  /* サイドバー内の幅調整（横幅いっぱいに） */
  .bapf_wid_3444{ width: 100%; padding-top: 16px; }
  .bapf_sfilter.bapf_button_berocket .bapf_button{ width: 100%; }

  /* 本文側の余白を詰める */
  .site-main{ margin: 0px 2%; }

  /* 商品リスト：カード幅を260px以上キープして自動で列数調整 */
  .woocommerce ul.products,
  ul.products{
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px 12px;
  }
  .woocommerce ul.products li.product,
  ul.products li.product{
    width: auto !important;
    margin: 0 !important;
  }
}

/* =========================================================
   商品カード（枠線・影・中身のバランス調整）
   ========================================================= */
.woocommerce ul.products li.product,
ul.products li.product{
  position:relative;
  background:#fff;
  width:250px;
  margin-right: 4%;
  border:1px solid #e5e7eb;
  box-shadow:0 4px 12px rgba(0,0,0,.04);
  padding: 0 var(--card-pad) 20px; /* 上0 / 横カード余白 / 下20px */
  overflow:hidden;            /* 角丸に画像を合わせる */

  /* 高さを揃えて、上からきっちり詰める */
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
}

/* 画像リンクをリボンの基準に＆余計な上マージンを殺す */
.woocommerce ul.products li.product a.woocommerce-LoopProduct-link{
  position:relative;
  display:block;
  margin-top:0 !important;
  padding-top:0 !important;
  line-height:0;              /* 画像上の隙間を抑制 */
  text-align:center;
}


.woocommerce ul.products li.product a.woocommerce-LoopProduct-link img{
  display:block;
  margin:0 auto !important;
  margin-top: 30px !important;
  margin-bottom: 30px !important;
  padding:0 !important;
  float:none !important;
  width:100% !important;
  height:220px !important; 
  max-width:100%;
  object-fit:contain !important; 
}

.woocommerce ul{ margin-top:20px; margin-bottom:20px; }

/* =========================================================
   ブランドリボン（画像と同じエリアの左上に重ねる）
   ========================================================= */
.product-card-ribbon{
  position: absolute;
  top: 30px;
  left: -16px;
  z-index: 2;
  display: inline-block;
  padding: 20px 30px;
  font-size: 18px;
  color: #000;
  font-weight: 700;
  border-radius: 0px;
  background: #E8E8E8;
  pointer-events: none;
}

/* 念のため：テーマ既定の SALE フラッシュは非表示（PHPでも除去済み） */
.woocommerce span.onsale{ display:none!important; }

/* =========================================================
   価格行
   ========================================================= */
.product-card-price-row{
  display: flex;
  justify-content: flex-start !important;  /* 左寄せに変更 */
  align-items:center;
  gap:8px;
  margin-top:10px;            /* 画像と価格の間だけ適度な間隔 */
  margin-right:0 !important;
  margin-left:4px !important;
}

/* WooCommerce 価格体裁 */
.woocommerce ul.products li.product .price{
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin:2px 0 0 !important;
  line-height:1.2;
  justify-content:flex-start !important;
}
.woocommerce ul.products li.product .price del,
.woocommerce ul.products li.product .price ins{
  display:inline; margin:0; line-height:1;
}
.woocommerce ul.products li.product .price del{ opacity:.6; }
.woocommerce ul.products li.product .price ins{ text-decoration:none; }

/* 税込注記 */
.wc-price-tax-note{ font-size:12px; margin-left:4px; align-self:center; }

/* バッジ共通 */
.product-card-badge{
  display:inline-block;
  padding:4px 9px;
  font-size:11px; font-weight:700; line-height:1;
  border-radius: 0px;
  border:1px solid currentColor;
}

/* メーカー取り寄せ */
.product-card-badge--order{
  background:#EB7575;
  color:#fff;
  border-color:#fff;
}

/* セール */
.product-card-badge--sale{
  background:#0f2b3a;
  color:#fff;
  border-color:#fff;
}

/* 文字（タイトル） */
.woocommerce-loop-product__title{
  font-weight:bold!important;
  margin-top:12px!important;
  margin-bottom:6px!important;
  font-size:16px!important;
  text-align:left!important;
  padding-left:4px;
  line-height: 1.4;
  /* タイトルエリアを「2行ぶん」の高さで固定してカード高さを統一 */
  min-height: 3em;                 /* 16px × 1.4 × 約2行ぶん */
  /* 3行以上になる場合は2行で切って省略（カード崩れ防止） */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;           /* 最大2行表示 */
  overflow: hidden;	
}
.woocommerce-Price-amount{ font-weight:bold!important; }

/* 枠 */
/* 枠＋カード幅固定（3カラム時の%指定を上書き） */
.site-main ul.products.columns-3 li.product{
  box-shadow: 0px 2px 10px rgba(28, 43, 38, 0.2);

  /* ブラウザ幅を狭めてもカード自体は細くしない */
  width: 250px !important;
  min-width: 250px;
}

/* ===== ヒーローセクション（メニュー直下） ===== */
/* ===== ヒーロー（タイトル左＋画像右）===== */
.jade-hero{
  background:#4f636e;
  border-bottom:4px solid #e7edf2;
  height: 205px;
  margin-bottom: 11px;
}
.jade-hero__inner{
  width:min(1200px,100%);
  margin-top: 30px;
  margin-inline:auto;
  display:grid;
  grid-template-columns: 1fr min(45vw, 500px); /* 左=タイトル / 右=画像 */
  align-items:center;
  gap:clamp(16px,4vw,40px);
  min-height:160px;
}
.jade-hero__title{
  color:#fff;
  font-weight:800;
  font-size: clamp(22px, 3.6vw, 36px);
  font-family: 源ノ角ゴシック JP;
}

/* 画像はカードっぽく切り抜き */
.jade-hero__img{
  justify-self:end;
  width:100%;
  max-width:640px;
  overflow:hidden;
  box-shadow:0 6px 16px rgba(0,0,0,.15);
}

@media  (min-width: 1024px) {
  .jade-hero__img img{
    height:200px;
  }
}

/* モバイルは縦積み */
@media (max-width: 800px){
  .jade-hero__inner{ grid-template-columns: 1fr; }
  .jade-hero__img{
    justify-self:start;
    max-width:100%;
    aspect-ratio:16/9;
    margin-top:10px;
  }
}

/* （任意）カテゴリ別の微調整 */
.jade-hero--headset{ border-top-color:#2e495e; }
.jade-hero--speaker{ border-top-color:#1f3b4a; }
.jade-hero--option { border-top-color:#364b5c; }

.lmp_products_loading{ display: none; }

.bapf_head{ font-weight:bold; }

/* Woo のclearfix疑似要素がGridの1マスを食うのを防ぐ */
.woocommerce ul.products::before,
.woocommerce ul.products::after,
ul.products::before,
ul.products::after{
  content: none !important;
  display: none !important;
}

/* 左上からきっちり詰めるための基本リセット */
.woocommerce ul.products,
ul.products{
  padding-left: 0 !important;
  margin-left: 0 !important;
  justify-content: start;   /* 念のため中央寄せを無効化 */
  align-content: start;
  justify-items: stretch;
  align-items: start;
}

/* ===============================
   紫のフォーカス枠を削除
================================= */
.site-header a:focus,
.site-footer a:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* ==== 絞り込みクリアをボタンではなくリンク風にする ==== */
/* BeRocket の <button class="bapf_button bapf_reset">絞り込みクリア</button> を対象 */
.bapf_sfilter .bapf_button.bapf_reset {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin-top: 0px !important;
  margin-bottom: 0 !important;
  width: auto !important;
  color: #99AECE !important;
  text-decoration: none !important;
  font-size: 14px;
  cursor: pointer;
  display: inline-block;          /* 中央寄せしやすいように */
}

/* 「この条件で絞り込む」と「絞り込みクリア」を中央寄せ */
.bapf_sfilter.bapf_button_berocket{
  text-align: center;
}

/* ホバー時に少し濃い色にする*/
.bapf_sfilter .bapf_button.bapf_reset:hover,
.bapf_sfilter .bapf_button.bapf_reset:focus {
  color: #7c93c0 !important;
  text-decoration: none !important;
}

..storefront-sorting{
	display:none!important;
}

/* =========================================
   製品一覧：サイドバー＋一覧エリアの横幅
   ヘッダー・フッターはそのまま
========================================= */

/* 本文エリア全体を 1080px に制限して中央寄せ */
body.post-type-archive-product #content .col-full,
body.tax-product_cat #content .col-full,
body.tax-product_tag #content .col-full {
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
}

/* メインとサイドバーの2カラムレイアウト */
body.post-type-archive-product #primary,
body.tax-product_cat #primary,
body.tax-product_tag #primary {
  float: right!important;         /* 右に本文 */
  width: 67%!important;
}

body.post-type-archive-product #secondary,
body.tax-product_cat #secondary,
body.tax-product_tag #secondary {
  float: left!important;          /* 左にサイドバー */
  width: 32%!important;
  margin-right: 1%!important;
}

/* モバイルでは1カラムに戻す */
@media (max-width: 960px) {
  body.post-type-archive-product #primary,
  body.tax-product_cat #primary,
  body.tax-product_tag #primary,
  body.post-type-archive-product #secondary,
  body.tax-product_cat #secondary,
  body.tax-product_tag #secondary {
    float: none;
    width: 100%;
  }

  body.post-type-archive-product #secondary,
  body.tax-product_cat #secondary,
  body.tax-product_tag #secondary {
    margin-bottom: 24px;
  }
}

.site-main {
    margin-right: 14%;
    margin-left: 0%;
	width:100%;
}

.berocket_single_filter_widget_3657{
	border-bottom: 0px;
}

.berocket_single_filter_widget_3656,.berocket_single_filter_widget_3398{
	padding-top:0px!important;
}
/* ==============================
   ページネーション中央寄せ（親コンテナをflexに）
============================== */

/* 並び替え＋ページネーションを包んでいるコンテナ */
.storefront-sorting {
  display: flex;
  justify-content: center;   /* 中央寄せ */
  align-items: center;
}

/* ページネーションナビ本体 */
.storefront-sorting .woocommerce-pagination {
  margin: 0;                 /* 余計な右寄せ用マージンを打ち消し */
  float: none !important;    /* 右寄せ用のfloatを殺す */
}

/* 数字リストを横並びで中央に */
.storefront-sorting .woocommerce-pagination ul.page-numbers {
  display: flex;
  gap: 0;
  padding: 0;
  margin: 0;
  list-style: none;
}

.bapf_sfilter li[data-term_id="93"] {
    display: none !important;
}

/* BeRocket：uncategorized のカテゴリ項目だけ非表示 */
.bapf_sfilter .bapf_body li:has(label[for*="_4_"]) label:contains("uncategorized") {
    display: none !important;
}
.bapf_sfilter .bapf_body li:has(input[value="uncategorized"]) {
    display: none !important;
}

/* =========================================================
   /device（ショップページ）のサイドバー位置調整
   ========================================================= */
@media (min-width: 1025px) {

  /* メイン＋サイドバーを2カラムに */
  .woocommerce-shop .site-main > .col-full {
    max-width: 1200px;            /* ヘッドセット一覧と合わせる想定 */
    margin: 0 auto;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr); /* 左：サイドバー、右：商品 */
    column-gap: 40px;
    align-items: flex-start;
  }

  /* コンテンツとサイドバーの並び順を入れ替え */
  .woocommerce-shop .content-area {
    order: 2;
  }
  .woocommerce-shop .widget-area {
    order: 1;
  }

  /* サイドバーの上の余白調整（必要であれば） */
  .woocommerce-shop .widget-area {
    margin-top: 40px;
  }
}

/* =========================================================
   /device サイドバー：項目ごとの仕切り線
   ========================================================= */
.berocket_single_filter_widget_3396 , .berocket_single_filter_widget_3660,.berocket_single_filter_widget_3656{
    border-bottom: 1px solid #000;
    padding-top: 30px;
    width: 240px;
}

.berocket_single_filter_widget_3397,.berocket_single_filter_widget_3657{
	margin-top:20px;
}