/* ==========================================================
   クレヒフク 法人向けページ（既製品の法人購入／別注・OEM相談）
   すべてのクラスに「khb-」を付け、既存テーマのCSSと衝突しないようにしています。
   ページ本体は <div class="khb"> の中に入れてください。
   ========================================================== */

/* ---------- WordPress組み込み用の土台 ----------
   テーマの destyle.css が消しているブラウザ標準の見た目を、.khb の中だけ戻す。
   :where() で詳細度を0にしているため、下の各指定が常に優先される。 */
/* テーマ側から受け継ぐ文字設定を標準に戻す */
:where(.khb) {
  font-weight: 400;
  font-style: normal;
  text-transform: none;
  text-indent: 0;
  font-feature-settings: normal;
  word-break: normal;
}

/* destyle：* { min-width: 0 } → 標準の auto */
:where(.khb) * { min-width: auto; }

/* destyle：見出しの太字を解除 → 標準の太字 */
:where(.khb) :is(h1, h2, h3, h4, h5, h6) { font-weight: bold; }

/* destyle：dl の上下余白0・dt太字 → 標準（オーダープランの余白） */
:where(.khb) dl { margin: 1em 0; }
:where(.khb) dt { font-weight: normal; }
:where(.khb) dd { margin-left: 40px; }

/* destyle：リンクの下線なし → 標準の下線 */
:where(.khb) a { text-decoration: underline; }

/* destyle：ボタンの文字左寄せ・余白0 → 標準の中央寄せ（相談リストに入れる） */
:where(.khb) button { text-align: center; padding: 1px 6px; }

/* destyle：表のセルを上寄せ・余白0 → 標準 */
:where(.khb) :is(td, th) { vertical-align: middle; padding: 1px; }

.khb {
  --khb-ink: #111111;
  --khb-sub: #555555;
  --khb-line: #CCCCCC;
  --khb-gray: #F2F2F2;
  --khb-red: #C00000;
  --khb-red-dark: #8C0009;
  --khb-red-mid: #C42B23;
  font-family: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', sans-serif;
  color: var(--khb-ink);
  background: #FFFFFF;
  line-height: 1.9;
  letter-spacing: 0.06em;
  font-size: 14px;
}
.khb *, .khb *::before, .khb *::after { box-sizing: border-box; }
.khb img { max-width: 100%; display: block; }
.khb a { color: inherit; }
.khb h1, .khb h2, .khb h3, .khb p, .khb ol, .khb ul { margin: 0; }
.khb ol, .khb ul { padding: 0; list-style: none; }

.khb-en {
  font-family: 'Syncopate', 'Arial Black', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 700;
  letter-spacing: .04em;
}

/* スクロールで下から出てくる演出（対応ブラウザのみ） */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .khb-rv { animation: khb-up linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
  }
}
@keyframes khb-up { from { opacity: 0; transform: translateY(48px); } to { opacity: 1; transform: none; } }

/* ---------- 共通レイアウト ---------- */
.khb-wrap { max-width: 1240px; margin: 0 auto; padding: 80px 24px; display: flex; flex-direction: column; gap: 40px; }
.khb-wrap--narrow { max-width: 880px; gap: 32px; }
.khb-bg-gray { background: var(--khb-gray); }

.khb-head { text-align: center; display: flex; flex-direction: column; gap: 8px; }
.khb-head h2 { font-size: clamp(26px, 3.4vw, 40px); }
.khb-head__ja { font-size: 13px; }
.khb-head__lead { font-size: 13px; margin-top: 8px; }
.khb-head__note { font-size: 12px; color: var(--khb-sub); }
.khb-item__img--empty { border: 1px dashed #8A8A85; display: flex; align-items: center; justify-content: center; color: #666666; font-size: 12px; }
.khb-lead { text-align: center; font-size: 14px; margin-top: -16px; }
.khb-note { text-align: center; font-size: 13px; }

/* ---------- ボタン ---------- */
.khb-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 13px 24px; border-radius: 999px;
  text-decoration: none; text-align: center; font-weight: 700;
  transition: opacity .2s;
}
.khb-btn:hover { opacity: .85; }
.khb-btn--red { background: var(--khb-red); color: #FFFFFF; border: 1px solid var(--khb-red); }
.khb-btn--line { border: 1px solid var(--khb-ink); font-weight: 400; }
.khb-btn--white { border: 1px solid #FFFFFF; color: #FFFFFF; font-weight: 400; font-size: 13px; min-height: 44px; }

.khb-arrow { font-size: 12px; display: flex; align-items: center; gap: 10px; text-decoration: none; }
.khb-arrow::after { content: ""; flex: 0 0 32px; height: 1px; background: currentColor; }
.khb-arrow--lg { font-size: 13px; align-self: center; gap: 12px; }
.khb-arrow--lg::after { flex-basis: 48px; }

/* ---------- 冒頭 ---------- */
.khb-hero__img { width: 100%; height: clamp(320px, 50vw, 660px); object-fit: cover; }
.khb-hero__body {
  max-width: 1240px; margin: 0 auto; padding: 48px 24px 72px;
  display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-end; justify-content: space-between;
}
.khb-hero__text { flex: 1 1 480px; display: flex; flex-direction: column; gap: 20px; }
.khb-hero__side { flex: 1 1 380px; display: flex; flex-direction: column; gap: 20px; }
.khb-crumb { font-size: 11px; color: var(--khb-sub); }
.khb-crumb a { text-decoration: none; }
.khb-eyebrow { font-size: 13px; color: var(--khb-red); }
.khb-hero h1 { font-size: clamp(24px, 3.2vw, 34px); line-height: 1.6; font-weight: 700; letter-spacing: .08em; }
.khb-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--khb-ink); border-bottom: 1px solid var(--khb-ink);
}
.khb-stats > div { padding: 16px 8px; text-align: center; border-right: 1px solid #DDDDDD; }
.khb-stats > div:last-child { border-right: 0; }
.khb-stats__num { font-size: 20px; }
.khb-stats__label { font-size: 12px; }
.khb-hero__btns { display: flex; flex-wrap: wrap; gap: 12px; }
.khb-hero__btns .khb-btn--red { flex: 1 1 200px; }
.khb-hero__btns .khb-btn--line { flex: 1 1 160px; }

/* ---------- 用途タイル ---------- */
.khb-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.khb-tile { position: relative; display: block; width: 100%; overflow: hidden; aspect-ratio: 4 / 3; border: 0; padding: 0; margin: 0; font: inherit; letter-spacing: inherit; text-align: left; cursor: pointer; text-decoration: none; color: #FFFFFF; background: #222222; }
.khb-tile[aria-expanded="true"] { outline: 5px solid var(--khb-red); outline-offset: -5px; }
.khb-tile:focus-visible { outline: 3px solid var(--khb-red); outline-offset: -3px; }
.khb-tile__row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.khb-tile__cue { font-size: 12px; white-space: nowrap; }
.khb-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.khb-tile:hover img { transform: scale(1.04); }
.khb-tile__cap { position: absolute; inset: auto 0 0 0; padding: 48px 20px 18px; background: linear-gradient(to top, rgba(0,0,0,.78), rgba(0,0,0,0)); }
.khb-tile__en { font-size: 17px; }
.khb-tile__ja { font-size: 12px; }
.khb-tile__sub { font-size: 11px; opacity: .85; }

/* ---------- 商品 ---------- */
.khb-products { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px 20px; }
.khb-item { display: flex; flex-direction: column; gap: 12px; }
.khb-item__img { aspect-ratio: 1 / 1; background: #FFFFFF; overflow: hidden; }
.khb-item__img img { width: 100%; height: 100%; object-fit: cover; }
.khb-item__info { display: flex; flex-direction: column; gap: 2px; }
.khb-item__code { font-size: 12px; color: var(--khb-sub); }
.khb-item__name { font-size: 15px; font-weight: 700; }
.khb-item__spec { font-size: 12px; color: #333333; }
.khb-item__size { font-size: 12px; color: var(--khb-sub); }
.khb-add {
  min-height: 44px; border-radius: 999px; border: 1px solid var(--khb-ink);
  background: #FFFFFF; color: var(--khb-ink); font: inherit; font-size: 13px; cursor: pointer;
}
.khb-add[aria-pressed="true"] { background: var(--khb-ink); color: #FFFFFF; }

/* ---------- 表（数量と納期） ---------- */
.khb-table-box { max-width: 880px; width: 100%; margin: 0 auto; overflow-x: auto; }
.khb-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.khb-table th { text-align: left; font-weight: 700; padding: 20px 16px; border-bottom: 1px solid var(--khb-line); width: 32%; vertical-align: top; }
.khb-table td { padding: 20px 16px; border-bottom: 1px solid var(--khb-line); }

/* ---------- 流れ ---------- */
.khb-flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.khb-flow--boxed { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); background: var(--khb-gray); padding: 12px; }
.khb-flow li { background: #FFFFFF; padding: 28px 20px; display: flex; flex-direction: column; gap: 8px; }
.khb-flow__num { font-size: 22px; color: var(--khb-red); }
.khb-flow__title { font-weight: 700; }
.khb-flow__desc { font-size: 12px; color: #444444; }

/* ---------- 3列カード（工場と歴史／対応できる範囲） ---------- */
.khb-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.khb-cards--wide { gap: 40px 24px; }
.khb-card { display: flex; flex-direction: column; gap: 12px; }
.khb-card__img { aspect-ratio: 4 / 3; overflow: hidden; background: #E0E0E0; }
.khb-card__img img { width: 100%; height: 100%; object-fit: cover; }
.khb-card__en { font-size: 13px; }
.khb-card__title { font-size: 16px; font-weight: 700; }
.khb-card__text { font-size: 13px; }
.khb-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.khb-tags__label { font-size: 11px; color: var(--khb-sub); }
.khb-tag { border: 1px solid var(--khb-ink); border-radius: 999px; padding: 0 10px; font-size: 11px; }

/* ---------- オーダープラン ---------- */
.khb-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; max-width: 920px; width: 100%; margin: 0 auto; }
.khb-plan { color: #FFFFFF; padding: 40px 32px; display: flex; flex-direction: column; gap: 24px; }
.khb-plan--regular { background: var(--khb-red-dark); }
.khb-plan--custom { background: var(--khb-red-mid); }
.khb-plan h3 { font-size: 24px; text-align: center; letter-spacing: .1em; }
.khb-plan__desc { font-size: 14px; font-weight: 500; }
.khb-plan__range { font-size: 12px; }
.khb-plan__spec { border-top: 1px solid rgba(255,255,255,.6); padding-top: 20px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.khb-plan__spec dt { font-size: 12px; }
.khb-plan__spec dd { margin: 0; font-size: 16px; font-weight: 700; }
.khb-plan__spec dd small { display: block; font-size: 12px; font-weight: 400; }

/* ---------- 製造体制 ---------- */
.khb-factory { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.khb-factory__img { flex: 1 1 520px; aspect-ratio: 16 / 9; overflow: hidden; background: #E0E0E0; }
.khb-factory__img img { width: 100%; height: 100%; object-fit: cover; }
.khb-factory__text { flex: 1 1 340px; display: flex; flex-direction: column; gap: 14px; }
.khb-factory__title { font-size: 18px; font-weight: 700; }
.khb-step__head { display: flex; align-items: baseline; gap: 12px; font-size: 13px; }
.khb-step__num { color: var(--khb-red); }
.khb-steps-after { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.khb-steps-after li { background: #FFFFFF; padding: 20px 24px; display: flex; gap: 16px; align-items: baseline; }
.khb-steps-after__num { font-size: 13px; color: var(--khb-red); flex: 0 0 auto; }
.khb-steps-after__body { display: flex; flex-direction: column; gap: 2px; }
.khb-steps-after__title { font-weight: 700; }
.khb-steps-after__desc { font-size: 13px; }

/* ---------- 事例（準備中） ---------- */
.khb-case { border: 1px dashed #8A8A85; display: flex; flex-direction: column; background: #FFFFFF; }
.khb-case__img { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; color: #666666; font-size: 12px; }
.khb-case__body { padding: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.khb-case__title { font-weight: 700; font-size: 15px; }

/* ---------- よくある質問 ---------- */
.khb-faq { border-top: 1px solid var(--khb-ink); }
.khb-faq details { border-bottom: 1px solid var(--khb-line); }
.khb-faq summary { list-style: none; cursor: pointer; padding: 20px 4px; display: flex; gap: 16px; align-items: baseline; }
.khb-faq summary::-webkit-details-marker { display: none; }
.khb-faq summary::after { content: "＋"; }
.khb-faq details[open] summary::after { content: "－"; }
.khb-faq__q { color: var(--khb-red); }
.khb-faq__title { flex: 1; font-weight: 700; }
.khb-faq__a { padding: 0 4px 20px 36px; font-size: 13px; }

/* ---------- 相談窓口 ---------- */
.khb-contact { position: relative; background: var(--khb-ink); color: #FFFFFF; overflow: hidden; }
.khb-contact__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .28; }
.khb-contact__body { position: relative; max-width: 1240px; margin: 0 auto; padding: 88px 24px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.khb-contact h2 { font-size: clamp(26px, 3.4vw, 40px); }
.khb-contact .khb-btn--red { margin-top: 12px; padding: 15px 48px; }
.khb-contact__tel { font-size: 12px; opacity: .85; }
.khb-contact__tel a { text-decoration: none; }

/* ---------- もう一方のページへ ---------- */
.khb-cross { max-width: 1240px; margin: 0 auto; padding: 56px 24px; }
.khb-cross a { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid var(--khb-ink); padding: 32px; text-decoration: none; }
.khb-cross__en { font-size: 16px; }
.khb-cross__ja { font-size: 13px; }
.khb-cross__more { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.khb-cross__more::after { content: ""; width: 48px; height: 1px; background: currentColor; }

/* ---------- 相談リスト（画面下に固定） ---------- */
.khb-list { position: sticky; bottom: 0; z-index: 50; background: var(--khb-ink); color: #FFFFFF; padding-bottom: env(safe-area-inset-bottom, 0px); }
.khb-list[hidden] { display: none; }
.khb-list__in { max-width: 1240px; margin: 0 auto; padding: 14px 24px; display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.khb-list__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.khb-list__count { font-weight: 700; }
.khb-list__items { font-size: 12px; opacity: .85; overflow-wrap: anywhere; }
.khb-list__btns { display: flex; gap: 12px; flex-wrap: wrap; }
.khb-list__clear { min-height: 44px; background: none; color: #FFFFFF; border: 1px solid #FFFFFF; border-radius: 999px; padding: 0 20px; font: inherit; font-size: 13px; cursor: pointer; }
.khb-list .khb-btn--red { min-height: 44px; padding: 0 28px; font-size: 13px; }

/* ---------- 用途別の商品一覧 ---------- */
.khb-byuse { border-top: 2px solid var(--khb-ink); padding-top: 32px; display: flex; flex-direction: column; gap: 24px; }
.khb-byuse[hidden] { display: none; }
.khb-byuse__head { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: baseline; justify-content: space-between; }
.khb-byuse__title { font-size: 20px; font-weight: 700; }
.khb-byuse__close { min-height: 44px; background: none; border: 1px solid var(--khb-ink); border-radius: 999px; padding: 0 20px; font: inherit; font-size: 13px; cursor: pointer; }
.khb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.khb-chip { min-height: 40px; border-radius: 999px; border: 1px solid var(--khb-ink); padding: 0 16px; font: inherit; font-size: 13px; cursor: pointer; background: #FFFFFF; color: var(--khb-ink); }
.khb-chip[aria-pressed="true"] { background: var(--khb-ink); color: #FFFFFF; }
.khb-mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 24px 16px; }
.khb-mini li { display: flex; flex-direction: column; gap: 8px; }
.khb-mini__img { aspect-ratio: 1 / 1; background: #FFFFFF; overflow: hidden; }
.khb-mini__img img { width: 100%; height: 100%; object-fit: contain; }
.khb-mini__code { font-size: 11px; color: var(--khb-sub); }
.khb-mini__name { font-size: 13px; font-weight: 700; line-height: 1.6; }
.khb-mini__link { font-size: 12px; color: var(--khb-sub); text-underline-offset: 3px; }
.khb-mini .khb-add { min-height: 40px; font-size: 12px; letter-spacing: 0; }
