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

:root {
  --orange: #f97316;
  --orange-light: #fff7ed;
  --orange-mid: #fed7aa;
  --orange-hover: #ea6a00;
  --gray-text: #333;
  --gray-sub: #666;
  --gray-border: #e5e7eb;
  --white: #fff;
  --max-w: 1100px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  background: #fafafa;
  color: var(--gray-text);
  line-height: 1.7;
  font-size: 15px;
}

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

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

/* ===== Layout ===== */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 16px; }

/* ===== Header ===== */
.site-header {
  background: var(--white);
  border-bottom: 2px solid var(--orange-mid);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  max-width: var(--max-w);
  margin: 0 auto;
}
.site-logo a {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--orange);
  display: flex;
  align-items: center;
  gap: 6px;
}
.site-nav ul { list-style: none; display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a {
  font-size: 0.82rem;
  color: var(--gray-sub);
  padding: 4px 10px;
  border-radius: 20px;
  transition: background 0.15s;
}
.site-nav a:hover { background: var(--orange-light); color: var(--orange); }

/* ===== Footer ===== */
.site-footer {
  background: var(--white);
  border-top: 1px solid var(--gray-border);
  text-align: center;
  padding: 28px 16px;
  margin-top: 60px;
  font-size: 0.82rem;
  color: var(--gray-sub);
}
.site-footer a { color: var(--gray-sub); }
.site-footer a:hover { color: var(--orange); }

/* ===== Breadcrumb ===== */
.breadcrumb {
  font-size: 0.80rem;
  color: var(--gray-sub);
  padding: 12px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.breadcrumb a { color: var(--gray-sub); }
.breadcrumb a:hover { color: var(--orange); }
.breadcrumb .sep { color: #ccc; }

/* ===== Article grid (index / category) ===== */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  padding: 24px 0;
}
.article-card {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.article-card:hover { box-shadow: 0 4px 18px rgba(249,115,22,.15); transform: translateY(-2px); }
.article-card__thumb { aspect-ratio: 1; overflow: hidden; background: var(--orange-light); }
.article-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.article-card__body { padding: 12px; }
.article-card__title {
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}
.article-card__title a { color: var(--gray-text); }
.article-card__title a:hover { color: var(--orange); }
.article-card__price {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--orange);
}

/* ===== Page heading ===== */
.page-heading {
  padding: 28px 0 8px;
  border-bottom: 2px solid var(--orange-mid);
  margin-bottom: 8px;
}
.page-heading h1 { font-size: 1.4rem; font-weight: 700; }
.page-heading p { font-size: 0.85rem; color: var(--gray-sub); margin-top: 4px; }

/* ===== Pagination ===== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 32px 0;
  font-size: 0.9rem;
}
.pagination a {
  padding: 6px 18px;
  border: 1px solid var(--orange-mid);
  border-radius: 20px;
  color: var(--orange);
}
.pagination a:hover { background: var(--orange-light); }
.pagination .current { color: var(--gray-sub); }

/* ===== Tag nav (group page) ===== */
.tag-nav { padding: 16px 0; }
.tag-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.tag-nav a {
  font-size: 0.82rem;
  padding: 4px 14px;
  border: 1px solid var(--orange-mid);
  border-radius: 20px;
  color: var(--orange);
  background: var(--orange-light);
}
.tag-nav a:hover { background: var(--orange-mid); }

/* ===== Article detail ===== */
.article-detail { max-width: 820px; margin: 0 auto; padding: 24px 0 60px; }

.article-detail__title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 20px;
}

/* --- Image gallery --- */
.gallery { margin-bottom: 28px; }
.gallery__main {
  aspect-ratio: 1;
  max-width: 480px;
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--gray-border);
  background: var(--orange-light);
}
.gallery__main img { width: 100%; height: 100%; object-fit: contain; }
.gallery__thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 10px;
}
.gallery__thumb {
  width: 64px;
  height: 64px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  background: var(--orange-light);
  transition: border-color 0.15s;
}
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb.active,
.gallery__thumb:hover { border-color: var(--orange); }

/* --- Summary --- */
.article-summary {
  background: var(--orange-light);
  border-left: 4px solid var(--orange);
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin-bottom: 28px;
  font-size: 0.95rem;
  line-height: 1.8;
}

/* --- Info table --- */
.info-table { width: 100%; border-collapse: collapse; margin-bottom: 28px; }
.info-table th, .info-table td {
  padding: 10px 14px;
  border: 1px solid var(--gray-border);
  font-size: 0.9rem;
  text-align: left;
}
.info-table th {
  background: var(--orange-light);
  font-weight: 600;
  width: 30%;
  white-space: nowrap;
}
.info-table td { background: var(--white); }
.info-table .price-cell { font-size: 1.1rem; font-weight: 700; color: var(--orange); }

/* Price note */
.price-note {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--gray-sub);
  margin-top: 3px;
}

/* --- Buy button --- */
.buy-section {
  background: var(--white);
  border: 1px solid var(--orange-mid);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 32px;
  text-align: center;
}
.buy-section .pr-text {
  font-size: 0.9rem;
  color: var(--gray-sub);
  margin-bottom: 16px;
  line-height: 1.75;
  text-align: left;
}
.btn-buy {
  display: inline-block;
  background: var(--orange);
  color: var(--white) !important;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 14px 48px;
  border-radius: 30px;
  transition: background 0.2s;
}
.btn-buy:hover { background: var(--orange-hover); }

/* --- Related --- */
.related-section { margin-top: 40px; }
.related-section h2 {
  font-size: 1rem;
  font-weight: 700;
  border-left: 4px solid var(--orange);
  padding-left: 10px;
  margin-bottom: 16px;
}

/* ===== Footer nav ===== */
.footer-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-bottom: 14px;
}
.footer-nav a { color: var(--gray-sub); font-size: 0.82rem; }
.footer-nav a:hover { color: var(--orange); }

/* ===== Static page ===== */
.static-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 0 60px;
}
.static-page h1 {
  font-size: 1.4rem;
  font-weight: 700;
  border-bottom: 2px solid var(--orange-mid);
  padding-bottom: 10px;
  margin-bottom: 28px;
}
.static-page h2 {
  font-size: 1.05rem;
  font-weight: 700;
  border-left: 4px solid var(--orange);
  padding-left: 10px;
  margin: 32px 0 12px;
}
.static-page p { margin-bottom: 12px; line-height: 1.8; }
.static-page ul { padding-left: 1.5em; margin-bottom: 12px; }
.static-page li { margin-bottom: 4px; line-height: 1.8; }
.static-page table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.static-page th,
.static-page td { padding: 10px 14px; border: 1px solid var(--gray-border); font-size: 0.9rem; text-align: left; }
.static-page th { background: var(--orange-light); font-weight: 600; width: 30%; }

/* ===== Category list (index) ===== */
.category-list { list-style: none; padding: 16px 0; }
.category-list li { border-bottom: 1px solid var(--gray-border); }
.category-list a {
  display: flex;
  justify-content: space-between;
  padding: 12px 8px;
  color: var(--gray-text);
  font-size: 0.9rem;
}
.category-list a:hover { background: var(--orange-light); }
.category-list .count { color: var(--gray-sub); font-size: 0.8rem; }

/* ===== Sidebar layout (future use) ===== */
.layout-two-col { display: grid; grid-template-columns: 1fr 280px; gap: 32px; align-items: start; }
@media (max-width: 768px) { .layout-two-col { grid-template-columns: 1fr; } }

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .article-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .article-detail__title { font-size: 1.05rem; }
  .gallery__main { max-width: 100%; }
  .info-table th { width: 36%; }
  .site-nav { display: none; }
}
