/*
Theme Name: Kurema Kiko (薄いWP)
Theme URI: https://kurema.co.jp/
Author: kurema-renewal project
Description: キャンペーン情報・中古品情報の2投稿タイプ専用。サイト本体（会社案内・取扱商品等）は静的HTMLで、ヘッダー・フッター・共通CSS（parts/・assets/site.css・assets/site.js）は静的サイトの build.py が書き出したものを使う。
Version: 0.2.0
Requires PHP: 7.4
Text Domain: kurema
*/

/* 色・フォント・ヘッダー・フッター・.pagehead・.blk・.crumb などの共通部分は assets/site.css（build.py が生成）。
   ここには WP の一覧・投稿ページだけで使うものを書く。 */

:root{--gut:20px}
@media (min-width:700px){ :root{--gut:48px} }
@media (min-width:1100px){ :root{--gut:64px} }

/* ---------- 一覧カード（キャンペーン／中古品） ---------- */
.card-grid{display:grid;gap:14px;grid-template-columns:1fr;margin:0;padding:0;list-style:none}
.card{display:grid;grid-template-columns:104px 1fr;gap:14px;height:100%;padding:12px;border:1px solid var(--line);background:var(--white);text-decoration:none;color:inherit;transition:border-color .15s,box-shadow .15s}
.card:hover{border-color:var(--ink);box-shadow:0 6px 20px rgba(0,0,0,.06)}
.card .thumb{position:relative;display:grid;place-items:center;aspect-ratio:3/4;background:var(--paper-2);overflow:hidden}
.card .thumb img,.card .thumb canvas{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
.card .thumb--none span{font:600 13px/1 var(--cond);letter-spacing:.14em;color:var(--steel)}
.card .body{min-width:0}
.card .date{display:block;margin:0 0 6px;font:600 14px/1.2 var(--cond);letter-spacing:.06em;color:var(--red)}
.card h2{margin:0;font-size:16px;font-weight:700;line-height:1.6}
.card .caption{display:block;margin-top:6px;font-size:14px;line-height:1.7;color:#3E444A}
.ended{display:inline-block;margin-top:8px;font-size:11px;line-height:1.4;color:var(--steel);border:1px solid var(--line);border-radius:999px;padding:3px 10px;background:var(--white)}
.card.is-ended .thumb{opacity:.55}
@media (min-width:700px){
  .card-grid{grid-template-columns:repeat(2,1fr);gap:18px}
  .card{grid-template-columns:1fr;align-content:start;padding:14px}
  .card .thumb{aspect-ratio:4/3}
}
@media (min-width:1100px){ .card-grid{grid-template-columns:repeat(3,1fr)} }

/* ---------- ページ送り ---------- */
.pagination{margin-top:28px}
.pagination .nav-links{display:flex;flex-wrap:wrap;gap:6px}
.page-numbers{display:inline-grid;place-items:center;min-width:44px;height:44px;padding:0 14px;border:1px solid var(--line);background:var(--white);text-decoration:none;font-size:14px;font-weight:700}
a.page-numbers:hover{border-color:var(--ink)}
.page-numbers.current{background:var(--ink);border-color:var(--ink);color:var(--white)}
.page-numbers.dots{border:0;background:none}
.screen-reader-text{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

.empty{margin:0;padding:24px 0;color:var(--steel);font-size:16px}

/* ---------- 投稿ページ ---------- */
.single-head,.entry-content,.single-foot{padding-left:var(--gut);padding-right:var(--gut);max-width:calc(800px + var(--gut) * 2)}
/* チラシと本文の列は中央に置く（見出しまわりはパンくずと左端をそろえたまま） */
.entry-content,.single-foot{margin-left:auto;margin-right:auto}
.single-head{padding-top:20px}
.single-head h1{font-size:clamp(22px,5.6vw,32px);font-weight:900;line-height:1.45;margin:10px 0 14px;text-wrap:balance}
.single-head .lead{margin:0;font-size:16px;line-height:1.9;color:#33393E}
.period{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;margin:0}
.period-badge{display:inline-block;background:var(--red);color:var(--white);font-size:13px;font-weight:700;line-height:1;padding:7px 11px;border-radius:3px}
.period-date{font:600 20px/1.2 var(--cond);letter-spacing:.06em;color:var(--ink)}
.period .ended{margin-top:0}
@media (min-width:700px){ .single-head{padding-top:32px} }
@media (min-width:1100px){ .single-head{padding-top:40px} }

.entry-content{padding-top:20px;padding-bottom:12px;font-size:16px;line-height:2}
.entry-content p{margin:0 0 1.3em}
.entry-content h2{font-size:20px;font-weight:900;line-height:1.5;margin:1.8em 0 .8em}
.entry-content h3{font-size:18px;font-weight:900;line-height:1.5;margin:1.6em 0 .6em}
.entry-content a{color:var(--red)}
.entry-content img{display:block;width:auto;max-width:100%;height:auto;max-height:70vh;object-fit:contain;margin:1.2em auto;border:1px solid var(--line)}
.entry-content .wp-block-gallery{margin:1.2em 0}
.entry-content .wp-block-gallery img{max-height:50vh}
.entry-content figure{margin:1.2em 0}
.entry-content figcaption{text-align:center;font-size:14px;color:var(--steel);margin-top:6px}

.single-foot{padding-top:24px;padding-bottom:56px}
/* 投稿末尾のお問い合わせ枠（contact-box.php） */
.contact-box{border:1px solid var(--line);border-top:3px solid var(--red);background:var(--white);border-radius:4px;padding:28px 20px;text-align:center}
.contact-box h2{font-size:18px;font-weight:900;line-height:1.5;margin:0 0 6px;text-wrap:balance;word-break:auto-phrase}
.contact-box .cb-co{margin:0 0 10px;font-size:16px;font-weight:700}
.contact-box .cb-note{margin:0 0 20px;font-size:14px;line-height:1.8;color:var(--steel);text-wrap:balance;word-break:auto-phrase}
.contact-box .cb-acts{display:flex;flex-direction:column;gap:10px;max-width:560px;margin:0 auto}
.contact-box .cb-acts .btn{padding:16px 18px;font-size:15px}
.contact-box .cb-hours{margin:14px 0 0;font-size:13px;color:var(--steel)}
.btn.ink{background:var(--ink);border-color:var(--ink);color:var(--white)}
.btn.ink:hover{background:#000;border-color:#000}
.single-foot .back{margin:28px 0 0;text-align:center}
.single-foot .back .btn{min-width:240px;padding:14px 18px}
@media (min-width:700px){
  .contact-box{padding:32px}
  .contact-box h2{font-size:20px}
  .contact-box .cb-acts{flex-direction:row}
  .contact-box .cb-acts .btn{flex:1}
}

/* ---------- kurema-carousel（ギャラリー送り／PDFビューア共通） ---------- */
.kurema-carousel{margin:1.4em 0;border:1px solid var(--line);background:var(--paper-2);padding:16px}
.kurema-carousel__stage{display:flex;align-items:center;justify-content:center;min-height:120px}
.kurema-carousel__stage img{width:auto;max-width:100%;max-height:65vh;object-fit:contain;margin:0 auto;display:block}
.kurema-carousel__stage--pdf canvas{width:auto;max-width:100%;height:auto;max-height:65vh;object-fit:contain;box-shadow:0 2px 10px rgba(0,0,0,.12)}
.kurema-carousel__nav{display:flex;align-items:center;justify-content:center;gap:16px;margin-top:12px}
.kurema-carousel__btn{width:38px;height:38px;border-radius:50%;border:1.5px solid var(--ink);background:var(--white);color:var(--ink);font-size:16px;line-height:1;cursor:pointer;display:grid;place-items:center;transition:background .15s,color .15s}
.kurema-carousel__btn:hover{background:var(--ink);color:var(--white)}
.kurema-carousel__count{font:600 13px/1 var(--cond);letter-spacing:.06em;color:var(--steel);min-width:4em;text-align:center}
.kurema-pdf{margin:1.4em 0;border:1px solid var(--line);background:var(--paper-2);padding:16px}
.kurema-carousel__loading{text-align:center;color:var(--steel);font-size:13px;padding:24px 0}

/* ---------- kurema-lightbox（クリックで拡大） ---------- */
body.kurema-lightbox-open{overflow:hidden}
.kurema-lightbox{position:fixed;inset:0;background:rgba(10,11,12,.94);z-index:9999;display:none;flex-direction:column;align-items:center;justify-content:center;padding:24px}
.kurema-lightbox.is-open{display:flex}
.kurema-lightbox__close{position:absolute;top:16px;right:20px;width:44px;height:44px;border-radius:50%;border:0;background:rgba(255,255,255,.12);color:#fff;font-size:22px;line-height:1;cursor:pointer}
.kurema-lightbox__close:hover{background:rgba(255,255,255,.22)}
.kurema-lightbox__stage{max-width:100%;max-height:calc(100vh - 140px);overflow:auto;cursor:zoom-in;display:flex;align-items:center;justify-content:center}
.kurema-lightbox__stage img,.kurema-lightbox__stage canvas{max-width:92vw;max-height:calc(100vh - 140px);width:auto;height:auto;object-fit:contain;display:block}
.kurema-lightbox__stage.is-zoomed{cursor:zoom-out;align-items:flex-start;justify-content:flex-start}
.kurema-lightbox__stage.is-zoomed img,.kurema-lightbox__stage.is-zoomed canvas{max-width:none;max-height:none}
.kurema-lightbox__hint{color:rgba(255,255,255,.55);font-size:12px;margin:10px 0 0}
.kurema-lightbox__nav{margin-top:14px}
.kurema-lightbox__nav .kurema-carousel__btn{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.4);color:#fff}
.kurema-lightbox__nav .kurema-carousel__btn:hover{background:#fff;color:#111}
.kurema-lightbox__nav .kurema-carousel__count{color:rgba(255,255,255,.8)}
