/* ==========================================================
   ガネーシャ商会 カテゴリーページ
   ========================================================== */

body.category {
  background: var(--gh-bg);
}

.gh-category-page,
.gh-category-page * {
  box-sizing: border-box;
}

.gh-category-page {
  color: var(--gh-body);
  font-family: var(--gh-sans);
  background: var(--gh-bg);
  overflow: hidden;
}

.gh-category-page a {
  color: inherit;
  text-decoration: none;
}

.gh-category-page img,
.gh-category-page svg {
  display: block;
  max-width: 100%;
}

.gh-category-page h1,
.gh-category-page h2,
.gh-category-page h3,
.gh-category-page h1::before,
.gh-category-page h1::after,
.gh-category-page h2::before,
.gh-category-page h2::after,
.gh-category-page h3::before,
.gh-category-page h3::after {
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.gh-cat-section {
  padding: 72px 0;
}

/* Hero */
.gh-cat-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 76% 38%, color-mix(in srgb, var(--gh-cat-accent) 13%, transparent) 0 18%, transparent 42%),
    linear-gradient(90deg, #fffdfa 0 56%, #fff8f5 100%);
  border-bottom: 1px solid rgba(237,226,221,.8);
}

.gh-cat-hero::before,
.gh-cat-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.gh-cat-hero::before {
  width: 240px;
  height: 240px;
  right: 8%;
  top: 24px;
  background: color-mix(in srgb, var(--gh-cat-accent) 8%, transparent);
  filter: blur(2px);
}

.gh-cat-hero::after {
  width: 90px;
  height: 90px;
  right: 28%;
  bottom: 32px;
  background: rgba(255,255,255,.68);
  box-shadow: 0 0 50px rgba(255,255,255,.9);
}

.gh-cat-hero__inner {
  position: relative;
  z-index: 1;
  min-height: 380px;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(310px, .82fr);
  align-items: center;
  gap: 36px;
  padding-block: 54px;
}

.gh-cat-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 26px;
  color: #9a8d85;
  font-size: 12px;
  line-height: 1.6;
}

.gh-cat-breadcrumb a:hover { color: var(--gh-pink); }

.gh-cat-hero h1 {
  margin: 0 !important;
  font-family: var(--gh-serif) !important;
  font-size: clamp(44px, 5vw, 68px) !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  letter-spacing: .035em !important;
  color: var(--gh-text) !important;
}

.gh-cat-hero__line {
  width: 44px;
  height: 2px;
  margin: 20px 0 22px;
  background: var(--gh-cat-accent);
}

.gh-cat-hero__copy > p {
  max-width: 620px;
  margin: 0;
  color: var(--gh-body);
  font-size: 17px;
  line-height: 2;
  letter-spacing: .02em;
}

.gh-cat-hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.gh-cat-symbol {
  position: relative;
  width: min(320px, 80%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: color-mix(in srgb, var(--gh-cat-accent) 72%, #856a58);
  background:
    radial-gradient(circle at 40% 32%, rgba(255,255,255,.95), rgba(255,255,255,.54) 45%, transparent 68%),
    color-mix(in srgb, var(--gh-cat-accent) 14%, #fffaf7);
  border: 1px solid color-mix(in srgb, var(--gh-cat-accent) 22%, #eee2dc);
  box-shadow: 0 24px 60px rgba(91,70,59,.08);
}

.gh-cat-symbol::before {
  content: "";
  position: absolute;
  inset: 12%;
  border: 1px solid color-mix(in srgb, var(--gh-cat-accent) 23%, transparent);
  border-radius: inherit;
}

.gh-cat-symbol svg {
  width: 50%;
  height: 50%;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gh-cat-symbol__ganesha {
  width: 66%;
  height: 66%;
  object-fit: contain;
}

/* Headings */
.gh-cat-section-head {
  text-align: center;
  margin-bottom: 34px;
}

.gh-cat-section-head h2,
.gh-cat-list-heading h2 {
  margin: 0 !important;
  font-family: var(--gh-serif) !important;
  font-size: 32px !important;
  font-weight: 500 !important;
  line-height: 1.55 !important;
  letter-spacing: .035em !important;
  color: var(--gh-text) !important;
}

/* Featured */
.gh-cat-featured {
  padding-top: 62px;
  padding-bottom: 64px;
}

.gh-cat-featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.gh-cat-featured-card {
  overflow: hidden;
  border: 1px solid var(--gh-border);
  border-radius: 10px;
  background: var(--gh-surface);
  box-shadow: var(--gh-shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.gh-cat-featured-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--gh-cat-accent) 30%, var(--gh-border));
  box-shadow: 0 15px 40px rgba(91,70,59,.08);
}

.gh-cat-featured-card__image {
  display: block;
  aspect-ratio: 16 / 8.6;
  overflow: hidden;
  background: var(--gh-surface-soft);
}

.gh-cat-featured-card__image img,
.gh-cat-list-item__image img,
.gh-cat-recent__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gh-cat-featured-card__image > span,
.gh-cat-list-item__image > span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #fff6f3, color-mix(in srgb, var(--gh-cat-accent) 16%, #fff));
}

.gh-cat-featured-card__body {
  padding: 20px 22px 22px;
}

.gh-cat-kicker {
  margin: 0 0 8px;
  color: var(--gh-cat-accent);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .04em;
}

.gh-cat-featured-card h3,
.gh-cat-list-item h3 {
  margin: 0 !important;
  font-family: var(--gh-serif) !important;
  color: var(--gh-text) !important;
  font-weight: 600 !important;
  letter-spacing: .01em !important;
}

.gh-cat-featured-card h3 {
  font-size: 21px !important;
  line-height: 1.65 !important;
}

.gh-cat-excerpt {
  min-height: 4.7em;
  margin: 12px 0 14px;
  color: var(--gh-body);
  font-size: 14px;
  line-height: 1.75;
}

.gh-cat-featured-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #a3958c;
  font-size: 12px;
}

.gh-cat-featured-card__meta span {
  color: var(--gh-cat-accent);
  font-size: 24px;
}

/* Archive */
.gh-cat-archive {
  padding-top: 44px;
}

.gh-cat-archive__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 42px;
  align-items: start;
}

.gh-cat-list-heading {
  margin-bottom: 22px;
}

.gh-cat-list-heading h2 {
  font-size: 29px !important;
}

.gh-cat-list-heading__line {
  width: 38px;
  height: 2px;
  margin-top: 12px;
  background: var(--gh-cat-accent);
}

.gh-cat-list {
  border-top: 1px solid var(--gh-border);
}

.gh-cat-list-item {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 90px;
  gap: 18px;
  align-items: center;
  padding: 17px 0;
  border-bottom: 1px solid var(--gh-border);
}

.gh-cat-list-item__image {
  aspect-ratio: 1.35;
  overflow: hidden;
  border-radius: 7px;
  background: var(--gh-surface-soft);
}

.gh-cat-list-item h3 {
  font-size: 17px !important;
  line-height: 1.65 !important;
}

.gh-cat-list-item__body > p:last-child {
  margin: 5px 0 0;
  color: #786c65;
  font-size: 13px;
  line-height: 1.65;
}

.gh-cat-list-item__side {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  color: #9b8e86;
  font-size: 11px;
}

.gh-cat-list-item__side span {
  color: var(--gh-cat-accent);
  font-size: 24px;
}

.gh-cat-pagination {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 30px;
}

.gh-cat-pagination .page-numbers {
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gh-border);
  border-radius: 50%;
  color: var(--gh-body);
  font-size: 13px;
}

.gh-cat-pagination .current,
.gh-cat-pagination a:hover {
  color: #fff;
  background: var(--gh-cat-accent);
  border-color: var(--gh-cat-accent);
}

/* Sidebar */
.gh-cat-sidebar {
  display: grid;
  gap: 18px;
  position: sticky;
  top: 102px;
}

.gh-cat-sidebar-card {
  padding: 22px;
  border: 1px solid var(--gh-border);
  border-radius: 10px;
  background: rgba(255,253,252,.94);
  box-shadow: var(--gh-shadow);
}

.gh-cat-sidebar-card h3 {
  margin: 0 0 14px !important;
  font-family: var(--gh-serif) !important;
  font-size: 19px !important;
  font-weight: 600 !important;
  line-height: 1.55 !important;
  color: var(--gh-text) !important;
}

.gh-cat-sidebar-card--diagnosis {
  background: linear-gradient(145deg, #fffaf8, color-mix(in srgb, var(--gh-cat-accent) 10%, #fff8fb));
  text-align: center;
}

.gh-cat-sidebar-card--diagnosis img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  margin: 0 auto 4px;
}

.gh-cat-sidebar-card--diagnosis > p:not(.gh-cat-kicker) {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.7;
}

.gh-cat-sidebar-card--diagnosis .gh-button {
  width: 100%;
  min-height: 44px;
  padding-inline: 14px;
  font-size: 13px;
}

.gh-cat-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.gh-cat-tags a {
  padding: 6px 9px;
  border: 1px solid var(--gh-border);
  border-radius: 999px;
  background: #fff;
  color: #73665f;
  font-size: 11px;
}

.gh-cat-tags a:hover {
  color: var(--gh-cat-accent);
  border-color: color-mix(in srgb, var(--gh-cat-accent) 45%, var(--gh-border));
}

.gh-cat-recent {
  display: grid;
  gap: 12px;
}

.gh-cat-recent__item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  align-items: center;
}

.gh-cat-recent__item img {
  width: 64px;
  height: 52px;
  border-radius: 5px;
}

.gh-cat-recent__item span {
  font-family: var(--gh-serif);
  color: var(--gh-text);
  font-size: 12px;
  line-height: 1.5;
}

/* Diagnosis wide */
.gh-cat-diagnosis-wide {
  padding-top: 32px;
}

.gh-cat-diagnosis-wide__panel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 22px;
  align-items: center;
  padding: 22px 32px;
  border: 1px solid color-mix(in srgb, var(--gh-cat-accent) 22%, var(--gh-border));
  border-radius: 12px;
  background: linear-gradient(90deg, #fffaf7, color-mix(in srgb, var(--gh-cat-accent) 9%, #fff8fb));
}

.gh-cat-diagnosis-wide__panel img {
  width: 78px;
  height: 78px;
  object-fit: contain;
}

.gh-cat-diagnosis-wide__panel h2 {
  margin: 0 0 4px !important;
  font-family: var(--gh-serif) !important;
  font-size: 24px !important;
  font-weight: 500 !important;
  line-height: 1.5 !important;
  color: var(--gh-text) !important;
}

.gh-cat-diagnosis-wide__panel p {
  margin: 0;
  color: #74665f;
  font-size: 14px;
}

/* Other categories */
.gh-cat-other {
  padding-top: 54px;
}

.gh-cat-other-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.gh-cat-other-card {
  position: relative;
  min-height: 184px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px solid var(--gh-border);
  border-radius: 10px;
  background: var(--gh-surface);
  transition: transform .18s ease, border-color .18s ease;
}

.gh-cat-other-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--gh-card-accent) 35%, var(--gh-border));
}

.gh-cat-other-card__icon {
  width: 62px;
  height: 62px;
  margin-bottom: 12px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: color-mix(in srgb, var(--gh-card-accent) 70%, #7a6252);
  background: color-mix(in srgb, var(--gh-card-accent) 12%, #fffaf7);
}

.gh-cat-other-card__icon svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gh-cat-other-card__icon .gh-cat-symbol__ganesha {
  width: 42px;
  height: 42px;
}

.gh-cat-other-card__text strong {
  display: block;
  font-family: var(--gh-serif);
  color: var(--gh-text);
  font-size: 15px;
  line-height: 1.5;
}

.gh-cat-other-card__text small {
  display: block;
  margin-top: 6px;
  color: #877a72;
  font-size: 10px;
  line-height: 1.55;
}

.gh-cat-other-card__arrow {
  margin-top: auto;
  color: var(--gh-card-accent);
  font-size: 21px;
}

.gh-cat-empty {
  padding: 28px;
  text-align: center;
  border: 1px solid var(--gh-border);
  border-radius: 10px;
  background: var(--gh-surface);
}

/* Brand image mark */
.gh-brand__mark--image {
  overflow: hidden;
}

.gh-brand__mark--image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Responsive */
@media (max-width: 1100px) {
  .gh-cat-other-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .gh-cat-hero__inner {
    grid-template-columns: 1fr 280px;
    min-height: 340px;
  }

  .gh-cat-featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gh-cat-featured-card:last-child {
    grid-column: 1 / -1;
    max-width: calc(50% - 12px);
    width: 100%;
    justify-self: center;
  }

  .gh-cat-archive__layout {
    grid-template-columns: 1fr;
  }

  .gh-cat-sidebar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gh-cat-sidebar-card--diagnosis {
    grid-row: span 2;
  }
}

@media (max-width: 720px) {
  .gh-cat-section {
    padding: 54px 0;
  }

  .gh-cat-hero {
    background: linear-gradient(180deg, #fffdfa, #fff8f6);
  }

  .gh-cat-hero__inner {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 22px;
    padding-block: 34px 38px;
  }

  .gh-cat-breadcrumb {
    margin-bottom: 18px;
    font-size: 10px;
  }

  .gh-cat-hero h1 {
    font-size: 35px !important;
    line-height: 1.45 !important;
  }

  .gh-cat-hero__line {
    margin: 14px 0 16px;
  }

  .gh-cat-hero__copy > p {
    font-size: 14px;
    line-height: 1.9;
  }

  .gh-cat-hero__visual {
    position: absolute;
    right: 8px;
    bottom: 4px;
    opacity: .18;
  }

  .gh-cat-symbol {
    width: 150px;
  }

  .gh-cat-featured {
    padding-top: 48px;
  }

  .gh-cat-section-head h2,
  .gh-cat-list-heading h2 {
    font-size: 27px !important;
  }

  .gh-cat-featured-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .gh-cat-featured-card:last-child {
    grid-column: auto;
    max-width: none;
  }

  .gh-cat-featured-card {
    display: grid;
    grid-template-columns: 42% 1fr;
  }

  .gh-cat-featured-card__image {
    aspect-ratio: auto;
    min-height: 190px;
  }

  .gh-cat-featured-card__body {
    padding: 16px 15px;
  }

  .gh-cat-featured-card h3 {
    font-size: 17px !important;
    line-height: 1.55 !important;
  }

  .gh-cat-excerpt {
    min-height: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 12px;
    margin: 8px 0 10px;
  }

  .gh-cat-list-item {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
    padding: 14px 0;
  }

  .gh-cat-list-item__side {
    grid-column: 2;
    justify-content: space-between;
    margin-top: -4px;
  }

  .gh-cat-list-item__body > p:last-child {
    display: none;
  }

  .gh-cat-list-item h3 {
    font-size: 15px !important;
  }

  .gh-cat-sidebar {
    display: none;
  }

  .gh-cat-diagnosis-wide__panel {
    grid-template-columns: 60px 1fr;
    gap: 14px;
    padding: 20px;
  }

  .gh-cat-diagnosis-wide__panel img {
    width: 58px;
    height: 58px;
  }

  .gh-cat-diagnosis-wide__panel h2 {
    font-size: 19px !important;
  }

  .gh-cat-diagnosis-wide__panel p {
    font-size: 12px;
    line-height: 1.65;
  }

  .gh-cat-diagnosis-wide__panel .gh-button {
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 2px;
  }

  .gh-cat-other-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .gh-cat-other-card {
    min-height: 0;
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 14px;
    align-items: center;
    text-align: left;
    padding: 14px;
  }

  .gh-cat-other-card__icon {
    width: 56px;
    height: 56px;
    margin: 0;
  }

  .gh-cat-other-card__text small {
    margin-top: 3px;
  }

  .gh-cat-other-card__arrow {
    margin: 0;
  }
}

@media (max-width: 420px) {
  .gh-cat-featured-card {
    grid-template-columns: 40% 1fr;
  }

  .gh-cat-featured-card__image {
    min-height: 170px;
  }

  .gh-cat-featured-card__category {
    font-size: 11px;
  }
}
