/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: #0d0d0d;
  color: #fff;
  font-family: 'Noto Sans JP', sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }

/* ── Site Header ── */
.sm-site-header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 200;
  background: rgba(17,17,17,0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px; height: 64px;
}
.sm-logo {
  display: flex; align-items: center; gap: 12px; text-decoration: none;
}
.sm-logo-badge {
  background: #CC0000; color: #fff;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 20px; font-weight: 900;
  letter-spacing: .05em; padding: 3px 10px; line-height: 1;
}
.sm-logo-text { font-size: 12px; font-weight: 700; color: #fff; line-height: 1.3; }
.sm-logo-sub  { color: rgba(255,255,255,.4); font-size: 9px; font-weight: 300; letter-spacing: .12em; }

.sm-nav { display: flex; align-items: center; gap: 28px; }
.sm-nav a {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 13px; color: rgba(255,255,255,.7);
  letter-spacing: .03em; transition: color .2s;
}
.sm-nav a:hover { color: #CC0000; }
.sm-nav-btn {
  background: transparent !important;
  border: 1px solid rgba(255,255,255,.25) !important;
  color: #fff !important;
  padding: 8px 18px !important;
  transition: background .2s, border-color .2s !important;
}
.sm-nav-btn:hover {
  background: #CC0000 !important;
  border-color: #CC0000 !important;
}

/* ── Page Wrapper ── */
.sm-page { padding: 100px 40px 80px; max-width: 1440px; margin: 0 auto; }
.sm-page-narrow { padding: 100px 40px 80px; max-width: 960px; margin: 0 auto; }

/* ── Section Labels ── */
.sm-label {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  font-size: 11px; letter-spacing: .2em;
  color: #CC0000; font-weight: 700; margin-bottom: 16px;
}
.sm-label-line { width: 28px; height: 1px; background: #CC0000; display: inline-block; }
.sm-page-title {
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-weight: 700; color: #fff; line-height: 1.2; margin-bottom: 12px;
}
.sm-page-subtitle {
  color: rgba(255,255,255,.45); font-size: .9375rem;
  line-height: 1.8; font-weight: 300; margin-bottom: 48px; max-width: 620px;
}

/* ── Grid ── */
.sm-grid-3 {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px; margin-bottom: 48px;
}
.sm-photo-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 2px; margin-bottom: 48px;
}

/* ── Cards (販売機械) ── */
.sm-machine-card {
  background: #111; border: 1px solid rgba(255,255,255,.1);
  overflow: hidden; display: flex; flex-direction: column;
  transition: box-shadow .25s;
}
.sm-machine-card:hover { box-shadow: 0 4px 24px rgba(0,0,0,.6); }

.sm-card-thumb {
  position: relative; aspect-ratio: 4/3;
  background: #1a1a1a; overflow: hidden;
}
.sm-card-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  filter: brightness(.82); transition: transform .5s;
}
.sm-machine-card:hover .sm-card-thumb img { transform: scale(1.03); }

.sm-card-no-img {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  color: rgba(255,255,255,.2); font-size: .72rem;
  font-family: 'Barlow Condensed', sans-serif; letter-spacing: .15em;
}
.sm-card-no-img svg { width: 44px; height: 44px; opacity: .5; }

.sm-badge {
  position: absolute; top: 12px; left: 12px;
  font-size: 9px; font-weight: 700; letter-spacing: .15em;
  padding: 5px 10px; color: #fff; font-family: 'Inter', sans-serif;
}
.sm-badge-sale        { background: rgba(22,101,52,.92); }
.sm-badge-negotiating { background: rgba(146,64,14,.92); }
.sm-badge-sold        { background: rgba(64,64,64,.92); }

.sm-card-body { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.sm-card-cat  { font-size: 9px; letter-spacing: .2em; color: #CC0000; font-weight: 700; font-family: 'Inter', sans-serif; }
.sm-card-title { font-size: 1rem; font-weight: 700; line-height: 1.45; color: #fff; }
.sm-card-price { font-size: .8125rem; color: rgba(255,255,255,.4); font-weight: 300; margin-top: auto; }
.sm-card-price strong { color: #CC0000; font-weight: 700; }

/* the_content() in card */
.sm-card-content {
  font-size: .82rem; color: rgba(255,255,255,.55);
  line-height: 1.9; font-weight: 300;
  border-top: 1px solid rgba(255,255,255,.08); padding-top: 12px;
}
.sm-card-content p { margin-bottom: .5em; }

/* ── Photo thumbnails (施工実績) ── */
.sm-photo-thumb {
  position: relative; aspect-ratio: 4/3;
  overflow: hidden; display: block; background: #111;
}
.sm-photo-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  filter: brightness(.68); transition: transform .6s ease, filter .35s;
}
.sm-photo-thumb:hover img { transform: scale(1.05); filter: brightness(.44); }
.sm-photo-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 20px 24px 28px;
  background: linear-gradient(to top, rgba(17,17,17,.95) 0%, transparent 100%);
}
.sm-photo-tag  { display: block; font-family: 'Barlow Condensed', sans-serif; font-size: 9px; font-weight: 700; letter-spacing: .2em; color: #CC0000; margin-bottom: 6px; }
.sm-photo-name { font-family: 'Noto Sans JP', sans-serif; font-size: .9375rem; font-weight: 700; margin-bottom: 4px; line-height: 1.4; color: #fff; }
.sm-photo-more { font-size: .73rem; opacity: .55; font-weight: 300; color: #fff; }
.sm-no-thumb {
  width: 100%; height: 100%; background: #1a1a1a;
  display: flex; align-items: center; justify-content: center;
}
.sm-no-thumb-icon {
  width: 56px; height: 56px;
  background: rgba(204,0,0,.12); border: 1px solid rgba(204,0,0,.3);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
}

/* ── Buttons ── */
.sm-btn-red {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 24px;
  background: #CC0000; color: #fff; border: 1px solid #CC0000;
  font-family: 'Noto Sans JP', sans-serif; font-size: .8125rem;
  font-weight: 700; letter-spacing: .05em;
  transition: background .2s; cursor: pointer;
}
.sm-btn-red:hover { background: #aa0000; border-color: #aa0000; }

.sm-btn-outline {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 32px;
  background: transparent; color: #fff;
  border: 1px solid rgba(255,255,255,.2);
  font-family: 'Noto Sans JP', sans-serif; font-size: 13px;
  font-weight: 700; letter-spacing: .05em;
  transition: background .2s, border-color .2s, color .2s;
}
.sm-btn-outline:hover { background: #CC0000; border-color: #CC0000; }

.sm-btn-row { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 40px; padding-top: 32px; border-top: 1px solid rgba(255,255,255,.1); }
.sm-cta { text-align: center; padding-top: 32px; }

/* ── the_content() WordPress Block Styles ── */
.sm-wp-content {
  color: rgba(255,255,255,.65);
  font-size: .9375rem; line-height: 2; font-weight: 300;
}
.sm-wp-content p  { margin-bottom: 1.2em; }
.sm-wp-content h2 { font-size: 1.3rem; font-weight: 700; color: #fff; margin: 2em 0 .6em; padding-bottom: .4em; border-bottom: 1px solid rgba(255,255,255,.1); }
.sm-wp-content h3 { font-size: 1.1rem; font-weight: 700; color: #fff; margin: 1.5em 0 .5em; }
.sm-wp-content ul, .sm-wp-content ol { padding-left: 1.5em; margin-bottom: 1em; }
.sm-wp-content li { margin-bottom: .4em; }
.sm-wp-content strong { color: rgba(255,255,255,.9); }
.sm-wp-content a  { color: #CC0000; border-bottom: 1px solid rgba(204,0,0,.4); transition: border-color .2s; }
.sm-wp-content a:hover { border-color: #CC0000; }
.sm-wp-content hr { border: none; border-top: 1px solid rgba(255,255,255,.1); margin: 2em 0; }

/* 画像 */
.sm-wp-content img {
  max-width: 100%; height: auto; display: block;
  margin: 24px auto; border-radius: 2px;
}
.sm-wp-content figure { margin: 24px 0; }
.sm-wp-content figcaption {
  font-size: .8rem; color: rgba(255,255,255,.4);
  text-align: center; margin-top: 8px; font-style: italic;
}

/* WordPress 画像ブロック */
.sm-wp-content .wp-block-image { margin: 24px 0; }
.sm-wp-content .wp-block-image img { width: 100%; height: auto; }
.sm-wp-content .wp-block-image.aligncenter { text-align: center; }
.sm-wp-content .wp-block-image.alignleft  { float: left; margin-right: 24px; max-width: 50%; }
.sm-wp-content .wp-block-image.alignright { float: right; margin-left: 24px; max-width: 50%; }

/* WordPress ギャラリーブロック */
.sm-wp-content .wp-block-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px; margin: 24px 0;
  list-style: none; padding: 0;
}
.sm-wp-content .wp-block-gallery .wp-block-image,
.sm-wp-content .wp-block-gallery li { margin: 0; }
.sm-wp-content .wp-block-gallery img {
  width: 100%; height: 200px; object-fit: cover;
  margin: 0; transition: opacity .2s;
}
.sm-wp-content .wp-block-gallery img:hover { opacity: .85; }

/* WordPress カラムブロック */
.sm-wp-content .wp-block-columns {
  display: flex; gap: 24px; margin: 24px 0; flex-wrap: wrap;
}
.sm-wp-content .wp-block-column { flex: 1 1 200px; }

/* テーブル */
.sm-wp-content table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: .875rem; }
.sm-wp-content th { background: rgba(204,0,0,.15); color: #fff; font-weight: 700; padding: 10px 14px; text-align: left; border-bottom: 1px solid rgba(255,255,255,.15); }
.sm-wp-content td { padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,.06); color: rgba(255,255,255,.65); }
.sm-wp-content tr:hover td { background: rgba(255,255,255,.03); }

/* 引用 */
.sm-wp-content blockquote {
  border-left: 3px solid #CC0000; margin: 24px 0;
  padding: 12px 20px; color: rgba(255,255,255,.5);
  font-style: italic; background: rgba(255,255,255,.03);
}

/* clearfix */
.sm-wp-content::after { content: ''; display: table; clear: both; }

/* ── Empty State ── */
.sm-empty { text-align: center; padding: 80px 0; color: rgba(255,255,255,.3); font-size: .95rem; line-height: 2; }

/* ── Note text ── */
.sm-note { font-size: .78rem; color: rgba(255,255,255,.3); text-align: center; line-height: 2; letter-spacing: .02em; font-weight: 300; font-family: 'Noto Sans JP', sans-serif; }

/* ── Site Footer ── */
.sm-site-footer {
  background: #0a0a0a; border-top: 1px solid rgba(255,255,255,.08);
  padding: 32px 40px; text-align: center;
  font-size: .72rem; color: rgba(255,255,255,.2); letter-spacing: .08em;
  margin-top: 80px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .sm-grid-3, .sm-photo-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 768px) {
  .sm-site-header { padding: 0 20px; }
  .sm-nav { gap: 16px; }
  .sm-nav a:not(.sm-nav-btn) { display: none; }
  .sm-page, .sm-page-narrow { padding: 90px 20px 60px; }
  .sm-wp-content .wp-block-image.alignleft,
  .sm-wp-content .wp-block-image.alignright { float: none; max-width: 100%; margin: 16px 0; }
}
@media (max-width: 640px) {
  .sm-grid-3, .sm-photo-grid { grid-template-columns: 1fr !important; }
  .sm-wp-content .wp-block-gallery { grid-template-columns: repeat(2, 1fr) !important; }
}
