/* =========================================================
   HelpApe Store — 共通スタイル
   商品詳細・カテゴリ一覧・カート画面で共有
   （トップページ index.html は独自に同等のスタイルを内包）
   ========================================================= */
:root {
  --c-text: #222;
  --c-sub: #666;
  --c-line: #c9c9c9;
  --c-line-soft: #ebe7e1;
  --c-box: #d9d9d9;
  --c-box-dark: #bdbdbd;

  --c-accent: #2a2a2a;       /* タグ・ボタン・アクティブ状態 */
  --c-accent-sub: #8a7f70;   /* ラベル文字 */
  --c-img-bg: #f1eee9;       /* 画像下地 */
  --c-bg-soft: #f5f3ef;      /* フッター・淡い面 */
  --c-star: #c9a24a;         /* 評価の星 */
  --c-alert: #b5452b;        /* 値引き・注意 */

  --max: 1200px;
  --gutter: 24px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  color: var(--c-text);
  background: #fff;
  line-height: 1.6;
  font-size: 14px;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

.inner { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- プレースホルダー / 画像枠 ---------- */
.ph {
  background: var(--c-img-bg);
  display: flex; align-items: center; justify-content: center;
  color: #a39b90; font-size: 11px; letter-spacing: .1em; text-align: center;
  position: relative; overflow: hidden;
}
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph.is-empty::after { content: "IMAGE"; }

/* ---------- セクション見出し ---------- */
.sec { padding: 56px 0; }
.sec-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 24px;
}
.sec-title { font-size: 22px; font-weight: 700; }
.sec-title small { display: block; font-size: 11px; color: var(--c-sub); letter-spacing: .15em; font-weight: 400; }
.sec-more { font-size: 13px; border-bottom: 1px solid currentColor; }

/* ---------- お知らせバー ---------- */
.notice {
  background: #2b2b2b; color: #fff;
  text-align: center; font-size: 12px; padding: 8px var(--gutter);
}

/* ---------- ヘッダー ---------- */
.header {
  background: #fff;
  border-bottom: 1px solid var(--c-line);
  position: sticky; top: 0; z-index: 50;
}
.header-row { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { font-size: 22px; font-weight: 700; letter-spacing: .02em; }
.gnav { display: flex; gap: 20px; font-size: 13px; font-weight: 700; }
.gnav a.is-current { border-bottom: 2px solid var(--c-accent); padding-bottom: 2px; }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.header-tools .search { margin-right: 12px; }
.search {
  width: 240px; height: 36px; border: 1px solid var(--c-line); border-radius: 18px;
  display: flex; align-items: center; padding: 0 14px; color: #999; font-size: 12px;
}
.icon {
  width: 40px; height: 40px; border-radius: 50%; position: relative;
  display: flex; align-items: center; justify-content: center; color: var(--c-text);
  transition: background .2s;
}
.icon:hover { background: var(--c-bg-soft); }
.icon svg { width: 22px; height: 22px; }
.cart-count {
  position: absolute; top: 2px; right: 0;
  min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px;
  background: var(--c-accent); color: #fff; font-size: 10px; font-weight: 700; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- パンくず ---------- */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; color: var(--c-sub); padding: 16px 0; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--c-line); }
.breadcrumb a:hover { text-decoration: underline; }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 28px; font-size: 14px; font-weight: 700;
  border: 1px solid var(--c-accent); cursor: pointer; transition: opacity .2s, background .2s;
}
.btn-primary { background: var(--c-accent); color: #fff; }
.btn-primary:hover { opacity: .85; }
.btn-outline { background: #fff; color: var(--c-accent); }
.btn-outline:hover { background: var(--c-bg-soft); }
.btn-block { width: 100%; }
.btn-sm { height: 36px; padding: 0 16px; font-size: 12px; }

/* ---------- 数量ステッパー ---------- */
.qty { display: inline-flex; align-items: center; border: 1px solid var(--c-line); height: 40px; }
.qty button {
  width: 36px; height: 100%; border: none; background: #fff; cursor: pointer; font-size: 16px;
}
.qty button:hover { background: var(--c-bg-soft); }
.qty input {
  width: 40px; height: 100%; border: none; border-left: 1px solid var(--c-line); border-right: 1px solid var(--c-line);
  text-align: center; -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- 評価の星 ---------- */
.stars { color: var(--c-star); letter-spacing: 1px; }
.stars .off { color: #ddd; }

/* ---------- 商品カード ---------- */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 20px; }
.product-card { background: #fff; border: 1px solid var(--c-line-soft); display: flex; flex-direction: column; }
.product-card > a { display: flex; flex-direction: column; height: 100%; }
.product-card .ph { aspect-ratio: 1 / 1; }
.product-card .fav {
  position: absolute; top: 10px; right: 10px; z-index: 1;
  width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 1px solid var(--c-line);
}
.product-card .tag {
  position: absolute; top: 10px; left: 10px; z-index: 1;
  font-size: 10px; font-weight: 700; background: var(--c-accent); color: #fff; padding: 1px 6px; letter-spacing: 0;
}
.product-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.swatches { display: flex; gap: 4px; margin-bottom: 4px; }
.swatches i { width: 14px; height: 14px; border-radius: 50%; background: var(--c-box-dark); border: 1px solid #fff; outline: 1px solid #ccc; }
.p-cat { font-size: 11px; color: var(--c-sub); }
.p-name { font-size: 14px; font-weight: 700; }
.p-price { font-size: 18px; font-weight: 700; margin-top: 4px; }
.p-price small { font-size: 11px; font-weight: 400; color: var(--c-sub); }
.p-price s { font-size: 12px; font-weight: 400; color: var(--c-sub); margin-left: 6px; }
.p-price.is-sale { color: var(--c-alert); }
.p-meta { font-size: 11px; color: var(--c-sub); }

/* ---------- ページネーション ---------- */
.pager { display: flex; justify-content: center; gap: 6px; margin-top: 40px; }
.pager a, .pager span {
  min-width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--c-line); font-size: 13px; padding: 0 10px;
}
.pager .is-current { background: var(--c-accent); color: #fff; border-color: var(--c-accent); }
.pager .is-disabled { color: #bbb; border-color: var(--c-line-soft); }

/* ---------- フッター ---------- */
.footer { background: var(--c-bg-soft); padding: 48px 0 24px; margin-top: 40px; }
.footer-cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 24px; }
.footer-cols h4 { font-size: 13px; margin-bottom: 10px; }
.footer-cols li { font-size: 12px; color: var(--c-sub); margin-bottom: 6px; }
.footer-lead { font-size: 12px; color: var(--c-sub); margin-top: 8px; }
.copy { text-align: center; font-size: 11px; color: var(--c-sub); margin-top: 32px; }

/* ---------- トースト ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px);
  background: var(--c-accent); color: #fff; padding: 14px 20px; font-size: 13px;
  display: flex; align-items: center; gap: 16px; z-index: 100;
  opacity: 0; visibility: hidden; transition: opacity .3s, transform .3s, visibility .3s;
}
.toast.is-show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.toast a { text-decoration: underline; font-weight: 700; white-space: nowrap; }

/* ---------- レスポンシブ ---------- */
@media (max-width: 960px) {
  .gnav, .search { display: none; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .sec { padding: 40px 0; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 20px 12px; }
  .product-body { padding: 10px 10px 14px; }
  .footer-cols { grid-template-columns: 1fr; }
}
