/* 商品コードを確実に表示する（優先度高め） */
.product_code {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: #222 !important;
  font-size: 14px !important;
  margin-top: 6px;
}
.product_code .product_list {
  font-weight: 700 !important;
  margin-right: 6px !important;
}

/* 画像枠を常に正方形にする */
.ec-shelfGrid__item-image {
  width: 100%;
  aspect-ratio: 1 / 1;      /* 幅に合わせて高さを1:1に固定 */
  background-color: #fff;   /* 余白色（ブランドに合わせて調整） */
  display: block;
  position: relative;
  overflow: hidden;
}

/* img を枠内で中央に収める（余白を残す） */
.ec-shelfGrid__item-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;      /* contain: 全体を表示して余白を作る */
  object-position: center;
  display: block;
}

/* 画像が無いときに表示するプレースホルダ（必要なら） */
.ec-shelfGrid__item-image .no-image {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 13px;
  background-color: #f8f8f8;
}

/* カテゴリレイアウト — 既存ブロックを置き換える */
.categories-container {
  width: 980px;
  margin: 0 auto;
  font-size: 11px;
  box-sizing: border-box;
}

.categories-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: start;
}

.categories-col {
  min-width: 0;
}

.categories-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
}

.categories-col li {
  margin: 6px 0;
}
/* 階層スタイル */
.categories-col li.rank1 > a {
  font-weight: 800;
  color: #0a3b2f;
  text-decoration: none;
}

.categories-col li.rank2 > a {
  font-weight: 700;
  color: #0a3b2f;
  text-decoration: none;
}

.categories-col li.rank3 {
  margin-left: 14px;
}

.categories-col li.rank4 {
  margin-left: 26px;
}

/* リンクの見た目とオーバーフロー対策 */
.categories-col a {
  color: inherit;
  text-decoration: none;
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* レスポンシブのフォールバック（対応できない環境向けの代替スタイル） */
@media (max-width: 600px) {
  .categories-container { width: 100%; padding: 0 12px; }
  .categories-row { grid-template-columns: 1fr; gap: 12px; }
}

/* 固定ヘッダー用の背景色 */
.logo_area.is_fixed {
  background-color: rgba(19, 43, 11, 0.7);
}

/* 固定ヘッダー用のスマホ非表示 */
@media screen and (max-width: 768px) {
  .category_side_area {
    display: none !important;
  }
}
/* 送料表 */
.shipping-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 16px;
  font-size: 14px;
}
.shipping-table th,
.shipping-table td {
  border: 1px solid #06693a;
  padding: 8px 10px;
  text-align: left;
  vertical-align: middle;
}
.shipping-table thead th {
  background: #eaf6ef;
  color: #064f35;
  font-weight: 700;
}
.shipping-table tbody td:first-child {
  background: #f3fff6;
  color: #064f35;
  width: 20%;
  font-weight: 700;
}
.shipping-table tbody tr:nth-child(odd) td {
  background-clip: padding-box;
}

/* グラフ（ショッピングガイド） */
.shoppingguide-graphs {
  margin: 4px 0 6px;
}
.shoppingguide-graphs .charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 4px;
  align-items: center;
}
.shoppingguide-graphs .chart {
  text-align: center;
  padding: 2.5px;
}
.shoppingguide-graphs .svg-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 72px;
}
.shoppingguide-graphs svg {
  width: 72px;
  height: 72px;
}
.shoppingguide-graphs .label {
  margin-top: 2px;
  font-weight: 700;
  font-size: 13px;
}
.slice-bg {
  fill: none;
  stroke: #f3f4f6;
  stroke-width: 12;
  stroke-linecap: butt;
}
.slice-fill {
  fill: none;
  stroke: #10b981;
  stroke-width: 12;
  stroke-linecap: butt;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

/* レスポンシブ */
@media (max-width:480px) {
  .shipping-table { font-size: 13px; }
  .shipping-table th,
  .shipping-table td { padding: 6px 8px; }
  .shoppingguide-graphs .svg-wrap { height: 72px; }
  .shoppingguide-graphs svg { width: 56px; height: 56px; }
}
/* タグ別スライダーのレイアウト */
.gallery_newitem .image span {
  display: block;
  margin-top: 5px;
}

/* タグ別商品一覧のレイアウト */
.ec-blockTitle {
  text-align: center;
  margin-bottom: 20px;
}

.ec-itemList {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  max-width: 1090px;
  margin: 0 auto;
}
.ec-itemBox {
  width: calc(20% - 16px);
  box-sizing: border-box;
  padding: 0;
  margin-bottom: 20px;
  text-align: left;
}
.ec-itemImage img {
  width: 100%;
  margin-left: 0;
  display: block;
}
.ec-itemName {
  margin-top: 8px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #666;
}
.ec-itemName a {
  color: #666;
  text-decoration: none;
  font-weight: normal;
}
.ec-itemPrice {
  font-weight: bold;
  margin-top: 4px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #666;
}
@media (min-width: 1024px) {
  /* 親の幅に合わせて正方形を作る（既存の .ec-itemBox 幅 を変えない） */
  .ec-itemBox .ec-itemImage {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #fff;
    position: relative;
    overflow: hidden;
    display: block;
  }

  /* img は枠に合わせて縦横比を維持しつつ中央に表示（余白が出る） */
  .ec-itemBox .ec-itemImage img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
  }

  /* 画像が無いときのプレースホルダ（任意） */
  .ec-itemBox .ec-itemImage .no-image {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 13px;
    background-color: #f8f8f8;
  }
}


/* 商品一覧上部の横並び指定（限定セレクタ） */
.ec-searchnavRole__actions .ec-select,
.ec-searchnavRole__actions .layout-toggle,
.ec-searchnavRole__actions .layout-selects {
  display: flex !important;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.ec-searchnavRole__actions .layout-selects > * {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}
.ec-searchnavRole__actions .layout-selects select {
  display: inline-block !important;
  width: auto !important;
  min-width: 120px;
  padding: 4px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  appearance: auto;
  font: inherit;
  color: inherit;
  vertical-align: middle;
}
/* =========================================================
   Header search form
   ========================================================= */
.header-inline-search,
form.searchform.header-inline-search,
.ec-headerNaviRole__search.logo_search {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 6px 0 !important;
  box-sizing: border-box !important;
}

/* 選択領域（スペースを確保） */
.header-inline-search .ec-select_search.compact {
  flex: 0 0 220px !important;
  width: 220px !important;
  min-width: 160px !important;
  box-sizing: border-box !important;
  z-index: 9000 !important;
}

/* === 同期: select と input の高さを 30px に揃える（既存挙動維持） === */
.header-inline-search .ec-select_search.compact,
.header-inline-search .ec-select_search.compact select,
.header-inline-search .ec-input input.search-name {
  height: 30px !important;
  line-height: 30px !important;
  box-sizing: border-box !important;
}

/* 余分な上下のパディングを削除して、ボックスの合計を30pxにする */
.header-inline-search .ec-select_search.compact select,
.header-inline-search .ec-input input.search-name {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin: 0 !important;
}

/* 入力ラッパー：アイコンを内部に配置できるよう position: relative にする */
.header-inline-search .ec-input {
  flex: 1 1 320px !important;
  min-width: 160px !important;
  box-sizing: border-box !important;
  position: relative !important;
}

/* 入力フィールド：右側にアイコン分のスペースを確保し、高さを維持する */
.header-inline-search .ec-input input.search-name {
  width: 100% !important;
  height: 30px !important;
  line-height: 30px !important;
  padding: 0 44px 0 8px !important;
  box-sizing: border-box !important;
  display: block !important;
}

/* 入力内に検索アイコンを配置し、30px フィールド用に縮尺を合わせる */
.header-inline-search .ec-input .ec-headerSearch__keywordBtn.in-input,
.header-inline-search .ec-input .ec-headerSearch__keywordBtn {
  position: absolute !important;
  right: 6px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  height: 20px !important;
  width: 28px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 10000 !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

/* 小画面用の調整 */
@media (max-width: 900px) {
  .header-inline-search .ec-select_search.compact {
    flex: 0 0 160px !important;
    width: 160px !important;
  }
  .header-inline-search .ec-input {
    flex: 1 1 auto !important;
    min-width: 120px !important;
  }
  .header-inline-search .ec-input input.search-name {
    padding: 0 38px 0 8px !important;
    height: 30px !important;
    line-height: 30px !important;
  }
}

/* 検索コントロール2つだけをわずかに下にずらす — 最小限の非破壊的調整 */
html body .header-inline-search,
html body form.searchform.header-inline-search,
html body .ec-headerNaviRole__search.logo_search {
  margin-top: -2px !important;
}

/* --- 目的の最小修正：カテゴリ選択窓の上辺を参照して他要素の上辺を揃える --- */
.header-inline-search,
form.searchform.header-inline-search,
.ec-headerNaviRole__search.logo_search {
  align-items: flex-start !important; /* コンテナの基準を上辺にするが高さ等は変えない */
}

/* select を基準要素として明示的に上辺に固定 */
.header-inline-search .ec-select_search.compact,
.header-inline-search .ec-select_search.compact select {
  align-self: flex-start !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  box-sizing: border-box !important;
}

/* input とそのラッパーを select の上辺に合わせる（余分な上マージンやパディングを除去） */
.header-inline-search .ec-input,
.header-inline-search .ec-input input.search-name {
  align-self: flex-start !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  box-sizing: border-box !important;
}

/* 直接の子要素による transform/top 指定があれば無効化して縦オフセットを防ぐ */
.header-inline-search > *,
form.searchform.header-inline-search > *,
.ec-headerNaviRole__search.logo_search > * {
  transform: none !important;
  top: auto !important;
}

/* =========================================================
   Banner Module (PC baseline + SP square center/right)
   ========================================================= */
/* --- PC & Shared Base -------------------------------------------------- */
#banner_block {
  max-width: 980px !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
}

#banner_block_top {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* 下段グリッド (PC: 4列) */
#banner_grid {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  row-gap: 18px;
  justify-content: flex-start;
  align-items: flex-start;
  box-sizing: border-box;
}

#banner_grid .banner_item {
  box-sizing: border-box;
  min-width: 0;
  flex-shrink: 0;
  display: block;
  position: relative;
}

/* PC: 上段 3カラム固定 / 下段4カラム */
@media (min-width:981px){
  #banner_block_top .banner_top_inner {
    display: flex !important;
    gap: 18px !important;
    align-items: stretch !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
  }

  #banner_block_top .banner_col--left  { flex:0 0 364px !important; max-width:364px !important; }
  #banner_block_top .banner_col--center{ flex:0 0 290px !important; max-width:290px !important; }
  #banner_block_top .banner_col--right { flex:0 0 290px !important; max-width:290px !important; }

  #banner_block_top .banner_col--left .banner_top_item + .banner_top_item { margin-top:12px !important; }

  /* 比率: 左(横長) / 中央&右(正方形) */
  .banner_top_image--left  { position:relative; height:0; padding-top:38.461%; overflow:hidden; box-sizing:border-box; }
  .banner_top_image--center,
  .banner_top_image--right { position:relative; height:0; padding-top:100%;   overflow:hidden; box-sizing:border-box; }

  /* 下段4列 */
  #banner_grid .banner_item.banner_grid_item {
    flex: 0 0 calc((100% - (18px * 3)) / 4);
    max-width: calc((100% - (18px * 3)) / 4);
  }
}

/* 共通画像ラッパー（汎用設定） */
.banner_top_image,
.banner_image {
  position: relative;
  overflow: hidden;
  background: #fff;
  border-radius: 4px;
  box-sizing: border-box;
}

.banner_top_image .banner-image__content,
.banner_top_image img,
.banner_image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#banner_grid .banner_image--tall { height:0; padding-top:50%; }
#banner_grid .banner_image--thin { height:0; padding-top:34.78%; }

#banner_grid .banner_image img,
#banner_block_top .banner-image__content img {
  max-width: none;
  opacity: 1;
  visibility: visible;
}

/* Badge / text */
#banner_grid .banner_badge,
#banner_block_top .banner_badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  padding: 4px 6px;
  font-size: 12px;
  border-radius: 3px;
  z-index: 5;
}
#banner_grid .banner_text,
#banner_block_top .banner_text { display: none !important; }

#banner_grid .banner_item a,
#banner_block_top .banner_top_item a {
  display: block;
  color: inherit;
  text-decoration: none;
}

/* Defensive (PC) */
#banner_block_top .banner_col--left,
#banner_block_top .banner_col--center,
#banner_block_top .banner_col--right {
  margin:0 !important;
  padding:0 !important;
  transform:none !important;
}

@media (min-width:981px){
  #banner_block_top .banner_col--left {
    display:flex !important;
    flex-direction:column !important;
    justify-content:space-between !important;
  }
  #banner_block_top .banner_col--center,
  #banner_block_top .banner_col--right {
    display:flex !important;
    flex-direction:column !important;
    justify-content:flex-start !important;
  }
  #banner_block_top .banner_col--left .banner_top_item:last-child {
    margin-bottom:12px !important;
  }
}

/* SP PATCH (max-width:980px) */
@media (max-width:980px){
  #banner_block { padding:0 8px; }

  /* 上段 2x2 グリッド */
  #banner_block_top .banner_top_inner {
    display:grid;
    grid-template-columns:1fr 1fr;
    grid-auto-rows:auto;
    gap:12px;
    padding:0;
  }
  .banner_col { width:100%; }

  /* 並び: Row1 左2枚 / Row2 中央・右 */
  .banner_col--left  .banner_top_item:first-child { grid-column:1; grid-row:1; }
  .banner_col--left  .banner_top_item:nth-child(2){ grid-column:2; grid-row:1; }
  .banner_col--center .banner_top_item            { grid-column:1; grid-row:2; }
  .banner_col--right  .banner_top_item            { grid-column:2; grid-row:2; }

  /* 逆並びにしたい場合は上の4行を差し替え  */

  /* 比率: 左は横長、中央/右は確実に正方形 (fallback + aspect-ratio) */
  .banner_top_image--left {
    position:relative;
    height:0 !important;
    padding-top:38.461% !important;
    overflow:hidden;
  }

  .banner_top_image--center,
  .banner_top_image--right {
    /* Fallback: padding-top による正方形 */
    position:relative;
    height:0 !important;
    padding-top:100% !important;
    overflow:hidden;
    /* Modern: aspect-ratio で強制正方形 (上記fallbackを上書き) */
    aspect-ratio:1 / 1;
    /* height:auto を指定したいが height:0 fallback維持で問題なし:
       aspect-ratio が有効時は算出高さが width に基づき決定される */
  }

  .banner_top_image--center .banner-image__content,
  .banner_top_image--right  .banner-image__content,
  .banner_top_image--center img,
  .banner_top_image--right  img {
    position:absolute;
    inset:0;
    width:100% !important;
    height:100% !important;
    object-fit:cover !important;
  }

  /* 下段 2列 */
  #banner_grid {
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    row-gap:12px;
    padding:0;
    margin-top:16px;
  }
  #banner_grid .banner_grid_item {
    flex:0 0 calc((100% - 12px)/2);
    max-width:calc((100% - 12px)/2);
    box-sizing:border-box;
  }

  .banner_image { position:relative; height:0; overflow:hidden; }
  .banner_image--tall { padding-top:50%; }
  .banner_image--thin { padding-top:34.78%; }

  .banner_image img {
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    object-fit:cover;
  }

  /* 過去 display:contents 防止 */
  .banner_col--left,
  .banner_col--center,
  .banner_col--right { display:block !important; }

  .banner_top_image,
  .banner_image { float:none !important; }
}

/* Extra Narrow (max-width:767px) 微調整 */
@media (max-width:767px){
  #banner_block { padding:0 8px; }
  #banner_block_top .banner_top_inner { gap:8px; }
  #banner_grid { gap:8px; row-gap:8px; }
  #banner_grid .banner_grid_item {
    flex:0 0 calc((100% - 8px)/2);
    max-width:calc((100% - 8px)/2);
  }

  /* 再確認: 中央/右 正方形維持 */
  .banner_top_image--center,
  .banner_top_image--right {
    padding-top:100% !important;
    aspect-ratio:1 / 1;
  }
}

/* 強制で下余白をなくす */
.main_visual.slick-initialized.slick-slider.slick-dotted {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
  bottom: auto !important;
}