/*
Theme Name: eplus-theme
Author: HAVE MARCY
Description: デンチャリ買取 イープラス 専用オリジナルテーマ。メーカー別買取ページ・買取実績（カスタム投稿）・出張買取エリア・FAQ・査定導線（電話／LINE／フォーム）を標準搭載。
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: eplus
*/

/* =========================================================
   Base
   ========================================================= */
:root {
  --c-main: #0b2a4a;      /* ネイビー */
  --c-main-2: #12406e;
  --c-accent: #ff7a00;    /* CTAオレンジ */
  --c-accent-d: #e56a00;
  --c-green: #19b46b;     /* e-bikeグリーン */
  --c-line: #06c755;
  --c-text: #1f2933;
  --c-sub: #5b6b7b;
  --c-border: #e3e8ee;
  --c-bg: #ffffff;
  --c-bg-soft: #f4f7fa;
  --c-yellow: #ffe14d;
  --radius: 12px;
  --shadow: 0 6px 20px rgba(11, 42, 74, .08);
  --container: 1120px;
  --font: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  color: var(--c-text);
  background: var(--c-bg);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; vertical-align: middle; }
a { color: var(--c-main-2); }
a:hover { opacity: .85; }
h1, h2, h3, h4 { line-height: 1.4; margin: 0 0 .6em; }
p { margin: 0 0 1.2em; }
ul, ol { padding-left: 1.4em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
  clip: auto; width: auto; height: auto; z-index: 1000;
  background: #fff; padding: 8px 16px; top: 8px; left: 8px;
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; padding: 14px 24px; border-radius: 999px;
  font-weight: 700; font-size: 1.05rem; text-decoration: none; line-height: 1.3;
  color: #fff; transition: transform .15s, box-shadow .15s, background .15s;
  box-shadow: 0 4px 0 rgba(0,0,0,.15);
}
.btn:hover { transform: translateY(-2px); opacity: 1; }
.btn__sub { font-size: .75rem; font-weight: 500; opacity: .95; }
.btn--tel { background: var(--c-main); }
.btn--line { background: var(--c-line); }
.btn--form { background: var(--c-accent); }
.btn--form:hover { background: var(--c-accent-d); }
.btn--ghost { background: #fff; color: var(--c-main); border: 2px solid var(--c-main); box-shadow: none; }
.btn--sm { padding: 10px 18px; font-size: .9rem; }

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.97); border-bottom: 1px solid var(--c-border);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 68px;
}
.site-branding { display: flex; flex-direction: column; line-height: 1.2; }
.site-branding a { text-decoration: none; color: var(--c-main); }
.site-branding__tag { font-size: .7rem; color: var(--c-sub); }
.site-branding__name { font-size: 1.3rem; font-weight: 900; letter-spacing: .02em; }
.site-branding__name span { color: var(--c-green); }
.custom-logo { max-height: 48px; width: auto; }

.header-actions { display: flex; align-items: center; gap: 12px; }
.header-tel { display: none; text-decoration: none; color: var(--c-main); text-align: right; line-height: 1.2; }
.header-tel__num { font-size: 1.4rem; font-weight: 900; }
.header-tel__hours { font-size: .7rem; color: var(--c-sub); }

.menu-toggle {
  width: 44px; height: 44px; border: 0; background: var(--c-main); border-radius: 8px;
  display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  cursor: pointer;
}
.menu-toggle span { display: block; width: 22px; height: 2px; background: #fff; transition: .2s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.global-nav { display: none; background: var(--c-main); }
.global-nav.is-open { display: block; }
.global-nav ul { list-style: none; margin: 0; padding: 0; }
.global-nav a {
  display: block; padding: 14px 16px; color: #fff; text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.1); font-weight: 500; font-size: .95rem;
}
.global-nav .current-menu-item > a { color: var(--c-yellow); }

@media (min-width: 1024px) {
  .menu-toggle { display: none; }
  .header-tel { display: block; }
  .global-nav { display: block; }
  .global-nav ul { display: flex; flex-wrap: nowrap; justify-content: center; max-width: var(--container); margin: 0 auto; }
  .global-nav a { border: 0; padding: 12px 9px; font-size: .82rem; white-space: nowrap; }
  .global-nav li:last-child a { background: var(--c-accent); }
}

/* =========================================================
   Hero (front)
   ========================================================= */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background:
    radial-gradient(circle at 85% 20%, rgba(25,180,107,.35), transparent 45%),
    linear-gradient(135deg, var(--c-main) 0%, var(--c-main-2) 100%);
  padding: 56px 0 64px;
}
.hero.has-image { background-size: cover; background-position: center; }
.hero.has-image::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(11,42,74,.92) 0%, rgba(11,42,74,.6) 60%, rgba(11,42,74,.2) 100%);
}
.hero .container { position: relative; }
.hero__eyebrow {
  display: inline-block; background: var(--c-yellow); color: var(--c-main);
  font-weight: 700; font-size: .85rem; padding: 4px 14px; border-radius: 999px; margin-bottom: 16px;
}
.hero__title { font-size: clamp(1.9rem, 6vw, 3.2rem); font-weight: 900; line-height: 1.3; margin-bottom: 16px; }
.hero__title em { font-style: normal; color: var(--c-yellow); }
.hero__lead { font-size: 1.05rem; max-width: 640px; opacity: .95; }
.hero__badges { list-style: none; padding: 0; margin: 24px 0 28px; display: flex; flex-wrap: wrap; gap: 10px; }
.hero__badges li {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.35);
  padding: 8px 14px; border-radius: 8px; font-weight: 700; font-size: .9rem;
}
.hero__badges li::before { content: "✓ "; color: var(--c-yellow); }
.hero__btns { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__btns .btn { flex: 1 1 200px; max-width: 280px; }

/* =========================================================
   Sections
   ========================================================= */
.section { padding: 64px 0; }
.section--soft { background: var(--c-bg-soft); }
.section__head { text-align: center; margin-bottom: 36px; }
.section__en {
  display: block; color: var(--c-green); font-weight: 700; letter-spacing: .15em;
  font-size: .8rem; text-transform: uppercase; margin-bottom: 4px;
}
.section__title { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 900; color: var(--c-main); margin: 0; }
.section__desc { color: var(--c-sub); margin-top: 12px; }
.section__more { text-align: center; margin-top: 32px; }

.grid { display: grid; gap: 20px; }
@media (min-width: 640px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } .grid--3 { grid-template-columns: repeat(2, 1fr); } .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } .grid--4 { grid-template-columns: repeat(4, 1fr); } }

/* Maker cards */
.maker-card {
  display: block; text-decoration: none; color: var(--c-text);
  background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: 28px 24px; box-shadow: var(--shadow); position: relative; transition: transform .15s;
}
.maker-card:hover { transform: translateY(-4px); opacity: 1; }
.maker-card__name { font-size: 1.5rem; font-weight: 900; color: var(--c-main); letter-spacing: .04em; margin: 0 0 4px; }
.maker-card__ja { font-size: .85rem; color: var(--c-sub); margin-bottom: 12px; display: block; }
.maker-card__models { font-size: .9rem; margin: 0 0 16px; }
.maker-card__link { color: var(--c-accent); font-weight: 700; font-size: .9rem; }
.maker-card__link::after { content: " →"; }

/* Type cards */
.type-card {
  display: flex; flex-direction: column; background: #fff; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: var(--c-text);
}
.type-card__head { background: var(--c-green); color: #fff; padding: 20px 24px; }
.type-card__head h3 { margin: 0; font-size: 1.3rem; }
.type-card__body { padding: 20px 24px 24px; }
.type-card__body ul { margin: 0 0 12px; }

/* Reasons */
.reason { background: #fff; border-radius: var(--radius); padding: 28px 22px; text-align: center; box-shadow: var(--shadow); }
.reason__num {
  display: inline-flex; width: 52px; height: 52px; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--c-main); color: var(--c-yellow); font-weight: 900; font-size: 1.2rem;
  margin-bottom: 12px;
}
.reason h3 { font-size: 1.1rem; color: var(--c-main); }
.reason p { font-size: .92rem; color: var(--c-sub); margin: 0; }

/* Jisseki cards */
.jisseki-card {
  background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: var(--c-text);
  box-shadow: var(--shadow);
}
.jisseki-card__thumb { aspect-ratio: 4 / 3; background: var(--c-bg-soft); overflow: hidden; display: flex; align-items: center; justify-content: center; color: var(--c-sub); font-size: .85rem; }
.jisseki-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.jisseki-card__body { padding: 16px 18px 20px; }
.jisseki-card__maker { display: inline-block; font-size: .72rem; font-weight: 700; background: var(--c-main); color: #fff; padding: 2px 10px; border-radius: 4px; }
.jisseki-card__title { font-size: 1rem; margin: 8px 0; }
.jisseki-card__price { font-size: 1.4rem; font-weight: 900; color: #e74c3c; margin: 0; }
.jisseki-card__price small { font-size: .75rem; color: var(--c-sub); font-weight: 500; margin-right: 6px; }
.jisseki-card__area { font-size: .8rem; color: var(--c-sub); margin: 4px 0 0; }

.filter { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 28px; }
.filter a {
  padding: 6px 16px; border-radius: 999px; border: 1px solid var(--c-border);
  text-decoration: none; color: var(--c-text); font-size: .9rem; background: #fff;
}
.filter a.is-active { background: var(--c-main); color: #fff; border-color: var(--c-main); }

/* Flow */
.flow { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; counter-reset: flow; }
@media (min-width: 960px) { .flow { grid-template-columns: repeat(4, 1fr); } }
.flow li {
  background: #fff; border-radius: var(--radius); padding: 24px 20px; box-shadow: var(--shadow);
  counter-increment: flow; position: relative;
}
.flow li::before {
  content: "STEP " counter(flow); display: block; color: var(--c-green);
  font-weight: 900; font-size: .85rem; letter-spacing: .1em; margin-bottom: 6px;
}
.flow h3 { font-size: 1.1rem; color: var(--c-main); margin-bottom: 6px; }
.flow p { font-size: .9rem; color: var(--c-sub); margin: 0; }

/* Area */
.area-box {
  background: #fff; border-radius: var(--radius); padding: 32px 24px; box-shadow: var(--shadow);
  border-top: 5px solid var(--c-green); text-align: center;
}
.area-box__text { font-size: 1.2rem; font-weight: 700; color: var(--c-main); }

/* FAQ */
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-list details, .entry-content .wp-block-details {
  background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius);
  margin-bottom: 12px; overflow: hidden;
}
.faq-list summary, .entry-content .wp-block-details summary {
  cursor: pointer; padding: 18px 48px 18px 52px; font-weight: 700; position: relative; list-style: none;
}
.faq-list summary::-webkit-details-marker, .entry-content .wp-block-details summary::-webkit-details-marker { display: none; }
.faq-list summary::before, .entry-content .wp-block-details summary::before {
  content: "Q"; position: absolute; left: 16px; top: 15px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--c-main); color: #fff; font-size: .85rem; display: flex; align-items: center; justify-content: center;
}
.faq-list summary::after, .entry-content .wp-block-details summary::after {
  content: "+"; position: absolute; right: 20px; top: 14px; font-size: 1.4rem; color: var(--c-sub);
}
.faq-list details[open] summary::after, .entry-content .wp-block-details[open] summary::after { content: "−"; }
.faq-list details > div, .faq-list details > p, .entry-content .wp-block-details > *:not(summary) {
  padding: 0 20px 4px 52px; margin-top: 0;
}
.faq-list details > p:last-child, .entry-content .wp-block-details > *:last-child { padding-bottom: 18px; }

/* CTA */
.cta { background: linear-gradient(135deg, var(--c-main) 0%, var(--c-main-2) 100%); color: #fff; padding: 56px 0; text-align: center; }
.cta__lead { font-size: clamp(1.3rem, 4vw, 1.8rem); font-weight: 900; margin-bottom: 8px; }
.cta__sub { opacity: .9; margin-bottom: 24px; }
.cta__btns { display: grid; gap: 12px; max-width: 900px; margin: 0 auto; }
@media (min-width: 768px) { .cta__btns { grid-template-columns: repeat(3, 1fr); } }
.cta__btns .btn { width: 100%; padding: 18px 16px; }
.cta__hours { font-size: .85rem; opacity: .85; margin: 16px 0 0; }

/* =========================================================
   Page / Entry
   ========================================================= */
.page-hero { background: linear-gradient(135deg, var(--c-main) 0%, var(--c-main-2) 100%); color: #fff; padding: 40px 0 44px; }
.page-hero__title { font-size: clamp(1.5rem, 5vw, 2.2rem); font-weight: 900; margin: 0; }
.page-hero__lead { margin: 10px 0 0; opacity: .9; }
.breadcrumb { font-size: .8rem; padding: 10px 0; color: var(--c-sub); }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.breadcrumb li + li::before { content: "›"; margin-right: 4px; }
.breadcrumb a { color: var(--c-sub); }

.main-content { padding: 40px 0 64px; }
.entry-content { max-width: 860px; margin: 0 auto; }
.entry-content > * + * { margin-top: 0; }
.entry-content h2 {
  font-size: 1.45rem; color: var(--c-main); margin: 2.2em 0 .9em; padding: 10px 16px;
  border-left: 6px solid var(--c-green); background: var(--c-bg-soft); border-radius: 0 8px 8px 0;
}
.entry-content h2:first-child { margin-top: 0; }
.entry-content h3 { font-size: 1.2rem; color: var(--c-main); margin: 1.8em 0 .7em; padding-bottom: 6px; border-bottom: 2px solid var(--c-border); }
.entry-content ul li, .entry-content ol li { margin-bottom: .4em; }
.entry-content .wp-block-table { margin: 0 0 1.4em; overflow-x: auto; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 480px; }
.entry-content th, .entry-content td { border: 1px solid var(--c-border); padding: 12px 14px; text-align: left; }
.entry-content thead th { background: var(--c-main); color: #fff; }
.entry-content tbody tr:nth-child(even) td { background: var(--c-bg-soft); }
.entry-content .wp-block-button__link { background: var(--c-accent); border-radius: 999px; font-weight: 700; }
.entry-content .wp-block-image img { border-radius: var(--radius); }

.note-box { background: #fff8e6; border-left: 4px solid #f59e0b; padding: 16px 20px; border-radius: 0 8px 8px 0; font-size: .92rem; }
.point-box { background: #ecfdf5; border-left: 4px solid var(--c-green); padding: 16px 20px; border-radius: 0 8px 8px 0; }

/* Jisseki single */
.jisseki-detail { width: 100%; border-collapse: collapse; margin-bottom: 28px; }
.jisseki-detail th, .jisseki-detail td { border: 1px solid var(--c-border); padding: 12px 14px; text-align: left; }
.jisseki-detail th { background: var(--c-bg-soft); width: 32%; }
.jisseki-detail .price { color: #e74c3c; font-weight: 900; font-size: 1.4rem; }
.jisseki-hero-img { margin-bottom: 24px; border-radius: var(--radius); overflow: hidden; }

/* Post list (fallback) */
.post-list { display: grid; gap: 20px; max-width: 860px; margin: 0 auto; }
.post-item { border-bottom: 1px solid var(--c-border); padding-bottom: 20px; }
.post-item h2 { font-size: 1.2rem; margin-bottom: 4px; }
.post-item h2 a { color: var(--c-main); text-decoration: none; }
.post-item time { font-size: .8rem; color: var(--c-sub); }
.pagination { text-align: center; margin-top: 32px; }
.pagination .page-numbers { display: inline-block; padding: 6px 12px; margin: 2px; border: 1px solid var(--c-border); border-radius: 6px; text-decoration: none; }
.pagination .current { background: var(--c-main); color: #fff; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer { background: #0a1f36; color: rgba(255,255,255,.85); padding: 48px 0 100px; font-size: .9rem; }
.site-footer a { color: rgba(255,255,255,.85); text-decoration: none; }
.site-footer__grid { display: grid; gap: 32px; }
@media (min-width: 768px) { .site-footer__grid { grid-template-columns: 1.2fr 2fr; } }
.site-footer__name { font-size: 1.2rem; font-weight: 900; color: #fff; margin-bottom: 8px; }
.footer-nav ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 16px; }
@media (min-width: 768px) { .footer-nav ul { grid-template-columns: repeat(3, 1fr); } }
.footer-nav a::before { content: "› "; color: var(--c-green); }
.site-footer__copy { text-align: center; margin-top: 36px; font-size: .78rem; opacity: .6; }
@media (min-width: 1024px) { .site-footer { padding-bottom: 48px; } }

/* Mobile fixed CTA */
.fixed-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: grid; grid-template-columns: repeat(3, 1fr);
  box-shadow: 0 -4px 12px rgba(0,0,0,.12);
}
.fixed-cta a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom)); color: #fff; text-decoration: none;
  font-weight: 700; font-size: .85rem; line-height: 1.3;
}
.fixed-cta small { font-size: .65rem; font-weight: 500; }
.fixed-cta__tel { background: var(--c-main); }
.fixed-cta__line { background: var(--c-line); }
.fixed-cta__form { background: var(--c-accent); }
@media (min-width: 1024px) { .fixed-cta { display: none; } }

/* Utility */
.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.empty-note { text-align: center; color: var(--c-sub); background: #fff; border: 1px dashed var(--c-border); padding: 32px; border-radius: var(--radius); }
