/*
Theme Name: ピラミッド五行ソルト Visual
Theme URI: https://example.com/
Author: GearBox
Description: ピラミッド五行ソルトの商品紹介サイト向け。生成済みの五行商品ビジュアルを同梱し、固定ページ・商品ページ・投稿一覧・STORES導線をまとめて構築します。
Version: 2.1.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: gogyo-salt-visual
*/

:root {
  --g-bg: #f5f0e7;
  --g-paper: #fbf8f1;
  --g-paper-2: #efe8dc;
  --g-ink: #262621;
  --g-muted: #726f67;
  --g-line: rgba(55, 50, 42, .16);
  --g-shadow: 0 24px 70px rgba(50, 43, 33, .14);
  --g-max: 1240px;
  --g-narrow: 840px;
  --g-wood: #667d4d;
  --g-fire: #a84d3e;
  --g-earth: #a77b32;
  --g-metal: #7b7d7f;
  --g-water: #315b7b;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--g-ink);
  background:
    radial-gradient(circle at 18% 10%, rgba(255,255,255,.72), transparent 28%),
    linear-gradient(180deg, #f8f4ec 0%, var(--g-bg) 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif;
  line-height: 1.9;
  letter-spacing: .035em;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }

.g-wrap { width: min(calc(100% - 48px), var(--g-max)); margin-inline: auto; }
.g-narrow { width: min(calc(100% - 48px), var(--g-narrow)); margin-inline: auto; }
.alignwide { max-width: var(--g-max) !important; width: 100%; }
.g-center { text-align: center; }
.g-content-spacer { height: 44px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 244, 236, .88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--g-line);
}
.site-header__inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.site-brand { display: inline-flex; flex-direction: column; text-decoration: none; line-height: 1.2; }
.site-brand__name { font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 1.22rem; letter-spacing: .18em; }
.site-brand__sub { margin-top: 7px; color: var(--g-muted); font-size: .62rem; letter-spacing: .18em; }
.primary-nav ul { display: flex; align-items: center; gap: 24px; list-style: none; margin: 0; padding: 0; }
.primary-nav a { text-decoration: none; font-size: .8rem; letter-spacing: .08em; }
.primary-nav a:hover { opacity: .58; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: transparent; padding: 10px; }
.nav-toggle span { display: block; height: 1px; background: var(--g-ink); margin: 6px 0; }

.g-button, .wp-block-button__link, .g-store-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 28px;
  border: 1px solid var(--g-ink);
  border-radius: 999px;
  background: var(--g-ink);
  color: #fff;
  text-decoration: none;
  font-size: .88rem;
  letter-spacing: .08em;
  transition: transform .22s ease, opacity .22s ease, background .22s ease;
}
.g-button:hover, .wp-block-button__link:hover, .g-store-button:hover { transform: translateY(-2px); opacity: .82; }
.g-button--ghost { background: rgba(255,255,255,.14); color: var(--g-ink); border-color: var(--g-ink); }
.g-text-link { text-decoration-thickness: 1px; text-underline-offset: 5px; }
.g-eyebrow { display: block; margin-bottom: 12px; color: var(--g-muted); font-size: .7rem; letter-spacing: .23em; text-transform: uppercase; }
.g-rule { width: 84px; height: 1px; background: currentColor; opacity: .55; margin: 26px 0; }
.g-lead { font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: clamp(1.08rem, 1.8vw, 1.34rem); line-height: 1.9; }

.g-hero {
  border-bottom: 1px solid var(--g-line);
  overflow: hidden;
}
.g-hero__inner {
  display: grid;
  grid-template-columns: .86fr 1.14fr;
  min-height: min(780px, calc(100vh - 78px));
  align-items: stretch;
}
.g-hero__copy { display: flex; flex-direction: column; justify-content: center; padding: 72px 6vw 72px 0; position: relative; z-index: 2; }
.g-hero__copy::before { content: ""; position: absolute; width: 420px; height: 420px; left: -230px; top: 40px; border-radius: 50%; background: radial-gradient(circle, rgba(167,123,50,.12), transparent 67%); z-index: -1; }
.g-title { margin: 0; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: clamp(2.6rem, 5.6vw, 5.5rem); font-weight: 500; line-height: 1.35; letter-spacing: .09em; }
.g-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.g-hero__image { position: relative; min-height: 520px; overflow: hidden; background: #e8dfd0; }
.g-hero__image img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.g-hero__image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(248,244,236,.34), transparent 26%); pointer-events: none; }
.g-hero__caption { position: absolute; right: 22px; bottom: 18px; z-index: 2; writing-mode: vertical-rl; color: rgba(38,38,33,.66); font-size: .68rem; letter-spacing: .18em; }

.entry-content { padding: 88px 0 120px; }
.entry-content > .g-wrap > * { max-width: var(--g-narrow); margin-left: auto; margin-right: auto; }
.entry-content > .g-wrap > .alignwide,
.entry-content > .g-wrap > .g-split,
.entry-content > .g-wrap > .g-products-grid,
.entry-content > .g-wrap > .g-choice-grid,
.entry-content > .g-wrap > .g-scene-grid,
.entry-content > .g-wrap > .g-use-grid,
.entry-content > .g-wrap > .g-product-detail-hero,
.entry-content > .g-wrap > .g-content-section,
.entry-content > .g-wrap > .g-wide-visual { max-width: var(--g-max); }
.entry-content h2, .entry-content h3 { font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-weight: 500; line-height: 1.55; letter-spacing: .08em; }
.entry-content h2 { margin-top: 72px; font-size: clamp(1.65rem, 3vw, 2.55rem); }
.entry-content h3 { margin-top: 42px; }
.entry-content p { margin-top: 1.2em; margin-bottom: 1.2em; }

.g-page-hero { padding: 94px 0 74px; border-bottom: 1px solid var(--g-line); background: linear-gradient(180deg, rgba(255,255,255,.36), rgba(255,255,255,0)); }
.g-page-hero__inner { max-width: 900px; }
.entry-title { margin: 0; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: clamp(2.2rem, 5vw, 4.9rem); font-weight: 500; letter-spacing: .09em; line-height: 1.35; }

.g-content-section { margin-top: 100px !important; }
.g-section-heading { max-width: 760px; margin-bottom: 38px; }
.g-section-heading h2 { margin: 0 0 14px; }
.g-section-heading p { color: #55524c; }

.g-split { display: grid; grid-template-columns: .88fr 1.12fr; gap: clamp(34px, 6vw, 80px); align-items: center; margin-top: 20px !important; margin-bottom: 90px !important; }
.g-split__text h2 { margin-top: 0; }
.g-scene { margin: 0; overflow: hidden; background: #e7ded0; border: 1px solid var(--g-line); }
.g-scene img { width: 100%; height: 100%; object-fit: cover; }
.g-scene figcaption { padding: 12px 2px 0; color: var(--g-muted); font-size: .76rem; background: var(--g-bg); }
.g-scene--portrait { aspect-ratio: 4 / 5; }
.g-scene--wide { aspect-ratio: 16 / 9; }
.g-scene--wide img { object-position: center; }

.g-wide-visual { position: relative; margin-top: 110px !important; }
.g-wide-visual .g-scene { border: 0; box-shadow: var(--g-shadow); }
.g-wide-visual__copy { width: min(520px, calc(100% - 40px)); margin: -72px 0 0 36px; position: relative; padding: 34px 38px; background: rgba(251,248,241,.96); border: 1px solid var(--g-line); box-shadow: 0 18px 50px rgba(50,43,33,.1); }
.g-wide-visual__copy h2 { margin: 0; }

.g-products-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.g-product-card { position: relative; display: flex; flex-direction: column; background: var(--g-paper); border: 1px solid var(--g-line); text-decoration: none; overflow: hidden; min-width: 0; transition: transform .28s ease, box-shadow .28s ease; }
.g-product-card:hover { transform: translateY(-6px); box-shadow: var(--g-shadow); }
.g-product-card__image { aspect-ratio: 4 / 5; overflow: hidden; background: #e9e1d4; }
.g-product-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.g-product-card:hover .g-product-card__image img { transform: scale(1.025); }
.g-product-card__body { padding: 22px 20px 24px; position: relative; }
.g-product-card__num { position: absolute; right: 18px; top: 20px; color: var(--g-muted); font-size: .65rem; letter-spacing: .2em; }
.g-product-card__kanji { font-family: "Yu Mincho", serif; font-size: 3.3rem; line-height: 1; margin-bottom: 10px; }
.g-product-card__langs { color: var(--g-muted); font-size: .68rem; letter-spacing: .16em; }
.g-product-card__langs span { opacity: .45; }
.g-product-card__words { min-height: 54px; margin-top: 15px; color: #55524c; font-size: .79rem; line-height: 1.65; }
.g-product-card__link { display: inline-block; margin-top: 18px; font-size: .76rem; border-bottom: 1px solid currentColor; }
.g-product-card--wood .g-product-card__kanji { color: var(--g-wood); }
.g-product-card--fire .g-product-card__kanji { color: var(--g-fire); }
.g-product-card--earth .g-product-card__kanji { color: var(--g-earth); }
.g-product-card--metal .g-product-card__kanji { color: var(--g-metal); }
.g-product-card--water .g-product-card__kanji { color: var(--g-water); }

.g-choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--g-line); border: 1px solid var(--g-line); margin-top: 48px !important; margin-bottom: 88px !important; }
.g-choice { background: var(--g-paper); padding: 36px; }
.g-choice__num { color: var(--g-muted); font-size: .68rem; letter-spacing: .2em; }
.g-choice h3 { margin: 12px 0 10px; }

.g-scene-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.g-scene-grid--2 { grid-template-columns: repeat(2, 1fr); }
.g-scene-grid .g-scene { aspect-ratio: 4 / 5; }
.g-scene-grid .g-scene figcaption { padding: 12px 0 0; }

.g-use-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.g-use-card { border: 1px solid var(--g-line); background: var(--g-paper); overflow: hidden; }
.g-use-card .g-scene { border: 0; aspect-ratio: 4/5; }
.g-use-card__body { padding: 26px; }
.g-use-card__body h2 { margin: 8px 0 10px; font-size: 1.45rem; }
.g-use-card__num, .g-info-card__num { color: var(--g-muted); font-size: .68rem; letter-spacing: .2em; }

.g-product-page .entry-content { padding-top: 42px; }
.g-product-detail-hero { --element: var(--g-ink); display: grid; grid-template-columns: .88fr 1.12fr; min-height: 640px; background: var(--g-paper); border: 1px solid var(--g-line); overflow: hidden; }
.g-product-detail-hero__copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(38px, 6vw, 82px); }
.g-product-detail-hero__copy h1 { margin: 0; font-family: "Yu Mincho", serif; font-size: clamp(2.1rem, 4vw, 4.2rem); font-weight: 500; line-height: 1.4; letter-spacing: .08em; }
.g-product-detail-hero__langs { display: flex; gap: 12px; margin-top: 20px; color: var(--element); font-size: .75rem; letter-spacing: .18em; }
.g-product-detail-hero__visual { min-height: 540px; overflow: hidden; background: #e8dfd2; }
.g-product-detail-hero__visual img { width: 100%; height: 100%; object-fit: cover; }
.g-product-detail--wood { --element: var(--g-wood); }
.g-product-detail--fire { --element: var(--g-fire); }
.g-product-detail--earth { --element: var(--g-earth); }
.g-product-detail--metal { --element: var(--g-metal); }
.g-product-detail--water { --element: var(--g-water); }
.g-product-body { max-width: var(--g-max) !important; margin-top: 72px !important; }
.g-symbol-row { display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: center; padding: 50px 0; border-top: 1px solid var(--g-line); border-bottom: 1px solid var(--g-line); }
.g-symbol-row__kanji { font-family: "Yu Mincho", serif; font-size: clamp(7rem, 14vw, 12rem); line-height: 1; text-align: center; }
.g-symbol--wood { color: var(--g-wood); } .g-symbol--fire { color: var(--g-fire); } .g-symbol--earth { color: var(--g-earth); } .g-symbol--metal { color: var(--g-metal); } .g-symbol--water { color: var(--g-water); }
.g-symbol-row h2 { margin: 0; }
.g-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 50px 0; }
.g-info-card { border: 1px solid var(--g-line); background: rgba(251,248,241,.78); padding: 30px; }
.g-info-card h3 { margin: 8px 0 10px; }
.g-store-button-wrap { margin: 44px 0 76px; padding: 34px; border: 1px solid var(--g-line); background: rgba(251,248,241,.74); }
.g-store-note { display: block; margin-top: 12px; color: var(--g-muted); font-size: .76rem; }
.g-store-button.is-disabled { opacity: .45; pointer-events: none; }

.g-journal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.g-post-card { border: 1px solid var(--g-line); background: var(--g-paper); overflow: hidden; }
.g-post-card__image { display: block; aspect-ratio: 16/10; overflow: hidden; }
.g-post-card__image img { width: 100%; height: 100%; object-fit: cover; }
.g-post-card__body { padding: 24px; }
.g-post-card__meta { color: var(--g-muted); font-size: .72rem; margin-bottom: 12px; }
.g-post-card h2, .g-post-card h3 { margin: 0 0 10px; font-family: "Yu Mincho", serif; font-weight: 500; line-height: 1.55; }
.g-post-card a { text-decoration: none; }
.g-post-card p { color: #5b5851; font-size: .9rem; }
.g-empty-note { padding: 26px; border: 1px dashed var(--g-line); color: var(--g-muted); background: rgba(251,248,241,.45); }
.g-category-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.g-category-nav a { padding: 8px 14px; border: 1px solid var(--g-line); border-radius: 999px; text-decoration: none; font-size: .78rem; background: var(--g-paper); }

.g-note-box { margin-top: 54px !important; padding: 24px 28px; border-left: 3px solid var(--g-ink); background: rgba(251,248,241,.78); }
.g-note-box p { margin: 0; font-size: .88rem; color: #55524c; }
.g-faq details { border-top: 1px solid var(--g-line); padding: 22px 0; }
.g-faq details:last-child { border-bottom: 1px solid var(--g-line); }
.g-faq summary { cursor: pointer; font-family: "Yu Mincho", serif; font-size: 1.08rem; }
.g-faq details p { color: #55524c; }

.g-contact-form { display: grid; gap: 20px; }
.g-form-row { display: grid; gap: 8px; }
.g-form-row label { font-size: .86rem; }
.g-form-row input, .g-form-row textarea, .g-form-row select { width: 100%; border: 1px solid var(--g-line); background: #fffefa; color: var(--g-ink); padding: 14px 16px; border-radius: 0; }
.g-form-row textarea { min-height: 190px; resize: vertical; }
.g-form-status { padding: 16px 18px; border: 1px solid var(--g-line); background: var(--g-paper); margin-bottom: 20px; }
.g-form-status--success { border-color: rgba(102,125,77,.5); }
.g-form-status--error { border-color: rgba(168,77,62,.5); }

.site-footer { border-top: 1px solid var(--g-line); background: #eae2d5; }
.site-footer__visual { height: 210px; overflow: hidden; border-bottom: 1px solid var(--g-line); }
.site-footer__visual img { width: 100%; height: 100%; object-fit: cover; object-position: center 46%; filter: saturate(.9) contrast(.96); }
.site-footer__inner { padding: 68px 0 32px; }
.site-footer__grid { display: grid; grid-template-columns: 1.35fr repeat(3, 1fr); gap: 36px; }
.site-footer h3, .site-footer h4 { font-family: "Yu Mincho", serif; font-weight: 500; margin-top: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 7px 0; }
.site-footer a { text-decoration: none; font-size: .86rem; }
.site-footer__bottom { margin-top: 50px; padding-top: 20px; border-top: 1px solid var(--g-line); color: var(--g-muted); font-size: .74rem; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

.pagination, .nav-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 42px; }
.page-numbers { display: inline-flex; min-width: 40px; min-height: 40px; align-items: center; justify-content: center; border: 1px solid var(--g-line); text-decoration: none; background: var(--g-paper); }
.page-numbers.current { background: var(--g-ink); color: #fff; }

@media (max-width: 1100px) {
  .g-products-grid { grid-template-columns: repeat(3, 1fr); }
  .g-hero__inner { grid-template-columns: .95fr 1.05fr; }
}
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .primary-nav { position: absolute; top: 100%; left: 0; right: 0; display: none; background: rgba(248,244,236,.98); border-bottom: 1px solid var(--g-line); padding: 18px 24px 26px; }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .primary-nav li { border-bottom: 1px solid var(--g-line); }
  .primary-nav a { display: block; padding: 14px 4px; }
  .g-hero__inner, .g-split, .g-product-detail-hero { grid-template-columns: 1fr; }
  .g-hero__copy { padding: 70px 0 52px; }
  .g-hero__image { min-height: 520px; }
  .g-use-grid, .g-scene-grid, .g-journal-grid { grid-template-columns: 1fr; }
  .g-scene-grid .g-scene { aspect-ratio: 16/10; }
  .g-choice-grid { grid-template-columns: 1fr; }
  .g-symbol-row { grid-template-columns: 150px 1fr; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .g-wrap, .g-narrow { width: min(calc(100% - 28px), var(--g-max)); }
  .site-header__inner { min-height: 68px; }
  .site-brand__sub { display: none; }
  .g-title { font-size: clamp(2.35rem, 11vw, 4rem); }
  .g-hero__image { min-height: 390px; }
  .g-hero__image img { object-position: 60% center; }
  .entry-content { padding: 60px 0 90px; }
  .g-page-hero { padding: 70px 0 56px; }
  .g-products-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .g-product-card__body { padding: 17px 15px 19px; }
  .g-product-card__kanji { font-size: 2.6rem; }
  .g-product-card__words { display: none; }
  .g-product-detail-hero__copy { padding: 38px 24px; }
  .g-product-detail-hero__visual { min-height: 430px; }
  .g-product-detail-hero__visual img { object-position: center; }
  .g-symbol-row { grid-template-columns: 1fr; gap: 18px; text-align: center; }
  .g-symbol-row__kanji { font-size: 7rem; }
  .g-info-grid { grid-template-columns: 1fr; }
  .g-wide-visual__copy { margin: -28px auto 0; padding: 24px; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .site-footer__visual { height: 150px; }
}
