/*
 * SPS EC Theme — メインCSS
 * ハードコードした色・フォントサイズは使用禁止。必ず var(--ec-*) を参照すること。
 */

/* ============================================================
   ベースリセット・基本設定
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

button,
input,
select,
textarea {
  font-family: inherit;
  letter-spacing: inherit;
  -webkit-font-smoothing: inherit;
  -moz-osx-font-smoothing: inherit;
}

html {
  font-size: 100%; /* 16px ベース */
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--ec-font-body);
  font-size: var(--ec-fz-base, 1rem);
  color: var(--ec-text-main, #2d2d2d);
  background-color: var(--ec-surface-main, #f8f8f8);
  line-height: 1.7;
  letter-spacing: var(--ec-letter-spacing-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* 見出しフォント・文字間（指示2: font-weight:700 を明示） */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--ec-font-heading);
  letter-spacing: var(--ec-letter-spacing-heading);
  font-weight: 700;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 太字要素: ボールドの最適化（指示1+2） */
strong,
b,
.ec-rank-popover__strong {
  font-weight: 700;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: inherit;
}

a {
  color: var(--ec-action-interactive, #23abdd);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ============================================================
   CSS カスタムプロパティ デフォルト値
   （カスタマイザーで上書きされる前のフォールバック）
   ============================================================ */

:root {
  /* --- Brand --- */
  --ec-brand-primary: #000000;
  --ec-brand-on-primary: #ffffff;

  /* --- Action --- */
  --ec-action-buy: #ed293e;
  --ec-action-buy-hover: #d42535;
  --ec-action-favorite: #ff7683;
  --ec-action-interactive: #23abdd;

  /* --- Status --- */
  --ec-status-sale: #ed293e;
  --ec-status-success: #008060;
  --ec-status-alert: #e67e22;

  /* --- Rating --- */
  --ec-color-rating-star: #ffa41c;

  /* --- Surface --- */
  --ec-surface-main: #f8f8f8;
  --ec-surface-card: #ffffff;
  --ec-surface-inverse: #2d2d2d;

  /* --- Text --- */
  --ec-text-main: #2d2d2d;
  --ec-text-subdued: #a0a0a0;
  --ec-text-inverse: #ffffff;
  --ec-text-numeric: #2d2d2d;

  /* --- Font --- */
  --ec-font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ec-font-heading: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ec-font-numeric: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* --- Letter Spacing --- */
  --ec-letter-spacing-body: 0em;
  --ec-letter-spacing-heading: 0em;

  /* --- Border --- */
  --ec-border-default: #dedede;
  --ec-border-subdued: #efefef;

  /* --- Logistics Label --- */
  --ec-logistics-cool-bg: #4a90d9;
  --ec-logistics-cool-text: #ffffff;
  --ec-logistics-frozen-bg: #1f3864;
  --ec-logistics-frozen-text: #ffffff;

  /* --- Overlay --- */
  --ec-overlay-dark: rgb(0 0 0 / 0.5);

  /* --- Shape --- */
  --ec-radius-button: 4px;
  --ec-radius-card: 8px;
  --ec-radius-product-image: 8px;
  --ec-radius-badge: 2px;
  --ec-radius-pill: 50px;
  --ec-space-unit: 4px;

  /* --- Typography Scale --- */
  --ec-fz-2xs: 0.625rem; /* 10px */
  --ec-fz-xs: 0.75rem; /* 12px */
  --ec-fz-sm: 0.875rem; /* 14px */
  --ec-fz-md: 0.9375rem; /* 15px */
  --ec-fz-base: 1rem; /* 16px */
  --ec-fz-lg: 1.25rem; /* 20px */
  --ec-fz-xl: 2rem; /* 32px */

}

/* ============================================================
   レイアウト
   ============================================================ */

.ec-layout {
  display: grid;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 calc(var(--ec-space-unit) * 4);
  gap: calc(var(--ec-space-unit) * 6);
}

.ec-layout--2col {
  grid-template-columns: 220px 1fr;
  grid-template-areas:
    'sidebar main';
}

.ec-layout--1col {
  grid-template-columns: 1fr;
  grid-template-areas: 'main';
}

.ec-layout__sidebar {
  grid-area: sidebar;
}
.ec-layout__main {
  grid-area: main;
  min-width: 0;
}

@media (max-width: 768px) {
  .ec-layout--2col {
    grid-template-columns: 1fr;
    grid-template-areas:
      'sidebar'
      'main';
  }
  /* SPではサイドバー（常時表示モード）をアコーディオン化（デフォルト折りたたみ） */
  .ec-layout__sidebar {
    overflow: hidden;
    max-height: 0;
    padding-top: 0;
    transition: max-height 0.3s ease;
  }
  .ec-layout__sidebar.is-open {
    max-height: 3000px;
  }
}

/* ============================================================
   お知らせバー
   ============================================================ */

/* お知らせバー + ヘッダーをまとめてスクロール追従させるラッパー */
.ec-sticky-top {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 100;
}

.ec-topbar {
  background-color: var(--topbar-bg, var(--ec-brand-primary));
  color: var(--topbar-color, var(--ec-text-inverse));
  font-size: var(--topbar-fs-pc, var(--ec-fz-xs));
  line-height: 20px;
  letter-spacing: var(--ec-letter-spacing-body);
  text-align: center;
  padding: 9px 252px;
  min-height: 29px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--ec-border-default);
}

.ec-topbar__link {
  color: inherit;
  text-decoration: none;
  white-space: normal;
}

.ec-topbar__link:hover {
  opacity: 0.8;
  text-decoration: none;
}

@media (max-width: 768px) {
  .ec-topbar {
    font-size: var(--topbar-fs-sp, var(--ec-fz-2xs));
    padding: 5px 15px;
    letter-spacing: var(--ec-letter-spacing-body);
  }
}

/* ============================================================
   お知らせバー カルーセル（右→左 スライド切替）
   ============================================================ */

/* カルーセル時は画面端から端までスライドさせるため、お知らせバー本体の
   左右パディングを取り除き overflow: hidden を付与する。 */
.ec-topbar--carousel {
  padding-left: 0;
  padding-right: 0;
  overflow: hidden;
}

.ec-topbar--carousel .ec-topbar__inner {
  width: 100%;
}

.ec-topbar__carousel {
  position: relative;
  width: 100%;
  min-height: 1.4em;
  overflow: hidden;
}

.ec-topbar__slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.6s ease;
  pointer-events: none;
  will-change: transform;
}

/* 位置状態は data-pos 属性で管理する（is-active/is-leaving のクラス順序問題を回避） */
.ec-topbar__slide[data-pos="right"]  { transform: translateX(100%); }
.ec-topbar__slide[data-pos="center"] { transform: translateX(0);    pointer-events: auto; }
.ec-topbar__slide[data-pos="left"]   { transform: translateX(-100%); }

/* 退場後に右端へ瞬間復帰させるための一時クラス */
.ec-topbar__slide.is-instant {
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .ec-topbar__slide {
    transition: none;
  }
}

.ec-topbar__text--vd {
  font-weight: 700;
}

/* ============================================================
   高額購入割引（プログレスバー付きメッセージ）
   ------------------------------------------------------------
   .ec-vd-progress: 共通ベース
   .ec-vd-progress--detail: 商品詳細用（枠付きボックス + 上部プログレスバー）
   .ec-vd-progress--topbar: お知らせバー用（インライン + 横並びプログレスバー）

   コンポーネント変数は :root ではなくコンポーネント境界に閉じ込め、
   呼び出し側がスコープ単位で上書きできるようにする。
   ============================================================ */

.ec-vd-progress {
  /* 色 */
  --ec-vd-progress-bar-color:   var(--ec-status-success);
  --ec-vd-progress-track-color: var(--ec-surface-card);
  /* レイアウト（添付デザイン仕様より） */
  --ec-vd-progress-bar-height:  3px;
  --ec-vd-progress-border:      0.5px solid var(--ec-border-default);
  --ec-vd-progress-transition:  width 0.3s ease;
}

/* ---------- 商品詳細バリアント ---------- */

.ec-volume-discount {
  margin: calc(var(--ec-space-unit) * 3) 0;
}

.ec-vd-progress--detail {
  /* 詳細バリアント固有: 50px ボックス、16px 横パディング、上端プログレスバー */
  --ec-vd-progress-detail-min-height: 50px;
  --ec-vd-progress-detail-padding-x:  calc(var(--ec-space-unit) * 4); /* 16px */
  --ec-vd-progress-detail-padding-y:  calc(var(--ec-space-unit) * 2 - 1px); /* 7px */
  --ec-vd-progress-detail-row-gap:    calc(var(--ec-space-unit) * 2.5); /* 10px */

  position: relative;
  background-color: var(--ec-surface-main);
  border: var(--ec-vd-progress-border);
  min-height: var(--ec-vd-progress-detail-min-height);
  padding: var(--ec-vd-progress-detail-padding-y) var(--ec-vd-progress-detail-padding-x);
  display: flex;
  align-items: center;
}

.ec-vd-progress--detail .ec-vd-progress__body {
  display: flex;
  align-items: center;
  gap: var(--ec-vd-progress-detail-row-gap);
  width: 100%;
  flex-wrap: wrap;
}

.ec-vd-progress--detail .ec-vd-progress__title {
  font-size: var(--ec-fz-sm);
  font-weight: 700;
  color: var(--ec-text-main);
  white-space: nowrap;
  letter-spacing: var(--ec-fz-sm-letter-spacing, normal);
}

.ec-vd-progress--detail .ec-vd-progress__message {
  display: inline-flex;
  align-items: baseline;
  gap: var(--ec-space-unit); /* 4px */
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}

.ec-vd-progress--detail .ec-vd-progress__prefix,
.ec-vd-progress--detail .ec-vd-progress__unit,
.ec-vd-progress--detail .ec-vd-progress__label {
  font-size: var(--ec-fz-xs);
  color: var(--ec-text-main);
}

.ec-vd-progress--detail .ec-vd-progress__remaining {
  font-size: var(--ec-fz-lg);
  font-family: var(--ec-font-numeric, inherit);
  font-weight: 700;
  color: var(--ec-text-main);
  line-height: 1;
}

.ec-vd-progress--detail .ec-vd-progress__rate {
  font-size: var(--ec-fz-lg);
  font-family: var(--ec-font-numeric, inherit);
  font-weight: 700;
  color: var(--ec-status-sale);
  line-height: 1;
}

/* 詳細バリアントは枠の上端にプログレスバーを重ねる */
.ec-vd-progress--detail .ec-vd-progress__track {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--ec-vd-progress-bar-height);
  background-color: var(--ec-vd-progress-track-color);
  overflow: hidden;
}

.ec-vd-progress--detail .ec-vd-progress__fill {
  height: 100%;
  background-color: var(--ec-vd-progress-bar-color);
  transition: var(--ec-vd-progress-transition);
}

/* ---------- お知らせバー バリアント ---------- */

.ec-vd-progress--topbar {
  /* お知らせバー固有: バー幅 PC=140px / SP=80px、数値スケールはテキスト基準で 1.2 倍 */
  --ec-vd-progress-topbar-bar-width:     calc(var(--ec-space-unit) * 35); /* 140px */
  --ec-vd-progress-topbar-bar-width-sp:  calc(var(--ec-space-unit) * 20); /*  80px */
  --ec-vd-progress-topbar-number-scale:  1.2em;
  --ec-vd-progress-topbar-gap:           calc(var(--ec-space-unit) * 3); /* 12px */

  display: inline-flex;
  align-items: center;
  gap: var(--ec-vd-progress-topbar-gap);
  font-weight: 700;
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
}

.ec-vd-progress--topbar .ec-vd-progress__body {
  display: inline-flex;
  align-items: baseline;
  gap: var(--ec-space-unit);
}

.ec-vd-progress--topbar .ec-vd-progress__message {
  display: inline-flex;
  align-items: baseline;
  gap: var(--ec-space-unit);
  white-space: nowrap;
}

.ec-vd-progress--topbar .ec-vd-progress__prefix,
.ec-vd-progress--topbar .ec-vd-progress__unit,
.ec-vd-progress--topbar .ec-vd-progress__label {
  font-size: inherit;
  font-weight: 400;
}

.ec-vd-progress--topbar .ec-vd-progress__remaining,
.ec-vd-progress--topbar .ec-vd-progress__rate {
  font-size: var(--ec-vd-progress-topbar-number-scale);
  font-family: var(--ec-font-numeric, inherit);
  font-weight: 700;
  line-height: 1;
}

.ec-vd-progress--topbar .ec-vd-progress__rate {
  color: var(--ec-status-sale);
}

.ec-vd-progress--topbar .ec-vd-progress__track {
  position: relative;
  width: var(--ec-vd-progress-topbar-bar-width);
  height: var(--ec-vd-progress-bar-height);
  background-color: var(--ec-vd-progress-track-color);
  border-radius: var(--ec-radius-badge);
  overflow: hidden;
}

.ec-vd-progress--topbar .ec-vd-progress__fill {
  height: 100%;
  background-color: var(--ec-vd-progress-bar-color);
  transition: var(--ec-vd-progress-transition);
}

@media (max-width: 768px) {
  .ec-vd-progress--topbar .ec-vd-progress__track {
    width: var(--ec-vd-progress-topbar-bar-width-sp);
  }
  .ec-vd-progress--detail .ec-vd-progress__title {
    font-size: var(--ec-fz-xs);
  }
  .ec-vd-progress--detail .ec-vd-progress__remaining,
  .ec-vd-progress--detail .ec-vd-progress__rate {
    font-size: var(--ec-fz-mi, 18px);
  }
}

/* ============================================================
   ヘッダー
   ============================================================ */

.ec-header {
  background-color: var(--ec-header-bg, #ffffff);
  color: var(--ec-header-text, var(--ec-text-main));
  border-bottom: 1px solid var(--ec-border-default);
}

.ec-header__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 calc(var(--ec-space-unit) * 4);
  min-height: 63px;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: calc(var(--ec-space-unit) * 6);
}

.ec-header__logo {
  flex-shrink: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}
.ec-header__logo img {
  height: 40px;
  width: auto;
  max-width: 100%;
}
.ec-header__site-name {
  display: inline-block;
  max-width: 100%;
  font-size: var(--ec-fz-lg);
  font-family: var(--ec-font-heading);
  font-weight: 700;
  color: var(--ec-header-text, var(--ec-text-main));
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ec-header__nav {
  flex: 1 1 auto;
  min-width: 0;
}
.ec-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 40px;
  align-items: center;
}
/* デフォルトのアンカー色を低 specificity で当てる（メガメニュー要素が個別に上書きできる） */
:where(.ec-nav__list) a {
  color: var(--ec-header-text, var(--ec-text-main));
  font-size: var(--ec-fz-sm);
  line-height: 24px;
  letter-spacing: var(--ec-letter-spacing-body);
  text-decoration: none;
}

/* メガメニュー基準: パネルが全幅で広がるよう .ec-header / .ec-header__cat-nav を基準にする */
.ec-header,
.ec-header__cat-nav {
  position: relative;
}
.ec-header__nav .ec-nav__item,
.ec-header__cat-nav .ec-nav__item {
  position: static;
}

.ec-nav__item {
  list-style: none;
}

.ec-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  color: var(--ec-header-text, var(--ec-text-main));
  font-size: var(--ec-fz-sm);
  font-weight: 700;
  font-family: inherit;
  letter-spacing: var(--ec-letter-spacing-body);
  line-height: 24px;
  text-decoration: none;
  position: relative;
  background: none;
  border: 0;
  cursor: pointer;
}

/* リンクなし見出し（<span>/<button> 兼用）— カーソルとアクセシビリティを調整 */
span.ec-nav__link { cursor: default; }
button.ec-nav__link { padding-inline: 0; }
.ec-megamenu__col-title--label,
.ec-megamenu__leaf-link--label {
  cursor: default;
  text-decoration: none;
}

.ec-nav__chevron {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.2s ease;
}

.ec-nav__item--has-children > .ec-nav__link[aria-expanded="true"] .ec-nav__chevron {
  transform: translateY(2px) rotate(-135deg);
}

/* 開いているプルダウンの下線 */
.ec-nav__item--has-children > .ec-nav__link[aria-expanded="true"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  background-color: var(--ec-text-main);
}

/* カレント（現在ページ）の項目に下線（Figma Styling-配下） */
.ec-nav__item.is-current > .ec-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  background-color: var(--ec-text-main);
}

/* メガパネル */
.ec-megamenu {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background-color: var(--ec-surface-card, #ffffff);
  /* menu-in（Figma 27-3688）は下線(border-b)のみ。上線はナビバーの border-bottom が担う */
  border-bottom: 1px solid var(--ec-border-default);
  padding: 32px 0;
  z-index: 100;
}

.ec-megamenu__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

.ec-megamenu__heading {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 32px;
  font-size: var(--ec-fz-base);
  font-weight: 700;
  color: var(--ec-text-main);
  text-decoration: none;
}
.ec-megamenu__heading:hover { text-decoration: underline; }

/* menu-in（Figma 40-9647 2列 / 40-9567 3列 / 27-3646 4列）:
   列は flex:1 0 0 の等幅。列数に応じて 2列=50% / 3列=33% / 4列=25% と
   自動で横幅いっぱいに分割される。 */
.ec-megamenu__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: stretch;
  gap: 32px;
}

.ec-megamenu__col {
  list-style: none;
  flex: 1 0 0;
  min-width: 0;
}
/* menu-in（Figma 27-3646）: 列間に区切り線＋左余白 */
.ec-megamenu__col + .ec-megamenu__col {
  border-left: 1px solid var(--ec-border-subdued, #e5e5e5);
  padding-left: 32px;
}

.ec-megamenu__col-title {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 24px;
  font-size: var(--ec-fz-sm);
  font-weight: 700;
  line-height: 24px;
  color: var(--ec-text-main);
  text-decoration: none;
}
/* カスタムリンク／固定ページ等でリンク化された列見出しのみホバー下線 */
a.ec-megamenu__col-title:hover { text-decoration: underline; }

.ec-megamenu__sub {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ec-megamenu__leaf {
  list-style: none;
}
/* テキスト見出し（リンクなし）をサブ項目位置に置いた場合は
   col-title の見出しスタイルを流用しつつ、リスト gap と二重にならないよう
   見出し自身の下マージンを詰める。 */
.ec-megamenu__leaf--heading .ec-megamenu__col-title {
  margin-bottom: 0;
}

.ec-megamenu__leaf-link {
  font-size: var(--ec-fz-xs);
  color: var(--ec-text-main);
  text-decoration: none;
  line-height: 20px;
}
.ec-megamenu__leaf-link:hover {
  color: var(--ec-text-main);
  text-decoration: underline;
}

.ec-megamenu__chevron {
  font-size: 1em;
  font-weight: 400;
  line-height: 1;
}

/* menu-in（Figma 27-3646）: PCメガには「○○トップ」見出し・列見出しの › を出さない */
.ec-header__cat-nav .ec-megamenu__heading { display: none; }
.ec-header__cat-nav .ec-megamenu__col-title .ec-megamenu__chevron { display: none; }

/* ── ドロップダウン（単一列・項目直下） ── */
.ec-header__cat-nav .ec-nav__item.ec-nav__item--dropdown { position: relative; }
/* ドロップダウン（Figma Styling-配下 27-3726 準拠）: 白・padding16/24・gap10・12px */
.ec-megamenu--dropdown {
  left: auto;
  right: auto;
  /* グロナビ（バー）下端に合わせて表示（バー下padding16pxぶん下げる） */
  top: calc(100% + 16px);
  width: max-content;
  min-width: 130px;
  max-width: 280px;
  padding: 16px 24px;
  border: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}
.ec-dropdown__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ec-dropdown__item { list-style: none; }
.ec-dropdown__link {
  display: block;
  font-size: var(--ec-fz-xs);     /* 12px */
  line-height: 20px;
  letter-spacing: 0.1em;          /* ≒1.2px @12px */
  color: var(--ec-text-main);
  text-decoration: none;
}
.ec-dropdown__link:hover { text-decoration: underline; }
.ec-dropdown__link--label { cursor: default; }
.ec-dropdown__link--label:hover { text-decoration: none; }

/* 中間幅では列間 gap を詰める（flex なので列数は内容に追従） */
@media (max-width: 1024px) {
  .ec-megamenu__grid { gap: 24px; }
  .ec-megamenu__col + .ec-megamenu__col { padding-left: 24px; }
}

/* ============================================================
   SP（ハンバーガー内）— メガメニューを縦アコーディオンに
   ============================================================ */
@media (max-width: 768px) {
  /* SPナビ（ハンバーガー内）— Figma 27-3809 のアコーディオン */
  .ec-header__sp-nav {
    padding: 0;
    border-top: 0;
  }
  /* SPナビ内のテキストは全て左寄せ（<button> 既定の中央寄せを打ち消す） */
  .ec-header__sp-nav,
  .ec-header__sp-nav .ec-nav__link,
  .ec-header__sp-nav .ec-nav__label,
  .ec-header__sp-nav .ec-megamenu__heading,
  .ec-header__sp-nav .ec-megamenu__col-title,
  .ec-header__sp-nav .ec-megamenu__leaf-link,
  .ec-header__sp-nav .ec-dropdown__link {
    text-align: left;
  }
  .ec-header__sp-nav .ec-nav__list {
    flex-direction: column;
    gap: 0;
    align-items: stretch;
  }
  /* トップ項目の行 */
  .ec-header__sp-nav .ec-nav__item {
    border-bottom: 1px solid var(--ec-border-default);
    position: static;
  }
  .ec-header__sp-nav .ec-nav__link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-height: 60px;
    padding: 16px;
    font-size: var(--ec-fz-base, 15px);
    font-weight: 700;
    line-height: 24px;
    letter-spacing: 0.1em;
    color: var(--ec-text-main);
  }
  .ec-header__sp-nav .ec-nav__label { flex: 1 1 auto; text-align: left; }
  /* カレント下線はSPでは出さない */
  .ec-header__sp-nav .ec-nav__item.is-current > .ec-nav__link::after { content: none; }

  /* 子あり項目の +/− トグル（aria-expanded で切替） */
  .ec-header__sp-nav .ec-nav__item--has-children > .ec-nav__link {
    position: relative;
    padding-right: 44px;
  }
  .ec-header__sp-nav .ec-nav__item--has-children > .ec-nav__link::before,
  .ec-header__sp-nav .ec-nav__item--has-children > .ec-nav__link::after {
    content: "";
    position: absolute;
    top: 50%;
    background-color: var(--ec-text-main);
    border-radius: 40px;
  }
  /* 横棒（＋／− 共通） */
  .ec-header__sp-nav .ec-nav__item--has-children > .ec-nav__link::before {
    right: 16px;
    width: 11px;
    height: 1.5px;
    transform: translateY(-50%);
  }
  /* 縦棒（＋ のときだけ表示） */
  .ec-header__sp-nav .ec-nav__item--has-children > .ec-nav__link::after {
    right: 20.75px;
    width: 1.5px;
    height: 11px;
    transform: translateY(-50%);
  }
  .ec-header__sp-nav .ec-nav__item--has-children > .ec-nav__link[aria-expanded="true"]::after {
    content: none;
  }

  /* 展開パネル（メガ／ドロップダウン共通）: 静的・インデント表示 */
  .ec-header__sp-nav .ec-megamenu {
    position: static;
    inset: auto;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
  }
  .ec-header__sp-nav .ec-megamenu__inner { padding: 0; max-width: none; margin: 0; }
  /* 「○○ トップ」見出しリンク（あれば） */
  .ec-header__sp-nav .ec-megamenu__heading {
    display: flex;
    margin: 0;
    padding: 16px 16px 16px 40px;
    border-bottom: 1px dashed var(--ec-border-subdued);
    font-size: var(--ec-fz-sm, 14px);
    font-weight: 700;
    line-height: 24px;
  }
  /* 列を縦積み（カテゴリブロック） */
  .ec-header__sp-nav .ec-megamenu__grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-bottom: 40px;
  }
  .ec-header__sp-nav .ec-megamenu__col {
    border: 0;
    padding: 32px 16px 0 40px;
  }
  .ec-header__sp-nav .ec-megamenu__col + .ec-megamenu__col { padding-top: 40px; }
  .ec-header__sp-nav .ec-megamenu__col-title {
    display: block;
    margin-bottom: 24px;
    font-size: var(--ec-fz-sm, 14px);
    font-weight: 700;
    line-height: 24px;
  }
  .ec-header__sp-nav .ec-megamenu__sub { gap: 24px; }
  .ec-header__sp-nav .ec-megamenu__leaf-link {
    font-size: var(--ec-fz-xs, 12px);
    line-height: 20px;
  }

  /* ドロップダウンを単一列の縦リストに */
  .ec-header__sp-nav .ec-megamenu--dropdown { padding: 0; }
  .ec-header__sp-nav .ec-dropdown__list {
    padding: 16px 16px 24px 40px;
    gap: 24px;
  }
  .ec-header__sp-nav .ec-dropdown__link { font-size: var(--ec-fz-xs, 12px); }
}

/* ヘッダーアイコン群 */
.ec-header__icons {
  display: flex;
  align-items: center;
  gap: calc(var(--ec-space-unit) * 1);
  flex-shrink: 0;
  margin-left: auto;
}

.ec-header__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  color: var(--ec-header-text, var(--ec-text-main));
  text-decoration: none;
  transition: opacity 0.15s;
}

.ec-header__icon svg {
  flex-shrink: 0;
  display: block;
  overflow: visible;
}

.ec-header__icon:hover {
  opacity: 0.6;
  text-decoration: none;
}

/* ハンバーガーボタン */
.ec-header__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  padding: 0;
  flex-shrink: 0;
}

.ec-header__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--ec-text-main);
  transition:
    transform 0.3s,
    opacity 0.3s;
}

.ec-header__hamburger.is-active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.ec-header__hamburger.is-active span:nth-child(2) {
  opacity: 0;
}
.ec-header__hamburger.is-active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* SPナビ */
.ec-header__sp-nav {
  background-color: var(--ec-surface-card);
  border-top: 1px solid var(--ec-border-subdued);
  padding: 16px;
}

/* カテゴリーナビゲーションバー（ヘッダー下） */
.ec-header__cat-nav {
  background-color: var(--ec-surface-card);
  border-top: 1px solid var(--ec-border-default);
  border-bottom: 1px solid var(--ec-border-default);
  padding: 16px 0;
}

.ec-header__cat-nav .ec-nav__list {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (max-width: 768px) {
  .ec-header__inner {
    padding: 0 calc(var(--ec-space-unit) * 2);
    min-height: 52px;
    gap: calc(var(--ec-space-unit) * 2);
  }
  .ec-header__site-name {
    font-size: var(--ec-fz-base);
  }
  .ec-header__hamburger {
    display: flex;
  }
  .ec-nav--pc {
    display: none;
  }
  .ec-header__cat-nav {
    display: none;
  }
  .ec-header__icons {
    gap: 0;
  }
  .ec-header__icon--login {
    display: none;
  }
}

/* ============================================================
   フッター
   ============================================================ */

.ec-footer {
  background-color: var(--ec-surface-inverse, #2d2d2d);
  color: var(--ec-text-inverse, #ffffff);
}

/* ウィジェットグリッド（最大6カラム）
   auto-fit + minmax で「アクティブなカラム数」に応じて幅が伸縮するため、
   4カラムだけ配置している既存サイトでも各カラムが極端に狭くならない */
.ec-footer__columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: calc(var(--ec-space-unit) * 8);
  max-width: 1280px;
  margin: 0 auto;
  padding: calc(var(--ec-space-unit) * 20) calc(var(--ec-space-unit) * 4) calc(var(--ec-space-unit) * 10);
}

.ec-footer__column {
  min-width: 0;
  color: var(--ec-text-inverse, #ffffff);
}

.ec-footer__column img {
  max-width: 100%;
  height: auto;
  display: block;
}

.ec-footer__column .ec-widget + .ec-widget {
  margin-top: calc(var(--ec-space-unit) * 4);
}

.ec-footer__column .ec-widget__title {
  color: var(--ec-text-inverse, #ffffff);
  font-size: var(--ec-fz-base);
  font-weight: 700;
  margin: 0 0 calc(var(--ec-space-unit) * 4);
}

.ec-footer__column a {
  color: var(--ec-text-inverse, #ffffff);
  font-size: var(--ec-fz-sm);
  line-height: 1.75;
  text-decoration: none;
}

.ec-footer__column a:hover {
  opacity: 0.7;
  text-decoration: none;
}

.ec-footer__column ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--ec-space-unit);
  padding: 0;
  margin: 0;
}

/* コピーライト */
.ec-footer__copyright {
  max-width: 1280px;
  margin: 0 auto;
  padding: calc(var(--ec-space-unit) * 6) calc(var(--ec-space-unit) * 4);
  font-family: var(--ec-font-body);
  font-size: var(--ec-fz-xs);
  font-weight: 400;
  line-height: 1.75;
  color: var(--ec-text-inverse, #ffffff);
}

.ec-footer__copyright p {
  margin: 0;
}

/* SP: gap/padding を縮小（カラム数は auto-fit に任せる） */
@media (max-width: 768px) {
  .ec-footer__columns {
    gap: calc(var(--ec-space-unit) * 6);
    padding: calc(var(--ec-space-unit) * 10) calc(var(--ec-space-unit) * 4) calc(var(--ec-space-unit) * 6);
  }
}

@media (max-width: 480px) {
  .ec-footer__columns {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   パンくずリスト
   ============================================================ */

.ec-breadcrumb {
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 16px;
}

.ec-breadcrumb__list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ec-breadcrumb__item {
  font-size: var(--ec-fz-xs);
  color: var(--ec-text-main);
  display: flex;
  align-items: center;
  gap: 12px;
}

.ec-breadcrumb__item + .ec-breadcrumb__item::before {
  content: '>';
  color: var(--ec-border-default);
}

.ec-breadcrumb__item a {
  color: var(--ec-text-main);
  text-decoration: none;
}

.ec-breadcrumb__item:last-child {
  opacity: 0.5;
}

@media (max-width: 768px) {
  .ec-breadcrumb {
    padding: 8px 16px;
  }
  .ec-breadcrumb__item {
    font-size: var(--ec-fz-2xs);
  }
}

/* ============================================================
   アーカイブヘッダー
   ============================================================ */

.ec-archive-header {
  max-width: 1280px;
  margin: 0 auto;
  padding: calc(var(--ec-space-unit) * 20) calc(var(--ec-space-unit) * 4);
  border-bottom: 1px solid var(--ec-border-default, #dedede);
}

.ec-archive-header__title {
  font-family: var(--ec-font-heading);
  font-size: var(--ec-fz-lg);
  font-weight: 700;
  line-height: 48px;
  letter-spacing: var(--ec-letter-spacing-heading);
  color: var(--ec-text-main);
}

@media (max-width: 768px) {
  .ec-archive-header {
    padding: 40px 15px;
  }
}

/* ============================================================
   リストツールバー（フィルタヘッダー＋件数＋ソート 一体型）
   ============================================================ */

.ec-list-toolbar {
  display: flex;
  align-items: center;
  gap: 11px;
  border-top: 1px solid var(--ec-border-default, #dedede);
  padding-top: calc(var(--ec-space-unit) * 14);
  padding-bottom: calc(var(--ec-space-unit) * 12);
}

/* 2カラム時: サイドバーとメインの上余白（元の toolbar padding-top を再現） */
.ec-layout--2col > .ec-layout__sidebar,
.ec-layout--2col > .ec-layout__main {
  padding-top: calc(var(--ec-space-unit) * 14);
}

/* 2カラム時のツールバー（メイン内配置） */
.ec-list-toolbar--2col {
  display: block;
  border-top: none;
  padding-top: 0;
  padding-bottom: calc(var(--ec-space-unit) * 6); /* 24px: 元の grid gap を再現 */
}

/* 1カラム（ドロワーモード or サイドバーなし）: 件数を独立行、その下に絞り込み + 並び替え */
.ec-list-toolbar--1col {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: calc(var(--ec-space-unit) * 4);
  border-top: none;
  padding-top: calc(var(--ec-space-unit) * 14);
  padding-bottom: calc(var(--ec-space-unit) * 6);
}

.ec-list-toolbar__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 11px;
}

/* 左側: 絞り込みタイトル + 条件クリア（右寄せ） */
.ec-list-toolbar__filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: calc(var(--ec-space-unit) * 6); /* 24px: 元の grid gap を再現 */
}

.ec-list-toolbar__filter-title {
  font-family: var(--ec-font-heading);
  font-size: var(--ec-fz-lg);
  font-weight: 700;
  letter-spacing: var(--ec-letter-spacing-heading);
  line-height: 32px;
  color: var(--ec-text-main);
  margin: 0;
}

.ec-list-toolbar__clear-link {
  background: none;
  border: none;
  font-family: var(--ec-font-body);
  font-size: var(--ec-fz-xs);
  font-weight: 400;
  letter-spacing: var(--ec-letter-spacing-body);
  line-height: 20px;
  color: var(--ec-action-interactive, #0066cc);
  text-decoration: underline;
  cursor: pointer;
  white-space: nowrap;
  padding: 0;
}

.ec-list-toolbar__clear-link:hover {
  opacity: 0.7;
}

/* 右側: 件数 + ソート */
.ec-list-toolbar__right {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 11px;
}

.ec-list-toolbar__count {
  flex: 1;
  font-family: var(--ec-font-body);
  font-size: var(--ec-fz-md);
  font-weight: 400;
  letter-spacing: var(--ec-letter-spacing-body);
  line-height: 24px;
  color: var(--ec-text-main);
}

/* 在庫ありのみチェックボックス */
.ec-stock-only-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  white-space: nowrap;
}

.ec-stock-only-check__box {
  position: relative;
  width: 16px;
  height: 16px;
  background-color: var(--ec-text-main);
  border-radius: var(--ec-radius-badge);
  overflow: hidden;
  flex-shrink: 0;
}

.ec-stock-only-check__box input[type='checkbox'] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}

.ec-stock-only-check__icon {
  position: absolute;
  top: 2px;
  left: 2px;
  color: var(--ec-text-inverse);
  pointer-events: none;
}

.ec-stock-only-check__box:not(:has(input:checked)) {
  background-color: var(--ec-surface-card);
  border: 1px solid var(--ec-border-default);
}

.ec-stock-only-check__box:not(:has(input:checked)) .ec-stock-only-check__icon {
  display: none;
}

.ec-stock-only-check__label {
  font-size: var(--ec-fz-base);
  font-weight: 400;
  letter-spacing: var(--ec-letter-spacing-body);
  line-height: 16px;
  color: var(--ec-text-main);
}

/* SP用フィルタトグル — PCでは非表示 */
.ec-list-toolbar__sp-actions {
  display: none;
}

/* PC用ソートバー — SPでは非表示 */
.ec-list-toolbar__pc-sort {
  display: contents;
}

/* SP フィルタトグルボタン */
.ec-sp-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--ec-text-main);
}

.ec-sp-filter-toggle__icon {
  width: 20px;
  height: 19px;
  flex-shrink: 0;
}

.ec-sp-filter-toggle__label {
  font-family: var(--ec-font-body);
  font-size: var(--ec-fz-sm);
  font-weight: 700;
  letter-spacing: var(--ec-letter-spacing-body);
  line-height: 24px;
  color: var(--ec-text-main);
  white-space: nowrap;
}

@media (max-width: 768px) {
  .ec-list-toolbar,
  .ec-list-toolbar--2col {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding-top: 24px;
    padding-bottom: 0;
  }
  .ec-list-toolbar__filter-header {
    display: none;
  }
  .ec-list-toolbar__pc-sort {
    display: none;
  }
  .ec-list-toolbar__right {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    width: 100%;
  }
  .ec-list-toolbar__count {
    font-size: var(--ec-fz-sm);
    letter-spacing: var(--ec-letter-spacing-body);
  }

  /* SP用フィルタ＋ソート行 */
  .ec-list-toolbar__sp-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
  }
  .ec-list-toolbar__sp-actions .ec-sort-bar {
    margin-left: auto;
  }
}

/* ============================================================
   商品グリッド
   ============================================================ */

.ec-product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: calc(var(--ec-space-unit) * 10);
  row-gap: calc(var(--ec-space-unit) * 12);
  transition: opacity 0.2s;
}

.ec-product-grid.is-loading {
  opacity: 0.5;
  pointer-events: none;
}

/* ブロックのカラム設定（--columns-pc）を常に優先させるため、
   下の @media .ec-product-grid（同詳細度）にソース順で負けないよう詳細度を上げる */
.ec-product-grid.ec-product-grid--block {
  grid-template-columns: repeat(var(--columns-pc, 3), 1fr);
}

/* トップページ（固定ページ＝.ec-front-content）では商品リストセクションを
   最大1200px・中央寄せで表示する（他ページ・他箇所には影響しない）。 */
.ec-front-content .ec-product-section {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

/* 商品リストブロックのセクション見出し（Figma 40-4634 h2+btn） */
.ec-product-section--has-head {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 16px;
  align-items: center;
}
.ec-product-section--has-head .ec-product-section__heading { grid-column: 1; grid-row: 1; }
.ec-product-section--has-head .ec-product-section__viewall { grid-column: 2; grid-row: 1; }
.ec-product-section--has-head .ec-product-grid {
  grid-column: 1 / 3;
  grid-row: 2;
  margin-top: 48px;
}
.ec-product-section__heading {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.ec-product-section__en {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  line-height: 48px;
  letter-spacing: 0.04em;
  color: var(--ec-text-main);
}
.ec-product-section__ja {
  margin: 0;
  font-size: var(--ec-fz-base, 15px);
  font-weight: 700;
  line-height: 24px;
  letter-spacing: 0.1em;
  color: var(--ec-text-main);
}
.ec-product-section__viewall {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 36px;
  border: 1px solid var(--ec-border-default, #ccc);
  border-radius: 4px;
  background: #fff;
  color: var(--ec-text-main);
  font-size: var(--ec-fz-xs, 12px);
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 20px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s;
}
.ec-product-section__viewall:hover { background: var(--ec-text-main); color: #fff; }

@media (max-width: 768px) {
  /* SP: 見出し → 商品グリッド → VIEW ALL（下・中央） */
  .ec-product-section--has-head {
    display: flex;
    flex-direction: column;
  }
  .ec-product-section--has-head .ec-product-section__heading { order: 1; }
  .ec-product-section--has-head .ec-product-grid { order: 2; margin-top: 24px; }
  .ec-product-section--has-head .ec-product-section__viewall {
    order: 3;
    align-self: center;
    margin-top: 32px;
  }
}

@media (max-width: 1024px) {
  .ec-product-grid {
    grid-template-columns: repeat(3, 1fr);
    column-gap: calc(var(--ec-space-unit) * 6);
    row-gap: calc(var(--ec-space-unit) * 10);
  }
}

@media (max-width: 768px) {
  .ec-product-grid {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 1px;
    row-gap: calc(var(--ec-space-unit) * 6);
  }
  .ec-product-grid.ec-product-grid--block {
    grid-template-columns: repeat(var(--columns-sp, 2), 1fr);
  }
}

/* ============================================================
   商品カード
   ============================================================ */

.ec-product-card {
  background-color: var(--ec-surface-card);
  border-radius: var(--ec-radius-card);
  display: flex;
  flex-direction: column;
  gap: calc(var(--ec-space-unit) * 4);
}

.ec-product-card__image-wrap {
  position: relative;
  aspect-ratio: 269 / 323;
  overflow: hidden;
  border-radius: var(--ec-radius-product-image);
  background-color: var(--ec-surface-main);
}

.ec-product-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.25s ease;
}

.ec-product-card__image--hover {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 1;
}

.ec-product-card__image-wrap:hover .ec-product-card__image--hover {
  opacity: 1;
}

.ec-product-card__image.is-fading {
  opacity: 0;
}

.ec-product-card__image-link {
  display: block;
  height: 100%;
  position: relative;
}

/* ラベル配置（画像上にオーバーレイ） */
.ec-product-card__labels {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2;
}

/* マーケティングラベル（画像左下にオーバーレイ） */
.ec-product-card__marketing-labels {
  position: absolute;
  bottom: 8px;
  left: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  z-index: 2;
}

/* バッジ（ロジスティク/在庫） */
.ec-product-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.ec-badge {
  display: inline-block;
  padding: 0 8px;
  border-radius: var(--ec-radius-badge);
  font-size: var(--ec-fz-2xs);
  font-weight: 700;
  line-height: 16px;
  letter-spacing: var(--ec-letter-spacing-body);
}

.ec-badge--marketing {
  background-color: var(--ec-brand-primary);
  color: var(--ec-brand-on-primary);
  width: auto;
}

.ec-badge--logistics {
  background-color: var(--ec-surface-main);
  color: var(--ec-text-main);
  border: 1px solid var(--ec-border-default);
}

.ec-badge--stock-low {
  background-color: transparent;
  color: var(--ec-status-sale);
  font-size: var(--ec-fz-2xs);
  font-weight: 700;
  line-height: 16px;
  letter-spacing: var(--ec-letter-spacing-body);
  padding: 0;
}

.ec-product-card__body {
  padding: 0 0 calc(var(--ec-space-unit) * 4) 0;
  display: flex;
  flex-direction: column;
  gap: calc(var(--ec-space-unit) * 6);
  flex: 1;
}

/* チップセクション（カラー＋サイズ） */
.ec-product-card__chips-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 商品情報セクション（ブランド＋商品名） */
.ec-product-card__info-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 価格・在庫・レビューセクション */
.ec-product-card__details-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ブランド名 */
.ec-product-card__brand {
  font-size: var(--ec-fz-xs);
  font-weight: 700;
  line-height: 20px;
  letter-spacing: var(--ec-letter-spacing-body);
  color: var(--ec-text-main);
  margin: 0;
}

.ec-product-card__title {
  font-family: var(--ec-font-heading);
  font-size: var(--ec-fz-md);
  font-weight: 700;
  line-height: 24px;
  letter-spacing: var(--ec-letter-spacing-heading);
  margin: 0;
}

.ec-product-card__title a {
  color: var(--ec-text-main);
  text-decoration: none;
}

.ec-product-card__title a:hover {
  text-decoration: none;
}

.ec-product-card__catch {
  font-size: var(--ec-fz-xs);
  color: var(--ec-text-subdued);
}

@media (max-width: 768px) {
  .ec-product-card__image-wrap {
    aspect-ratio: 195 / 234;
  }
  .ec-product-card__labels {
    top: 6px;
    left: 6px;
  }
  .ec-product-card__marketing-labels {
    bottom: 6px;
    left: 6px;
  }
  .ec-product-card__body {
    padding: 0 calc(var(--ec-space-unit) * 3) calc(var(--ec-space-unit) * 3);
    gap: calc(var(--ec-space-unit) * 4);
  }
  .ec-product-card__brand {
    font-size: var(--ec-fz-xs);
  }
  .ec-product-card__title {
    font-size: var(--ec-fz-xs);
    line-height: 20px;
    letter-spacing: var(--ec-letter-spacing-heading);
  }
}

/* ============================================================
   価格（商品詳細用）
   ============================================================ */

.ec-price {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.ec-price-text {
  font-family: var(--ec-font-numeric);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
  font-size: var(--ec-fz-lg);
  font-weight: 700;
  color: var(--ec-text-price, var(--ec-text-main));
}

.ec-price-unit {
  font-size: var(--ec-fz-xs);
  font-weight: 400;
}

.ec-price__sub {
  font-size: var(--ec-fz-sm);
  color: var(--ec-text-subdued);
}

/* ============================================================
   カード価格（商品一覧用）
   ============================================================ */

.ec-card-price {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ec-card-price__original {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ec-card-price__original-label {
  font-size: var(--ec-fz-2xs);
  line-height: 16px;
  letter-spacing: var(--ec-letter-spacing-body);
  color: var(--ec-text-main);
}

.ec-card-price__original-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ec-card-price__original-value {
  font-size: var(--ec-fz-xs);
  line-height: 20px;
  letter-spacing: var(--ec-letter-spacing-body);
  color: var(--ec-text-main);
}

.ec-card-price__original-value--strike {
  text-decoration: line-through;
  text-decoration-color: var(--ec-status-sale);
}

.ec-card-price__discount {
  font-size: var(--ec-fz-xs);
  font-weight: 700;
  line-height: 20px;
  letter-spacing: var(--ec-letter-spacing-body);
  color: var(--ec-status-sale);
  white-space: nowrap;
}

.ec-card-price__main {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 8px;
}

.ec-card-price__value {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.ec-card-price__value--sale .ec-card-price__number,
.ec-card-price__value--sale .ec-card-price__unit {
  color: var(--ec-status-sale);
}

.ec-card-price__number {
  font-family: var(--ec-font-numeric);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
  font-size: var(--ec-fz-lg);
  font-weight: 700;
  line-height: 36px;
  color: var(--ec-text-price, var(--ec-text-main));
}

.ec-card-price__unit {
  font-size: var(--ec-fz-xs);
  font-weight: 700;
  line-height: 20px;
  letter-spacing: var(--ec-letter-spacing-body);
  color: var(--ec-text-price, var(--ec-text-main));
}

/* 会員割引が適用されるユーザー向け：通常価格に取り消し線（赤）を引く */
.ec-card-price__value--member-strike .ec-card-price__number,
.ec-card-price__value--member-strike .ec-card-price__unit {
  text-decoration: line-through;
  text-decoration-color: var(--ec-status-sale);
  text-decoration-thickness: 2px;
  color: var(--ec-text-main);
}

/* 一般会員価格ラベル・会員価格サフィックス共通の基本書式 */
.ec-card-price__general-label,
.ec-card-price__member-suffix {
  font-size: var(--ec-fz-sm);
  font-weight: 400;
  line-height: 20px;
  letter-spacing: var(--ec-letter-spacing-body);
}

.ec-card-price__general-label {
  color: var(--ec-text-main);
}

.ec-card-price__member-suffix {
  color: var(--ec-status-sale);
  font-weight: 700;
}

/* 会員ランク割引価格行：通常メイン価格と同じ赤系大文字レイアウト */
.ec-card-price__member {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: 2px;
}

.ec-card-price__member-value {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: var(--ec-status-sale);
}

.ec-card-price__member-number {
  font-family: var(--ec-font-numeric);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
  font-size: var(--ec-fz-lg);
  font-weight: 700;
  line-height: 36px;
}

.ec-card-price__member-unit {
  font-size: var(--ec-fz-xs);
  font-weight: 700;
  line-height: 20px;
  letter-spacing: var(--ec-letter-spacing-body);
}

.ec-card-price__point {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: 4px;
  font-size: var(--ec-fz-sm);
  color: var(--ec-status-sale);
}

.ec-card-price__point-value {
  font-family: var(--ec-font-numeric);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
  font-weight: 700;
}

.ec-card-price__point-unit {
  font-weight: 700;
}

/* 会員ランク特典バッジ（ポイント数の右に挿入） */
.ec-card-price__point-rank-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  background-color: var(--ec-status-sale);
  color: var(--ec-text-inverse);
  border-radius: 4px;
  font-size: var(--ec-fz-xs);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: var(--ec-letter-spacing-body);
  /* 狭いカードでも溢れないよう、text は折り返し許可・バッジ自体は flex 親で wrap */
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.ec-card-price__point-breakdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: var(--ec-fz-sm);
  color: var(--ec-status-sale);
  cursor: pointer;
}

.ec-card-price__point-breakdown-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ec-status-alert, #e67e22);
  color: var(--ec-text-inverse);
  font-size: var(--ec-fz-2xs);
  font-weight: 700;
  line-height: 1;
}

/* 決済別の獲得ポイント内訳モーダル */
.ec-points-breakdown-modal[hidden] {
  display: none;
}

.ec-points-breakdown-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.ec-points-breakdown-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.ec-points-breakdown-modal__panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 32px);
  background: var(--ec-surface-card, #fff);
  border-radius: var(--ec-radius-card, 8px);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* × ボタンはパネル右上に絶対配置（暗いヘッダーは設けない） */
.ec-points-breakdown-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ec-text-main, #2d2d2d);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
}

.ec-points-breakdown-modal__close:hover,
.ec-points-breakdown-modal__close:focus-visible {
  background: var(--ec-border-subdued, #efefef);
  outline: none;
}

.ec-points-breakdown-modal__body {
  padding: 24px 24px 24px;
  overflow-y: auto;
}

.ec-points-breakdown-modal__title {
  margin: 0 0 8px;
  font-size: var(--ec-fz-base);
  font-weight: 700;
  color: var(--ec-text-main);
}

.ec-points-breakdown-modal__period {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 0 0 12px;
  font-size: var(--ec-fz-sm);
  font-weight: 700;
  color: var(--ec-status-sale);
}

.ec-points-breakdown-modal__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ec-points-breakdown-modal__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--ec-border-subdued, #efefef);
}

.ec-points-breakdown-modal__item:last-child {
  border-bottom: 0;
}

.ec-points-breakdown-modal__name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  color: var(--ec-text-main);
  font-size: var(--ec-fz-sm);
}

.ec-points-breakdown-modal__icon {
  width: auto;
  height: 22px;
  max-width: 80px;
  object-fit: contain;
  display: inline-block;
  flex-shrink: 0;
}

.ec-points-breakdown-modal__name-text {
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.ec-points-breakdown-modal__points {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  flex-shrink: 0;
  color: var(--ec-status-sale);
  font-weight: 700;
  white-space: nowrap;
}

.ec-points-breakdown-modal__points-num {
  font-family: var(--ec-font-numeric);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
  font-size: var(--ec-fz-base);
}

.ec-points-breakdown-modal__points-unit {
  font-size: var(--ec-fz-xs);
}

.ec-points-breakdown-modal__mult {
  margin-left: 4px;
  font-size: var(--ec-fz-xs);
}

@media (max-width: 480px) {
  .ec-points-breakdown-modal__body {
    padding: 16px 16px 20px;
  }
  .ec-points-breakdown-modal__icon {
    height: 18px;
    max-width: 64px;
  }
}

.ec-ptup-period {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 4px 0 0;
  font-size: var(--ec-fz-xs);
  /* 価格・ポイントと同じセール赤に揃える（仕様: ポイントアップ期間は価格と同色） */
  color: var(--ec-status-sale);
}

.ec-ptup-period__label,
.ec-ptup-period__value {
  font-weight: 700;
}

@media (max-width: 768px) {
  .ec-card-price__number {
    font-size: var(--ec-fz-lg);
    line-height: 36px;
  }
  .ec-card-price__unit {
    font-size: var(--ec-fz-xs);
    letter-spacing: var(--ec-letter-spacing-body);
  }
  .ec-card-price__original-value {
    font-size: var(--ec-fz-xs);
  }
}

/* ============================================================
   カラーチップ（一覧カード用）
   ============================================================ */

.ec-product-card__colors-wrap,
.ec-product-card__sizes-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
}

.ec-product-card__colors,
.ec-product-card__sizes {
  display: flex;
  gap: 4px;
  flex-wrap: nowrap;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.ec-product-card__colors::-webkit-scrollbar,
.ec-product-card__sizes::-webkit-scrollbar {
  display: none;
}

/* スクロール矢印 */
.ec-product-card__scroll-arrow {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ec-text-main);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.ec-product-card__scroll-arrow[hidden] {
  display: none;
}

.ec-color-chip {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--ec-border-default);
  cursor: pointer;
  transition: border-color 0.15s;
  outline: none;
  padding: 1px;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.ec-color-chip:hover,
.ec-color-chip.is-hovered {
  border-color: var(--ec-text-main);
}
.ec-color-chip.is-selected {
  border-color: var(--ec-text-main);
  outline: 1px solid var(--ec-text-main);
  outline-offset: -1px;
}
.ec-color-chip.is-soldout {
  opacity: 0.3;
  cursor: default;
}

/* ============================================================
   サイズチップ（一覧カード用）
   ============================================================ */

/* sizes gap override */
.ec-product-card__sizes {
  gap: 2px;
}

.ec-size-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 2px;
  font-size: var(--ec-fz-2xs);
  line-height: 1;
  color: var(--ec-text-main);
  background: var(--ec-surface-card);
  border: 0.31px solid var(--ec-border-default);
  border-radius: 1.24px;
  flex-shrink: 0;
  cursor: pointer;
}

.ec-size-chip__stock {
  font-size: var(--ec-fz-2xs);
  color: var(--ec-text-subdued);
  margin-left: 1px;
}

.ec-size-chip.is-selected {
  background: var(--ec-surface-inverse);
  color: var(--ec-text-inverse);
  border-color: var(--ec-text-main);
}

.ec-size-chip.is-selected .ec-size-chip__stock {
  color: var(--ec-text-inverse);
}

@media (max-width: 768px) {
  .ec-color-chip {
    width: 20px;
    height: 20px;
  }
}

/* ============================================================
   在庫ラベル
   ============================================================ */

.ec-product-card__stock-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ec-product-card__stock-label {
  font-size: var(--ec-fz-2xs);
  line-height: 16px;
  letter-spacing: var(--ec-letter-spacing-body);
  color: var(--ec-text-main);
  flex-shrink: 0;
}

.ec-product-card__stock {
  font-size: var(--ec-fz-2xs);
  line-height: 16px;
  letter-spacing: var(--ec-letter-spacing-body);
}

.ec-variation__stock {
  font-size: var(--ec-fz-xs);
  font-weight: 600;
  margin-top: 4px;
}

.ec-stock--in {
  color: var(--ec-status-success);
}
.ec-stock--low {
  color: var(--ec-status-alert);
}
.ec-stock--out {
  color: var(--ec-text-subdued);
}

/* ============================================================
   商品ラベル（NEW / SALEバッジ）
   ============================================================ */

.ec-label {
  display: inline-block;
  font-size: var(--ec-fz-2xs);
  font-weight: 700;
  line-height: 16px;
  letter-spacing: var(--ec-letter-spacing-body);
  padding: 0 8px;
  border-radius: var(--ec-radius-badge);
  pointer-events: none;
}

.ec-label--new {
  background-color: var(--ec-status-success);
  color: var(--ec-text-inverse);
}
.ec-label--sale {
  background-color: var(--ec-status-sale);
  color: var(--ec-text-inverse);
}
.ec-label--logistics {
  background-color: var(--ec-surface-main);
  color: var(--ec-text-main);
  border: 1px solid var(--ec-border-default);
}
.ec-label--logistics[data-logistics="cool"] {
  background-color: var(--ec-logistics-cool-bg);
  color: var(--ec-logistics-cool-text);
  border-color: transparent;
}
.ec-label--logistics[data-logistics="frozen"] {
  background-color: var(--ec-logistics-frozen-bg);
  color: var(--ec-logistics-frozen-text);
  border-color: transparent;
}

/* ============================================================
   ソートバー
   ============================================================ */

.ec-sort-bar {
  display: inline-flex;
  align-items: center;
  position: relative;
  flex: 0 0 auto;
}

.ec-sort-form {
  display: inline-flex;
  height: 40px;
  align-items: center;
  gap: 16px;
  position: relative;
  border-radius: var(--ec-radius-button);
}

.ec-sort-bar__label {
  font-family: var(--ec-font-body);
  font-size: var(--ec-fz-md);
  font-weight: 400;
  letter-spacing: var(--ec-letter-spacing-body);
  line-height: 24px;
  color: var(--ec-text-main);
  white-space: nowrap;
}

.ec-sort-bar__current {
  font-family: var(--ec-font-body);
  font-size: var(--ec-fz-md);
  font-weight: 700;
  letter-spacing: var(--ec-letter-spacing-body);
  line-height: 24px;
  color: var(--ec-text-main);
  white-space: nowrap;
}

.ec-sort-bar__select {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: var(--ec-fz-md);
}

.ec-sort-bar__arrow {
  flex-shrink: 0;
  color: var(--ec-text-main);
}

@media (max-width: 768px) {
  .ec-sort-form {
    height: 36px;
    gap: 12px;
  }
  .ec-sort-bar__label,
  .ec-sort-bar__current {
    font-size: var(--ec-fz-sm);
    letter-spacing: var(--ec-letter-spacing-body);
  }
}

/* ============================================================
   レビュー＋お気に入り（カードフッター）
   ハート位置はレビュー表示の ON/OFF に依存せず常に右端固定。
   お気に入りは position:absolute で右端にピン留めし、
   レビュー側の表示状態（display:none 等）に影響されないようにする。
   ============================================================ */

.ec-product-card__footer {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  padding-right: 28px;
}

.ec-product-card__review {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.ec-review__star {
  color: var(--ec-color-rating-star);
  font-size: var(--ec-fz-xs);
  line-height: 1;
}

.ec-review__score {
  font-size: var(--ec-fz-xs);
  font-weight: 700;
  line-height: 20px;
  letter-spacing: var(--ec-letter-spacing-body);
  color: var(--ec-text-main);
}

.ec-review__count {
  font-size: var(--ec-fz-xs);
  line-height: 20px;
  letter-spacing: var(--ec-letter-spacing-body);
  color: var(--ec-text-main);
}

.ec-product-card__favorite {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ec-action-favorite);
  padding: 0;
  display: flex;
  align-items: center;
  transition: opacity 0.15s;
}

.ec-product-card__favorite:hover {
  opacity: 0.7;
}
.ec-product-card__favorite.is-active {
  color: var(--ec-action-favorite);
}

/* ============================================================
   ページネーション
   ============================================================ */

.ec-pagination {
  margin-top: calc(var(--ec-space-unit) * 12);
  display: flex;
  justify-content: center;
}

.ec-pagination .page-numbers {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
}

.ec-pagination .page-numbers li {
  display: inline-flex;
}

.ec-pagination .page-numbers a,
.ec-pagination .page-numbers span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 40px;
  padding: 4px 16px;
  font-size: var(--ec-fz-xs);
  font-weight: 400;
  line-height: 20px;
  letter-spacing: var(--ec-letter-spacing-body);
  color: var(--ec-text-main);
  text-decoration: none;
  border: 1px solid var(--ec-border-default);
  border-radius: var(--ec-radius-button);
  transition:
    background-color 0.15s,
    color 0.15s;
}

.ec-pagination .page-numbers a:hover {
  background-color: var(--ec-surface-main);
  text-decoration: none;
}

.ec-pagination .page-numbers .current {
  background-color: var(--ec-surface-inverse);
  color: var(--ec-text-inverse);
  border-color: var(--ec-text-main);
  font-weight: 700;
}

.ec-pagination .page-numbers .dots {
  border: none;
  min-width: auto;
  padding: 0;
}

.ec-pagination .page-numbers .prev,
.ec-pagination .page-numbers .next {
  width: 40px;
  min-width: 40px;
  height: 40px;
  border-radius: var(--ec-radius-pill);
  padding: 4px;
}

.ec-pagination .page-numbers .prev {
  opacity: 0.5;
}

/* ============================================================
   ボタン
   ============================================================ */

.ec-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--ec-space-unit) * 3) calc(var(--ec-space-unit) * 6);
  border-radius: var(--ec-radius-button);
  font-size: var(--ec-fz-base);
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition:
    background-color 0.15s,
    opacity 0.15s;
}

.ec-btn--cart {
  background-color: var(--ec-action-buy);
  color: var(--ec-text-inverse);
  width: 100%;
}

.ec-btn--cart:hover {
  background-color: var(--ec-action-buy-hover);
  text-decoration: none;
}
.ec-btn--cart.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  /* pointer-events は除去 — hover表示を維持しつつ、クリック無効化はJSで制御 */
}

/* ============================================================
   フィルタ
   ============================================================ */

.ec-filter {
  width: 220px;
}

/* ドロワーヘッダー（PCでは非表示、SPドロワー時のみ） */
.ec-filter__drawer-header {
  display: none;
}

.ec-filter__title {
  flex: 1;
  font-family: var(--ec-font-heading);
  font-size: var(--ec-fz-lg);
  font-weight: 700;
  letter-spacing: var(--ec-letter-spacing-heading);
  line-height: 32px;
  color: var(--ec-text-main);
  margin: 0;
}

.ec-filter__clear-link {
  background: none;
  border: none;
  font-family: var(--ec-font-body);
  font-size: var(--ec-fz-xs);
  font-weight: 400;
  letter-spacing: var(--ec-letter-spacing-body);
  line-height: 20px;
  color: var(--ec-action-interactive, #0066cc);
  text-decoration: underline;
  cursor: pointer;
  white-space: nowrap;
  padding: 0;
}

.ec-filter__clear-link:hover {
  opacity: 0.7;
}

/* 選択中タグ */
.ec-filter__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 24px 0;
}

.ec-filter__tag {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 4px 10px;
  background: var(--ec-surface-tag, #f4f4f4);
  border-radius: var(--ec-radius-pill);
  border: 1px solid var(--ec-border-default, #ccc);
}

.ec-filter__tag-label {
  font-family: var(--ec-font-body);
  font-size: var(--ec-fz-xs);
  font-weight: 400;
  letter-spacing: var(--ec-letter-spacing-body);
  line-height: 20px;
  color: var(--ec-text-main);
  overflow-wrap: break-word;
  word-break: break-word;
  max-width: 150px;
}

.ec-filter__tag-remove {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  width: 10px;
  height: 10px;
  position: relative;
  flex-shrink: 0;
}

.ec-filter__tag-x::before,
.ec-filter__tag-x::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 10px;
  height: 1px;
  background-color: var(--ec-text-main);
  border-radius: var(--ec-radius-pill);
}

.ec-filter__tag-x::before {
  transform: rotate(45deg);
}
.ec-filter__tag-x::after {
  transform: rotate(-45deg);
}

/* セクション */
.ec-filter__section {
  border-top: 1px solid var(--ec-border-default, #dedede);
  padding: 0;
}

.ec-filter__section-title {
  display: flex;
  height: 60px;
  align-items: center;
  font-family: var(--ec-font-body);
  font-size: var(--ec-fz-md);
  font-weight: 700;
  letter-spacing: var(--ec-letter-spacing-body);
  line-height: 24px;
  color: var(--ec-text-main);
  padding: 8px 0 4px;
}

.ec-filter__options {
  display: flex;
  flex-direction: column;
  gap: calc(var(--ec-space-unit) * 4);
  padding: calc(var(--ec-space-unit) * 2.5) 0 calc(var(--ec-space-unit) * 7.5);
}

/* チェックボックス */
.ec-filter__checkbox-box {
  position: relative;
  width: 16px;
  height: 16px;
  background-color: var(--ec-surface-main, #f8f8f8);
  border-radius: var(--ec-radius-badge);
  border: 1px solid var(--ec-border-default, #dedede);
  flex-shrink: 0;
  overflow: hidden;
}

.ec-filter__checkbox-box.is-checked {
  background-color: var(--ec-action-interactive, #0066cc);
  border-color: var(--ec-action-interactive, #0066cc);
}

.ec-filter__checkbox-box input[type='checkbox'] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}

.ec-filter__check-icon {
  position: absolute;
  top: 2px;
  left: 2px;
  pointer-events: none;
  display: none;
}

.ec-filter__checkbox-box.is-checked .ec-filter__check-icon {
  display: block;
}

/* アイテム行 */
.ec-filter__item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.ec-filter__item-name {
  flex: 1;
  font-family: var(--ec-font-body);
  font-size: var(--ec-fz-xs);
  font-weight: 400;
  letter-spacing: var(--ec-letter-spacing-body);
  line-height: 20px;
  color: var(--ec-text-main);
}

.ec-filter__item .ec-filter__checkbox-box.is-checked ~ .ec-filter__item-name {
  font-weight: 700;
}

.ec-filter__count {
  font-family: var(--ec-font-body);
  font-size: var(--ec-fz-2xs);
  font-weight: 400;
  letter-spacing: var(--ec-letter-spacing-body);
  line-height: 16px;
  color: var(--ec-text-subdued, #555);
  white-space: nowrap;
}

/* 0件グレーアウト（PoC達成条件） */
.ec-filter__item.is-zero,
.ec-filter__color-swatch.is-zero {
  opacity: 0.35;
  pointer-events: none;
}

/* カテゴリーツリー */
.ec-filter__category-tree {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ec-filter__cat-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ec-filter__cat-parent {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ec-filter__cat-parent .ec-filter__item {
  flex: 1;
}

.ec-filter__cat-toggle {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--ec-text-subdued, #555);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.ec-filter__cat-toggle[aria-expanded='true'] {
  transform: rotate(180deg);
}

.ec-filter__cat-children {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ec-filter__cat-children[hidden] {
  display: none;
}

.ec-filter__item--child {
  padding-left: 26px;
  gap: 6px;
}

.ec-filter__item--child .ec-filter__item-name {
  font-size: var(--ec-fz-2xs);
  letter-spacing: var(--ec-letter-spacing-body);
  line-height: 16px;
}

/* サイズ: 2カラムグリッド */
.ec-filter__size-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.ec-filter__size-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.ec-filter__size-item .ec-filter__item-name {
  font-size: var(--ec-fz-xs);
  letter-spacing: var(--ec-letter-spacing-body);
  line-height: 20px;
}

/* カラースウォッチ */
.ec-filter__color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
}

.ec-filter__color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
}

.ec-filter__color-swatch input[type='checkbox'] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  margin: 0;
}

.ec-filter__color-swatch.is-checked {
  border-color: var(--ec-text-main);
}

/* 価格帯フォーム */
.ec-filter__price-inputs {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ec-filter__price-field {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  padding: 4px 12px;
  border: 1px solid var(--ec-border-default, #dedede);
  border-radius: var(--ec-radius-pill);
  background-color: var(--ec-surface-main, #f8f8f8);
}

.ec-filter__price-yen {
  font-size: var(--ec-fz-2xs);
  color: var(--ec-text-main);
  flex-shrink: 0;
}

.ec-filter__price-input {
  width: 100%;
  border: none;
  background: transparent;
  font-family: var(--ec-font-body);
  font-size: var(--ec-fz-xs);
  letter-spacing: var(--ec-letter-spacing-body);
  line-height: 20px;
  color: var(--ec-text-main);
  outline: none;
  padding: 0;
  -moz-appearance: textfield;
}

.ec-filter__price-input::-webkit-inner-spin-button,
.ec-filter__price-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.ec-filter__price-sep {
  width: 5px;
  height: 1px;
  background-color: var(--ec-text-main);
  border-radius: var(--ec-radius-pill);
  flex-shrink: 0;
}

/* ドロワー／SPの詳細スタイルは assets/css/filter.css に集約 */

/* ============================================================
   バリエーション選択（商品詳細）
   ============================================================ */

.ec-variation__group {
  margin-bottom: 16px;
}

.ec-variation__label {
  font-size: var(--ec-fz-sm);
  font-weight: 600;
  margin-bottom: 8px;
}

.ec-variation__colors {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ec-variation__color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
  transition: border-color 0.15s;
}

.ec-variation__color-swatch input[type='radio'] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.ec-variation__color-swatch.is-selected {
  border-color: var(--ec-text-main);
}

.ec-variation__sizes {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ec-variation__size-btn {
  border: 1px solid var(--ec-border-default);
  border-radius: var(--ec-radius-button);
  padding: 6px 16px;
  font-size: var(--ec-fz-sm);
  cursor: pointer;
  position: relative;
  transition:
    border-color 0.15s,
    background-color 0.15s;
}

.ec-variation__size-btn input[type='radio'] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.ec-variation__size-btn.is-selected {
  border-color: var(--ec-text-main);
  background-color: var(--ec-text-main);
  color: var(--ec-text-inverse);
}

/* 存在しない組み合わせ（SKU が無い）→ 選択不可 */
.ec-variation__size-btn.is-disabled {
  opacity: 0.35;
  pointer-events: none;
  text-decoration: line-through;
}

/* 在庫切れ → 選択は可能（クリックすると「在庫切れ」を表示） */
.ec-variation__size-btn.is-soldout {
  opacity: 0.5;
  pointer-events: auto;
  cursor: pointer;
}

/* 在庫切れでも選択中であることが分かるようにする */
.ec-variation__size-btn.is-soldout.is-selected {
  opacity: 1;
}

/* ============================================================
   ギャラリー・商品詳細レイアウト
   → assets/css/product-detail.css に移動（single-products のみ読込）
   ============================================================ */

.ec-gallery__main {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--ec-radius-product-image);
  background-color: var(--ec-surface-main);
}

.ec-gallery__main-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.25s ease;
}

.ec-gallery__main-image.is-fading {
  opacity: 0;
}

.ec-gallery__thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.ec-gallery__thumb {
  width: 60px;
  height: 60px;
  border-radius: calc(var(--ec-radius-product-image) / 2);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  background: none;
  transition: border-color 0.15s;
}

.ec-gallery__thumb.is-active {
  border-color: var(--ec-text-main);
}
.ec-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================================
   商品詳細レイアウト
   ============================================================ */

.ec-product-detail__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(var(--ec-space-unit) * 8);
  max-width: 1280px;
  margin: calc(var(--ec-space-unit) * 8) auto;
  padding: 0 calc(var(--ec-space-unit) * 4);
}

@media (max-width: 768px) {
  .ec-product-detail__inner {
    grid-template-columns: 1fr;
  }
}

.ec-product-detail__name {
  font-family: var(--ec-font-heading);
  font-size: var(--ec-fz-xl);
  font-weight: 700;
  letter-spacing: var(--ec-letter-spacing-heading);
  margin-bottom: calc(var(--ec-space-unit) * 2);
}

.ec-product-detail__labels {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--ec-space-unit) * 1);
  margin-bottom: calc(var(--ec-space-unit) * 2);
}

.ec-product-detail__price {
  margin: 16px 0;
}

/* ============================================================
   ウィジェットエリア
   ============================================================ */

.ec-widget-area {
  margin-top: calc(var(--ec-space-unit) * 4);
  margin-bottom: calc(var(--ec-space-unit) * 4);
}

/* 全幅ウィジェットエリア: WordPress layout 制約を解除 */
.ec-widget-area.alignfull {
  max-width: none !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.ec-widget-area.alignfull .wp-block-image {
  width: 100%;
}

.ec-widget-area.alignfull .wp-block-image img {
  width: 100%;
}

/* ============================================================
   検索結果
   ============================================================ */

.ec-search-header {
  margin-bottom: 24px;
}
.ec-search-header__title {
  font-family: var(--ec-font-heading);
  font-size: var(--ec-fz-lg);
  font-weight: 700;
  letter-spacing: var(--ec-letter-spacing-heading);
}
.ec-search-header__count {
  color: var(--ec-text-subdued);
  font-size: var(--ec-fz-sm);
}

.ec-no-results {
  text-align: center;
  padding: 48px 16px;
  color: var(--ec-text-subdued);
}

/* ============================================================
   投稿カード（検索結果・投稿一覧で使用）
   ============================================================ */

.ec-post-card {
  display: flex;
  flex-direction: column;
  background: var(--ec-surface-card);
  border-radius: var(--ec-radius-card);
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.ec-post-card:hover {
  box-shadow: 0 calc(var(--ec-space-unit) * 1) calc(var(--ec-space-unit) * 3) rgba(0, 0, 0, 0.08);
}

.ec-post-card__thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.ec-post-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ec-post-card__body {
  padding: calc(var(--ec-space-unit) * 4);
}

.ec-post-card__title {
  font-size: var(--ec-fz-base);
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: calc(var(--ec-space-unit) * 2);
}

.ec-post-card__title a {
  color: var(--ec-text-main);
  text-decoration: none;
}

.ec-post-card__title a:hover {
  text-decoration: underline;
}

.ec-post-card__date {
  font-size: var(--ec-fz-xs);
  color: var(--ec-text-subdued);
  margin-bottom: calc(var(--ec-space-unit) * 2);
}

.ec-post-card__excerpt {
  font-size: var(--ec-fz-sm);
  color: var(--ec-text-subdued);
  line-height: 1.6;
}

.ec-post-card__excerpt-sp {
  display: none;
}

@media (max-width: 768px) {
  .ec-post-card__excerpt-pc {
    display: none;
  }
  .ec-post-card__excerpt-sp {
    display: inline;
  }
}

/* ============================================================
   投稿リストブロック
   ============================================================ */

.ec-post-list {
  display: grid;
  gap: calc(var(--ec-space-unit) * 6);
}

.ec-post-list--vertical {
  grid-template-columns: repeat(3, 1fr);
}

.ec-post-list--horizontal .ec-post-card {
  flex-direction: row;
}

.ec-post-list--horizontal .ec-post-card__thumb {
  width: calc(var(--ec-space-unit) * 60);
  flex-shrink: 0;
  aspect-ratio: auto;
}

.ec-post-list--horizontal .ec-post-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (max-width: 768px) {
  .ec-post-list--vertical {
    grid-template-columns: repeat(2, 1fr);
  }

  .ec-post-list--horizontal .ec-post-card {
    flex-direction: column;
  }

  .ec-post-list--horizontal .ec-post-card__thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 480px) {
  .ec-post-list--vertical {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   ブログパーツ
   ============================================================ */

.ec-blogpart {
  margin-bottom: calc(var(--ec-space-unit) * 6);
}

/* ============================================================
   PAGE TOP ボタン
   ============================================================ */

.ec-page-top {
  display: flex;
  height: 40px;
  align-items: center;
  justify-content: center;
  margin-top: 80px;
  border: 1px solid var(--ec-border-default, #dedede);
}

.ec-page-top__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--ec-fz-sm);
  font-weight: 400;
  letter-spacing: var(--ec-letter-spacing-body);
  color: var(--ec-text-main);
  text-decoration: none;
}

.ec-page-top__link:hover {
  text-decoration: none;
  opacity: 0.7;
}

@media (max-width: 768px) {
  .ec-page-top {
    padding: 9px 15px;
    margin-top: 40px;
  }
}

/* ============================================================
   レイアウト上書き（商品一覧専用）
   ============================================================ */

/* 商品一覧レイアウトはベースの ec-layout (max-width:1280px, padding:0 16px) をそのまま使用 */

/* ============================================================
   お知らせ（news CPT）一覧 ウィジェット
   ============================================================ */
/* お知らせ（INFORMATION）— Figma 40-4589: 左に見出し＋VIEW ALL／右に日付＋タイトル */
.ec-news {
  width: 100%;
  padding: 80px 0;
}
.ec-news__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 80px;
  row-gap: 36px;
  align-items: start;
}
.ec-news__heading {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}
.ec-news__heading-en {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  line-height: 48px;
  letter-spacing: 0.04em;
  color: var(--ec-text-main);
}
.ec-news__heading-ja {
  margin: 0;
  font-size: var(--ec-fz-base, 15px);
  font-weight: 700;
  line-height: 24px;
  letter-spacing: 0.1em;
  color: var(--ec-text-main);
}
.ec-news__viewall {
  grid-column: 1;
  grid-row: 2;
  align-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 36px;
  border: 1px solid var(--ec-border-default, #ccc);
  border-radius: 4px;
  background: #fff;
  color: var(--ec-text-main);
  font-size: var(--ec-fz-xs, 12px);
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 20px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s;
}
.ec-news__viewall:hover { background: var(--ec-text-main); color: #fff; }
.ec-news__list {
  grid-column: 2;
  grid-row: 1 / 3;
  min-width: 0;
}
.ec-news__row {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--ec-border-subdued, #e5e5e5);
  text-decoration: none;
}
.ec-news__date {
  flex-shrink: 0;
  color: var(--ec-text-subdued, #555);
  font-size: var(--ec-fz-sm, 14px);
  line-height: 24px;
  letter-spacing: 0.1em;
}
.ec-news__row-title {
  flex: 1 1 0;
  min-width: 0;
  color: var(--ec-text-main);
  font-size: var(--ec-fz-sm, 14px);
  line-height: 24px;
  letter-spacing: 0.1em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ec-news__row:hover .ec-news__row-title { text-decoration: underline; }

@media (max-width: 768px) {
  /* お知らせ SP（Figma 40-5061〜5093）: 見出し→リスト→VIEW ALL(中央) */
  .ec-news { padding: 48px 0; }
  .ec-news__inner {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0 15px;
  }
  .ec-news__heading { order: 1; }
  .ec-news__list { order: 2; margin-top: 40px; width: 100%; }
  .ec-news__viewall { order: 3; align-self: center; margin-top: 40px; }
  /* 行: 日付（上・12px・#291b17）＋ タイトル（下・下線・最大2行）。罫線#ccc・上下10px */
  .ec-news__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 10px 0;
    border-top-color: var(--ec-border-default, #ccc);
  }
  .ec-news__date {
    font-size: var(--ec-fz-xs, 12px);
    line-height: 20px;
    /* 日付はPC同様グレー（#555）。タイトルのみ濃色＋下線 */
  }
  .ec-news__row-title {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-decoration: underline;
  }
}

/* ============================================================
   ヒーロースライダー（sps-ec/hero-slider）
   ============================================================ */
.ec-hero {
  position: relative;
  width: 100%;
  background-color: var(--ec-surface-card, #fff);
}
.ec-hero__viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 1440 / 600;
  overflow: hidden;
}
/* 横スライドのカルーセル（フェードのちらつき回避） */
.ec-hero__track {
  display: flex;
  height: 100%;
  transition: transform 0.6s ease;
  will-change: transform;
}
.ec-hero__slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
}
.ec-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* 画像の上に暗幕（Figma 40-4495: rgba(41,27,23,0.35)）で文字可読性を確保 */
.ec-hero__slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba( 41, 27, 23, 0.35 );
  pointer-events: none;
  z-index: 1;
}
.ec-hero__body {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  /* テキスト部はクリックを透過（下のドットを押せるように）。ボタンのみ有効化 */
  pointer-events: none;
}
.ec-hero__btn-wrap,
.ec-hero__body a { pointer-events: auto; }
/* Figma 40-4496: 幅680pxの左寄せコピー、塊⇔ボタン gap36、文字色は白 */
.ec-hero__body-inner {
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  align-items: center;     /* VIEW MORE ボタンは中央 */
  gap: 36px;
  color: var(--ec-hero-fg, #fff);   /* スライドごとに変更可（既定: 白） */
}
.ec-hero__copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  text-align: left;        /* 見出し・本文は左寄せ */
}
.ec-hero__heading {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  line-height: 48px;
  letter-spacing: 0.04em;
}
.ec-hero__text {
  margin: 0;
  font-size: var(--ec-fz-base, 15px);
  font-weight: 400;
  line-height: 24px;
  letter-spacing: 0.1em;
}
.ec-hero__btn-wrap { text-decoration: none; }
/* VIEW MORE ボタン（Figma: 透明地・白枠 #e5e5e5・白文字・角丸4px・高さ48） */
.ec-hero__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 36px;
  border: 1px solid var(--ec-hero-fg, #fff);
  border-radius: 4px;
  background: transparent;
  color: var(--ec-hero-fg, #fff);
  font-size: var(--ec-fz-xs, 12px);
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 20px;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s;
}
.ec-hero__btn-arrow { font-size: 1.1em; line-height: 1; }
.ec-hero__btn-wrap:hover .ec-hero__btn {
  background: rgba(255, 255, 255, 0.15);
}

/* VIEW MORE ボタン（バナー） */
.ec-banner__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 36px;
  border: 1px solid var(--ec-border-subdued, #e5e5e5);
  border-radius: 4px;
  background: transparent;
  color: var(--ec-text-inversed, #fff);
  font-size: var(--ec-fz-xs, 12px);
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 20px;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s;
}
.ec-banner__item--link:hover .ec-banner__btn {
  background: rgba(255, 255, 255, 0.15);
}
/* ドット */
.ec-hero__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 24px;
  display: flex;
  justify-content: center;
  gap: 24px;
  z-index: 3;
}
.ec-hero__dot {
  box-sizing: border-box;
  width: 10px;
  height: 10px;
  padding: 0;
  border: 1px solid var(--ec-hero-dot, #fff);
  border-radius: 50%;
  background: transparent;   /* 非アクティブ=中抜き */
  cursor: pointer;
  pointer-events: auto;
  transition: background-color 0.2s;
}
.ec-hero__dot.is-active { background: var(--ec-hero-dot, #fff); }   /* アクティブ=べた塗り */

/* ============================================================
   バナー（sps-ec/banner）1〜3カラム
   ============================================================ */
.ec-banner { width: 100%; }
.ec-banner__grid { display: grid; gap: 0; }
.ec-banner--cols-1 .ec-banner__grid { grid-template-columns: 1fr; }
.ec-banner--cols-2 .ec-banner__grid { grid-template-columns: repeat(2, 1fr); }
.ec-banner--cols-3 .ec-banner__grid { grid-template-columns: repeat(3, 1fr); }

.ec-banner__item {
  position: relative;
  display: block;
  overflow: hidden;
  text-decoration: none;
  color: var(--ec-text-inversed, #fff);   /* 写真上の白文字 */
}
/* 画像の上に暗幕（Figma 1column 準拠: rgba(41,27,23,0.35)） */
.ec-banner__item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba( 41, 27, 23, 0.35 );
  pointer-events: none;
  z-index: 1;
}
.ec-banner__media { position: relative; width: 100%; z-index: 0; }
.ec-banner__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* 列数ごとのアスペクト比（Figma準拠） */
.ec-banner--cols-1 .ec-banner__media { aspect-ratio: 2 / 1; }
.ec-banner--cols-2 .ec-banner__media { aspect-ratio: 1 / 1; }
.ec-banner--cols-3 .ec-banner__media { aspect-ratio: 1 / 1; }

/* テキストを画像に重ねる */
.ec-banner__body {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 36px;
  padding: 40px;
}
.ec-banner__copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  text-align: left;
}
/* 1カラム: 800px幅のコピーを中央配置（テキストは左寄せ）、ボタンは中央 */
.ec-banner--cols-1 .ec-banner__body {
  align-items: center;
  justify-content: center;
}
.ec-banner--cols-1 .ec-banner__copy {
  max-width: 800px;
}
/* 2カラム: テキストは左寄せ＋縦中央、左右padding80px（Figma 40-4535） */
.ec-banner--cols-2 .ec-banner__body {
  align-items: flex-start;
  justify-content: center;
  padding: 40px 80px;
}
/* 3カラム: テキストは左寄せ＋縦中央、左右padding80px（Figma 40-4559） */
.ec-banner--cols-3 .ec-banner__body {
  align-items: flex-start;
  justify-content: center;
  padding: 40px 80px;
}
.ec-banner__heading {
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 48px;
}
.ec-banner--cols-1 .ec-banner__heading { font-size: 28px; }
.ec-banner--cols-2 .ec-banner__heading { font-size: 28px; }
/* 3カラムの見出しは 18px / 行間32 / 字間なし */
.ec-banner--cols-3 .ec-banner__heading { font-size: 18px; line-height: 32px; letter-spacing: 0; }
.ec-banner__text {
  margin: 0;
  font-size: var(--ec-fz-base, 15px);
  line-height: 24px;
  letter-spacing: 0.1em;
}

@media (max-width: 768px) {
  /* スマホ: 縦長ビューポート、テキスト・ボタン・インジケータすべて左寄せ */
  .ec-hero__viewport { aspect-ratio: 3 / 4; }
  .ec-hero__body { padding: 24px; align-items: center; }
  .ec-hero__body-inner { gap: 24px; align-items: flex-start; }   /* ボタンも左寄せ */
  .ec-hero__copy { gap: 12px; }
  .ec-hero__heading { font-size: 22px; line-height: 34px; letter-spacing: 0.04em; }
  .ec-hero__text { font-size: var(--ec-fz-sm, 14px); line-height: 22px; }
  .ec-hero__btn { height: 44px; padding: 0 28px; }
  /* インジケータも左寄せ（テキスト左端＝padding24pxに揃える） */
  .ec-hero__dots { bottom: 16px; gap: 16px; justify-content: flex-start; padding-left: 24px; }
  /* バナーはSPで1列縦積み（Figma 40-4973/4985/5014）
     1カラム=3:4、2/3カラム=1:1。テキストは左寄せ＋縦中央・余白30px */
  .ec-banner--cols-2 .ec-banner__grid,
  .ec-banner--cols-3 .ec-banner__grid { grid-template-columns: 1fr; }
  .ec-banner--cols-1 .ec-banner__media { aspect-ratio: 3 / 4; }
  .ec-banner--cols-2 .ec-banner__media,
  .ec-banner--cols-3 .ec-banner__media { aspect-ratio: 1 / 1; }
  .ec-banner .ec-banner__body {
    padding: 30px;
    gap: 32px;
    align-items: flex-start;
    justify-content: center;
  }
  .ec-banner .ec-banner__copy { gap: 20px; max-width: none; }
  .ec-banner .ec-banner__heading { font-size: 18px !important; line-height: 32px; letter-spacing: 0; }
  .ec-banner .ec-banner__text { font-size: var(--ec-fz-sm, 14px); line-height: 24px; letter-spacing: 0.1em; }
}
