/*
Theme Name: Original Donburi
Theme URI: https://original-donburi.com/
Author: Original Donburi
Author URI: https://original-donburi.com/
Description: オリジナルどんぶり・レンゲの制作専門店「オリジナルどんぶりとレンゲ.com」専用に設計した、軽量・高速・SEO最適化のWordPress + WooCommerce対応オリジナルテーマ。jQuery非依存、セマンティックHTML5、JSON-LD構造化データ、Core Web Vitals最適化。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
Text Domain: original-donburi
Tags: e-commerce, one-column, two-columns, custom-logo, custom-menu, translation-ready
*/

/* ==========================================================================
   1. CSS変数（デザイントークン）
   ========================================================================== */
:root {
  --color-primary: #23408e;      /* ブランド紺藍 */
  --color-primary-dark: #16295c;
  --color-primary-light: #3a5bbf;
  --color-accent: #b5342a;       /* 柿色アクセント（CTA） */
  --color-accent-hover: #99291f;
  --color-gold: #b98a2f;         /* 窯元・陶器の golden */
  --color-bg: #faf8f3;           /* 生成り背景 */
  --color-surface: #ffffff;
  --color-text: #2b2b2e;
  --color-text-muted: #63636b;
  --color-border: #e4e0d6;
  --color-success: #2e7d4f;
  --font-sans: "Zen Kaku Gothic New", "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  --font-serif: "Shippori Mincho", "Noto Serif JP", "Hiragino Mincho ProN", serif;
  --fs-xs: 0.78rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.0625rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 2rem;
  --fs-hero: clamp(1.75rem, 4.5vw, 3rem);
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(30, 35, 60, 0.08);
  --shadow-md: 0 6px 18px rgba(30, 35, 60, 0.1);
  --shadow-lg: 0 12px 32px rgba(30, 35, 60, 0.14);
  --container: 1180px;
  --header-h: 72px;
}

/* ==========================================================================
   2. リセット & ベース
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  line-height: 1.8;
  color: var(--color-text);
  background: var(--color-bg);
  font-feature-settings: "palt";
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: color .2s ease, opacity .2s ease; }
a:hover { color: var(--color-primary-light); }
ul, ol { margin: 0; padding: 0; }
h1, h2, h3, h4, h5, h6, p, figure { margin: 0; line-height: 1.5; }
h1, h2 { font-weight: 700; letter-spacing: .02em; }
button { font-family: inherit; }
:focus-visible { outline: 3px solid var(--color-primary-light); outline-offset: 2px; }

.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--space-4); }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 999;
  background: var(--color-primary); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 8px;
  transition: top .2s ease;
}
.skip-link:focus { top: 0; color: #fff; }

/* ==========================================================================
   3. ヘッダー
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.announcement-bar {
  background: var(--color-primary); color: #fff;
  font-size: var(--fs-xs); letter-spacing: .05em;
  padding: 6px 16px; text-align: center;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4); min-height: var(--header-h); max-width: var(--container);
  margin-inline: auto; padding-inline: var(--space-4);
}
.site-branding { display: flex; align-items: center; flex-shrink: 0; }
.custom-logo { max-height: 52px; width: auto; }
.site-title { font-size: 1.15rem; font-weight: 700; color: var(--color-primary); }
.site-title a { color: inherit; }
.site-description { font-size: var(--fs-xs); color: var(--color-text-muted); }

.global-nav > ul { display: flex; align-items: center; gap: 2px; list-style: none; }
.global-nav a {
  display: block; padding: 10px 14px; font-size: var(--fs-sm); font-weight: 500;
  color: var(--color-text); border-radius: 8px;
}
.global-nav a:hover { color: var(--color-primary); background: #eef1fa; }
.global-nav .sub-menu {
  display: none; position: absolute; z-index: 10; min-width: 220px;
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius);
  box-shadow: var(--shadow-md); padding: 8px; list-style: none;
}
.global-nav li { position: relative; }
.global-nav li:hover > .sub-menu, .global-nav li:focus-within > .sub-menu { display: block; }

.header-cart {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  padding: 9px 16px; border-radius: 999px;
  background: var(--color-accent); color: #fff;
  font-size: var(--fs-sm); font-weight: 700;
  transition: background .2s ease, transform .2s ease;
}
.header-cart:hover { background: var(--color-accent-hover); color: #fff; transform: translateY(-1px); }
.cart-count {
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: #fff; color: var(--color-accent);
  font-size: var(--fs-xs); font-weight: 700; line-height: 20px; text-align: center;
}
.nav-toggle {
  display: none; width: 48px; height: 48px; border: none; background: transparent;
  cursor: pointer; padding: 10px; border-radius: 8px;
}
.nav-toggle svg { width: 26px; height: 26px; stroke: var(--color-primary); }

/* ==========================================================================
   4. ヒーロー / フロントページ
   ========================================================================== */
.hero {
  position: relative; overflow: hidden; text-align: center;
  padding: var(--space-8) var(--space-4) var(--space-7);
  background:
    radial-gradient(ellipse at 20% 0%, rgba(185, 138, 47, 0.14), transparent 55%),
    radial-gradient(ellipse at 85% 100%, rgba(35, 64, 142, 0.12), transparent 55%),
    linear-gradient(180deg, #f2efe6 0%, var(--color-bg) 100%);
}
.hero-inner { max-width: 820px; margin-inline: auto; }
.hero h1 { font-size: var(--fs-hero); color: var(--color-primary); line-height: 1.35; }
.hero h1 .accent { color: var(--color-gold); }
.hero-lead { margin-top: var(--space-5); color: var(--color-text-muted); font-size: var(--fs-lg); }
.hero-actions { margin-top: var(--space-6); display: flex; gap: var(--space-4); justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 34px; border-radius: 999px;
  font-weight: 700; font-size: var(--fs-base); line-height: 1.4; cursor: pointer;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.btn-primary { background: var(--color-accent); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--color-accent-hover); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-secondary { background: #fff; color: var(--color-primary); border: 2px solid var(--color-primary); }
.btn-secondary:hover { background: var(--color-primary); color: #fff; transform: translateY(-2px); }

.section { padding: var(--space-8) 0; }
.section-alt { background: #fff; }
.section-head { text-align: center; margin-bottom: var(--space-6); }
.section-head h2 { font-size: var(--fs-2xl); color: var(--color-primary); }
.section-head .en { display: block; margin-top: 6px; font-size: var(--fs-sm); letter-spacing: .18em; text-transform: uppercase; color: var(--color-gold); }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-5); }
.feature-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-6) var(--space-5);
  box-shadow: var(--shadow-sm); transition: transform .25s ease, box-shadow .25s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-card .icon {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: #fff; font-size: 1.5rem; font-weight: 700; margin-bottom: var(--space-4);
}
.feature-card h3 { font-size: var(--fs-lg); margin-bottom: var(--space-2); color: var(--color-primary); }
.feature-card p { color: var(--color-text-muted); font-size: var(--fs-base); }

/* 商品カテゴリーセクション */
.product-panel {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm);
}
.product-panel + .product-panel { margin-top: var(--space-7); }
.product-panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  flex-wrap: wrap; padding: var(--space-4) var(--space-5);
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: #fff;
}
.product-panel-head h3 { font-size: var(--fs-lg); }
.product-panel-head .more { color: #fff; font-size: var(--fs-sm); border-bottom: 1px solid rgba(255,255,255,.6); padding-bottom: 2px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-5); padding: var(--space-5); }
.product-card {
  display: flex; flex-direction: column; border: 1px solid var(--color-border);
  border-radius: var(--radius); overflow: hidden; background: #fff;
  transition: transform .2s ease, box-shadow .2s ease;
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.product-card img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; }
.product-card .body { padding: var(--space-3) var(--space-4) var(--space-4); display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card .name { font-size: var(--fs-sm); font-weight: 700; line-height: 1.5; }
.product-card .name a { color: var(--color-text); }
.product-card .price { color: var(--color-accent); font-weight: 700; }
.product-panel .no-products { padding: var(--space-6); color: var(--color-text-muted); text-align: center; }

/* FAQ誘導 & コラム */
.column-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--space-5); }
.column-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease;
}
.column-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.column-card img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.column-card .body { padding: var(--space-4); display: flex; flex-direction: column; gap: 8px; flex: 1; }
.column-card .cat { font-size: var(--fs-xs); color: var(--color-gold); font-weight: 700; letter-spacing: .08em; }
.column-card h3 { font-size: var(--fs-base); line-height: 1.6; }
.column-card h3 a { color: var(--color-text); }
.column-card time { font-size: var(--fs-xs); color: var(--color-text-muted); margin-top: auto; }

.cta-band {
  background: linear-gradient(120deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff; text-align: center; padding: var(--space-7) var(--space-4); border-radius: var(--radius-lg);
}
.cta-band h2 { font-size: var(--fs-xl); }
.cta-band p { margin-top: var(--space-3); opacity: .85; }
.cta-band .btn { margin-top: var(--space-5); background: var(--color-accent); color: #fff; }
.cta-band .btn:hover { background: var(--color-accent-hover); color: #fff; }

/* ==========================================================================
   5. 記事コンテンツ
   ========================================================================== */
.page-hero {
  background: linear-gradient(120deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: #fff; padding: var(--space-6) 0;
}
.page-hero h1 { font-size: var(--fs-xl); }
.breadcrumb { margin-top: 10px; font-size: var(--fs-xs); opacity: .85; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; opacity: .6; }
.breadcrumb a { color: #fff; }

.content-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--space-7); padding: var(--space-7) 0; }
.entry-area { min-width: 0; }
.entry-header h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.4; color: var(--color-primary); }
.entry-meta { display: flex; gap: var(--space-4); flex-wrap: wrap; margin-top: var(--space-3); font-size: var(--fs-sm); color: var(--color-text-muted); }
.entry-thumb { margin-top: var(--space-5); border-radius: var(--radius-lg); overflow: hidden; }
.entry-content { margin-top: var(--space-6); background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: clamp(20px, 4vw, 44px); }
.entry-content > * + * { margin-top: 1.2em; }
.entry-content h2 {
  font-size: var(--fs-xl); color: var(--color-primary); padding-bottom: .4em;
  border-bottom: 3px solid var(--color-border); position: relative;
}
.entry-content h2::after { content: ""; position: absolute; left: 0; bottom: -3px; width: 18%; height: 3px; background: var(--color-gold); }
.entry-content h3 { font-size: var(--fs-lg); color: var(--color-primary); }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li + li { margin-top: .4em; }
.entry-content blockquote { margin: 0; padding: var(--space-4) var(--space-5); background: #f4f6fb; border-left: 4px solid var(--color-primary); border-radius: 0 var(--radius) var(--radius) 0; color: var(--color-text-muted); }
.entry-content img { border-radius: var(--radius); }
.entry-content table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.entry-content th, .entry-content td { border: 1px solid var(--color-border); padding: 10px 12px; text-align: left; }
.entry-content th { background: #f4f6fb; color: var(--color-primary); }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; }
.entry-tags { margin-top: var(--space-5); display: flex; gap: 8px; flex-wrap: wrap; }
.entry-tags a { font-size: var(--fs-xs); border: 1px solid var(--color-border); border-radius: 999px; padding: 4px 12px; color: var(--color-text-muted); background: #fff; }
.entry-tags a:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* ==========================================================================
   6. サイドバー / アーカイブ / ページ
   ========================================================================== */
.widget-area .widget { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); padding: var(--space-5); }
.widget-area .widget + .widget { margin-top: var(--space-5); }
.widget-area h2, .widget-area .widget-title { font-size: var(--fs-base); color: var(--color-primary); margin-bottom: var(--space-3); padding-bottom: 8px; border-bottom: 2px solid var(--color-border); }
.widget-area ul { list-style: none; }
.widget-area li { padding: 8px 0; border-bottom: 1px dashed var(--color-border); font-size: var(--fs-sm); }
.widget-area li a { color: var(--color-text); display: block; }
.widget-area li a:hover { color: var(--color-primary); }

.archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--space-5); padding: var(--space-7) 0; }
.pagination, .woocommerce-pagination { margin: var(--space-6) 0 var(--space-7); display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pagination .page-numbers {
  min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 14px; border: 1px solid var(--color-border); border-radius: var(--radius);
  background: #fff; color: var(--color-text); font-weight: 700; font-size: var(--fs-sm);
}
.pagination .page-numbers.current, .pagination a.page-numbers:hover { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* ==========================================================================
   7. 検索 / 404 / フッター
   ========================================================================== */
.notfound-wrap { text-align: center; padding: var(--space-8) var(--space-4); }
.notfound-wrap h1 { font-size: var(--fs-2xl); color: var(--color-primary); }
.notfound-wrap p { margin-top: var(--space-4); color: var(--color-text-muted); }
.search-form { display: flex; gap: 8px; max-width: 480px; margin: var(--space-5) auto 0; }
.search-form input[type="search"] {
  flex: 1; min-height: 48px; padding: 10px 16px; border: 1px solid var(--color-border);
  border-radius: var(--radius); font-size: var(--fs-base); font-family: inherit; background: #fff;
}
.search-form button {
  min-height: 48px; padding: 10px 22px; border: none; border-radius: var(--radius);
  background: var(--color-primary); color: #fff; font-weight: 700; cursor: pointer;
}
.search-form button:hover { background: var(--color-primary-dark); }

.site-footer { background: var(--color-primary-dark); color: rgba(255, 255, 255, 0.85); margin-top: var(--space-8); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-6); padding: var(--space-7) 0 var(--space-6); }
.site-footer h2, .site-footer h3 { color: #fff; font-size: var(--fs-base); margin-bottom: var(--space-3); }
.site-footer a { color: rgba(255, 255, 255, 0.85); font-size: var(--fs-sm); }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; }
.site-footer li { padding: 5px 0; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding: var(--space-4) 0; text-align: center; font-size: var(--fs-xs);
}

/* ==========================================================================
   8. WooCommerce 調整
   ========================================================================== */
.woocommerce ul.products { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--space-5); margin: var(--space-5) 0 !important; }
.woocommerce ul.products li.product {
  width: auto !important; margin: 0 !important; background: #fff;
  border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; padding-bottom: var(--space-4);
  transition: transform .2s ease, box-shadow .2s ease;
}
.woocommerce ul.products li.product:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.woocommerce ul.products li.product img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: var(--fs-sm) !important; font-weight: 700; padding: 10px 16px 0 !important; min-height: 0; }
.woocommerce ul.products li.product .price { padding: 0 16px; color: var(--color-accent) !important; font-weight: 700; }
.woocommerce ul.products li.product .button { margin: 12px 16px 0; border-radius: 999px; background: var(--color-primary) !important; color: #fff !important; text-align: center; }
.woocommerce ul.products li.product .button:hover { background: var(--color-primary-dark) !important; }
.woocommerce span.onsale {
  position: absolute; z-index: 2; top: 10px; left: 10px; margin: 0;
  background: var(--color-accent); color: #fff; border-radius: 999px;
  padding: 4px 14px; font-size: var(--fs-xs); font-weight: 700; line-height: 1.6;
}
.woocommerce div.product .price { color: var(--color-accent); font-weight: 700; font-size: var(--fs-lg); }
.woocommerce div.product form.cart .button, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit {
  border-radius: 999px; background: var(--color-accent) !important; color: #fff !important;
  font-weight: 700 !important; padding: 12px 30px !important; transition: background .2s ease;
}
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover, .woocommerce #respond input#submit:hover {
  background: var(--color-accent-hover) !important; color: #fff !important;
}
.woocommerce .woocommerce-message, .woocommerce .woocommerce-info { border-top-color: var(--color-primary); border-radius: var(--radius); }
.woocommerce .woocommerce-message::before, .woocommerce .woocommerce-info::before { color: var(--color-primary); }
.woocommerce .star-rating span::before { color: var(--color-gold); }

/* ==========================================================================
   10. 商品ページ見積もりフォーム（CF7）
   ========================================================================== */
.od-estimate-form {
  margin: var(--space-7) 0 var(--space-6);
  background: linear-gradient(180deg, #ffffff 0%, #f7f9ff 100%);
  border: 1px solid var(--color-border);
  border-top: 4px solid var(--color-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  scroll-margin-top: calc(var(--header-h) + 12px);
  box-sizing: border-box;
}
.od-estimate-form *, .od-estimate-form *::before, .od-estimate-form *::after { box-sizing: border-box; }
.od-estimate-form[hidden] { display: none !important; }
.od-estimate-form__head {
  background: linear-gradient(120deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: #fff;
  padding: var(--space-5) var(--space-6);
}
.od-estimate-form__head h2 {
  font-size: var(--fs-lg);
  margin: 0;
  color: #fff;
  letter-spacing: .03em;
}
.od-estimate-form__head p {
  margin-top: 6px;
  font-size: var(--fs-sm);
  opacity: .92;
  line-height: 1.7;
}
.od-estimate-form__body {
  padding: clamp(20px, 4vw, 40px);
  overflow: visible;
}

/* CF7 default resets — stop its own flex/grid/float from competing with theme */
.od-estimate-form__body .wpcf7 { margin: 0; }
.od-estimate-form__body .wpcf7 form { display: block; margin: 0; }
/* Each CF7 row is a normal block, NOT a flex child of the form. */
.od-estimate-form__body .wpcf7 form > p,
.od-estimate-form__body .wpcf7 form > div,
.od-estimate-form__body .wpcf7 form > .wpcf7-form { display: block; margin: 0 0 22px; }
.od-estimate-form__body .wpcf7 form > p:last-child { margin-bottom: 0; }

/* Row-level wrap: label on its own line, then input+unit aligns inline.
   This is implemented via a `display:flex` row when a label is present so the
   unit (個 / 円) stays on the same line as the input. */
.od-estimate-form__body .wpcf7 form > p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 10px;
  row-gap: 6px;
}
.od-estimate-form__body .wpcf7 form > p > label,
.od-estimate-form__body .wpcf7 form > .label,
.od-estimate-form__body .wpcf7 form > div > label {
  display: block;
  flex: 0 0 100%;
  font-weight: 700;
  font-size: var(--fs-sm);
  color: var(--color-primary);
  line-height: 1.6;
  margin: 0;
}

/* CF7 wraps every input in <span class="wpcf7-form-control-wrap">.
   Give the wrap a flex value so it shares row space with the unit. */
.od-estimate-form__body .wpcf7-form-control-wrap {
  display: inline-block;
  flex: 1 1 320px;
  min-width: 0;
  margin: 0;
  position: relative;
}

/* Form controls — never 100% width; let the unit sit on the same line. */
.od-estimate-form__body .wpcf7 input[type="text"],
.od-estimate-form__body .wpcf7 input[type="email"],
.od-estimate-form__body .wpcf7 input[type="tel"],
.od-estimate-form__body .wpcf7 input[type="number"],
.od-estimate-form__body .wpcf7 input[type="url"],
.od-estimate-form__body .wpcf7 select {
  width: 100%;
  max-width: 320px;
  min-height: 48px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: var(--fs-base);
  color: var(--color-text);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.od-estimate-form__body .wpcf7 textarea {
  width: 100%;
  max-width: 640px;
  min-height: 160px;
  resize: vertical;
  line-height: 1.7;
  padding: 12px 14px;
  font-family: inherit;
  font-size: var(--fs-base);
  color: var(--color-text);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: border-color .2s ease, box-shadow .2s ease;
}
/* Any anonymous text node next to the input (個 / 円) keeps on the same row */
.od-estimate-form__body .wpcf7 form > p { white-space: normal; }
.od-estimate-form__body .wpcf7 form > p > .wpcf7-form-control-wrap + br { display: none; }

/* Focus states */
.od-estimate-form__body .wpcf7 input:focus,
.od-estimate-form__body .wpcf7 textarea:focus,
.od-estimate-form__body .wpcf7 select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(35, 64, 142, .15);
}

/* Radio / checkbox groups — full-width wrapper, items wrap naturally */
.od-estimate-form__body .wpcf7 form > p .wpcf7-form-control.wpcf7-radio,
.od-estimate-form__body .wpcf7 form > p .wpcf7-form-control.wpcf7-checkbox {
  flex: 0 0 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}
.od-estimate-form__body .wpcf7-list-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-sm);
  color: var(--color-text);
  margin: 0;
}
.od-estimate-form__body .wpcf7 input[type="checkbox"],
.od-estimate-form__body .wpcf7 input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
  margin: 0;
}

/* Acceptance checkboxes (校正サンプル rows may render via this class) */
.od-estimate-form__body .wpcf7-acceptance,
.od-estimate-form__body .wpcf7-form .wpcf7-acceptance {
  flex: 0 0 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 0;
  margin: 0;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
.od-estimate-form__body .wpcf7-acceptance .wpcf7-list-item {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}

/* Submit button */
.od-estimate-form__body .wpcf7-form .wpcf7-submit,
.od-estimate-form__body .wpcf7 input[type="submit"] {
  min-height: 52px;
  padding: 12px 40px;
  border: none;
  border-radius: 999px;
  background: var(--color-accent);
  color: #fff !important;
  font-weight: 700;
  font-size: var(--fs-base);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.od-estimate-form__body .wpcf7-form .wpcf7-submit:hover,
.od-estimate-form__body .wpcf7 input[type="submit"]:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Validation */
.od-estimate-form__body .wpcf7-not-valid {
  border-color: var(--color-accent) !important;
  box-shadow: 0 0 0 3px rgba(181, 52, 42, .12);
}
.od-estimate-form__body .wpcf7-not-valid-tip {
  color: var(--color-accent);
  font-size: var(--fs-xs);
  margin-top: 4px;
}
.od-estimate-form__body .wpcf7-response-output {
  margin: var(--space-3) 0 0;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: var(--fs-sm);
}
.od-estimate-form__body .wpcf7-mail-sent-ok { background: #e9f6ee; border: 1px solid #b9dfc5; color: var(--color-success); }
.od-estimate-form__body .wpcf7-validation-errors,
.od-estimate-form__body .wpcf7-spam-blocked { background: #fdecea; border: 1px solid #f5c2bd; color: #99251f; }

/* Mobile (375px) layout — single column, full-width input, submit full width */
@media (max-width: 600px) {
  .od-estimate-form { margin: var(--space-5) 0; }
  .od-estimate-form__head { padding: var(--space-4); }
  .od-estimate-form__body { padding: 20px; }
  .od-estimate-form__body .wpcf7-form-control-wrap { flex: 1 1 100%; }
  .od-estimate-form__body .wpcf7 input[type="text"],
  .od-estimate-form__body .wpcf7 input[type="email"],
  .od-estimate-form__body .wpcf7 input[type="tel"],
  .od-estimate-form__body .wpcf7 input[type="number"],
  .od-estimate-form__body .wpcf7 input[type="url"],
  .od-estimate-form__body .wpcf7 select,
  .od-estimate-form__body .wpcf7 textarea { max-width: 100%; }
  .od-estimate-form__body .wpcf7-form .wpcf7-submit,
  .od-estimate-form__body .wpcf7 input[type="submit"] { width: 100%; }
}


/* ==========================================================================
   9. モバイル対応
   ========================================================================== */
@media (max-width: 900px) {
  .content-wrap { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .global-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg); padding: var(--space-4);
    max-height: calc(100vh - 120px); overflow-y: auto;
  }
  .global-nav.is-open { display: block; }
  .global-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .global-nav a { padding: 14px 12px; font-size: var(--fs-base); border-radius: 8px; }
  .global-nav .sub-menu { display: block; position: static; border: none; box-shadow: none; padding-left: 16px; }
  .header-cart .cart-label-text { display: none; }
  .hero { padding: var(--space-7) var(--space-4); }
  .section { padding: var(--space-7) 0; }
}
@media (max-width: 600px) {
  :root { --header-h: 60px; }
  body { font-size: var(--fs-base); }
  .custom-logo { max-height: 40px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-3); padding: var(--space-4); }
  .product-panel-head { padding: var(--space-3) var(--space-4); }
  .entry-content { padding: 20px; }
  .hero-actions .btn { width: 100%; }
}

/* 印刷 & モーション低減 */
@media print {
  .site-header, .site-footer, .widget-area, .breadcrumb, .nav-toggle, .header-cart { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
