@charset "UTF-8";
/* 銀座田屋：商品リスト共通スタイル */

/* 調整しやすいように変数化 */
:root {
  --item-w: 144px;   /* アイテムの横幅（サイズ微調整はここだけでOK） */
  --gap: 20px;       /* アイテム間の余白 */
}

/* コンテナ：中央に幅を固定して左右を大きく空ける */
.item-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;                 /* 中央寄せ */
  gap: var(--gap);
  max-width: calc((var(--item-w) * 4) + (var(--gap) * 3)); /* 4個＋余白3つ分 */
  margin: 20px auto;                       /* 画面中央に配置（左右は余白） */
}

/* アイテム：固定幅で折り返し */
.item {
  flex: 0 0 var(--item-w);                 /* 1個の幅を固定（= 最大4個/行） */
  text-decoration: none;
  color: inherit;
  text-align: center;
  transition: transform .3s ease;
  padding-bottom: 20px; /* ← ここで下方向に余白 */
}

.img-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

.item-info {
  margin-top: 14px;
  width: 100%;
}

/* 商品名 */
.item-name {
  font-size: 14px;
  font-family: "ヒラギノ角ゴ Pro", "Hiragino Kaku Gothic Pro",
               "游ゴシック", YuGothic, "メイリオ", "Meiryo", sans-serif;
  line-height: 1.5;
  text-align: left;
  color: #222;
  margin-bottom: 5px;
}

/* プライス */
.item-price {
  font-size: 12px;
  font-family: "ヒラギノ角ゴ Pro", "Hiragino Kaku Gothic Pro",
               "游ゴシック", YuGothic, "メイリオ", "Meiryo", sans-serif;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-align: left;
  color: #444;
  font-weight: bold;
}

/* ラベル */
.img-wrap {
  position: relative;  /* ← ラベルの基準位置を画像に固定！ */
  display: block;
}

.label-new {
  position: absolute;
  top: -30px;
  left: 0px;
  width: 38px;
  height: 38px;
  background: url("https://www.ginza-taya.co.jp/img/icon/new_01.png") no-repeat center / contain;
  pointer-events: none;
  opacity: 1;               /* 常に表示（hover関係なし） */
  transition: opacity 0.3s; /* フェードで出すなら */
}

/* オンマウス時のエフェクトを加えたい場合はこうもできる */
.item:hover .label-new {
  opacity: 0.8; /* ほんの少し変化させて高級感UP */
}


/* ボタン */
.more-button {
  text-align: center;
  margin-top: 20px;
}
.more-button button {
  background: #a7945f;
  color: #fff;
  border: none;
  padding: 12px 80px;
  cursor: pointer;
  transition: background 0.3s;
}
.more-button button:hover {
  background: #8e8052;
}

/* SOLD OUT ボックス */
.soldout-box {
  text-align: center;
  margin: 40px 0;
  padding: 20px 0;
}

.soldout-box p {
  color: #555;
  font-size: 14px;
  margin-bottom: 20px;
  font-family: "ヒラギノ角ゴ Pro", "Hiragino Kaku Gothic Pro",
               "游ゴシック", YuGothic, "メイリオ", "Meiryo", sans-serif;
  letter-spacing: 0.05em;
}

/* SOLD OUT ボタン：もっと見るボタンと統一 */
.soldout-btn {
  display: inline-block;
  background: #a7945f;
  color: #fff;
  border: none;
  padding: 12px 80px;
  border-radius: 0;          /* 四角い統一デザイン */
  cursor: pointer;
  text-decoration: none;
  font-weight: normal;
  font-size: 14px;
  transition: background 0.3s;
}

.soldout-btn:hover {
  background: #8e8052;
}


/* =========================================
   スマホ時（768px以下）：商品を2列表示に (修正版)
   ========================================= */
@media screen and (max-width: 768px) {
  :root {
    /* アイテム幅の計算 (var(--item-w)) はGridを使うため不要 */
    --gap: 16px; /* スマホでは少し間を詰める */
  }

  .item-list {
    /* 修正点 1: displayをgridに変更 */
    display: grid;
    /* 修正点 2: 2つの均等な列を強制的に作成 */
    grid-template-columns: repeat(2, 1fr);
    /* ギャップは var(--gap) を利用 */
    gap: var(--gap);
    
    /* Flexbox用の justify-content: center; はGridでは不要ですが、残していても問題なし */
    justify-content: center;
    max-width: 100%; /* 全幅でOK */
    padding: 0 10px; /* 画面端に余白を入れる */
    
    /* Flexboxの flex-wrap: wrap; はGridの grid-template-columns が代替 */
  }

  .item {
    /* 修正点 3: Flexboxの幅指定を削除し、Gridの子要素に任せる */
    flex: unset; 
    /* flex: 0 0 var(--item-w); を削除 */
  }
}

