
.kcm-wrap,.kcm-single{max-width:1180px;margin:30px auto}
.kcm-card{background:#fff;border:1px solid #e6e6e6;border-radius:14px;padding:22px;box-sizing:border-box}
.kcm-form label,.kcm-search label{display:block;font-weight:700;margin:14px 0 6px}
.kcm-form label span{color:#c33}
.kcm-form input[type=text],.kcm-form input[type=number],.kcm-form select,.kcm-form textarea,
.kcm-search input{width:100%;padding:12px;border:1px solid #ccc;border-radius:8px;box-sizing:border-box}
.kcm-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 18px}
.kcm-checks{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;background:#f8f8f8;padding:14px;border-radius:10px}
.kcm-checks label{margin:0;font-weight:400}
.kcm-btn{display:inline-block;border:0;border-radius:9px;padding:12px 20px;background:#222;color:#fff!important;text-decoration:none;cursor:pointer;font-weight:700}
.kcm-btn-light{background:#f1f1f1;color:#222!important}
.kcm-help{font-size:.9em;color:#666}
.kcm-search{display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) auto;gap:12px;align-items:end;margin-bottom:24px}
.kcm-search label{margin:0 0 6px}
.kcm-results-head{margin:15px 0}
.kcm-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}
.kcm-car-card{border:1px solid #e5e5e5;border-radius:14px;overflow:hidden;background:#fff}
.kcm-card-image{display:block;position:relative;aspect-ratio:4/3;background:#eee;overflow:hidden}
.kcm-card-image img{width:100%;height:100%;object-fit:cover}
.kcm-noimage{height:100%;min-height:220px;display:flex;align-items:center;justify-content:center;background:#eee;color:#888}
.kcm-status{position:absolute;left:10px;top:10px;background:#fff;padding:5px 9px;border-radius:999px;font-size:12px}
.kcm-card-body{padding:16px}
.kcm-card-body h3{margin:0 0 8px;font-size:18px}
.kcm-card-body h3 a{text-decoration:none;color:inherit}
.kcm-price{font-size:25px;font-weight:800;margin:8px 0}
.kcm-meta{color:#666;font-size:14px}
.kcm-gallery{display:grid;grid-template-columns:2fr 1fr 1fr;gap:8px}
.kcm-gallery img{width:100%;height:220px;object-fit:cover;border-radius:10px}
.kcm-gallery img:first-child{grid-row:span 2;height:448px}
.kcm-single-summary{display:flex;gap:18px;align-items:center;flex-wrap:wrap;margin:18px 0}
.kcm-status-big{background:#eee;border-radius:999px;padding:7px 12px}
.kcm-specs{display:grid;grid-template-columns:180px 1fr;border-top:1px solid #eee}
.kcm-specs dt,.kcm-specs dd{margin:0;padding:12px;border-bottom:1px solid #eee}
.kcm-specs dt{font-weight:700;background:#fafafa}
.kcm-equipment{display:flex;gap:9px;flex-wrap:wrap}
.kcm-equipment span{background:#f4f4f4;border-radius:999px;padding:7px 11px}
.kcm-description{margin-bottom:30px}
.kcm-tabs{display:flex;gap:8px;border-bottom:1px solid #ddd;margin-bottom:24px}
.kcm-tabs a{padding:12px 16px;text-decoration:none}
.kcm-tabs a.active{font-weight:800;border-bottom:3px solid #222}
.kcm-inquiry-list{display:grid;gap:10px}
.kcm-inquiry-item{display:grid;gap:5px;text-decoration:none;color:inherit}
.kcm-thread{display:flex;flex-direction:column;gap:12px;margin:18px 0}
.kcm-bubble{max-width:75%;padding:12px 14px;border-radius:14px;background:#f1f1f1}
.kcm-bubble.mine{align-self:flex-end;background:#e9f3ff}
.kcm-bubble small{display:block;margin-top:5px;color:#777}
.kcm-inline-form{display:inline}
.kcm-notice{padding:12px 15px;border-radius:8px;margin:10px 0}
.kcm-ok{background:#e8f7ea}.kcm-error{background:#fdeaea}
.kcm-pagination{margin:25px 0;text-align:center}
.kcm-pagination .page-numbers{display:inline-block;padding:7px 10px;margin:2px;border:1px solid #ddd;border-radius:6px;text-decoration:none}
@media(max-width:800px){
 .kcm-grid,.kcm-search,.kcm-cards{grid-template-columns:1fr}
 .kcm-checks{grid-template-columns:repeat(2,minmax(0,1fr))}
 .kcm-gallery{display:grid;grid-template-columns:1fr 1fr}
 .kcm-gallery img,.kcm-gallery img:first-child{height:220px;grid-row:auto}
 .kcm-specs{grid-template-columns:120px 1fr}
}

/* ===== v0.2 Home ===== */
.kcm-home{--kcm-navy:#071d63;--kcm-blue:#0878cf;--kcm-yellow:#ffd51c;--kcm-text:#111;max-width:100%;margin:0 auto;color:var(--kcm-text)}
.kcm-hero{width:100%;margin:0;line-height:0;background:#eaf6ff;overflow:hidden}
.kcm-hero img{display:block;width:100%;height:auto;margin:0}
.kcm-home-section{max-width:1180px;margin:56px auto;padding:0 22px;box-sizing:border-box}
.kcm-home-actions{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:32px}
.kcm-home-action{position:relative;display:flex;min-height:160px;flex-direction:column;justify-content:center;padding:28px 34px;border-radius:18px;color:#fff!important;text-decoration:none;box-shadow:0 12px 28px rgba(0,0,0,.10);transition:transform .2s ease,box-shadow .2s ease;overflow:hidden}
.kcm-home-action:hover{transform:translateY(-2px);box-shadow:0 16px 34px rgba(0,0,0,.15)}
.kcm-home-action strong{font-size:clamp(22px,2.2vw,31px);margin:5px 0 9px}.kcm-home-action>span:last-child{font-size:15px;opacity:.94}
.kcm-home-action:after{content:'›';position:absolute;right:28px;top:50%;transform:translateY(-50%);font-size:64px;opacity:.28}
.kcm-home-action.kcm-buy{background:linear-gradient(135deg,#071d63,#0878cf)}
.kcm-home-action.kcm-sell{background:linear-gradient(135deg,#171717,#063f91)}
.kcm-action-kicker{font-weight:800;letter-spacing:.16em;color:var(--kcm-yellow)}
.kcm-section-heading{margin-bottom:22px}.kcm-section-heading>span,.kcm-seller-cta>div>span{display:block;color:#0a67b7;font-weight:900;letter-spacing:.13em;font-size:12px}.kcm-section-heading h2,.kcm-seller-cta h2{margin:6px 0 8px;color:var(--kcm-navy);font-size:clamp(26px,3vw,38px);line-height:1.25}.kcm-section-heading p,.kcm-seller-cta p{margin:0;color:#626a76}
.kcm-heading-row{display:flex;justify-content:space-between;gap:20px;align-items:flex-end}.kcm-heading-row>a{font-weight:700;color:#064e9e;text-decoration:none;white-space:nowrap}
.kcm-home-search-section{background:#f3f8fc;border-radius:22px;padding:34px;margin-top:56px}
.kcm-home-search{display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) auto;gap:12px;align-items:end}.kcm-home-search label{display:block;font-size:13px;font-weight:800;margin-bottom:6px}.kcm-home-search input{width:100%;box-sizing:border-box;border:1px solid #cfd8e3;background:#fff;padding:13px 12px;border-radius:9px}.kcm-home-search-btn{border:0;border-radius:9px;background:var(--kcm-navy);color:#fff;padding:14px 24px;font-weight:800;cursor:pointer;min-height:48px}
.kcm-home-cards .kcm-car-card{box-shadow:0 8px 22px rgba(18,45,77,.07);border-color:#e1e8ef}.kcm-empty-home{grid-column:1/-1;text-align:center;border:1px dashed #bfcddb;background:#fafcff;border-radius:15px;padding:46px 20px}.kcm-empty-home strong{font-size:20px;color:var(--kcm-navy)}
.kcm-flow-section{border-top:1px solid #e3e9f0;padding-top:50px}.kcm-flow-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}.kcm-flow-grid>div{background:#fff;border:1px solid #e1e8ef;border-radius:15px;padding:24px}.kcm-flow-grid b{display:block;color:#0a72c8;font-size:28px;margin-bottom:14px}.kcm-flow-grid strong{display:block;color:var(--kcm-navy);font-size:19px;margin-bottom:7px}.kcm-flow-grid p{color:#626a76;font-size:14px;line-height:1.75;margin:0}
.kcm-seller-cta{display:flex;align-items:center;justify-content:space-between;gap:30px;background:linear-gradient(120deg,#eaf6ff,#fff9d7);border:1px solid #dce8f2;border-radius:22px;padding:38px 42px!important;margin-bottom:70px}.kcm-seller-cta h2{font-size:clamp(23px,2.5vw,34px)}.kcm-cta-button{display:inline-block;background:var(--kcm-navy);color:#fff!important;border-radius:10px;padding:15px 24px;text-decoration:none;font-weight:800;white-space:nowrap}
body.page .entry-content:has(.kcm-home){max-width:none!important;padding-left:0!important;padding-right:0!important}.wp-site-blocks:has(.kcm-home) main{padding-top:0!important}
@media(max-width:900px){.kcm-home-search{grid-template-columns:1fr 1fr}.kcm-home-search-btn{grid-column:1/-1}.kcm-flow-grid{grid-template-columns:1fr 1fr}.kcm-seller-cta{align-items:flex-start;flex-direction:column}.kcm-home-actions{grid-template-columns:1fr}}
@media(max-width:600px){.kcm-home-section{margin:38px auto;padding:0 16px}.kcm-home-search-section{margin:38px 16px;padding:24px 16px}.kcm-home-search{grid-template-columns:1fr}.kcm-home-search-btn{grid-column:auto}.kcm-flow-grid{grid-template-columns:1fr}.kcm-heading-row{align-items:flex-start;flex-direction:column}.kcm-home-action{min-height:128px;padding:23px}.kcm-seller-cta{margin:35px 16px 55px!important;padding:28px 20px!important}.kcm-hero img{min-height:210px;object-fit:cover;object-position:center}}


/* ===== v0.3 シゲンBOX ブランド共通UI ===== */
.kcm-market-site{
  --kcm-navy:#071d63;
  --kcm-blue:#0878cf;
  --kcm-yellow:#ffd51c;
  --kcm-ink:#151922;
  --kcm-muted:#657080;
  --kcm-border:#dfe7ef;
}
.kcm-market-site > .wp-site-blocks > header.wp-block-template-part,
.kcm-market-site > .wp-site-blocks > footer.wp-block-template-part{
  display:none!important;
}
.kcm-market-site .wp-site-blocks{
  padding-top:0!important;
  padding-bottom:0!important;
}
.kcm-market-site main{
  margin-top:0!important;
}
.kcm-market-home main .wp-block-post-title,
.kcm-market-home main .entry-title{
  display:none!important;
}
.kcm-market-home main > .wp-block-group,
.kcm-market-home main > .wp-block-post-content,
.kcm-market-home .entry-content{
  margin-top:0!important;
}
.kcm-market-home .entry-content > :first-child{
  margin-top:0!important;
}
.kcm-brand-inner{
  width:min(1180px,calc(100% - 40px));
  margin:0 auto;
  box-sizing:border-box;
}
.kcm-brand-header{
  position:relative;
  z-index:30;
  background:#fff;
  border-bottom:1px solid #e2e8f0;
  box-shadow:0 2px 12px rgba(7,29,99,.05);
}
.kcm-brand-topline{
  background:#071d63;
  color:#fff;
  font-size:12px;
}
.kcm-brand-topline .kcm-brand-inner{
  min-height:32px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}
.kcm-brand-topline span:last-child{opacity:.82}
.kcm-brand-main{background:#fff}
.kcm-brand-row{
  min-height:82px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:30px;
}
.kcm-brand-logo{
  display:inline-flex;
  flex-direction:column;
  line-height:1;
  text-decoration:none!important;
  color:#071d63!important;
  flex:0 0 auto;
}
.kcm-brand-logo-main{
  font-size:30px;
  font-weight:950;
  letter-spacing:.02em;
  color:#071d63;
}
.kcm-brand-logo-main span{color:#0878cf}
.kcm-brand-logo small{
  margin-top:7px;
  color:#697487;
  font-size:9px;
  letter-spacing:.22em;
  font-weight:800;
}
.kcm-brand-nav{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:4px;
}
.kcm-brand-nav a{
  display:inline-flex;
  align-items:center;
  min-height:42px;
  padding:0 13px;
  border-radius:8px;
  text-decoration:none!important;
  color:#172033!important;
  font-size:14px;
  font-weight:750;
}
.kcm-brand-nav a:hover{background:#f1f6fb}
.kcm-brand-nav .kcm-nav-sub{color:#687488!important}
.kcm-brand-nav .kcm-nav-cta{
  background:#ffd51c;
  color:#071d63!important;
  padding-left:18px;
  padding-right:18px;
  margin-left:4px;
}
.kcm-brand-nav .kcm-nav-cta:hover{background:#f2c900}
.kcm-home-trust{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  background:linear-gradient(90deg,#071d63,#0b67ae);
  color:#fff;
}
.kcm-home-trust>div{
  min-height:86px;
  padding:17px 24px;
  border-right:1px solid rgba(255,255,255,.16);
  display:flex;
  flex-direction:column;
  justify-content:center;
  text-align:center;
}
.kcm-home-trust>div:last-child{border-right:0}
.kcm-home-trust strong{font-size:17px;color:#ffd51c}
.kcm-home-trust span{margin-top:4px;font-size:12px;opacity:.9}
.kcm-brand-footer{
  margin-top:70px;
  background:#061646;
  color:#fff;
}
.kcm-footer-grid{
  display:grid;
  grid-template-columns:1.5fr 1fr;
  gap:50px;
  padding-top:48px;
  padding-bottom:42px;
}
.kcm-footer-brand .kcm-brand-logo-main{color:#fff}
.kcm-footer-brand .kcm-brand-logo-main span{color:#6fc5ff}
.kcm-footer-brand p{
  max-width:560px;
  margin:14px 0 0;
  color:#cbd6e7;
  line-height:1.8;
  font-size:14px;
}
.kcm-footer-links{
  display:grid;
  grid-template-columns:1fr;
  align-content:start;
  gap:7px;
}
.kcm-footer-links a{
  color:#fff!important;
  text-decoration:none!important;
  padding:6px 0;
}
.kcm-footer-copy{
  border-top:1px solid rgba(255,255,255,.12);
  text-align:center;
  color:#9eacc3;
  padding:16px;
  font-size:12px;
}
.kcm-market-site .kcm-wrap,
.kcm-market-site .kcm-single{
  padding-left:20px;
  padding-right:20px;
  box-sizing:border-box;
}
.kcm-market-site .kcm-btn,
.kcm-market-site .kcm-home-search-btn,
.kcm-market-site .kcm-cta-button{
  background:#071d63;
}
.kcm-market-site .kcm-btn:hover,
.kcm-market-site .kcm-home-search-btn:hover,
.kcm-market-site .kcm-cta-button:hover{
  filter:brightness(1.12);
}
@media(max-width:900px){
  .kcm-brand-topline span:last-child{display:none}
  .kcm-brand-row{min-height:auto;padding-top:14px;padding-bottom:14px;align-items:flex-start}
  .kcm-brand-nav{gap:1px}
  .kcm-brand-nav a{font-size:13px;padding:0 9px}
  .kcm-home-trust{grid-template-columns:1fr}
  .kcm-home-trust>div{min-height:auto;border-right:0;border-bottom:1px solid rgba(255,255,255,.13);padding:13px 20px}
  .kcm-home-trust>div:last-child{border-bottom:0}
}
@media(max-width:680px){
  .kcm-brand-inner{width:min(100% - 28px,1180px)}
  .kcm-brand-row{display:block}
  .kcm-brand-logo{margin-bottom:13px}
  .kcm-brand-logo-main{font-size:26px}
  .kcm-brand-nav{justify-content:flex-start;overflow-x:auto;flex-wrap:nowrap;padding-bottom:2px}
  .kcm-brand-nav a{white-space:nowrap;min-height:38px;background:#f7f9fc}
  .kcm-brand-nav .kcm-nav-cta{margin-left:0}
  .kcm-footer-grid{grid-template-columns:1fr;gap:26px;padding-top:38px;padding-bottom:32px}
}


/* ===== v0.3.1 Twenty Twenty-Five cleanup ===== */
/* Hide the theme's own header/footer on marketplace pages, regardless of block wrapper depth. */
body.kcm-market-site header.wp-block-template-part,
body.kcm-market-site footer.wp-block-template-part,
body.kcm-market-site .wp-site-blocks > header,
body.kcm-market-site .wp-site-blocks > footer{
  display:none!important;
}
/* Keep our plugin header/footer visible. */
body.kcm-market-site .kcm-brand-header{display:block!important}
body.kcm-market-site .kcm-brand-footer{display:block!important}

/* Remove the theme-generated page title and excessive top spacing on the marketplace home. */
body.kcm-market-home h1.wp-block-post-title,
body.kcm-market-home .wp-block-post-title,
body.kcm-market-home .entry-title{
  display:none!important;
}
body.kcm-market-home .wp-site-blocks,
body.kcm-market-home main,
body.kcm-market-home main.wp-block-group,
body.kcm-market-home .wp-block-post-content,
body.kcm-market-home .entry-content{
  margin-block-start:0!important;
  margin-top:0!important;
  padding-top:0!important;
}
body.kcm-market-home main > *{
  margin-block-start:0;
}

/* Full-width marketplace content under a block theme. */
body.kcm-market-site .wp-block-post-content > .kcm-brand-header,
body.kcm-market-site .wp-block-post-content > .kcm-home,
body.kcm-market-site .entry-content > .kcm-brand-header,
body.kcm-market-site .entry-content > .kcm-home{
  width:100vw;
  max-width:none!important;
  margin-left:calc(50% - 50vw)!important;
  margin-right:calc(50% - 50vw)!important;
}
body.kcm-market-site .wp-block-post-content > .kcm-brand-header + .kcm-home,
body.kcm-market-site .entry-content > .kcm-brand-header + .kcm-home{
  margin-top:0!important;
}

/* When there is only one new vehicle, keep the card intentional rather than stretched. */
.kcm-home-new-grid:has(.kcm-car-card:only-child){
  grid-template-columns:minmax(280px,430px);
}

/* Tablet tuning based on the current staging screenshots. */
@media (min-width:700px) and (max-width:1100px){
  .kcm-brand-row{
    min-height:72px;
  }
  .kcm-brand-logo-main{font-size:27px}
  .kcm-brand-nav a{
    font-size:12px;
    padding-left:8px;
    padding-right:8px;
  }
  .kcm-home-actions,
  .kcm-home-section{
    width:min(100% - 40px,1180px);
  }
}


/* ===== v0.3.2 standalone marketplace template ===== */
body.kcm-standalone{
  margin:0!important;
  padding:0!important;
  background:#fff;
}
body.kcm-standalone .kcm-brand-header{
  display:block!important;
  width:100%;
}
.kcm-standalone-main{
  width:100%;
  margin:0;
  padding:0;
}
.kcm-standalone-main > .kcm-home{
  margin-top:0!important;
}
.kcm-standalone .kcm-brand-footer{
  display:block!important;
  margin-top:70px;
}
.kcm-standalone-car{
  width:min(1180px,calc(100% - 40px));
  margin:35px auto 0;
}
.kcm-standalone-title{
  margin-bottom:18px;
}
.kcm-standalone-title>a{
  color:#0878cf;
  text-decoration:none;
  font-weight:700;
}
.kcm-standalone-title h1{
  margin:10px 0 0;
  color:#071d63;
  font-size:clamp(28px,4vw,44px);
}
/* WordPress admin bar remains intentionally visible for logged-in administrators. */
@media(max-width:680px){
  .kcm-standalone-car{
    width:min(100% - 28px,1180px);
    margin-top:24px;
  }
}
