/* ============================================
   GI★GEAR Off-road Catalog - main stylesheet
   ============================================ */
:root {
  --c-primary: #14296b;      /* GI★GEAR navy */
  --c-primary-dark: #0a173f;
  --c-accent: #e60012;       /* star red */
  --c-accent-dark: #b3000d;
  --c-ink: #0d1117;
  --c-text: #1a1d25;
  --c-text-sub: #5d6471;
  --c-bg: #f5f6f8;
  --c-bg-warm: #f0ebe2;
  --c-card: #ffffff;
  --c-border: #d9dde4;
  --c-success: #2c8a4a;
  --c-warning: #d18c10;
  --c-danger:  #c0392b;
  --c-mud: #4a3a2a;
  --shadow-sm: 0 1px 2px rgba(13,17,23,.08);
  --shadow-md: 0 6px 18px rgba(13,17,23,.10);
  --shadow-lg: 0 14px 40px rgba(13,17,23,.18);
  --radius: 6px;
  --radius-lg: 12px;
  --header-h: 64px;
  --header-h-sp: 56px;
  --container: 1240px;
  --t-fast: 150ms ease;
  --t: 220ms cubic-bezier(.2,.7,.3,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Meiryo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 0;
}
img { max-width: 100%; display: block; }
a { color: var(--c-primary); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--c-accent); }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 15px; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* ============================================ Header */
.site-header {
  background: #ffffff;
  border-bottom: 3px solid var(--c-primary);
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-sm);
}
.site-header .bar {
  height: var(--header-h);
  display: flex; align-items: center; gap: 20px;
}
.site-header .logo { display: flex; align-items: center; gap: 10px; }
.site-header .logo img { height: 40px; width: auto; display: block; }
.site-header nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.site-header nav a {
  padding: 8px 14px; border-radius: var(--radius);
  font-weight: 600; font-size: 14px; color: var(--c-text);
  position: relative;
}
.site-header nav a.is-active,
.site-header nav a:hover { background: var(--c-bg); color: var(--c-primary); }

/* Header search bar (キーワード検索) */
.header-search {
  display: flex; align-items: center;
  flex: 1; max-width: 360px; min-width: 180px;
  background: var(--c-bg); border-radius: 100px;
  padding: 4px 4px 4px 14px;
  border: 1px solid var(--c-border);
  transition: var(--t-fast);
  margin: 0 8px;
}
.header-search:focus-within {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(20,41,107,.12);
  background: #fff;
}
.header-search .hs-icon {
  width: 16px; height: 16px;
  color: var(--c-text-sub); flex-shrink: 0;
}
.header-search input {
  flex: 1; border: 0; background: transparent;
  height: 32px; padding: 0 8px;
  font-size: 13px; min-width: 0; color: var(--c-text);
}
.header-search input:focus { outline: 0; }
.header-search input::placeholder { color: #9aa3b2; }
.header-search .hs-go {
  height: 28px; padding: 0 14px;
  border: 0; border-radius: 100px;
  background: var(--c-primary); color: #fff;
  font-size: 12px; font-weight: 700;
  cursor: pointer; transition: var(--t-fast); white-space: nowrap;
}
.header-search .hs-go:hover { background: var(--c-primary-dark); }
@media (max-width: 960px) {
  .header-search { max-width: 240px; min-width: 140px; }
}
@media (max-width: 720px) {
  /* スマホでは検索窓はヘッダー(sticky)から除外 → ヒーロー画像にかぶらない・スクロールについてこない */
  .header-search { display: none; }
}

/* Dealer chip in header */
.btn-dealer-login {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; font-size: 13px; font-weight: 700;
  color: var(--c-primary); border: 1.5px solid var(--c-primary);
  border-radius: var(--radius); background: #fff;
  text-decoration: none; transition: var(--t-fast);
  white-space: nowrap;
}
.btn-dealer-login:hover { background: var(--c-primary); color: #fff; }
.btn-dealer-login svg { width: 16px; height: 16px; }
.dealer-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 6px 5px 10px; border: 1px solid var(--c-border); border-radius: 100px;
  background: linear-gradient(135deg, #f5f7fb, #fff);
  font-size: 12px;
}
.dealer-chip .dealer-tier {
  font-weight: 900; padding: 2px 8px; border-radius: 100px;
  color: #fff; font-size: 11px; letter-spacing: 0.5px;
}
.dealer-chip .dealer-tier.tier-A { background: var(--c-accent); }
.dealer-chip .dealer-tier.tier-B { background: var(--c-primary); }
.dealer-chip .dealer-tier.tier-C { background: var(--c-text-sub); }
.dealer-chip .dealer-tier.tier-S { background: linear-gradient(135deg, #b88720, #d6a64e); }
.dealer-chip .dealer-name { font-weight: 700; color: var(--c-text); max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dealer-chip .dealer-logout {
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(0,0,0,0.05); border: 0;
  display: grid; place-items: center; color: var(--c-text-sub);
  transition: var(--t-fast);
}
.dealer-chip .dealer-logout:hover { background: var(--c-accent); color: #fff; }
.dealer-chip .dealer-logout svg { width: 14px; height: 14px; }

.btn-icon {
  position: relative; width: 40px; height: 40px;
  border-radius: 50%; border: 1px solid var(--c-border);
  background: #fff; display: inline-grid; place-items: center;
  transition: var(--t-fast);
}
.btn-icon:hover { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.btn-icon svg { width: 20px; height: 20px; }
.btn-icon .badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--c-accent); color: #fff;
  border-radius: 9px; font-size: 11px; font-weight: 700;
  display: grid; place-items: center; line-height: 1;
}
.btn-icon .badge:empty { display: none; }

.hamburger { display: none; width: 40px; height: 40px; border: 0; background: transparent; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--c-text); margin: 5px auto; transition: var(--t); }
.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================ Hero — full image with clickable overlays */
.hero-image {
  width: 100%; background: #0d1117;
  line-height: 0;
}
.hero-image .wrap {
  position: relative; width: 100%; line-height: 0;
}
.hero-image img {
  width: 100%; height: auto; display: block;
}
.hero-image .overlay-link {
  position: absolute; display: block;
  background: transparent; border: 0;
  cursor: pointer;
}
/* Positions are % of image (1536×1024 reference) — work at all sizes */
.hero-image .ov-cta       { left: 1.5%;  top: 53.0%; width: 19%;   height: 6.5%; }
.hero-image .ov-front     { left: 1.0%;  top: 76.5%; width: 13.0%; height: 14%; }
.hero-image .ov-roof      { left: 15.0%; top: 76.5%; width: 13.0%; height: 14%; }
.hero-image .ov-step      { left: 29.0%; top: 76.5%; width: 13.0%; height: 14%; }
.hero-image .ov-fender    { left: 43.0%; top: 76.5%; width: 13.0%; height: 14%; }
.hero-image .ov-bumper    { left: 57.0%; top: 76.5%; width: 13.0%; height: 14%; }
.hero-image .ov-lighting  { left: 71.0%; top: 76.5%; width: 13.0%; height: 14%; }
.hero-image .ov-more      { left: 85.0%; top: 76.5%; width: 14.0%; height: 14%; }

/* ============================================ Search Card */
.search-card {
  background: #fff; color: var(--c-text);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-lg);
  margin-top: 18px;
}
.search-card h2 {
  margin: 0 0 16px; font-size: 18px;
  display: flex; align-items: center; gap: 8px;
}
.search-card h2::before {
  content: ""; width: 4px; height: 22px;
  background: var(--c-accent); border-radius: 2px;
}
.search-form { display: grid; gap: 14px; grid-template-columns: repeat(5, 1fr); align-items: end; }
.search-form .field { display: flex; flex-direction: column; gap: 6px; }
.search-form label { font-size: 12px; font-weight: 700; color: var(--c-text-sub); letter-spacing: 0.5px; }
.search-form select, .search-form input {
  height: 44px; padding: 0 12px;
  border: 1px solid var(--c-border); border-radius: var(--radius);
  background: #fff; transition: var(--t-fast);
}
.search-form select:focus, .search-form input:focus {
  outline: 0; border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(20,41,107,.12);
}
.search-form .check-field {
  flex-direction: row; align-items: center; gap: 8px;
  padding: 11px 12px; border: 1px solid var(--c-border); border-radius: var(--radius);
  height: 44px;
}
.search-form .check-field input { width: 16px; height: 16px; margin: 0; }
.search-form .check-field label { margin: 0; color: var(--c-text); font-size: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 22px; height: 44px;
  border: 0; border-radius: var(--radius);
  font-weight: 700; font-size: 15px;
  cursor: pointer; transition: var(--t);
  text-decoration: none;
}
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-dark); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-accent { background: var(--c-accent); color: #fff; }
.btn-accent:hover { background: var(--c-accent-dark); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-success { background: #2e7d32; color: #fff; font-weight: 700; }
.btn-success:hover { background: #1f5f24; color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--c-text); border: 1px solid var(--c-border); }
.btn-ghost:hover { background: var(--c-bg); border-color: var(--c-primary); color: var(--c-primary); }
.btn-block { width: 100%; }
.btn-lg { height: 52px; font-size: 16px; padding: 0 28px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.search-form .submit-cell { grid-column: span 5; display: flex; gap: 10px; justify-content: flex-end; }

/* ============================================ Section */
.section { padding: 60px 0; }
.section.alt { background: #fff; }
.section.dark { background: var(--c-ink); color: #fff; }
.section-head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 28px; gap: 20px; flex-wrap: wrap; }
.section-head h2 {
  margin: 0; font-size: 26px; font-weight: 900; letter-spacing: -0.5px;
  position: relative; padding-left: 16px;
}
.section-head h2::before {
  content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 5px;
  background: linear-gradient(var(--c-primary), var(--c-accent));
  border-radius: 3px;
}
.section-head .sub { color: var(--c-text-sub); font-size: 13px; }
.section-head .more { font-size: 14px; font-weight: 700; color: var(--c-primary); }

/* ============================================ Maker grid (vehicle picker) */
.maker-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.maker-card {
  background: #fff; border: 1px solid var(--c-border);
  border-radius: var(--radius-lg); padding: 22px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  transition: var(--t); cursor: pointer;
  color: var(--c-text);
}
.maker-card:hover {
  border-color: var(--c-primary); transform: translateY(-3px);
  box-shadow: var(--shadow-md); color: var(--c-primary);
}
.maker-card .m-name { font-size: 17px; font-weight: 800; }
.maker-card .m-count { font-size: 12px; color: var(--c-text-sub); }
.maker-card .arrow { color: var(--c-accent); font-weight: 900; font-size: 18px; }

/* ============================================ Category strip */
.cat-strip {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
}
.cat-tile {
  background: #fff; border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 18px 12px; text-align: center;
  transition: var(--t); color: var(--c-text);
}
.cat-tile:hover {
  background: var(--c-primary); color: #fff; border-color: var(--c-primary);
  transform: translateY(-2px);
}
.cat-tile .ico {
  width: 44px; height: 44px; margin: 0 auto 10px;
  border-radius: 50%; background: var(--c-bg);
  display: grid; place-items: center; color: var(--c-primary);
  transition: var(--t);
}
.cat-tile:hover .ico { background: rgba(255,255,255,0.15); color: #fff; }
.cat-tile .ico svg { width: 24px; height: 24px; }
.cat-tile .name { font-size: 13px; font-weight: 700; }

/* ============================================ Product card */
.product-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.product-card {
  background: #fff; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--c-border);
  display: flex; flex-direction: column;
  transition: var(--t); color: var(--c-text); text-decoration: none;
}
.product-card:hover {
  transform: translateY(-4px); box-shadow: var(--shadow-md);
  border-color: var(--c-primary); color: var(--c-text);
}
.product-card .thumb {
  aspect-ratio: 4/3; position: relative; overflow: hidden;
  background: #ffffff;
  display: flex; align-items: center; justify-content: center;
  padding: 8px;
}
.product-card .thumb img {
  position: relative;
  display: block;
  max-width: 100% !important;
  max-height: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  transition: transform var(--t);
  z-index: 1;
}
.product-card:hover .thumb img { transform: scale(1.04); }
/* 旧: 画像にオーバーレイ表示(廃止)。新: body内に横並びで表示 */
.product-card .badges-row {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-bottom: 6px;
}
.product-card .badges-row .badge-tag {
  font-size: 10px;
  padding: 2px 7px;
}
.badge-tag {
  display: inline-flex; align-items: center;
  padding: 3px 8px; font-size: 11px; font-weight: 700;
  border-radius: 3px; line-height: 1.4; color: #fff;
  background: var(--c-text);
}
.badge-tag.new { background: var(--c-accent); }
.badge-tag.featured { background: var(--c-primary); }
.badge-tag.container { background: var(--c-warning); }
.badge-tag.outofstock { background: var(--c-text-sub); }
.badge-tag.discontinued { background: #555; }
.badge-tag.instock { background: var(--c-success); }
.product-card .body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-card .cat { font-size: 11px; color: var(--c-text-sub); letter-spacing: 0.5px; text-transform: uppercase; }
.product-card .pname {
  font-size: 14px; font-weight: 700; color: var(--c-text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.45; min-height: 2.9em;
}
.product-card .meta { display: flex; align-items: center; justify-content: space-between; margin-top: auto; gap: 8px; }
.product-card .price { font-size: 16px; font-weight: 900; color: var(--c-primary); font-style: italic; }
.product-card .price .yen { font-size: 11px; opacity: 0.6; margin-right: 2px; }
.product-card .price .tax { font-size: 10px; color: var(--c-text-sub); margin-left: 2px; }

/* ============= 税抜/税込 デュアル表示 ============= */
.price-dual { display: inline-flex; gap: 6px; align-items: baseline; }
.price-dual.layout-col { flex-direction: column; align-items: flex-start; gap: 1px; }
.price-dual .price-ex {
  color: var(--c-primary); font-weight: 900; font-style: italic;
  display: inline-flex; align-items: baseline; gap: 1px;
}
.price-dual .price-ex .yen { font-size: 0.65em; opacity: 0.6; margin-right: 1px; }
.price-dual .price-ex .tax-mk { font-size: 0.55em; color: var(--c-text-sub); font-style: normal; margin-left: 3px; font-weight: 700; }
.price-dual .price-inc { font-size: 0.65em; color: var(--c-text-sub); font-style: normal; font-weight: 500; white-space: nowrap; }

.price-dual.size-sm .price-ex { font-size: 14px; }
.price-dual.size-md .price-ex { font-size: 16px; }
.price-dual.size-lg .price-ex { font-size: 28px; line-height: 1; }
.price-dual.size-xl .price-ex { font-size: 36px; line-height: 1; }
.product-card .stock-mini { font-size: 11px; padding: 2px 6px; border-radius: 3px; font-weight: 700; }
.stock-mini.in_stock { background: #e7f5ec; color: var(--c-success); }
.stock-mini.container { background: #fff3da; color: var(--c-warning); }
.stock-mini.out_of_stock { background: #f4f4f6; color: var(--c-text-sub); }
.stock-mini.discontinued { background: #efe9e9; color: #777; }

/* 配送ステータス mini (在庫表記の下) */
.delivery-mini {
  display: block; margin-top: 4px;
  font-size: 11px; color: var(--c-text-sub);
  padding: 2px 6px; background: #fafbfc; border-radius: 3px;
  border-left: 2px solid var(--c-primary);
  line-height: 1.4;
}
.product-card .meta { align-items: flex-start; }
.product-card .meta .price-stock-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }

/* 商品詳細の配送ステータスバッジ */
.delivery-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 4px;
  font-size: 13px; font-weight: 700;
  background: var(--c-bg); color: var(--c-text);
  border-left: 4px solid var(--c-primary);
  margin-left: 8px;
}
.delivery-badge.success { border-left-color: var(--c-success); }
.delivery-badge.warning { border-left-color: var(--c-warning); background: #fff8e6; }
.delivery-badge.info    { border-left-color: var(--c-primary); }
.delivery-badge.muted   { border-left-color: #888; color: var(--c-text-sub); }

/* Dealer price mini block (in product card) */
.dealer-price-mini {
  margin-top: 8px; padding: 6px 8px;
  background: linear-gradient(135deg, #fff8e6, #fff);
  border: 1px solid #f0d99a; border-radius: 4px;
  font-size: 13px; display: flex; align-items: center; gap: 6px;
}
.dealer-price-mini strong { color: var(--c-accent); font-weight: 900; font-style: italic; }
.dealer-price-mini.muted { color: var(--c-text-sub); font-size: 12px; background: #f5f6f8; border-color: #e0e3e8; }
.dealer-price-mini .tier-mark {
  display: inline-block; padding: 1px 6px; border-radius: 3px;
  font-size: 10px; font-weight: 900; color: #fff;
  letter-spacing: 0.5px;
}
.tier-mark.tier-A { background: var(--c-accent); }
.tier-mark.tier-B { background: var(--c-primary); }
.tier-mark.tier-C { background: var(--c-text-sub); }
.tier-mark.tier-S { background: linear-gradient(135deg, #b88720, #d6a64e); }
.ship-mini {
  margin-top: 4px; font-size: 11px; color: var(--c-text-sub);
  display: inline-block;
}

/* Dealer price big block (in product detail) */
.dealer-price-box {
  background: linear-gradient(135deg, #fff8e6, #fff);
  border: 1.5px solid #f0d99a; border-radius: var(--radius-lg);
  padding: 16px 20px; margin: 14px 0;
}
.dealer-price-box .lbl {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--c-text-sub); margin-bottom: 6px;
}
.dealer-price-box .lbl .tier-mark {
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
  border: 1px solid rgba(0,0,0,0.15);
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  border-radius: 4px;
}
.dealer-price-box .lbl > span:not(.tier-mark) {
  font-size: 13px;
  color: var(--c-text);
  font-weight: 600;
}
.dealer-price-box .big {
  font-size: 28px; font-weight: 900; color: var(--c-accent);
  font-style: italic; line-height: 1;
}
.dealer-price-box .big .yen { font-size: 16px; }
.dealer-price-box .save { font-size: 12px; color: var(--c-text-sub); margin-top: 4px; }
.dealer-price-box .ship-row { margin-top: 12px; padding-top: 12px; border-top: 1px dashed #ddd6c8; font-size: 13px; }
.dealer-price-box .ship-row strong { color: var(--c-text); }

/* Login prompt (for non-logged-in users on dealer features) */
.dealer-prompt {
  background: #f5f6f8; border: 1px dashed var(--c-border);
  padding: 16px 18px; border-radius: var(--radius); margin: 14px 0;
  display: flex; align-items: center; gap: 14px;
}
.dealer-prompt .icon {
  width: 38px; height: 38px; flex-shrink: 0;
  background: var(--c-primary); color: #fff;
  border-radius: 50%; display: grid; place-items: center;
}
.dealer-prompt .text { font-size: 13px; color: var(--c-text-sub); flex: 1; line-height: 1.6; }
.dealer-prompt .text strong { color: var(--c-text); }
.dealer-prompt a { font-weight: 700; }

/* ============================================ List view (products page) */
.layout {
  display: grid; grid-template-columns: 260px 1fr; gap: 28px;
  padding: 30px 0 60px;
}
.sidebar {
  background: #fff; border-radius: var(--radius-lg);
  padding: 20px; align-self: start; position: sticky; top: calc(var(--header-h) + 14px);
  border: 1px solid var(--c-border);
  max-height: calc(100vh - var(--header-h) - 28px); overflow-y: auto;
}
.sidebar h3 {
  margin: 0 0 12px; font-size: 13px; letter-spacing: 1px;
  color: var(--c-text-sub); text-transform: uppercase;
  padding-bottom: 8px; border-bottom: 1px solid var(--c-border);
}
.sidebar .filter-group { margin-bottom: 22px; }
.sidebar .filter-group h4 { margin: 0 0 8px; font-size: 14px; }
.filter-options { display: flex; flex-direction: column; gap: 4px; }
.filter-option {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px;
  border-radius: var(--radius); cursor: pointer; transition: var(--t-fast);
  font-size: 14px;
}
.filter-option:hover { background: var(--c-bg); }
.filter-option input { width: 16px; height: 16px; margin: 0; accent-color: var(--c-primary); }
.filter-option .count { margin-left: auto; font-size: 12px; color: var(--c-text-sub); }

.main-content { min-width: 0; }
.results-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 18px; flex-wrap: wrap;
}
.results-count { font-weight: 700; }
.results-count strong { color: var(--c-accent); font-size: 18px; }
.sort-box { display: flex; align-items: center; gap: 8px; }
.sort-box select {
  height: 36px; padding: 0 30px 0 12px;
  border: 1px solid var(--c-border); border-radius: var(--radius);
  background: #fff;
}

.active-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--c-primary); color: #fff;
  padding: 4px 10px; border-radius: 100px;
  font-size: 12px; font-weight: 600;
}
.chip button {
  background: rgba(255,255,255,0.25); color: #fff;
  border: 0; width: 16px; height: 16px; border-radius: 50%;
  display: grid; place-items: center; line-height: 1;
  font-size: 11px;
}
.chip button:hover { background: rgba(255,255,255,0.4); }
.chip.clear-all { background: var(--c-text-sub); cursor: pointer; }

/* Empty state */
.empty {
  background: #fff; border-radius: var(--radius-lg);
  padding: 60px 20px; text-align: center; color: var(--c-text-sub);
  border: 1px dashed var(--c-border);
}
.empty .ico { font-size: 48px; margin-bottom: 10px; opacity: 0.4; }
.empty h3 { margin: 0 0 6px; color: var(--c-text); }

/* Pagination */
.pagination { display: flex; gap: 4px; justify-content: center; margin-top: 28px; }
.pagination button {
  min-width: 36px; height: 36px; padding: 0 8px;
  border: 1px solid var(--c-border); background: #fff;
  border-radius: var(--radius); font-weight: 700;
  color: var(--c-text);
}
.pagination button:hover { border-color: var(--c-primary); color: var(--c-primary); }
.pagination button.is-active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.pagination button[disabled] { opacity: 0.4; cursor: not-allowed; }

/* ============================================ Product detail */
.detail-layout {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
  padding: 30px 0 50px;
}
.gallery { position: sticky; top: calc(var(--header-h) + 14px); align-self: start; }
.gallery .main-img {
  aspect-ratio: 1; background: #ffffff;
  border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--c-border);
  display: grid; place-items: center; position: relative;
}
.gallery .main-img::before {
  content: ""; position: absolute; inset: 0;
  background: transparent;
  pointer-events: none;
}
.gallery .main-img img { position: relative; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.gallery .thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 10px; }
.gallery .thumbs .t {
  aspect-ratio: 1; border: 2px solid transparent; border-radius: var(--radius);
  background: #ffffff;
  overflow: hidden; cursor: pointer; transition: var(--t-fast);
  display: grid; place-items: center; position: relative;
}
.gallery .thumbs .t::before {
  content: ""; position: absolute; inset: 0;
  background: transparent;
  pointer-events: none;
}
.gallery .thumbs .t img { position: relative; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.gallery .thumbs .t.is-active { border-color: var(--c-primary); }

.detail-info h1 { font-size: 22px; line-height: 1.4; margin: 8px 0; font-weight: 800; }
.detail-meta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.code-row { color: var(--c-text-sub); font-size: 13px; margin-bottom: 14px; }
.code-row code { background: var(--c-bg); padding: 2px 8px; border-radius: 3px; font-family: 'SF Mono', Consolas, monospace; font-size: 12px; }
.price-row { padding: 18px 0; border-block: 1px solid var(--c-border); margin: 18px 0; }
.price-big { font-size: 32px; font-weight: 900; color: var(--c-primary); font-style: italic; }
.price-big .yen { font-size: 18px; }
.price-big .tax-mark { font-size: 13px; color: var(--c-text-sub); margin-left: 8px; font-style: normal; }

.btn-row { display: flex; gap: 10px; margin: 18px 0; }
.btn-row > * { flex: 1; }

.spec-list { background: var(--c-bg); border-radius: var(--radius); padding: 14px 18px; margin: 18px 0; }
.spec-list dl { margin: 0; display: grid; grid-template-columns: 130px 1fr; gap: 6px 14px; font-size: 14px; }
.spec-list dt { color: var(--c-text-sub); font-weight: 600; }
.spec-list dd { margin: 0; }

.compat-list { background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius); padding: 14px 18px; margin: 18px 0; }
.compat-list h4 { margin: 0 0 8px; font-size: 13px; color: var(--c-text-sub); }
.compat-list ul { margin: 0; padding-left: 18px; font-size: 14px; }

/* ============================================ Breadcrumb */
.breadcrumb { font-size: 13px; color: var(--c-text-sub); padding: 14px 0; }
.breadcrumb a { color: var(--c-text-sub); }
.breadcrumb a:hover { color: var(--c-primary); }
.breadcrumb .sep { margin: 0 6px; opacity: 0.5; }

/* ============================================ Form */
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 14px; }
.form-row label .req { color: var(--c-accent); margin-left: 4px; }
.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row input[type="number"],
.form-row input[type="password"],
.form-row select,
.form-row textarea {
  width: 100%; height: 44px; padding: 0 12px;
  border: 1px solid var(--c-border); border-radius: var(--radius);
  background: #fff; transition: var(--t-fast);
}
.form-row textarea { padding: 12px; min-height: 140px; height: auto; resize: vertical; line-height: 1.6; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: 0; border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(20,41,107,.12);
}
.form-row .help { font-size: 12px; color: var(--c-text-sub); margin-top: 4px; }
.form-row .err { font-size: 12px; color: var(--c-danger); margin-top: 4px; display: none; }
.form-row.has-err .err { display: block; }
.form-row.has-err input, .form-row.has-err textarea, .form-row.has-err select { border-color: var(--c-danger); }
.form-card { background: #fff; padding: 30px; border-radius: var(--radius-lg); border: 1px solid var(--c-border); max-width: 760px; margin: 30px auto; }

/* Quote list */
.quote-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius-lg); overflow: hidden; }
.quote-table th, .quote-table td { padding: 12px 14px; border-bottom: 1px solid var(--c-border); text-align: left; font-size: 14px; vertical-align: middle; }
.quote-table th { background: var(--c-bg); font-size: 12px; letter-spacing: 0.5px; color: var(--c-text-sub); }
.quote-table tr:last-child td { border-bottom: 0; }
.quote-table .thumb-cell { width: 70px; }
.quote-table .thumb-cell img, .quote-table .thumb-cell .ph { width: 60px; height: 60px; object-fit: contain; border-radius: var(--radius); background: #fff; border: 1px solid var(--c-border); padding: 4px; }
.quote-table input[type="number"] { width: 70px; padding: 6px 8px; height: 32px; border: 1px solid var(--c-border); border-radius: 4px; text-align: center; }
.quote-table .remove { background: transparent; color: var(--c-danger); border: 0; font-size: 13px; }

/* Toast */
.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translate(-50%, 100px);
  background: var(--c-text); color: #fff; padding: 12px 22px; border-radius: 100px;
  font-weight: 700; font-size: 14px; box-shadow: var(--shadow-lg);
  opacity: 0; transition: var(--t); z-index: 200;
  display: flex; align-items: center; gap: 8px;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.toast.success { background: var(--c-success); }
.toast.error { background: var(--c-danger); }

/* ============================================ Footer */
.site-footer {
  background: #f5f6f8; color: #4a5160;
  padding: 50px 0 0;
  margin-top: 60px;
  border-top: 1px solid var(--c-border);
}
.site-footer a { color: #3a4150; text-decoration: none; }
.site-footer a:hover { color: var(--c-accent); }

/* Top link columns */
.foot-cols { display: grid; grid-template-columns: repeat(5, 1fr); gap: 30px; margin-bottom: 40px; }
.foot-cols h4 {
  color: var(--c-text); font-size: 14px; font-weight: 700;
  margin: 0 0 14px; padding-bottom: 8px;
  border-bottom: 2px solid var(--c-primary);
  display: inline-block;
}
.foot-cols ul { list-style: none; padding: 0; margin: 0; }
.foot-cols li { margin-bottom: 8px; font-size: 13px; }
.foot-cols li a { display: inline-flex; align-items: center; gap: 4px; }
.foot-cols .ext::after { content: ""; display: inline-block; width: 10px; height: 10px; margin-left: 2px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'><path d='M15 3h6v6'/><path d='M21 3l-9 9'/><path d='M10 5h-5a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5'/></svg>") center/contain no-repeat;
}

/* Business calendar */
.foot-calendar {
  background: #fff; border-radius: var(--radius-lg);
  border: 1px solid var(--c-border);
  padding: 24px; margin-bottom: 30px;
  display: grid; grid-template-columns: 280px 280px 280px; gap: 30px; align-items: start;
  justify-content: center;
}
.foot-calendar .cal-head h4 { margin: 0 0 12px; font-size: 15px; color: var(--c-text); font-weight: 700; }
.foot-calendar .cal-legend { display: flex; flex-direction: column; gap: 8px; font-size: 12px; }
.foot-calendar .cal-legend span { display: inline-flex; align-items: center; gap: 8px; color: #4a5160; }
.foot-calendar .cal-legend .swatch { width: 14px; height: 14px; border-radius: 2px; display: inline-block; flex-shrink: 0; }
.foot-calendar .cal-legend .swatch.closed     { background: #f5b5b5; }
.foot-calendar .cal-legend .swatch.inventory  { background: #d4d8de; }
.foot-calendar .cal-legend .swatch.restricted { background: #b5c8e0; }
.cal-month { max-width: 280px; width: 100%; }
.cal-month .cal-title { font-size: 14px; font-weight: 700; text-align: center; margin: 0 0 8px; color: var(--c-text); }
.cal-month table { width: 100%; border-collapse: collapse; font-size: 12px; table-layout: fixed; }
.cal-month th, .cal-month td {
  width: 14.28%; height: 32px;
  text-align: center; vertical-align: middle;
  border-bottom: 1px solid #efeef0;
  font-weight: 500; padding: 0;
}
.cal-month th {
  font-size: 11px; color: #888;
  padding: 4px 0; border-bottom: 1.5px solid var(--c-border);
}
.cal-month th:first-child { color: #c0392b; }
.cal-month th:last-child  { color: #2c5599; }
.cal-month td { color: var(--c-text); position: relative; }
.cal-month td.empty { background: transparent; }
.cal-month td.closed     { background: #f5b5b5; color: #fff; font-weight: 700; }
.cal-month td.inventory  { background: #d4d8de; color: #555; }
.cal-month td.restricted { background: #b5c8e0; color: #fff; }
.cal-month td.today { box-shadow: inset 0 0 0 2px var(--c-accent); font-weight: 900; }

/* Shopping sites */
.foot-shops { margin-bottom: 30px; }
.foot-shops h4 {
  font-size: 14px; color: var(--c-text); margin: 0 0 14px;
  font-weight: 700; padding-bottom: 8px;
  border-bottom: 2px solid var(--c-primary); display: inline-block;
}
.shop-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(4, 1fr);
}
.shop-card {
  display: flex; flex-direction: column; align-items: stretch;
  background: #fff; border: 1px solid var(--c-border);
  border-radius: var(--radius-lg); overflow: hidden;
  text-decoration: none; color: var(--c-text);
  transition: var(--t);
}
.shop-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--c-primary); color: var(--c-text); }
.shop-card .shop-logo-area {
  height: 88px; display: grid; place-items: center;
  padding: 14px;
  background: #ffffff;
  border-bottom: 1px solid var(--c-border);
}
.shop-card .shop-logo-area img {
  max-width: 100%; max-height: 100%;
  object-fit: contain; display: block;
}
.shop-card .shop-logo-area svg { max-width: 100%; max-height: 100%; }
.shop-card .shop-info {
  padding: 10px 14px; display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; font-weight: 700;
}
.shop-card .shop-arrow { color: var(--c-text-sub); transition: transform var(--t); }
.shop-card:hover .shop-arrow { transform: translateX(3px); color: var(--c-accent); }

/* Bottom bar (logo + sns + copyright) */
.foot-bottom {
  border-top: 1px solid var(--c-border);
  background: #e8eaef; color: #4a5160;
  margin-top: 30px;
}
.foot-bottom .sns a { background: rgba(0,0,0,0.06); color: #4a5160; }
.foot-bottom .sns a:hover { background: var(--c-accent); color: #fff; }
.foot-bottom .copyright { color: #6a7382; border-top-color: rgba(0,0,0,0.06); }
.foot-bottom .inner {
  padding: 28px 0 20px;
  display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center;
}
.foot-bottom .brand { display: flex; flex-direction: column; gap: 8px; }
.foot-bottom .brand img { height: 38px; width: auto; display: block; }
.foot-bottom .brand .tag { font-size: 11px; color: #8a93a3; letter-spacing: 2px; padding-left: 4px; }
.foot-bottom .sns { display: flex; gap: 10px; justify-content: flex-end; }
.foot-bottom .sns a {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.08); color: #d0d5dc;
  display: grid; place-items: center;
  transition: var(--t-fast);
}
.foot-bottom .sns a:hover { background: var(--c-accent); color: #fff; transform: translateY(-2px); }
.foot-bottom .sns a svg { width: 18px; height: 18px; }
.foot-bottom .copyright {
  text-align: center; font-size: 12px; color: #6a7382;
  padding: 14px 0; border-top: 1px solid rgba(255,255,255,0.06);
}

/* Footer responsive */
@media (max-width: 960px) {
  .foot-cols { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .foot-calendar { grid-template-columns: 1fr; gap: 20px; }
  .cal-month { margin: 0 auto; }
  .shop-grid { grid-template-columns: repeat(2, 1fr); }
  .foot-bottom .inner { grid-template-columns: 1fr; text-align: center; }
  .foot-bottom .sns { justify-content: center; }
}
@media (max-width: 480px) {
  .shop-grid { grid-template-columns: 1fr; }
}

/* ============================================ Footer LinkHub (SEO内部リンク集) */
/*  背景は明るいグレー(#f5f6f8)。テキスト色は濃色に統一して可読性確保 */
.foot-linkhub {
  display: grid; grid-template-columns: 1fr 1.4fr 1.4fr; gap: 30px;
  padding: 34px 0 26px; border-bottom: 1px solid var(--c-border);
  margin-bottom: 30px;
}
.linkhub-block { min-width: 0; }
.linkhub-block summary { list-style: none; cursor: default; }
.linkhub-block summary::-webkit-details-marker { display: none; }
.linkhub-block h4 {
  color: var(--c-text); font-size: 14px; margin: 0 0 12px; padding-bottom: 8px;
  border-bottom: 2px solid var(--c-primary); display: inline-block; font-weight: 700;
}
.linkhub-block h4 .cnt { color: var(--c-text-sub); font-size: 11px; margin-left: 4px; font-weight: 400; }
.linkhub-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 12px;
}
.linkhub-list li { min-width: 0; }
.linkhub-list a {
  color: #3a4150; font-size: 12px; line-height: 1.7;
  display: block; padding: 2px 0; text-decoration: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.linkhub-list a:hover { color: var(--c-accent); text-decoration: underline; }
.linkhub-list-vehicles { grid-template-columns: repeat(2, 1fr); }
.linkhub-list-cats { display: block; }
.linkhub-list-cats > li.cat-parent { margin-bottom: 10px; }
.linkhub-list-cats > li.cat-parent > a { color: var(--c-primary); font-weight: 700; }
.linkhub-sub { list-style: none; margin: 4px 0 0 12px; padding: 0; }
.linkhub-sub li a { font-size: 11px; color: #6a7180; }
.linkhub-sub li a:hover { color: var(--c-accent); }
@media (max-width: 960px) {
  .foot-linkhub { grid-template-columns: 1fr; gap: 6px; padding: 20px 0; }
  .linkhub-block { border-top: 1px solid var(--c-border); padding-top: 14px; }
  .linkhub-block summary { cursor: pointer; }
  .linkhub-block h4 { display: flex; align-items: center; justify-content: space-between; width: 100%; }
  .linkhub-block h4::after { content: "▾"; font-size: 12px; color: var(--c-text-sub); }
  .linkhub-block:not([open]) h4::after { transform: rotate(-90deg); }
  .linkhub-block[open] .linkhub-list { margin-top: 10px; }
}

/* ============================================ Mobile nav drawer */
.drawer {
  position: fixed; inset: var(--header-h-sp) 0 0 0;
  background: #fff; z-index: 99;
  transform: translateX(-100%); transition: transform var(--t);
  overflow-y: auto;
  box-shadow: 4px 0 24px rgba(0,0,0,.15);
  padding-bottom: 80px;
}
.drawer.is-open { transform: translateX(0); }

/* ドロワー内検索フォーム(モバイルでヘッダー検索の代わり) */
.drawer-search {
  display: flex; align-items: center;
  margin: 16px; padding: 6px 6px 6px 14px;
  background: var(--c-bg); border: 1.5px solid var(--c-border);
  border-radius: 100px;
}
.drawer-search:focus-within {
  border-color: var(--c-primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(20,41,107,.12);
}
.drawer-search .ds-icon {
  width: 18px; height: 18px; color: var(--c-text-sub); flex-shrink: 0;
}
.drawer-search input {
  flex: 1; border: 0; background: transparent;
  height: 36px; padding: 0 10px;
  font-size: 14px; min-width: 0; color: var(--c-text);
}
.drawer-search input:focus { outline: 0; }
.drawer-search input::placeholder { color: #9aa3b2; }
.drawer-search .ds-go {
  height: 30px; padding: 0 16px;
  border: 0; border-radius: 100px;
  background: var(--c-primary); color: #fff;
  font-size: 13px; font-weight: 700;
  cursor: pointer; white-space: nowrap;
}

.drawer-nav { padding: 0 16px 16px; }
.drawer-nav a {
  display: flex; align-items: center; padding: 14px 12px;
  border-bottom: 1px solid var(--c-border); font-weight: 700;
  color: var(--c-text);
}
.drawer-nav a::after { content: "›"; margin-left: auto; color: var(--c-text-sub); font-size: 20px; }

/* Mobile filter button */
.mobile-filter-btn {
  display: none; position: fixed; bottom: 80px; right: 16px;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--c-primary); color: #fff; border: 0;
  box-shadow: var(--shadow-lg); z-index: 50;
}

/* Bottom nav (mobile) */
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
  background: #fff; border-top: 1px solid var(--c-border);
  padding: 6px 0; padding-bottom: max(6px, env(safe-area-inset-bottom));
}
.bottom-nav .bn-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px; font-size: 10px; font-weight: 700;
  color: var(--c-text-sub); text-decoration: none; position: relative;
}
.bottom-nav .bn-item svg { width: 22px; height: 22px; }
.bottom-nav .bn-item.is-active { color: var(--c-primary); }
.bottom-nav .bn-item .badge {
  position: absolute; top: 2px; right: calc(50% - 18px);
  min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--c-accent); color: #fff;
  border-radius: 8px; font-size: 10px;
  display: grid; place-items: center; line-height: 1;
}
.bottom-nav .bn-item .badge:empty { display: none; }
.bottom-nav { display: none; }

/* ============================================ Utility */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.flex { display: flex; gap: 10px; }
.flex-wrap { flex-wrap: wrap; }
.hide-sp { display: initial; }
.show-sp { display: none; }

/* ============================================ Mobile */
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset: 0; z-index: 95;
    border-radius: 0; max-height: 100%; padding: 20px;
    transform: translateY(100%); transition: transform var(--t);
  }
  .sidebar.is-open { transform: translateY(0); }
  .sidebar .close-filter { display: block; }
  .mobile-filter-btn { display: grid; place-items: center; }
  .detail-layout { grid-template-columns: 1fr; gap: 24px; }
  .gallery { position: static; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .site-header .bar { height: var(--header-h-sp); }
  .site-header .logo img { height: 28px; }
  .site-header nav { display: none; }
  .hamburger { display: block; margin-left: auto; }
  .search-form { grid-template-columns: 1fr; gap: 12px; }
  .search-form > * { grid-column: span 1 !important; min-width: 0; }
  .search-form select { width: 100%; max-width: 100%; }
  .search-form .submit-cell { grid-column: span 1; flex-direction: column; align-items: stretch; }
  .search-form .submit-cell .btn { white-space: nowrap; font-size: 14px; }
  .section { padding: 40px 0; }
  .section-head h2 { font-size: 22px; }
  .bottom-nav { display: flex; }
  body { padding-bottom: 64px; }
  .mobile-filter-btn { bottom: 80px; }
  .foot-cols { grid-template-columns: 1fr; gap: 20px; }
  .hide-sp { display: none; }
  .show-sp { display: initial; }
  .detail-info h1 { font-size: 18px; }
  .price-big { font-size: 26px; }
  .btn-row { flex-direction: column; }
  .spec-list dl { grid-template-columns: 100px 1fr; }
  .quote-table { font-size: 12px; }
  .quote-table th:nth-child(3), .quote-table td:nth-child(3) { display: none; }
}
@media (max-width: 420px) {
  .product-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .product-card .pname { font-size: 13px; }
  .product-card .price { font-size: 15px; }
  .cat-strip { grid-template-columns: repeat(3, 1fr); }
  .maker-grid { grid-template-columns: 1fr 1fr; }
}

/* Star Icon (loose) */
.star-bullet {
  display: inline-block; width: 10px; height: 10px;
  background: var(--c-accent);
  clip-path: polygon(50% 0,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%);
  margin-right: 6px; vertical-align: middle;
}
