@charset "UTF-8";
/* =========================================================
   プレミアムデリカ 共通カードデザイン（試作）
   置き場所：/public_html/card.css
   読み込み：style.css の「後」に <link> で読み込むこと
     /public_html/ 直下のページ … href="card.css"
     /public_html/posts/ のページ … href="../card.css"
   ========================================================= */

/* ---------- 色の設定（ここを変えれば全ページに反映） ---------- */
:root {
  --accent:      #EA6530;   /* 見出しと同じオレンジ（style.css と同じ色） */
  --card-bg:     #fdf3e7;   /* カードの背景：薄い肌色                     */
  --card-border: #ecd9c3;   /* カードの枠線：少し濃い肌色                 */
}

/* =========================================================
   商品一覧ページ（item.html）
   ※style.css は「#sp-wp-post-list-2」というidで指定しているため、
     こちらも先頭に同じidを付けて、style.css より優先されるようにしている。
   ========================================================= */

/* カードを並べる箱：スマホは1列 */
#sp-wp-post-list-2 .product-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 16px 0 0;
  padding: 0 10px;
}

/* PC表示（style.css と同じ 569px 以上）は2列 */
@media screen and (min-width: 569px) {
  #sp-wp-post-list-2 .product-list { grid-template-columns: 1fr 1fr; }
}

/* 商品カード1枚分 */
#sp-wp-post-list-2 .product-card {
  display: flex;               /* 中身を縦に並べ、ボタンをカードの一番下にそろえる */
  flex-direction: column;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-top: 5px solid var(--accent);   /* 上の縁だけ見出し色の太線 */
  border-radius: 12px;
  padding: 14px 16px 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* 商品名（dt） */
#sp-wp-post-list-2 .product-card dt {
  font-weight: bold;
  font-size: 1.5rem;
  line-height: 1.5;
  margin: 0 0 10px;
  padding: 0 0 8px;
  border-bottom: 1px dashed var(--accent);
}
#sp-wp-post-list-2 .product-card dt a {
  color: #323339;
  text-decoration: none;
}
#sp-wp-post-list-2 .product-card dt a:hover { color: var(--accent); }
#sp-wp-post-list-2 .product-card dt img { vertical-align: middle; margin-left: 4px; }

/* 商品写真と説明（dd） */
#sp-wp-post-list-2 .product-card dd {
  margin: 0;                   /* style.css の左余白16pxを打ち消す */
  flex: 1;                     /* 説明が短いカードでもボタンの位置をそろえる */
  display: flex;
  flex-direction: column;
}
#sp-wp-post-list-2 .product-card .sp-entry-content {
  flex: 1;
  margin-bottom: 0;            /* style.css の下余白25pxを打ち消す */
}
#sp-wp-post-list-2 .product-card table { margin: 0 auto 10px; }
#sp-wp-post-list-2 .product-card img.sp-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* 「詳しく見る」ボタン */
#sp-wp-post-list-2 .product-card .more-link {
  align-self: flex-end;
  display: inline-block;
  margin-top: 8px;
  padding: 4px 16px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: #fff;
  color: var(--accent);
  font-size: 90%;
  text-decoration: none;
}
#sp-wp-post-list-2 .product-card .more-link:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

/* =========================================================
   商品詳細ページ（posts/itemN.html）用
   ※各ページの <style> に書いていた内容をここへ移したもの。
   ※詳細ページの外枠には class="hpb-viewtype-full" が付いている
     （一覧ページは hpb-viewtype-content）ので、それで区別して
     一覧ページのカードには効かないようにしている。
   ========================================================= */
.hpb-viewtype-full .product-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-top: 5px solid var(--accent);   /* 上の縁だけ見出し色の太線（一覧と同じ） */
  border-radius: 12px;            /* 角を丸く */
  padding: 16px 18px;             /* 枠の内側の余白 */
  margin: 12px 0 24px;            /* 枠の外側の余白（上・左右・下） */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);  /* ごく薄い影 */
}
/* 商品名の行（アイコン付き） */
.hpb-viewtype-full .product-card .product-name {
  font-weight: bold;
  font-size: 1.5rem;              /* 一覧ページの商品名と同じ大きさ */
  line-height: 1.5;
  color: #323339;
  margin: 0 0 12px;
  padding: 0 0 8px;
  border-bottom: 1px dashed var(--accent);  /* 商品名の下に見出し色の点線（一覧と同じ） */
}
/* 商品写真：カードの幅からはみ出さないように */
.hpb-viewtype-full .product-card table { margin: 0 auto 12px; }
.hpb-viewtype-full .product-card img.sp-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}
/* 説明文：最後の段落の下に余計な空きを作らない */
.hpb-viewtype-full .product-card p:last-child { margin-bottom: 0; }

/* =========================================================
   新アイコン（人気No.1～5・おすすめ・新発売）
   style.css が商品ページの画像すべてに灰色の3px枠を付けているので、
   アイコンだけ枠を消す。（idで指定された枠を消すため !important を使用）
   ========================================================= */
img[src$="ninki1.png"], img[src$="ninki2.png"], img[src$="ninki3.png"],
img[src$="ninki4.png"], img[src$="ninki5.png"],
img[src$="osusume.png"], img[src$="shinhatsubai.png"] {
  border: none !important;
  vertical-align: middle;
}
