
@charset "UTF-8";

/* ==========================================================
   KIHACHI お年賀特集 | CSS整理版
   ・ページ最大幅800px / 商品一覧最大幅600px
   ・PCカテゴリー写真：正方形、画像とボタンの両方がリンク
   ・SP：正方形FV、下部固定メニュー、JSによるパララックス
   ・商品価格 / 手提げタグ / 価格一覧内カテゴリ / 商品件数は非表示
   ・商品情報や価格判定の変更は各JSファイルで管理
   ========================================================== */

:root {
  --color-bg: #fdefec;
  --color-primary: #4a1000;
  --color-accent: #c9a953;
  --color-text: #4f4638;
  --color-menu-bg: #c0001c;
  --font-mincho: "Yu Mincho","Hiragino Mincho ProN","Hiragino Mincho Pro",serif;
  --font-gothic: "Helvetica Neue",Arial,"Hiragino Kaku Gothic ProN","Hiragino Sans",Meiryo,sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-mincho);
  line-height: 1.7;
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: opacity .23s;
}

a:hover {
  opacity: .8;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

button {
  font: inherit;
  cursor: pointer;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

.wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 10px;
}

/*
 ============================================================
 FV：お歳暮特集と同じ「背景写真2枚＋中央に透過PNGタイトル」方式
 背景画像：images/title1.jpg / title3.jpg（SPは下部のメディアクエリ参照）
 クロスフェード：1周20秒、写真が約4秒かけてゆっくり溶け合う
 ============================================================
 */

.hero {
  position: relative;
  width: 100%;
  height: 700px; /* PCのFV高さ */
  overflow: hidden;
  background: #aa2225; /* 背景写真の読み込み前に表示する色 */
  isolation: isolate;
}

.hero-slides,
.hero-slide,
.hero-wash,
.hero-logo {
  position: absolute;
  inset: 0;
}

.hero-slides {
  z-index: 0;
  overflow: hidden;
}

.hero-slide {
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}

.hero-slide--01 {
  background-image: url("images/title1.jpg");
}

.hero-slide--02 {
  background-image: url("images/title3.jpg");
  opacity: 0;
  animation: fvCrossFade 10s ease-in-out infinite;
  will-change: opacity;
}

@keyframes fvCrossFade {
  0%,
  15% {
    opacity: 0;
  }

  35%,
  65% {
    opacity: 1;
  }

  85%,
  100% {
    opacity: 0;
  }
}

/* 背景写真を柔らかく見せる薄いグラデーション */

.hero-wash {
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg,rgba(255,246,237,.08) 0%,rgba(255,246,237,.02) 52%,rgba(93,36,27,.10) 100%);
}

/* ============================================================
   FV タイトルPNG（写真2枚のクロスフェードとは独立して中央固定）
   PC: images/titlelogo_pc.png (1500 x 1000)
   SP: images/titlelogo_sp.png (1000 x 1000)
   ※ HTMLには picture / source / img を使用する
   ============================================================ */

.hero-logo {
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  pointer-events: none;
}

.hero-logo-title {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  margin: 0;
}

.hero-logo-title img {
  filter: drop-shadow(0 4px 8px rgba(45, 20, 15, 0.2));
}

/* PNGに含まれる透明余白を活かしてサイズを調整 */
.hero-logo-title picture {
  display: block;
  width: min(100vw, 1000px);
  flex: 0 0 auto;
}

.hero-logo-title picture img {
  display: block;
  width: 100%;
  max-width: none;
  max-height: none;
  height: auto;
  object-fit: contain;
}

/* ご案内テキスト */

.intro {
  text-align: center;
  padding-top: 62px;
  padding-bottom: 36px;
}

.intro-title {
  color: var(--color-primary);
  font-family: Georgia,"Times New Roman",serif;
  font-size: 42px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: .02em;
}

.intro-lead {
  color: var(--color-primary);
  font-family: var(--font-mincho);
  font-size: 28px;
  font-weight: bold;
  line-height: 1.6;
  margin: 20px auto 27px;
}

.intro-rule {
  height: 1px;
  border: 0;
  background: var(--color-primary);
  opacity: .3;
  margin: 0 auto 30px;
}

/* ==========================================================
   カテゴリーメニュー：PC写真3列×2段＋赤ボタン
   ・写真／赤ボタンはどちらも同じカテゴリーへリンク
   ・スマホは下部のメディアクエリで文字ボタンだけに変更
   ========================================================== */
.category-menu {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px; /* 白い区切り線 */
  max-width: 800px;
  margin: 30px auto 34px;
  padding: 2px; /* 外枠も同じ太さ */
  background: #fff;
  border: 0;
}

.menu-tile {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0;
  border: 0;
  background: transparent;
}

.menu-tile-label:hover {
  opacity: .83;
}

.menu-tile-image {
  display: block;
  width: 100%;
  aspect-ratio: 1.29;
  overflow: hidden;
  background: #f8efea;
}

.menu-tile-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transition: opacity .45s ease;
}

/* 画像リンク自体の透過を防ぎ、写真のみホバーさせる */
.category-menu a.menu-tile-image:hover {
  opacity: 1;
}

@media (hover: hover) and (pointer: fine) {
  .menu-tile-image:hover img {
    opacity: .75;
  }
}

.menu-tile-label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 13px 5px;
  min-height: 52px;
  text-align: center;
  font-size: 18px;
  line-height: 1.4;
  color: #fff;
  background: var(--color-menu-bg);
  font-family: var(--font-mincho);
  font-weight: bold;
}

.menu-tile-en {
  display: none;
}

/* PCのみに適用：カテゴリー写真は正方形、赤ボタンは写真の直下 */
@media (min-width: 769px) {
  .category-menu .menu-tile {
    background: #fff;
  }

  .category-menu .menu-tile-image {
    height: auto;
    aspect-ratio: 1 / 1;
    flex: 0 0 auto;
    background: #fff;
  }

  .category-menu .menu-tile-label {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    width: 100%;
    margin: 0;
  }
}

/* ギフト案内：画像を横幅いっぱいに表示（素材の比率を維持） */

.notice-section {
  text-align: center;
  padding: 15px 10px 95px;
}

.notice-section h2 {
  font-size: 36px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.48;
  letter-spacing: .025em;
  margin: 8px auto 26px;
}

.gift-visual {
  width: 100%;
  max-width: 800px;
  height: auto;
  overflow: hidden;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.gift-visual img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  object-fit: contain;
  mix-blend-mode: normal;
  filter: none;
}

.notice-section>p {
  font-family: var(--font-gothic);
  font-size: 17px;
  line-height: 2;
  color: var(--color-text);
  padding: 0 14px;
}

/* パララックス：追加の色レイヤーなし、背景写真を全幅表示 */

/* パララックス1 */
.cd-fixed-bg {
  position: relative;
  height: 430px;
  overflow: hidden;
  background-image: url("images/ny_cate_back2.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/* パララックス2 */
.cd-fixed-bg.cd-bg-2 {
  height: 390px;
  background-image: url("images/ny_cate_back1.jpg");
}

/* ==========================================================
   商品一覧：大カード＋2列カード、写真は1:1で全体を表示
   ========================================================== */

.product-section {
  background: var(--color-bg);
  padding: 14px 0 58px;
  position: relative;
  z-index: 1;
  scroll-margin-top: 20px;
}

.product-section.section-tinted,
.price-section {
  background: var(--color-bg);
}

.recommended-section {
  padding-top: 20px;
  padding-bottom: 35px;
}

.section-head {
  text-align: center;
  margin: 14px auto 32px;
}

.section-head h2 {
  font-size: 42px;
  font-family: var(--font-mincho);
  color: var(--color-primary);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .025em;
}

.section-head .eyebrow,
.section-rule {
  display: none;
}

.product-grid {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 20px 10px;
  align-items: stretch;
}

.product-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #fff;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,.055);
  transition: box-shadow .2s;
}

.product-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.09);
}

.product-card.is-featured {
  grid-column: 1/-1;
  max-width: 600px;
  width: 100%;
  margin: 0 auto 20px;
  border: 1px solid #eee;
}

.product-image {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  position: relative;
  background: #fff;
  overflow: hidden;
  padding: 0;
}

.product-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-body,
.product-card.is-featured .product-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 10px 12px 0;
  font-family: var(--font-gothic);
}

.product-card.is-featured .product-body {
  padding: 12px 15px 0;
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 5px;
  min-height: 0;
  align-content: flex-start;
}

/* タグの種類ごとに色を固定 */

.product-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  box-sizing: border-box;
  background: #826b61;
  color: #fff;
  border: 1px solid transparent;
  border-radius: 4px;
  font-family: var(--font-gothic);
  padding: 3px 8px;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: .02em;
}

.product-tag--new {
  background: #96702a;
  border-color: #96702a;
  color: #fff;
}

.product-tag--shipping {
  background: #c64974;
  border-color: #c64974;
  color: #fff;
}

.product-tag--menko {
  background: #fff;
  border-color: #b92d39;
  color: #b92d39;
}

.product-tag--band {
  background: #b92d39;
  border-color: #b92d39;
  color: #fff;
}

/* 手提げアイコンは表示しない（商品データは残す） */
.product-tag--bag {
  display: none !important;
}

.product-tag--popular {
  background: #96702a;
  border-color: #96702a;
  color: #fff;
}

.product-name,
.product-card.is-featured .product-name {
  color: #333;
  font-family: var(--font-gothic);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.45;
  min-height: 2.8em;
  overflow-wrap: anywhere;
  letter-spacing: 0;
  margin: 3px 0 1px;
  white-space: pre-line;
}

.product-card.is-featured .product-name {
  min-height: 0;
}

/* 価格は表示しない。値はJSの価格フィルターで使用する */
.product-price,
.alt-price,
.rank-card .rank-body > p {
  display: none !important;
}

.product-description {
  border-top: 1px solid rgba(74,16,0,.2);
  font-size: 13px;
  line-height: 1.55;
  color: var(--color-text);
  padding: 12px 0 13px;
  margin: 0;
  min-height: 70px;
  flex: 1;
}

.product-card.is-featured .product-description {
  min-height: 0;
  margin-top: 0;
}

.product-body:not(:has(.product-description)) {
  padding-bottom: 15px;
}

/* お年賀おすすめ：大1件＋小2列 */

.recommended-section .product-grid.is-empty {
  display: none;
}

/* ランキング用スタイル（再表示時に再利用可能） */

.ranking-section {
  max-width: 600px;
  margin: 36px auto 18px;
  text-align: center;
}

.ranking-section .eyebrow {
  display: none;
}

.ranking-section h3 {
  font-family: var(--font-mincho);
  font-size: 28px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 22px;
}

.ranking-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 10px;
}

.rank-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,.05);
}

.rank-card:first-child {
  grid-column: 1/-1;
}

.rank-image-wrap {
  position: relative;
}

.rank-image {
  display: block;
  aspect-ratio: 1 / 1;
  background: white;
  overflow: hidden;
}

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

.rank-number {
  position: absolute;
  z-index: 1;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  border-bottom-right-radius: 50%;
}

.rank-body {
  padding: 12px;
  font-family: var(--font-gothic);
  text-align: left;
}

.rank-body h4 {
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

/* ==========================================================
   価格で選ぶ：丸いフィルターボタン＋商品カード2列
   ========================================================== */

.price-buttons {
  max-width: 800px;
  margin: 0 auto 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.price-buttons button {
  border: 1px solid var(--color-primary);
  background: #fff;
  color: var(--color-primary);
  padding: 10px 14px;
  border-radius: 30px;
  min-width: 100px;
  font-family: var(--font-gothic);
  font-size: 14px;
  line-height: 1.1;
}

.price-buttons button[aria-pressed="true"],
.price-buttons button:hover {
  background: var(--color-primary);
  color: #fff;
}

/* 「○商品」件数表示は非表示 */
.price-count,
#price-count {
  display: none;
}

.price-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  max-width: 600px;
  margin: 0 auto;
  gap: 20px 10px;
  align-items: stretch;
}

.price-grid .product-card {
  max-width: none;
}

.price-grid .product-card.is-featured {
  grid-column: auto;
}

.price-grid .product-body {
  padding-bottom: 10px;
}

.price-grid .product-name {
  min-height: 2.8em;
}

/* 価格一覧に挿入される「クッキー」等のカテゴリー名は非表示 */
.price-origin {
  display: none !important;
}

.price-empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 35px 0;
}

/* フッター */

.site-footer {
  background: var(--color-menu-bg);
  color: #fff7ed;
  text-align: center;
  padding: 40px 10px 33px;
}

.footer-flower {
  font-size: 21px;
  margin-bottom: 9px;
}

.footer-brand {
  font-family: Georgia,serif;
  font-size: 14px;
  margin-bottom: 18px;
}

.footer-brand strong {
  font-size: 21px;
  font-weight: 400;
  letter-spacing: .08em;
}

.back-top {
  font-family: var(--font-gothic);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* お歳暮：PCは右サイドメニュー、SPは下部固定 */

.fixed-nav {
  position: fixed;
  right: 0;
  top: 20px;
  width: 180px;
  z-index: 80;
  background: rgba(255,255,255,.96);
  border: 1px solid #ddd;
  box-shadow: -2px 2px 6px rgba(0,0,0,.1);
  border-radius: 8px 0 0 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .45s;
  overflow: hidden;
}

.fixed-nav.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.fixed-nav-inner {
  display: flex;
  flex-direction: column;
}

.fixed-nav a {
  font-family: var(--font-mincho);
  display: block;
  text-align: center;
  border-bottom: 1px solid #eee;
  color: var(--color-primary);
  font-size: 15px;
  padding: 15px 9px;
  font-weight: 700;
}

.fixed-nav a:hover,
.fixed-nav a.is-current {
  background: #fff2ef;
}

.mobile-fixed-nav {
  display: none;
}

/* PC中画面：サイドナビが商品本文と重ならないよう幅を狭める */

@media (min-width:769px) and (max-width:1190px) {
  .fixed-nav {
    width: 145px;
  }

  .fixed-nav a {
    font-size: 13px;
    padding: 12px 5px;
  }
}

/* SPは旧お歳暮どおり、正方形FV・メニュー文字だけ・通常カード2列 */

@media (max-width:768px) {
  html {
    scroll-padding-top: 30px;
  }

  body {
    padding-bottom: 68px;
  }

  /* SPは正方形FV。写真はスマホ用素材に切り替え */

  .hero {
    height: 100vw;
    min-height: 0;
    max-height: none;
  }

  /* SP用の正方形PNGに切替。110vwなら透明余白込みで少し大きく表示 */
  .hero-logo-title picture {
    width: 110vw; /* ぴったり収めたい場合は100vwに変更 */
  }

  /* スマホ用の背景写真 */

  .hero-slide--01 {
    background-image: url("images/title_sp1.jpg");
  }

  .hero-slide--02 {
    background-image: url("images/title_sp3.jpg");
  }

  .intro {
    padding-top: 27px;
    padding-bottom: 10px;
  }


  .intro-title {
    font-size: 28px;
    line-height: 1.26;
  }

  .intro-lead {
    font-size: 19px;
    line-height: 1.7;
    margin: 15px auto 17px;
  }

  .intro-rule {
    margin: 0 auto 17px;
  }

  .category-menu {
    gap: 0;
    margin: 15px auto 20px;
    padding: 0;
    border: 1px solid #fff;
  }

  .menu-tile {
    background: var(--color-menu-bg);
    border: 1px solid #fff;
  }

  .menu-tile-image {
    display: none;
  }

  .menu-tile-label {
    font-size: 13px;
    min-height: 60px;
    padding: 5px 2px;
    line-height: 1.25;
  }

  .notice-section {
    padding: 9px 14px 52px;
  }

  .notice-section h2 {
    font-size: 26px;
    margin: 12px auto 18px;
  }

  .gift-visual {
    margin-bottom: 19px;
  }

  .notice-section>p {
    font-size: 12px;
    line-height: 1.8;
    padding: 0;
  }

  /* JSがない場合は通常の背景画像を表示 */
  .cd-fixed-bg,
  .cd-bg-2 {
    height: 350px;
    background-attachment: scroll;
    background-size: cover;
    background-position: center;
  }

  /* JSがある場合、スマホでも固定背景風にスクロール */
  .cd-fixed-bg.has-mobile-parallax {
    background-image: none;
    overflow: hidden;
  }

  .cd-fixed-bg.has-mobile-parallax .parallax-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    pointer-events: none;
    will-change: transform;
    z-index: 0;
  }

  .product-section {
    padding: 10px 0 29px;
  }

  .recommended-section {
    padding-top: 15px;
    padding-bottom: 18px;
  }

  .section-head {
    margin: 8px auto 20px;
  }

  .section-head h2 {
    font-size: 28px;
  }

  .product-grid,
  .price-grid {
    gap: 13px 9px;
  }

  .product-card.is-featured {
    margin-bottom: 10px;
  }

  .product-body,
  .product-card.is-featured .product-body {
    padding: 8px 8px 10px;
  }

  .product-tags {
    gap: 3px;
    margin-bottom: 2px;
  }

  .product-tag {
    font-size: 10px;
    min-height: 21px;
    padding: 2px 5px;
  }

  .product-name {
    font-size: 12px;
    min-height: 3.8em;
    line-height: 1.45;
    margin: 3px 0 0;
  }

  .product-card.is-featured .product-name {
    font-size: 14px;
  }

  .product-description {
    display: none;
  }

  .ranking-grid {
    gap: 9px;
  }

  .rank-number {
    width: 29px;
    height: 29px;
    font-size: 15px;
  }

  .rank-body {
    padding: 9px;
  }

  .rank-body h4 {
    font-size: 11px;
  }

  .price-buttons {
    gap: 8px;
  }

  .price-buttons button {
    min-width: 0;
    font-size: 12px;
    padding: 9px 12px;
  }

  .price-grid .product-name {
    font-size: 12px;
    min-height: 3em;
  }

  .fixed-nav {
    display: none;
  }

  .mobile-fixed-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 90;
    background: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,.10);
    padding-bottom: env(safe-area-inset-bottom);
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
  }

  .mobile-fixed-nav::-webkit-scrollbar {
    display: none;
  }

  .mobile-fixed-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 22%;
    min-width: 70px;
    min-height: 60px;
    font-family: var(--font-mincho);
    font-weight: bold;
    color: var(--color-primary);
    font-size: 11px;
    border-right: 1px solid #eee;
    position: relative;
    padding-top: 9px;
  }

  .mobile-fixed-nav a::before {
    content: "";
    position: absolute;
    top: 12px;
    left: calc(50% - 3px);
    width: 6px;
    height: 6px;
    background: #ddd;
    border-radius: 50%;
  }

  .mobile-fixed-nav a.is-current::before {
    background: var(--color-menu-bg);
  }

  .site-footer {
    padding: 32px 10px;
  }
}

@media (prefers-reduced-motion:reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-slide--02 {
    animation: none;
    opacity: 0;
  }
}
