/*
Theme Name: MochiPlease
Theme URI: https://mochiplease.com
Author: MochiPlease
Author URI: https://mochiplease.com
Description: Mochi-themed blog for trending Japanese products.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: mochiplease
*/

/* ===================================================
   MochiPlease — Custom Theme CSS
=================================================== */

:root {
  --bg:           #FFF8F0;
  --header-bg:    #F2D4C2;
  --accent:       #C9866B;
  --accent2:      #E8A87C;
  --text:         #3D2410;
  --text-light:   #7A5440;
  --card-bg:      #FFFFFF;
  --border:       #EDD9C8;
  --shadow:       rgba(201, 134, 107, 0.15);
  --shadow-hover: rgba(201, 134, 107, 0.3);
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent2); }
img { max-width: 100%; display: block; }

/* ===== Header ===== */
.site-header {
  background: var(--header-bg);
  border-bottom: 3px solid var(--border);
  padding: 0 40px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px var(--shadow);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.site-logo img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.12));
}

.site-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.site-title-text {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
}

.site-tagline {
  font-size: 11px;
  color: var(--text-light);
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* Nav */
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
}

.site-nav ul li a {
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 50px;
  transition: background 0.2s, color 0.2s;
  display: block;
}

.site-nav ul li a:hover,
.site-nav ul li.current-menu-item > a {
  background: var(--accent2);
  color: #fff;
}

/* Search */
.header-search {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 50px;
  padding: 6px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-light);
  transition: border-color 0.2s;
}
.header-search:hover { border-color: var(--accent); }
.header-search svg { width: 14px; height: 14px; stroke: var(--text-light); }

/* Search form */
.header-search form { display: flex; align-items: center; gap: 8px; }
.header-search input[type="search"] {
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: var(--text);
  width: 120px;
}
.header-search button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, #F2D4C2 0%, #FDE8D6 50%, #FFF8F0 100%);
  padding: 60px 40px;
  text-align: center;
  border-bottom: 2px solid var(--border);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '🍡';
  position: absolute;
  font-size: 120px;
  opacity: 0.06;
  top: -20px;
  left: -20px;
  transform: rotate(-15deg);
}

.hero::after {
  content: '🍡';
  position: absolute;
  font-size: 100px;
  opacity: 0.06;
  bottom: -10px;
  right: 20px;
  transform: rotate(15deg);
}

.hero-mochi {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin: 0 auto 16px;
  filter: drop-shadow(0 4px 12px rgba(201, 134, 107, 0.3));
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

.hero h1 {
  font-size: 32px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 10px;
}

.hero h1 span { color: var(--accent); }

.hero p {
  font-size: 15px;
  color: var(--text-light);
  max-width: 500px;
  margin: 0 auto;
}

/* ===== Main Content ===== */
.site-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 40px;
}

/* Section Label */
.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.section-label h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--border);
  border-radius: 2px;
}

/* Posts Grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 56px;
}

/* Post Card */
.post-card {
  background: var(--card-bg);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 20px var(--shadow);
  border: 1.5px solid var(--border);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px var(--shadow-hover);
}

.post-card-thumb {
  width: 100%;
  height: 210px;
  object-fit: cover;
  object-position: center top;
  background: var(--header-bg);
  display: block;
}

/* WordPress が img に height属性を付けても無効化 */
.post-card a img.post-card-thumb {
  height: 210px !important;
  width: 100% !important;
}

.post-card-thumb-placeholder {
  width: 100%;
  height: 210px;
  background: linear-gradient(135deg, #F2D4C2, #EDD9C8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.post-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card-category {
  display: inline-block;
  background: var(--header-bg);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 50px;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-decoration: none;
}

.post-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.45;
  margin-bottom: 10px;
  flex: 1;
}

.post-card-title a { color: var(--text); }
.post-card-title a:hover { color: var(--accent); }

.post-card-excerpt {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Read More — 旧プラグインCSSを上書きするため詳細度を上げる */
a.read-more,
.post-card a.read-more {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: linear-gradient(135deg, var(--accent2), var(--accent)) !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  padding: 8px 18px !important;
  border-radius: 50px !important;
  align-self: flex-start !important;
  transition: transform 0.15s, opacity 0.15s !important;
  text-decoration: none !important;
  border: none !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

a.read-more:hover,
.post-card a.read-more:hover {
  color: #fff !important;
  transform: scale(1.04) !important;
  opacity: 0.92 !important;
}

a.read-more::after,
.post-card a.read-more::after {
  content: '→' !important;
}

/* ===== Pagination ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
  margin-bottom: 20px;
}

.pagination .page-numbers {
  background: #fff;
  border: 1.5px solid var(--border);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ===== Single Post ===== */
.single-post-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 48px 40px;
}

.single-post-header {
  margin-bottom: 32px;
}

.single-post-category {
  display: inline-block;
  background: var(--header-bg);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 50px;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-decoration: none;
}

.single-post-title {
  font-size: 28px;
  font-weight: 900;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 16px;
}

.single-post-meta {
  font-size: 13px;
  color: var(--text-light);
}

.single-post-thumb {
  width: 100%;
  border-radius: 16px;
  margin-bottom: 32px;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.single-post-content {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
}

.single-post-content h2 {
  font-size: 22px;
  font-weight: 800;
  margin: 32px 0 12px;
  color: var(--text);
}

.single-post-content h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 24px 0 10px;
  color: var(--text);
}

.single-post-content p { margin-bottom: 20px; }

.single-post-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.single-post-content a:hover { color: var(--accent2); }

.single-post-content img {
  border-radius: 12px;
  margin: 16px 0;
  max-width: 100%;
}

.single-post-content ul,
.single-post-content ol {
  margin: 16px 0 16px 24px;
}

.single-post-content li { margin-bottom: 6px; }

/* CTA Button (affiliate link) */
.wp-block-button .wp-block-button__link,
.affiliate-button,
.single-post-content .cta-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  color: #fff !important;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 15px;
  transition: transform 0.15s, opacity 0.15s;
  text-decoration: none !important;
  margin: 8px 0;
}

.wp-block-button .wp-block-button__link:hover,
.affiliate-button:hover {
  transform: scale(1.03);
  opacity: 0.92;
  color: #fff !important;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--header-bg);
  border-top: 3px solid var(--border);
  padding: 40px;
  text-align: center;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}

.footer-logo img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.footer-logo-text {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
}

.footer-nav li a {
  color: var(--text-light);
  font-size: 13px;
  font-weight: 600;
}

.footer-nav li a:hover { color: var(--accent); }

.footer-copy {
  font-size: 12px;
  color: var(--text-light);
}

/* ===== ヘッダーナビ — Privacy/Terms を非表示（フッターのみ表示） ===== */
.site-nav #menu-item-2262,
.site-nav #menu-item-2263 {
  display: none;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .posts-grid { grid-template-columns: 1fr; }

  .site-header { padding: 0 20px; }
  .header-inner { height: 60px; gap: 12px; }
  .site-tagline { display: none; }
  .site-nav { display: none; }
  .header-search { display: none; }

  .hero { padding: 40px 20px; }
  .hero h1 { font-size: 24px; }

  .site-main { padding: 32px 20px; }
  .single-post-wrap { padding: 32px 20px; }

  .site-footer { padding: 30px 20px; }
}

/* アイキャッチ画像を記事内で非表示 */
.single-post-thumb { display: none !important; }

