/**
 * Kitsune — iHerb 本家インスパイア配色
 * 白ベース + 緑ヘッダー帯 + 青リンク + 赤セール
 */

/* ============================================================
   Design Tokens
   ============================================================ */
:root {
  --bg: #fff;
  --bg-warm: #F6F9F2;
  --bg-card: #fff;
  --text: #222;
  --text-muted: #555;
  --text-light: #666;
  --green: #458500;
  --green-hover: #3A7200;
  --green-light: #E8F3D6;
  --blue: #126CC5;
  --blue-hover: #0F5CA8;
  --sale-red: #CC0000;
  --border: #E0E0E0;
  --border-light: #F0F0F0;
  --font-heading: "Zen Kaku Gothic New", "Noto Sans JP", sans-serif;
  --font-body: "Zen Kaku Gothic New", "Noto Sans JP", sans-serif;
  --width-reading: 680px;
  --width-wide: 800px;
  --space-section: clamp(3rem, 5vw, 6rem);
  --radius: 6px;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.8;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}

/* ============================================================
   Site Structure
   ============================================================ */
.kitsune-site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.kitsune-content {
  flex: 1;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ============================================================
   Header
   ============================================================ */
.kitsune-header {
  background: var(--green);
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 100;
}

.kitsune-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.5rem;
  gap: 1rem;
}

.kitsune-logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.kitsune-logo-link:hover { text-decoration: none; opacity: 0.9; }

.kitsune-logo-svg {
  height: 44px;
  width: auto;
}

.kitsune-header-tagline {
  color: #fff;
  font-size: 0.78rem;
  line-height: 1.5;
  text-align: right;
  white-space: nowrap;
  margin: 0;
}

@media (max-width: 640px) {
  .kitsune-header-tagline { display: none; }
  .kitsune-header-inner { justify-content: center; }
}

/* ============================================================
   Navigation
   ============================================================ */
.kitsune-nav {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding: 0 1.5rem;
}

.kitsune-menu-toggle {
  display: none;
  width: 100%;
  padding: 0.75rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: #fff;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.kitsune-menu {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
}

.kitsune-menu-item a {
  display: block;
  padding: 0.65rem 1rem;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.15s;
}

.kitsune-menu-item a:hover {
  color: #fff;
  text-decoration: underline;
}

/* ============================================================
   Content Layout
   ============================================================ */
.kitsune-main {
  width: 100%;
}

.kitsune-has-sidebar {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
}

.kitsune-has-sidebar .kitsune-main {
  min-width: 0;
}

/* ============================================================
   Entry (Article)
   ============================================================ */
.kitsune-entry {
  margin-bottom: 3rem;
}

.kitsune-entry-header {
  margin-bottom: 1.5rem;
}

.kitsune-entry-title {
  font-size: 1.8rem;
  line-height: 1.3;
}

.kitsune-entry-title a { color: inherit; }
.kitsune-entry-title a:hover { color: var(--blue); text-decoration: none; }

.kitsune-entry-meta {
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-light);
}

.kitsune-entry-thumbnail {
  margin-bottom: 1.5rem;
  border-radius: var(--radius);
  overflow: hidden;
}

.kitsune-entry-content {
  font-size: 1rem;
  line-height: 1.85;
  max-width: var(--width-reading);
}

.kitsune-entry-content h2 {
  font-size: 1.3rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}
.kitsune-entry-content h3 {
  font-size: 1.1rem;
  margin-top: 2rem;
  margin-bottom: 0.6rem;
}

.kitsune-entry-content p { margin-bottom: 1.2rem; }

.kitsune-entry-content ul,
.kitsune-entry-content ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.kitsune-entry-content li { margin-bottom: 0.25rem; }

.kitsune-entry-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  border-left: 3px solid var(--border);
  color: var(--text-muted);
  background: var(--bg-warm);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.kitsune-entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.kitsune-entry-content th,
.kitsune-entry-content td {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  text-align: left;
}

.kitsune-entry-content th {
  background: var(--bg-warm);
  font-weight: 600;
  font-size: 0.9rem;
}

.kitsune-entry-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.82rem;
  color: var(--text-light);
}

.kitsune-entry-footer a { color: var(--text-muted); }

/* ============================================================
   Page Header
   ============================================================ */
.kitsune-page-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.kitsune-page-title {
  font-size: 1.5rem;
}

/* ============================================================
   Sidebar
   ============================================================ */
.kitsune-sidebar { font-size: 0.88rem; }

.kitsune-widget { margin-bottom: 2rem; }

.kitsune-widget-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.kitsune-widget ul { list-style: none; }

.kitsune-widget li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border-light);
}

.kitsune-widget li a { color: var(--text); }

.kitsune-widget .post-date {
  display: block;
  font-size: 0.78rem;
  color: var(--text-light);
}

.kitsune-tagcloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.kitsune-tagcloud a {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.kitsune-tagcloud a:hover {
  border-color: var(--green);
  color: var(--green);
  text-decoration: none;
}

/* ============================================================
   Pagination
   ============================================================ */
.kitsune-pagination {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 2rem;
}

.kitsune-pagination a,
.kitsune-pagination span {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.88rem;
  color: var(--text-muted);
}

.kitsune-pagination .is-current {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.kitsune-pagination a:hover {
  border-color: var(--green);
  text-decoration: none;
}

/* ============================================================
   Search Form
   ============================================================ */
.kitsune-search-form {
  display: flex;
  gap: 0.5rem;
}

.kitsune-search-input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.88rem;
  background: var(--bg);
  font-family: var(--font-body);
}

.kitsune-search-submit {
  padding: 0.5rem 1rem;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.88rem;
  font-family: var(--font-body);
}

.kitsune-search-submit:hover { background: var(--green-hover); }

/* ============================================================
   Shelf Components
   ============================================================ */
.shelf {
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.shelf-tag {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5em;
  background: var(--green);
  color: #fff;
  padding: 0.35rem 0.9rem 0.35rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: var(--radius) var(--radius) 0 0;
}

.shelf-tag-note {
  font-weight: 400;
  font-size: 0.7rem;
  opacity: 0.85;
}

.shelf:nth-child(3n+2) .shelf-tag { background: var(--blue); }
.shelf:nth-child(3n+3) .shelf-tag { background: var(--sale-red); }

.shelf-board {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0 var(--radius) var(--radius) var(--radius);
}

.shelf-rail {
  display: flex;
  gap: 0;
  padding: 0.75rem 0.25rem 0;
  overflow-x: auto;
  align-items: flex-end;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.shelf-rail::-webkit-scrollbar { height: 3px; }
.shelf-rail::-webkit-scrollbar-track { background: transparent; }
.shelf-rail::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.shelf-item {
  flex: 0 0 auto;
  width: 108px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  scroll-snap-align: start;
  transition: transform 150ms;
  padding: 0 3px;
}

.shelf-item:hover {
  transform: translateY(-4px);
  text-decoration: none;
}

.shelf-item-img {
  height: 110px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.shelf-item-img img {
  max-height: 100px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.shelf-item-info {
  border-top: 2px solid var(--border);
  padding: 0.3rem 0 0.5rem;
  margin-top: 0.2rem;
}

.shelf-item-brand {
  display: block;
  font-size: 0.62rem;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.shelf-item-price {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

.shelf-item-label {
  display: block;
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--green);
  margin-bottom: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shelf-item-badge {
  display: inline-block;
  font-size: 0.58rem;
  font-weight: 700;
  color: #fff;
  background: var(--green);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  margin-bottom: 0.15rem;
}

/* ============================================================
   Footer
   ============================================================ */
.kitsune-footer {
  background: var(--bg-warm);
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem;
  margin-top: auto;
}

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

.kitsune-footer-nav { margin-bottom: 1.5rem; }

.kitsune-footer-menu {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1rem;
}

.kitsune-footer-menu a {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.kitsune-footer-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.kitsune-footer-widget h3 {
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
}

.kitsune-footer-widget {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.kitsune-social {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.kitsune-social-link {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  background: var(--text-muted);
  color: #fff !important;
  border-radius: var(--radius);
  font-size: 0.78rem;
}

.kitsune-social-link:hover {
  background: var(--text);
  text-decoration: none;
}

.kitsune-copyright {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-light);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
  .kitsune-menu-toggle { display: flex; }
  .kitsune-menu { display: none; flex-direction: column; }
  .kitsune-menu.is-open { display: flex; }
  .kitsune-menu-item a { padding: 0.6rem 0; border-bottom: 1px solid var(--border-light); }
  .kitsune-has-sidebar { grid-template-columns: 1fr; }
  .kitsune-entry-title { font-size: 1.4rem; }
}
