/*
Theme Name: sora-coffee-core
Description: Minimal theme for SORA Coffee. WooCommerce-safe, sticky footer, logo, and optional XO Event Calendar in footer.
Version: 1.0.0
Author: SORA
*/
:root {
  --sora-bg: #f7f5f2;
  --sora-text: #2f2a26;
  --sora-brown: #a28669;
  /* --sora-brown: #7b4b2a;*/
  --sora-white: #fff;
  --sora-max: 1200px;
}

@font-face {
  font-family: 'NotoSansjp';
  font-style: normal;
  font-weight: 400;
  src: url('/font/NotoSansJP-Regular.woff') format('woff'),
    url('/font/NotosanscJP-Regular.eot') format('eot');
  font-display: swap;
}

/* ----------------------------------------------------------------------
初期化 リセット
---------------------------------------------------------------------- */
*,
*::before,
*::after {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

* {
  margin: 0;
}

html,
body {
  /*height: 100%;*/
  font-size: 16px;
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img,
picture,
video,
canvas,
svg {
  display: inline-block;
}

input,
button,
textarea,
select {
  font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
  margin-top: 0;
  margin-bottom: 0;
  font-weight: normal;
}

#root,
#__next {
  isolation: isolate;
}

a {
  list-style-type: none;
  text-decoration: none;
  width: 100%;
}

ul {
  display: block;
  list-style-type: none;
  -webkit-margin-before: 0;
  margin-block-start: 0;
  -webkit-margin-after: 0;
  margin-block-end: 0;
  -webkit-margin-start: 0;
  margin-inline-start: 0;
  -webkit-margin-end: 0;
  margin-inline-end: 0;
  -webkit-padding-start: 0;
  padding-inline-start: 0;
}

li {
  display: block;
  list-style-type: none;
  -webkit-margin-before: 0;
  margin-block-start: 0;
  -webkit-margin-after: 0;
  margin-block-end: 0;
  -webkit-margin-start: 0;
  margin-inline-start: 0;
  -webkit-margin-end: 0;
  margin-inline-end: 0;
  -webkit-padding-start: 0;
  padding-inline-start: 0;
}

strong {
  font-weight: normal;
}

/* === Utilities === */

.u-sp {
  display: none !important;
}

.u-pc {
  display: block;
}

/* 上下の余白を調整する 外側　上部
-------------------------------------------------- */

.u-ma-t-00 {
  margin-top: 0em;
}
.u-ma-t-10 {
  margin-top: 1em;
}
.u-ma-t-20 {
  margin-top: 2em;
}
.u-ma-t-30 {
  margin-top: 3em;
}
.u-ma-t-40 {
  margin-top: 4em;
}
.u-ma-t-50 {
  margin-top: 5em;
}

/* 上下の余白を調整する 外側　下部
-------------------------------------------------- */

.u-ma-b-00 {
  margin-bottom: 0em;
}
.u-ma-b-10 {
  margin-bottom: 1em;
}
.u-ma-b-20 {
  margin-bottom: 2em;
}
.u-ma-b-30 {
  margin-bottom: 3em;
}
.u-ma-b-40 {
  margin-bottom: 4em;
}
.u-ma-b-50 {
  margin-bottom: 5em;
}

.u-center {
  display: flex;
  justify-content: center;
}

.u-pv-24 {
  padding: 24px 0;
} /* たて方向24px */
.u-mb-16 {
  margin-bottom: 1rem;
} /* 16px相当（1rem） */
.u-mt-20 {
  margin-top: 20px;
}

/* Sticky footer layout */
html,
body {
  height: 100%;
}
body {
  margin: 0;
  color: var(--sora-text);
  background: var(--sora-bg) !important;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  line-height: 1.7;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, 'Noto Sans JP',
    sans-serif;
}
main {
  flex: 1;
}
img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--sora-text);
}

/*未訪問リンク*/
a:link {
  color: var(--sora-text);
}
/*訪問済みリンク*/
a:visited {
  color: var(--sora-text);
}

/*カーソルが重なった時*/
a:hover {
  color: var(--sora-brown);
}
/*クリックしてから離される時まで*/
a:active {
  color: var(--sora-brown);
}

/* Container */
.sora-container {
  max-width: var(--sora-max);
  margin: 0 auto;
  padding: 0 16px;
  width: 100%;
}

main.sora-container {
  max-width: var(--sora-max);
  margin: 0 auto;
  /*  padding: 0 16px;*/
  width: 100%;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.sora-container p {
  font-size: 1rem;
  line-height: 2rem;
}

.sora-container img {
  margin-bottom: 1rem;
}

.sora-container input,
.sora-container textarea,
.woocommerce .woocommerce-ordering select {
  display: block;
  width: 100%;
  border-radius: 5px;
  padding: 5px;
  margin-bottom: 1rem;
  border-color: #7a746e;
  border: 1px;
}

/* Header */
.sora-header {
  background: var(--sora-brown);
  color: var(--sora-white);
}
.sora-header a {
  color: var(--sora-white);
  text-decoration: none;
}
.sora-header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 72px;
  justify-content: space-between;
  align-content: center;
  flex-wrap: nowrap;
  flex-direction: row;
}
.sora-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sora-logo img {
  height: 56px;
  width: auto;
}

.site-title {
  font-size: 1.5rem;
  font-weight: bold;
  padding-left: 5px;
  padding-right: 5px;
}
.sora-sitename {
  font-size: 18px;
  font-weight: 600;
}
.sora-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  align-content: center;
  flex-wrap: nowrap;
  flex-direction: row;
}
.sora-nav ul {
  display: flex;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.sora-nav a {
  display: block;
  padding: 8px 10px;
  /*border: 1px solid rgba(255, 255, 255, 0.25);*/
  /* border-radius: 10px;*/
  text-align: center;
}

/*カーソルが重なった時*/
.sora-nav a:hover {
  background-color: var(--sora-bg);
  color: var(--sora-text);
  border-radius: 5px;
}

.sora-header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  align-content: center;
  flex-wrap: nowrap;
  flex-direction: row;
  width: 150px;
  margin-left: 10px;
}

.sora-header-actions .button {
  font-size: 100%;
  margin: 0;
  line-height: 1;
  cursor: pointer;
  position: relative;
  text-decoration: none;
  overflow: visible;
  padding: 0.618em 1em;
  font-weight: 700;
  border-radius: 5px;
  left: auto;
  color: #515151;
  background-color: #e9e6ed;
  border: 0;
  display: inline-block;
  background-image: none;
  box-shadow: none;
  text-shadow: none;
}

.wpcf7-submit,
button,
.woocommerce ul.products li.product .button,
.woocommerce button.button.alt {
  font-size: 1.2rem;
  margin: 0;
  line-height: 2;
  cursor: pointer;
  position: relative;
  text-decoration: none;
  overflow: visible;
  padding: 0.618em 1em;
  font-weight: 700;
  border-radius: 5px;
  color: #e9e6ed;
  background-color: #515151;
  width: 100%;
}

/* Footer */
.sora-footer {
  background: var(--sora-brown);
  color: var(--sora-white);
  margin-top: 24px;
}
.sora-footer a {
  color: #fff;
}
.sora-footer-inner {
  display: grid;
  gap: 16px;
  padding: 24px 0;
}
.sora-footer-grid {
  display: grid;
  gap: 24px;
}

.sora-footer-shop-wrap {
  padding-top: 1rem;
}

.sora-footer-shop-title {
  font-size: 1.25rem;
  font-weight: bold;
  line-height: 3rem;
}

.sora-footer-shop-text {
  font-size: 1rem;
  line-height: 2rem;
}

.sora-footer-shop-menu {
  padding-top: 4rem;
}

.sora-footer-shop-menu li {
  font-size: 1rem;
  line-height: 2rem;
}

@media (min-width: 920px) {
  .sora-footer-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* index */

.sora-top-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  column-gap: 10px;
   　row-gap: 1em;
}

/* Gentle tune for XO Event Calendar (optional) */
.sora-footer .xo-event-calendar .xo-ec-header {
  background: transparent;
  color: #fff;
  border: 0;
  padding: 6px 0;
}
.sora-footer .xo-event-calendar .xo-ec-prev,
.sora-footer .xo-event-calendar .xo-ec-next {
  color: #fff;
}
.sora-footer .xo-event-calendar table {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 5px;
  overflow: hidden;
}
.sora-footer .xo-event-calendar th,
.sora-footer .xo-event-calendar td {
  border-color: rgba(255, 255, 255, 0.15);
}
.sora-footer .xo-event-calendar .xo-ec-today {
  background: rgba(255, 255, 255, 0.18);
}
.sora-footer .xo-event-calendar .xo-ec-holiday {
  background: rgba(255, 255, 255, 0.12);
}

.xo-event-calendar table.xo-month button span.nav-prev {
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
}

.xo-event-calendar table.xo-month button span.nav-next {
  border-right: 2px solid #fff;
  border-top: 2px solid #fff;
}

.sora-footer .xo-event-calendar table {
  color: var(--sora-text);
}

.month-header {
  color: var(--sora-white);
}

/* WooCommerce — do not touch design; tiny spacing only */
.woocommerce ul.products {
  gap: 18px;
}

/* スライドショー */
/* スライドの親領域 */
#mainvisual {
  position: relative;
  height: 600px; /* ここで高さを決める（必要に応じて変更） */
  overflow: hidden;
}

/* ULのリセット */
#mainvisual .fade {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative; /* 子のabsoluteの基準にする */
  height: 100%;
}

/* 各スライド（li） */
#mainvisual .fade li {
  width: 100%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0; /* 最初は非表示 */
  animation: fade 15s infinite;
}

/* 画像フィット */
#mainvisual .fade li img {
  width: 100%;
  height: 600px; /* 親の高さと合わせる */
  object-fit: cover;
  display: block;
}

/* アニメのタイミング */
#mainvisual .fade li {
  animation: fade 30s infinite;
}
#mainvisual .fade li:nth-child(1) {
  animation-delay: 0s;
}
#mainvisual .fade li:nth-child(2) {
  animation-delay: 10s;
}
#mainvisual .fade li:nth-child(3) {
  animation-delay: 20s;
}

/* ふちの内側シャドウ（任意）
#mainvisual .fade li::after {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 20px 20px #fff;
  pointer-events: none;
} */

/* フェード+ズームのキーフレーム（必須！） */
@keyframes fade {
  /* 3枚＝15s のうち 5s を1枚分として配分 */
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.05);
  }
  5% {
    opacity: 1;
  }
  30% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  35% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

/* ====== スライド上のキャプション ====== */
#mainvisual {
  position: relative;
} /* すでに指定済でもOK */

#mainvisual .mv-caption {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0 16px;
  display: grid;
  gap: 6px;
  justify-items: center; /* 中央寄せ */
  text-align: center;
  padding: 0 16px;
  z-index: 5; /* 画像より上に */
  background: none; /* 透明に戻すなら */
}

/* 黒文字＋白ぼかしフチ */
#mainvisual .mv-caption h1,
#mainvisual .mv-caption p {
  margin: 0;
  color: #000; /* 文字色：黒 */
  font-weight: 700;
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.95),
    0 0 10px rgba(255, 255, 255, 0.7), 0 0 18px rgba(255, 255, 255, 0.5); /* 白グローで“白いぼかし縁” */

  padding-bottom: 14px;
}

/* サイズ（必要に応じて調整） */
#mainvisual .mv-caption h1 {
  font-size: clamp(18px, 2.8vw, 28px);
}
#mainvisual .mv-caption p {
  font-size: clamp(13px, 1.8vw, 16px);
}

/* スマホ：高さを低く */
@media (max-width: 767px) {
  #mainvisual {
    height: 240px;
  }
  #mainvisual .fade li img {
    height: 240px;
  }
}

/* スマホ時は下の余白を少し詰める */
@media (max-width: 767px) {
  #mainvisual .mv-caption {
    inset: auto 0 10px 0;
  }
}

a.p-button-a {
  display: block;
  width: 100%;
  padding: 0.5rem;
  border-radius: 5px;
  color: var(--sora-white);
  background: var(--sora-brown);
  font-size: 1.2em;
  text-align: center;
}

/*未訪問リンク*/
a.p-button-a:link {
  color: var(--sora-white);
}
/*訪問済みリンク*/
a.p-button-a:visited {
  color: var(--sora-white);
}

/*カーソルが重なった時*/
a.p-button-a:hover {
  color: var(--sora-white);
  background-color: var(--sora-text);
}
/*クリックしてから離される時まで*/
a.p-button-a:active {
  color: var(--sora-white);
  background-color: var(--sora-text);
}

/* === Page/Section === */
.sora-page-hero {
  margin-bottom: 16px;
}
.sora-page-title {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
}

/* === Posts list (cards) === */
.sora-post-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.sora-card {
  background: #fff;
  border: 1px solid #e7e1da;
  border-radius: 5px;
  overflow: hidden;
}
.sora-card-thumb {
  display: block;
}
.sora-card-thumb img {
  width: 100%;
  height: auto;
  display: block;
}
.sora-card .pad {
  padding: 12px 14px;
}
.sora-post-meta {
  font-size: 0.85rem;
  color: #7a746e;
}

/* === Pagination wrapper === */
.sora-pagination {
  margin-top: 20px;
}

.sora-pagination .nav-links {
  margin-top: 20px;
  display: flex;
  flex-wrap: nowrap;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

.sora-pagination .nav-previous {
  padding: 0.5rem;
}

.sora-pagination .nav-next {
  padding: 0.5rem;
}

/* ===== 記事ナビ（前/次）をカード風に ===== */

/*

.post-navigation{
  margin: 24px 0 32px;
  padding: 12px;
  background:#fff;
  border:1px solid #e7e1da;
  border-radius:12px;
}
.post-navigation .nav-links{
  display:flex;
  gap:12px;
  justify-content:space-between;
  align-items:stretch;
}

*/
.sora-pagination a {
  display: flex;
  flex: 1 1 0;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  background: #f7f5f2;
  border: 1px solid #e7e1da;
  border-radius: 5px;
  color: var(--sora-text);
  text-decoration: none;
  transition: 0.15s ease;
  min-width: 0; /* 省略記号のため */
}
.sora-pagination a:hover {
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

/* 矢印マークとラベル/タイトル */
.sora-pagination .nav-previous a::before {
  content: '«';
  opacity: 0.6;
}
.sora-pagination .nav-next a::after {
  content: '»';
  opacity: 0.6;
}
.sora-pagination .nav-previous a,
.sora-pagination .nav-next a {
  position: relative;
}
.sora-pagination .nav-previous a .meta-nav,
.sora-pagination .nav-next a .meta-nav {
  display: block;
  font-size: 0.85rem;
  color: #7a746e;
  margin-bottom: 2px;
}
.sora-pagination .nav-previous a .post-title,
.sora-pagination .nav-next a .post-title {
  display: block;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis; /* 長いタイトルは「…」 */
}

/* スマホ：縦並び */
@media (max-width: 640px) {
  .sora-pagination .nav-links {
    flex-direction: column;
  }
}

/* === single === */

.sora-single img {
  margin-bottom: 1rem;
}

.sora-single p {
  line-height: 1.5rem;
}

.sora-single-content {
  line-height: 1.5rem;
}

.sora-single-category {
  line-height: 1.5rem;
}

/* === WooCommerce header（上部の余白だけCSSに） === */
.woocommerce-products-header {
  margin-bottom: 16px;
}

.woocommerce ul.products li.product .price {
  margin-bottom: 1rem;
}

@media screen and (max-width: 992px) {
  html,
  body {
    font-size: 12px;
  }

  .u-sp {
    display: block !important;
  }
  .u-pc {
    display: none !important;
  }

  /* SP　ヘッダー　*/

  header {
    position: fixed; /* ヘッダーを固定する */
    top: 0; /* 上部から配置の基準位置を決める */
    left: 0; /* 左から配置の基準位置を決める */
    width: 100%; /* ヘッダーの横幅を指定する */
    z-index: 9999;
    background-color: #fff;
  }

  .custom-logo {
    width: 60px;
  }

  .header-left {
    padding: 5px;
  }

  .header-left-box {
    display: flex;
    align-items: center;
  }

  .header-right {
  }

  /* ========== Mobile Header (CSS only) ========== */
  .sora-nav-toggle {
    position: absolute;
    appearance: none;
    inset: auto;
    opacity: 0;
    pointer-events: none;
  }

  /* ハンバーガー */
  .sora-burger {
    display: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: var(--sora-brown);
    margin-top: 15px;
    margin-right: 5px;
  }
  .sora-burger span,
  .sora-burger span::before,
  .sora-burger span::after {
    content: '';
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    position: relative;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .sora-burger span::before {
    position: absolute;
    top: -7px;
    left: 0;
  }
  .sora-burger span::after {
    position: absolute;
    top: 7px;
    left: 0;
  }

  /* ナビ本体（デスクトップ） */
  .nav .nav-menu {
    display: flex;
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .nav .nav-menu > li > a {
    display: block;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    color: var(--sora-header-fg);
  }

  /* ===== スマホ化 ===== */

  /* 右側のボタンはアイコン類が重なる場合があるので縮める/折返し */
  .header-inner {
    gap: 12px;
    display: flex;
    justify-content: space-between;
  }
  .header-actions {
    display: none;
  } /* 必要なら消す。表示したい場合は調整 */

  /* ハンバーガー表示、デスクトップメニューは縦ナビに */
  .sora-burger {
    display: flex;
    margin-left: auto;
  }
  .nav {
    position: fixed;
    top: 68px;
    right: 0;
    left: 0;
    z-index: 95;
  }
  .nav .nav-menu {
    display: block;
    max-height: 0;
    overflow: hidden;
    background: #fff;
    color: var(--sora-fg);
    border-bottom: 1px solid #e7e1da;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    transition: max-height 0.25s ease;
  }
  .nav .nav-menu > li > a {
    color: var(--sora-fg);
    border: none;
    border-radius: 0;
    padding: 14px 16px;
    display: block;
    border-top: 1px solid #f0ece7;
  }

  /* チェックされたら開く */
  .sora-nav-toggle:checked ~ .nav .nav-menu {
    max-height: 70vh;
  }

  /* バーガー -> 閉じる(X)アニメ */
  .sora-nav-toggle:checked + .sora-burger span {
    transform: rotate(45deg);
  }
  .sora-nav-toggle:checked + .sora-burger span::before {
    transform: rotate(90deg) translateX(-7px);
  }
  .sora-nav-toggle:checked + .sora-burger span::after {
    opacity: 0;
    transform: translateY(-7px);
  }

  /* 背景オーバーレイ（開いている間だけ表示） */
  .sora-nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 90;
    display: none;
  }
  .sora-nav-toggle:checked ~ .sora-nav-backdrop {
    display: block;
  }

  /* キーボード操作のためのフォーカス可視化 */
  .nav a:focus-visible,
  .sora-burger:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
  }

  /* SP　contents　*/

  main.sora-container {
    padding-top: 3rem;
  }

  .sora-top-wrap {
    grid-template-columns: 1fr;
  }

  .p-button-a {
    margin-bottom: 1rem;
  }

  .sora-container input,
  .sora-container textarea,
  .woocommerce .woocommerce-ordering select {
    width: 100%;
    min-width: 300px;
  }

  section.sora-container {
    margin-bottom: 2rem;
  }

  .sora-container p {
    font-size: 1rem;
    line-height: 3rem;
  }

  /* SP　footer　*/

  footer.sora-footer {
    padding: 1.5rem;
  }

  .sora-footer-shop-menu {
    padding-top: 1rem;
  }

  .l-footer-body-left {
    margin-bottom: 1rem;
  }

  .l-footer-body-right {
    padding-bottom: 1rem;
  }
}
