/* 日光山輪王寺 ご祈願・授与物オンライン受付（現行 Shopify テーマの見た目に合わせる：和紙の地・黒の角ボタン） */
:root {
  --ink: #000;
  --ink-sub: rgba(0, 0, 0, .71);
  --line: #eae8e6;
  --paper: #f7f4ee;
  --accent: #8e354a;
  --danger: #d00;
  --ok: #2f6b3a;
  --w: 960px;
  --serif: 'Noto Serif JP', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Yu Gothic', Meiryo, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.8;
  background: var(--paper) url(/img/bg-paper03.jpg) repeat top center / 600px auto;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.nw { display: inline-block; }
.wrap { max-width: var(--w); margin: 0 auto; padding: 0 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ヘッダー */
.hd { background: rgba(0,0,0,.35); position: relative; z-index: 5; }
.hd .wrap { display: flex; align-items: center; justify-content: center; height: 72px; position: relative; }
.hd .logo img { height: 52px; width: auto; }
.hd .cart-link { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: #fff; text-decoration: none; display: flex; align-items: center; gap: 4px; padding: 8px; }
.hd .cart-link svg { width: 24px; height: 24px; }
.hd .cart-count { min-width: 18px; height: 18px; border-radius: 9px; background: #fff; color: #000; font-size: 11px; line-height: 18px; text-align: center; padding: 0 5px; }
.hd .cart-count:empty, .hd .cart-count[data-n="0"] { display: none; }
body.is-qr-free-page .hd .cart-link { display: none; }

/* トップのヒーロー */
.hero { position: relative; margin-top: -72px; padding: 140px 16px 70px; text-align: center; color: #fff; background: #333 url(/img/eye-amulet.jpg) center / cover; }
.hero::before { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.35); }
.hero h1 { position: relative; margin: 0; font-family: var(--serif); font-weight: 400; line-height: 1.5; }
.hero h1 .s { display: block; font-size: clamp(20px, 4.5vw, 28px); }
.hero h1 .l { display: block; font-size: clamp(30px, 7vw, 48px); letter-spacing: .06em; }

/* 見出し・本文 */
.sec { padding: 40px 0; }
.sec-title { font-family: var(--serif); font-weight: 400; font-size: 24px; text-align: center; margin: 0 0 24px; }
.notice { text-align: center; margin: 24px 0; }
.rich p { margin: 0 0 1em; }
.rich img { margin: 12px auto; }
.rich table { border-collapse: collapse; width: 100%; }
.rich td, .rich th { border: 1px solid var(--line); padding: 8px 10px; vertical-align: top; text-align: left; }

/* 商品（トップの並び） */
.plist { display: grid; gap: 40px; }
.pcard { background: rgba(255,255,255,.55); padding: 24px 16px; text-align: center; }
.pcard .ph { max-width: 280px; margin: 0 auto 12px; }
.pcard .pt { font-family: var(--serif); font-size: 22px; margin: 0; }
.pcard .pp { font-family: var(--serif); font-size: 20px; margin: 0 0 12px; }
.pcard .pt a { text-decoration: none; }
.group-title { font-family: var(--serif); font-weight: 400; font-size: 26px; text-align: center; margin: 24px 0 0; }

/* 数量＋カート追加 */
.buy { display: flex; gap: 8px; align-items: stretch; max-width: 560px; margin: 0 auto; }
.qty { display: flex; align-items: center; border: 1px solid var(--line); background: #fff; }
.qty button { width: 40px; height: 48px; border: 0; background: none; font-size: 20px; cursor: pointer; }
.qty input { width: 40px; border: 0; text-align: center; font-size: 15px; background: none; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 0 20px; border: 1px solid #000; background: #000; color: #fff; font-size: 15px; font-family: inherit; cursor: pointer; text-decoration: none; border-radius: 0; flex: 1; }
.btn:hover { background: rgba(0,0,0,.71); }
.btn[disabled] { background: #aaa; border-color: #aaa; cursor: not-allowed; }
.btn.sub { background: #e6e6e6; color: #000; border-color: #e6e6e6; }
.btn.block { width: 100%; }
.added { display: none; color: var(--ok); font-size: 13px; margin-top: 6px; }
.added.on { display: block; }

/* 備考欄 */
.field { margin: 12px auto; max-width: 560px; text-align: left; }
.field label, .field .lbl { display: block; font-size: 14px; margin-bottom: 4px; }
.field input[type=text], .field input[type=email], .field input[type=tel], .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #ccc; background: #fff; font: inherit; border-radius: 0; color: #000;
}
.field textarea { min-height: 84px; }
.field.error input, .field.error select, .field.error textarea { border-color: var(--danger); }
.field .help { font-size: 12px; color: var(--ink-sub); margin-top: 4px; }
.field .warn { font-size: 13px; color: #a15c00; margin-top: 4px; }
.req::after { content: '必須'; font-size: 11px; color: var(--danger); margin-left: 6px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }

/* 購入方法 */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; text-align: center; }
.steps div { background: rgba(255,255,255,.6); padding: 16px 8px; font-size: 14px; }
.steps b { display: block; font-family: var(--serif); font-size: 15px; margin-bottom: 6px; }

/* 商品ページ */
.pdp { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding: 32px 0; }
.pdp .gallery img { margin-bottom: 8px; background: #fff; }
.pdp h1 { font-family: var(--serif); font-weight: 400; font-size: 28px; margin: 0 0 4px; }
.pdp .price { font-family: var(--serif); font-size: 22px; margin: 0 0 16px; }
.opt { margin: 12px 0; }
.opt .lbl { font-size: 14px; margin-bottom: 6px; }
.opt .vals { display: flex; flex-wrap: wrap; gap: 8px; }
.opt .vals label { cursor: pointer; }
.opt .vals input { position: absolute; opacity: 0; }
.opt .vals span { display: inline-block; padding: 8px 12px; border: 1px solid var(--line); background: #fff; font-size: 14px; }
.opt .vals input:checked + span { background: #000; color: #fff; border-color: #000; }
.opt .vals input:disabled + span { color: #aaa; text-decoration: line-through; }
.soldout { color: var(--danger); font-weight: bold; }

/* カート */
.cart-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; padding: 24px 0 48px; align-items: start; }
.cline { display: grid; grid-template-columns: 80px 1fr auto; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: start; }
.cline img { width: 80px; background: #fff; }
.cline .t { font-family: var(--serif); font-size: 17px; }
.cline .v, .cline .pr { font-size: 13px; color: var(--ink-sub); }
.cline .rm { background: none; border: 0; text-decoration: underline; font-size: 13px; cursor: pointer; padding: 4px 0; }
.cline .qty button { height: 36px; width: 32px; }
.summary { background: rgba(255,255,255,.7); padding: 20px; }
.summary h2 { font-size: 16px; margin: 0 0 8px; }
.summary .tot { display: flex; justify-content: space-between; font-weight: bold; font-size: 18px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.chk { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0; }
.chk input { width: 20px; height: 20px; margin: 3px 0 0; flex: none; }
.chk.error { color: var(--danger); }
.notes { font-size: 14px; }
.notes ul { padding-left: 1.2em; margin: 8px 0; }
.errs { color: var(--danger); font-size: 14px; margin: 8px 0; }
.errs:empty { display: none; }
hr.thin { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }

/* 購入手続き */
.co { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; padding: 24px 0 48px; align-items: start; }
.co h2 { font-size: 17px; margin: 24px 0 8px; }
.co fieldset { border: 0; padding: 0; margin: 0; }
.radio-card { display: block; border: 1px solid var(--line); background: #fff; padding: 12px; margin-bottom: -1px; cursor: pointer; }
.radio-card input { margin-right: 8px; }

/* 完了・状況 */
.status-box { background: rgba(255,255,255,.75); padding: 24px; margin: 24px 0; }
.pay-box { background: #faf6ee; border: 1px solid #eadfc8; padding: 16px; margin: 16px 0; }

/* QR ダイアログ（閉じられない） */
dialog.no-close { border: 2px solid #000; padding: 20px 24px; max-width: 90vw; width: 440px; text-align: center; font-weight: bold; }
dialog.no-close::backdrop { background: rgba(0,0,0,.45); }
dialog.no-close .qr-free { font-weight: normal; margin-top: 12px; font-size: 14px; }

/* フッター */
.ft { background: rgba(0,0,0,.85); color: #fff; padding: 32px 0 24px; margin-top: 40px; font-size: 13px; }
.ft a { color: #fff; }
.ft .logo { width: 140px; margin: 0 auto 16px; }
.ft ul { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; }
.ft .copy { text-align: center; opacity: .8; }
body.is-qr-free-page main { padding-bottom: 64px; }

@media (max-width: 749px) {
  .pdp, .cart-grid, .co { grid-template-columns: 1fr; gap: 16px; }
  .steps { grid-template-columns: 1fr; }
  .hero { padding: 120px 16px 56px; }
  .row2 { grid-template-columns: 1fr 1fr; }
}
.co .field, .summary .field, .row2 .field { max-width: none; margin-left: 0; margin-right: 0; }
@media (max-width: 749px) {
  /* スマホは写真を横スワイプにして、購入ボタンを近くに */
  .pdp .gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 8px; margin: 0 -16px; padding: 0 16px; }
  .pdp .gallery img { flex: 0 0 88%; scroll-snap-align: center; margin: 0; }
  .pdp { padding-top: 16px; }
}
.test-bar { position: relative; z-index: 10; background: #b00020; color: #fff; text-align: center; font-size: 13px; padding: 6px 12px; }
