/*
Theme Name: PETIT EBISU NOTE
Theme URI: https://petit-ebisu.com/apps/note/
Author: PETIT EBISU
Description: PETIT EBISU 公式NOTE専用テーマ。カラーミー本体とフォント・色・余白・ロゴの雰囲気を共有しつつ、読みものとして独立したシンプルな構成。
Version: 0.3.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: petit-ebisu-note
*/

/* =========================================================
   基本設定（本体と共通：Lora + Noto Sans JP / 文字 #3F3F3F / hover #777）
========================================================= */
:root {
  --pe-text: #3f3f3f;
  --pe-text-sub: #909090;
  --pe-line: #dddddd;
  --pe-bg-gray: #f7f7f7;
  --pe-beige: #efe8dc;
  --pe-beige-light: #f7f3ed;
  --pe-serif: "Lora", serif;
  --pe-sans: "Noto Sans JP", sans-serif;
  --pe-container: 1030px;
  --pe-gutter: 15px;
  --pe-read: 680px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #fff;
  color: var(--pe-text);
  font-family: var(--pe-sans);
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: top;
}

a {
  color: var(--pe-text);
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: #777777;
}

.pe-container {
  width: 100%;
  max-width: var(--pe-container);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--pe-gutter);
  padding-right: var(--pe-gutter);
}

.pe-skip {
  position: absolute;
  top: -100px;
  left: 8px;
  z-index: 100;
  padding: 8px 16px;
  background: #fff;
  border: 1px solid var(--pe-text);
}

.pe-skip:focus {
  top: 8px;
}

/* ---------------------------------------------------------
   ヘッダー（左：PETIT EBISU / NOTES　右：ONLINE SHOP）
--------------------------------------------------------- */
.pe-header {
  border-bottom: 1px solid #ebebeb;
  background: #fff;
}

.pe-header__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 100px;
}

.pe-header__brand {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}

.pe-header__brand:hover {
  color: var(--pe-text);
  opacity: 0.7;
}

/* 本体ロゴと同じ「PETIT / EBISU」2段・Lora 600 */
.pe-header__logo {
  font-family: var(--pe-serif);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.05;
}

.pe-header__label {
  padding-left: 20px;
  border-left: 1px solid var(--pe-line);
  color: var(--pe-text-sub);
  font-family: var(--pe-serif);
  font-size: 13px;
  line-height: 40px;
  letter-spacing: 0.25em;
}

.pe-header__shop {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  font-family: var(--pe-serif);
  font-size: 12px;
  letter-spacing: 0.18em;
  white-space: nowrap;
}

.pe-header__shop::after {
  content: "";
  width: 6px;
  height: 6px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
}

/* ---------------------------------------------------------
   メイン・パンくず
--------------------------------------------------------- */
.pe-main {
  padding-bottom: 110px;
}

.c-breadcrumbs-list {
  margin: 0 0 40px;
  padding: 20px 0 0;
  list-style: none;
  color: var(--pe-text-sub);
  font-size: 12px;
}

.c-breadcrumbs-list__item {
  position: relative;
  display: inline-block;
  margin-right: 25px;
}

.c-breadcrumbs-list__item::before {
  content: "";
  position: absolute;
  top: 50%;
  right: -15px;
  margin-top: -3px;
  width: 5px;
  height: 5px;
  border-right: 1px solid #999999;
  border-bottom: 1px solid #999999;
  transform: rotate(-45deg);
}

.c-breadcrumbs-list__item:last-child {
  margin-right: 0;
}

.c-breadcrumbs-list__item:last-child::before {
  content: none;
}

.c-breadcrumbs-list a {
  color: var(--pe-text);
}

/* ---------------------------------------------------------
   フッター（PETIT EBISU / ONLINE SHOP / NOTES / Instagram / Copyright）
--------------------------------------------------------- */
.pe-footer {
  background: var(--pe-bg-gray);
}

.pe-footer__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 64px;
  padding-bottom: 56px;
}

.pe-footer__logo {
  font-family: var(--pe-serif);
  font-size: 16px;
  letter-spacing: 0.08em;
}

.pe-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 36px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--pe-serif);
  font-size: 12px;
  letter-spacing: 0.15em;
}

.pe-copyright {
  margin: 0;
  padding: 24px var(--pe-gutter) 30px;
  border-top: 1px solid #ebebeb;
  color: var(--pe-text-sub);
  font-size: 11px;
  text-align: center;
}

/* ---------------------------------------------------------
   NOTE 共通
--------------------------------------------------------- */
/* カード・ボタン・前後記事は hover でも下線を出さない */
.pe-card a,
.pe-btn,
.pe-postnav a {
  text-decoration: none !important;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

.pe-sp-br {
  display: none;
}

/* ---------------------------------------------------------
   ページ見出し（本体の見出し c-ttl-main と同じ Lora 30px / 0.15em）
--------------------------------------------------------- */
.pe-page-head {
  margin-bottom: 56px;
}

.pe-page-head__ttl {
  margin: 0;
  font-family: var(--pe-serif);
  font-weight: normal;
  font-size: 30px;
  line-height: 1.4;
  letter-spacing: 0.15em;
}

.pe-page-head__sub {
  margin: 4px 0 0;
  color: var(--pe-text-sub);
  font-size: 13px;
}

.pe-page-head__lead {
  max-width: 560px;
  margin: 16px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--pe-beige);
  line-height: 2;
}

/* ---------------------------------------------------------
   NOTE一覧（カード）
--------------------------------------------------------- */
.pe-note-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* カード全体を記事リンクにする（タイトルのリンクをカード全面に広げる） */
.pe-card {
  position: relative;
}

.pe-card a {
  color: inherit;
}

.pe-card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.pe-card__img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--pe-beige-light);
}

.pe-card__img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.pe-card:hover .pe-card__img img {
  transform: scale(1.03);
}

/* カテゴリー名・日付（補助情報） */
.pe-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
}

.pe-card__cat {
  position: relative;
  z-index: 2; /* カード全体リンクより手前（カテゴリー一覧へ） */
  color: #8a7d68 !important;
  font-family: var(--pe-serif);
  font-size: 11px;
  letter-spacing: 0.18em;
}

.pe-card__cat:hover {
  color: var(--pe-text) !important;
}

.pe-card__noimg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #b8ab96;
  font-family: var(--pe-serif);
  font-size: 13px;
  letter-spacing: 0.2em;
}

.pe-card__body {
  padding-top: 12px;
}

.pe-date {
  display: block;
  color: var(--pe-text-sub);
  font-family: var(--pe-serif);
  font-size: 12px;
  letter-spacing: 0.1em;
}

.pe-card__ttl {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.7;
}

.pe-card:hover .pe-card__ttl a {
  color: #777777;
}

/* ---------------------------------------------------------
   カテゴリーナビ（ALL / STORY / COLOR …）
--------------------------------------------------------- */
.pe-page-head + .pe-catnav {
  margin-top: -16px;
}

.pe-catnav {
  margin-bottom: 48px;
}

.pe-catnav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pe-catnav__link {
  display: inline-block;
  padding: 4px 0 6px;
  border-bottom: 1px solid transparent;
  color: var(--pe-text-sub);
  font-family: var(--pe-serif);
  font-size: 12px;
  letter-spacing: 0.2em;
}

.pe-catnav__link:hover {
  color: var(--pe-text);
}

.pe-catnav__link.is-current {
  border-bottom-color: var(--pe-text);
  color: var(--pe-text);
}

.pe-card__excerpt {
  display: -webkit-box;
  margin: 6px 0 0;
  overflow: hidden;
  color: #6f6f6f;
  font-size: 13px;
  line-height: 1.8;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.pe-empty {
  padding: 40px 0;
  color: var(--pe-text-sub);
  text-align: center;
}

/* ページネーション */
.pagination {
  margin-top: 70px;
}

.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--pe-line);
  font-family: var(--pe-serif);
  font-size: 13px;
}

.pagination a.page-numbers:hover {
  border-color: #3f3f3f;
  color: #3f3f3f;
}

.pagination .page-numbers.current {
  border-color: var(--pe-beige);
  background: var(--pe-beige);
}

.pagination .page-numbers.dots {
  border-color: transparent;
}

/* ---------------------------------------------------------
   記事詳細
--------------------------------------------------------- */
.pe-article__head {
  max-width: var(--pe-read);
  margin: 0 auto 36px;
}

.pe-article__cat {
  display: inline-block;
  margin-bottom: 10px;
  color: #8a7d68;
  font-family: var(--pe-serif);
  font-size: 12px;
  letter-spacing: 0.2em;
}

.pe-article__cat:hover {
  color: var(--pe-text);
}

.pe-article__ttl {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.06em;
}

.pe-article__head .pe-date {
  margin-top: 12px;
}

/* アイキャッチ：本文と同じ幅・16:9 で控えめに（元画像は加工せず CSS でトリミング） */
.pe-article__eyecatch {
  max-width: var(--pe-read);
  margin: 0 auto 56px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--pe-beige-light);
}

.pe-article__eyecatch img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* 本文 */
.pe-entry {
  max-width: var(--pe-read);
  margin: 0 auto;
  font-size: 15px;
  line-height: 2.1;
  letter-spacing: 0.04em;
  overflow-wrap: break-word;
}

.pe-entry > * {
  margin-top: 0;
  margin-bottom: 2em;
}

.pe-entry > *:last-child {
  margin-bottom: 0;
}

.pe-entry h2 {
  margin-top: 3.2em;
  margin-bottom: 1.4em;
  padding-bottom: 0.7em;
  border-bottom: 1px solid var(--pe-line);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.06em;
}

.pe-entry h3 {
  margin-top: 2.6em;
  margin-bottom: 1em;
  padding-left: 14px;
  border-left: 2px solid var(--pe-beige);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: 0.05em;
}

.pe-entry h4 {
  margin-top: 2em;
  margin-bottom: 0.8em;
  font-size: 15px;
  font-weight: 500;
}

.pe-entry a {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: #b8ab96;
}

.pe-entry ul,
.pe-entry ol {
  padding-left: 1.4em;
}

.pe-entry ul {
  list-style: disc;
}

.pe-entry ol {
  list-style: decimal;
}

.pe-entry li + li {
  margin-top: 0.4em;
}

.pe-entry ul li::marker {
  color: #b8ab96;
}

.pe-entry figure {
  margin: 2.8em 0;
}

.pe-entry img {
  display: block;
  height: auto;
}

.pe-entry figcaption,
.pe-entry .wp-element-caption {
  margin-top: 10px;
  color: var(--pe-text-sub);
  font-size: 12px;
  line-height: 1.8;
  text-align: center;
}

.pe-entry .alignwide,
.pe-entry .alignfull {
  width: 100%;
  max-width: 100%;
}

.pe-entry blockquote {
  margin-left: 0;
  margin-right: 0;
  padding: 24px 28px;
  background: var(--pe-beige-light);
  border-left: 2px solid var(--pe-beige);
}

.pe-entry blockquote p:last-child {
  margin-bottom: 0;
}

.pe-entry hr {
  width: 40px;
  margin: 3.5em auto;
  border: 0;
  border-top: 1px solid var(--pe-text-sub);
}

.pe-entry table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.pe-entry th,
.pe-entry td {
  padding: 10px 12px;
  border: 1px solid var(--pe-line);
  text-align: left;
}

.pe-entry pre {
  overflow-x: auto;
}

/* 同じカテゴリーの記事（MORE FROM …）：一覧のカードを小さめに再利用 */
.pe-related {
  max-width: var(--pe-read);
  margin: 80px auto 0;
  padding-top: 40px;
  border-top: 1px solid var(--pe-line);
}

.pe-related__ttl {
  margin: 0 0 28px;
  color: var(--pe-text);
  font-family: var(--pe-serif);
  font-size: 13px;
  font-weight: normal;
  letter-spacing: 0.2em;
}

.pe-related__list.pe-note-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 20px;
}

.pe-related .pe-card__body {
  padding-top: 10px;
}

.pe-related .pe-card__ttl {
  font-size: 13px;
}

.pe-related + .pe-article__foot {
  margin-top: 56px;
}

/* 前後記事・一覧へ戻る */
.pe-article__foot {
  max-width: var(--pe-read);
  margin: 72px auto 0;
  padding-top: 40px;
  border-top: 1px solid var(--pe-line);
}

.pe-postnav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
}

.pe-postnav__item--next {
  text-align: right;
}

.pe-postnav__item a {
  display: block;
}

.pe-postnav__dir {
  display: block;
  color: var(--pe-text-sub);
  font-family: var(--pe-serif);
  font-size: 11px;
  letter-spacing: 0.15em;
}

.pe-postnav__ttl {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.7;
}

.pe-more {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  margin-top: 56px;
}

.pe-article__foot > .pe-more:first-child {
  margin-top: 0;
}

/* カラーミーTOP「VIEW ALL」（.p-note-more a）と同じボタン */
.pe-btn {
  display: inline-block;
  padding: 12px 30px;
  border: 1px solid #555555;
  color: #555555;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.pe-btn:hover {
  background: var(--pe-beige-light);
  color: #3f3f3f;
}

/* ONLINE SHOP への控えめな導線 */
.pe-textlink {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--pe-text-sub);
  font-family: var(--pe-serif);
  font-size: 12px;
  letter-spacing: 0.18em;
}

.pe-textlink::after {
  content: "";
  width: 5px;
  height: 5px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
}

/* ---------------------------------------------------------
   レスポンシブ
--------------------------------------------------------- */
@media screen and (max-width: 1030px) {
  :root {
    --pe-gutter: 24px;
  }
}

@media screen and (max-width: 900px) {
  .pe-note-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 767px) {
  :root {
    --pe-gutter: 20px;
  }

  .pe-header__in {
    min-height: 64px;
  }

  .pe-header__brand {
    gap: 14px;
  }

  .pe-header__logo {
    font-size: 13px;
  }

  .pe-header__label {
    padding-left: 14px;
    font-size: 11px;
    line-height: 28px;
    letter-spacing: 0.2em;
  }

  .pe-header__shop {
    gap: 8px;
    font-size: 11px;
    letter-spacing: 0.12em;
  }

  .c-breadcrumbs-list {
    margin-bottom: 28px;
    padding-top: 14px;
    font-size: 10px;
  }

  .pe-main {
    padding-bottom: 80px;
  }

  .pe-footer__in {
    flex-direction: column;
    gap: 22px;
    padding-top: 48px;
    padding-bottom: 40px;
    text-align: center;
  }

  .pe-footer__nav {
    justify-content: center;
    gap: 12px 28px;
  }

  .pe-copyright {
    padding-top: 20px;
    padding-bottom: 24px;
  }

  .pe-sp-br {
    display: inline;
  }

  .pe-page-head {
    margin-bottom: 36px;
  }

  .pe-page-head__ttl {
    font-size: 24px;
  }

  .pe-page-head + .pe-catnav {
    margin-top: -8px;
  }

  .pe-catnav {
    margin-bottom: 36px;
  }

  .pe-catnav__list {
    gap: 8px 26px;
  }

  .pe-related {
    margin-top: 60px;
    padding-top: 32px;
  }

  /* スマホ：MORE FROM は「小さな画像｜カテゴリー・日付・タイトル」の横並び（一覧カードは変更しない） */
  .pe-related__list.pe-note-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .pe-related .pe-card {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: start;
    gap: 16px;
    padding: 18px 0;
    border-top: 1px solid #ececec;
  }

  .pe-related .pe-card:first-child {
    padding-top: 0;
    border-top: 0;
  }

  .pe-related .pe-card:last-child {
    padding-bottom: 0;
  }

  .pe-related .pe-card__img {
    aspect-ratio: 4 / 3;
  }

  .pe-related .pe-card__noimg {
    font-size: 9px;
    letter-spacing: 0.1em;
  }

  .pe-related .pe-card__body {
    padding-top: 0;
  }

  .pe-related .pe-card__meta {
    gap: 2px 12px;
  }

  .pe-related .pe-card__cat,
  .pe-related .pe-date {
    font-size: 10.5px;
  }

  .pe-related .pe-card__ttl {
    display: -webkit-box;
    margin-top: 4px;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.65;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
  }

  .pe-related .pe-card:hover .pe-card__img img {
    transform: none;
  }

  .pe-related + .pe-article__foot {
    margin-top: 44px;
  }

  .pe-note-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .pagination {
    margin-top: 50px;
  }

  .pe-article__ttl {
    font-size: 20px;
  }

  .pe-article__eyecatch {
    margin-bottom: 40px;
  }

  .pe-entry {
    font-size: 14.5px;
    line-height: 2;
  }

  .pe-entry h2 {
    font-size: 17px;
  }

  .pe-article__foot {
    margin-top: 56px;
  }
}
