/* =========================================================
   Cralier - Shop Page Stylesheet
   (style.css の共通スタイルに上乗せする形)
   ========================================================= */

/* =========================================================
   Breadcrumb(パンくず)— 帯状デザイン
   ========================================================= */
.breadcrumb {
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 8px 24px;
  background: var(--c-accent);
  color: var(--c-white);
}
.breadcrumb a {
  color: var(--c-white);
  text-decoration: none;
  opacity: 0.9;
  transition: opacity .2s;
}
.breadcrumb a:hover { opacity: 1; }
.breadcrumb__sep { margin: 0 8px; opacity: 0.7; }
.breadcrumb__current { color: var(--c-white); }

/* =========================================================
   Shop Hero — 背景画像 + ブラー画像 + テキスト
   ========================================================= */
.shop-hero {
  position: relative;
  background-image: url('../images-webp/shop-images/shop-hero.webp');
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  min-height: 460px;
  padding: 16px 16px 0;
}
/* ブラー画像を絶対配置でテキストの真下に重ねる */
.shop-hero__bura {
  position: absolute;
  top: 58px;                      /* 28px → +30px 下げる */
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% + 70px);       /* もう少しだけ拡大 */
  max-width: 530px;
  height: auto;
  z-index: 1;
  pointer-events: none;
  user-select: none;
}
.shop-hero__inner {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-top: 30px;               /* bura と一緒にテキスト全体を約30px下げる */
  padding: 23px 18px 32px;
}
.shop-hero__lead {
  margin: 16px 0 6px;
  color: var(--c-text);
  line-height: 0;
}
/* アーチ状のリード文(SVG textPath) */
.shop-hero__lead-svg {
  display: block;
  width: 100%;
  max-width: 220px;
  margin: 0 auto;
  height: auto;
  overflow: visible;
}
.shop-hero__brand {
  margin: 0;
  height: 70px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.shop-hero__brand img {
  display: block;
  width: 180px;
  max-width: 50%;
  height: auto;
  flex-shrink: 0;
}
.shop-hero__title {
  font-family: "Kokoro", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 24px;
  letter-spacing: 0.12em;
  color: var(--c-text);
  margin: -4px 0 12px;
  font-weight: 400;
}
.shop-hero__desc {
  font-size: 12px;
  color: var(--c-text);
  margin: 0;
  line-height: 1.85;
  letter-spacing: 0.04em;
}

/* =========================================================
   Genre filter(ジャンル一覧)
   ========================================================= */
.genre {
  padding: 32px 18px 24px;
}
.genre__title {
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text);
  margin: 0 0 18px;
  letter-spacing: 0.08em;
}
.genre-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px 4px;
  list-style: none;
  padding: 0;
  margin: 0;
}
/* モバイル幅では4列×3行で確実に収まる */
@media (max-width: 480px) {
  .genre-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px 6px;
  }
}
.genre-item {
  min-width: 0;
}
.genre-item a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--c-text);
  transition: opacity .2s;
}
.genre-item a:hover { opacity: .7; }
.genre-item__icon {
  width: 100%;
  max-width: 64px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  /* 通常時は枠/背景なし — アイコン単体で表示 */
}
.genre-item__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.genre-item__label {
  font-size: 10px;
  text-align: center;
  line-height: 1.3;
  letter-spacing: 0;
}
/* ホバー or アクティブ時:周囲に丸い背景が出現 */
.genre-item:hover .genre-item__icon,
.genre-item.is-active .genre-item__icon {
  background: var(--c-bg-soft);
}

/* おすすめ(featured)— genre-frame.svg を背景にしてテキスト中央配置 */
.genre-item--featured a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--c-text);
  height: 100%;
}
.genre-item__featured {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 80px;
  aspect-ratio: 5 / 4;
}
.genre-item__featured-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 0;
}
.genre-item__featured-text {
  position: relative;
  z-index: 1;
  font-size: 10px;
  font-weight: 500;
  color: var(--c-text);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* =========================================================
   Products(商品リスト)
   ========================================================= */
.products {
  padding: 8px 24px 0;
}

/* セクション(新着 / おすすめ) */
.products-section + .products-section {
  margin-top: 36px;
}
/* 「もっと見る」を挟んだ後の次セクションにも余白(隣接セレクタが効かないため別途指定) */
.more-link + .products-section {
  margin-top: 48px;
}
.products-section__title {
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text);
  margin: 0 0 14px;
  letter-spacing: 0.08em;
}
/* 見出しの右にソート等を並べたいとき */
.products-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 14px;
  flex-wrap: wrap;
}
.products-section__head .products-section__title { margin: 0; }

/* ソートドロップダウン(おすすめセクション内に残ってる場合) */
.products-toolbar {
  display: flex;
  justify-content: flex-end;
  margin: 0;
}

/* ジャンル一覧の直下に出すソートバー */
.filter-bar {
  display: flex;
  justify-content: flex-end;
  padding: 0 24px;
  margin: -8px 0 16px;
}
.sort-select {
  position: relative;
  display: inline-block;
}
.sort-select select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 7px 30px 7px 18px;
  border: none;
  border-radius: 999px;
  background-color: var(--c-accent);
  color: var(--c-white);
  font-family: var(--ff-body);
  font-size: 12px;
  letter-spacing: 0.04em;
  cursor: pointer;
  outline: none;

  /* 右端に三角矢印(白) */
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23FFF7F2' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 9px 6px;

  transition: opacity .2s;
}
.sort-select select:hover { opacity: .85; }
.sort-select select:focus { outline: 2px solid var(--c-accent); outline-offset: 2px; }

/* 上部:2カラムの注目商品 */
.products-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

/* 単独カードのリスト */
.products-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* 商品カード共通 */
.product-card {
  position: relative;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(124, 91, 56, 0.12);
  transition: transform .25s ease, box-shadow .25s ease;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 26px rgba(124, 91, 56, 0.18);
}

/* カード全体をリンク化(<a> でラップした場合) */
.product-card__link {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}
.product-card--wide .product-card__link {
  display: flex;
  align-items: stretch;
}

/* 小カード(2カラム) */
.product-card--small .product-card__img {
  aspect-ratio: 1 / 1;
  background: var(--c-bg-soft);
  overflow: hidden;
}
.product-card--small .product-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-card--small .product-card__body {
  padding: 10px 12px 12px;
}

/* 横長カード */
.product-card--wide {
  display: flex;
  align-items: stretch;
}
.product-card--wide .product-card__img {
  flex: 0 0 38%;
  aspect-ratio: 1 / 1;
  background: var(--c-bg-soft);
  overflow: hidden;
}
.product-card--wide .product-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-card--wide .product-card__body {
  flex: 1;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

/* バッジ(難易度・新着)— 背景色 + 枠線(文字と同色) */
.product-card__badge {
  display: inline-block;
  font-size: 11px;
  padding: 3px 16px;
  border-radius: 999px;
  letter-spacing: 0.06em;
  align-self: flex-start;
  border: 1px solid currentColor;   /* 枠線は文字色と同じ(currentColor)*/
}
.product-card--small .product-card__badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}
.product-card--wide .product-card__badge {
  margin-bottom: 6px;
}
/* それぞれ文字色 + 背景色のセット指定
   Cralier 公式:初級 → 緑 / 中級 → ピンク / 上級 → 水色 */
.product-card__badge--new       { color: var(--c-pink-text);  background: var(--c-pink-bg); }
.product-card__badge--beginner  { color: var(--c-green-text); background: var(--c-green-bg); }
.product-card__badge--mid       { color: var(--c-pink-text);  background: var(--c-pink-bg); }
.product-card__badge--advanced  { color: var(--c-blue-text);  background: var(--c-blue-bg); }

/* 絞り込みで非表示にする商品 */
.product-card[hidden] { display: none; }

/* 商品名・価格 */
.product-card__title {
  font-size: 12px;
  color: var(--c-text);
  margin: 0;
  line-height: 1.5;
  letter-spacing: 0.02em;
}
.product-card__price {
  font-family: var(--ff-en);
  font-size: 14px;
  color: var(--c-text);
  margin: 4px 0 0;
  letter-spacing: 0.04em;
}

/* もっと見る(中央のセクション区切りに使う) */
.products .more-link {
  margin: 18px 0;
  text-align: center;
}
.products .more-link a {
  display: inline-block;
  padding: 8px 24px;
  background: var(--c-bg-soft);
  border: 1px solid var(--c-line);
  border-radius: 999px;
  color: var(--c-text);
  font-family: var(--ff-body);    /* M PLUS 1p に明示(親 .more-link a が --ff-en になるのを上書き)*/
  font-size: 12px;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--c-line);
  text-decoration: none;
}

/* =========================================================
   Cross-page banner(コモノガタリへの動線)— 画像背景バナー
   ========================================================= */
.cross-banner {
  margin: 36px 24px 24px;
}
.cross-banner__link {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: url('../images-webp/komono-banner-small.webp') no-repeat center center;
  background-size: cover;
  aspect-ratio: 402 / 85;          /* 画像の比率に合わせる */
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  text-decoration: none;
  color: var(--c-text);
  transition: opacity .25s;
}
.cross-banner__link:hover { opacity: 0.85; }

.cross-banner__title {
  position: relative;
  font-family: "Kaisei Decol", "Hiragino Mincho ProN", serif;
  font-size: 20px;
  letter-spacing: 0.32em;
  margin: 0 0 8px;
  padding-bottom: 8px;
  font-weight: 400;
  text-indent: 0.32em;            /* letter-spacing の右ズレ補正 */
}
/* 見出し下の細い区切り線 */
.cross-banner__title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  max-width: 200px;
  height: 1px;
  background: var(--c-accent);
}
.cross-banner__sub {
  font-family: "Kaisei Decol", "Hiragino Mincho ProN", serif;
  font-size: 13px;
  color: var(--c-text);
  margin: 0;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
}
