/* =========================================================
   人気のデザイン印鑑（商品一覧上部セクション）
   ※ 既存の Bootstrap / style.css と衝突しないよう
     すべて .hanko-sample 配下にスコープしています。
   ========================================================= */
.hanko-sample{
  --red: #c0392b;
  --ink: #222222;
  --sub: #555555;
  --line: #e6e6e6;
  --bg: #ffffff;

  background: var(--bg);
  color: var(--ink);
  margin-bottom: 1.5rem;
}

/* 人気のデザイン印鑑・おすすめ商品：ボーダーTOP・::beforeなし */
h2.h2title.h2title-nobt{
  border-top: none;
}
h2.h2title.h2title-nobt::before{
  display: none;
}

.hanko-sample .heading{
  font-size: 20px;
  font-weight: 700;
  padding: 20px 24px 16px;
  margin: 0;
  border-bottom: 1px solid var(--line);
}

/* =========================================================
   PRODUCT ROW — CSS Grid
   PC / モバイルで DOM 順序は同じ。grid-template のみ
   切り替えることで各ブロックの表示位置を変更します。
   ========================================================= */
.hanko-sample .product{
  display: grid;
  grid-template-columns: 210px 1fr;
  grid-template-areas:
    "thumb desc"
    "thumb name"
    "thumb links";
  column-gap: 56px;
  row-gap: 6px;
  align-items: start;
  padding: 14px 12px;
  border: none;
}

/* 商品1: ボーダーTOP / 商品2: ボーダーBOTTOMのみ */
.hanko-sample .product:first-of-type{
  border-top: 1px solid var(--line);
}
.hanko-sample .product:last-of-type{
  border-bottom: 1px solid var(--line);
}

.hanko-sample .product:nth-of-type(2n){
  background: #f5f5f5;
}

.hanko-sample .thumb{ grid-area: thumb; }
.hanko-sample .desc { grid-area: desc;  font-size: 14px; color: #444; line-height: 1.7; margin: 24px 0 8px; }
.hanko-sample .name { grid-area: name;  font-size: 24px; font-weight: 700; margin: 0 0 14px; color: #444; }
.hanko-sample .links{ grid-area: links; display: flex; gap: 8px; }
.hanko-sample .links .link-item:last-child{ margin-left: -16px; }

/* thumbnail block */
.hanko-sample .thumb-photo{
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 4px;
  overflow: hidden;
  background: linear-gradient(135deg,#3a3a3a,#111 55%,#555);
}
.hanko-sample .thumb-photo .barrel{
  position: absolute;
  right: 8%;
  top: 6%;
  width: 26%;
  height: 88%;
  border-radius: 8px;
  background: repeating-linear-gradient(0deg,#888 0 3px,#666 3px 6px);
  box-shadow: inset 0 0 6px rgba(0,0,0,.5);
}
.hanko-sample .thumb-photo .stamp-face{
  position: absolute;
  left: 6%;
  top: 10%;
  width: 55%;
  height: 55%;
  border-radius: 50%;
  background: #f4efe4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--red);
  font-size: 22px;
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.hanko-sample .badge{
  position: absolute;
  left: 8px;
  bottom: 8px;
  background: #222;
  color: #fff;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 2px;
  letter-spacing: .04em;
  white-space: nowrap;
}
/* link rows (PC: side-by-side, 2 columns) */
.hanko-sample .link-item{
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  flex: 1 1 0;
  padding: 4px 0;
}
.hanko-sample .link-icon{
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--red);
  color: var(--red);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.1;
}
.hanko-sample .link-text{ flex: 0 1 auto; min-width: 0; }
.hanko-sample .link-title{ font-size: 16px; font-weight: 500; color: #444; }
.hanko-sample .chevron{ flex: 0 0 auto; color: #bbb; font-size: 24px; margin-left: -4px; }
.hanko-sample .link-item:hover .link-title{ text-decoration: underline; }

/* =====================================================
   MOBILE LAYOUT (<=600px)
   - 説明文は独立した行で全幅表示
   - サムネイル + (タイトル & リンク) をその下に横並び
   - リンク2行はカラム内で縦積み
   - 画像の左右は商品ごとに交互（1つ目=左, 2つ目=右）
   ===================================================== */
@media (max-width: 600px){

  .hanko-sample .heading{ font-size: 17px; padding: 16px 16px 12px; }

  .hanko-sample .product{
    grid-template-columns: 44% 1fr;
    grid-template-areas:
      "desc  desc"
      "thumb name"
      "thumb links";
    column-gap: 14px;
    row-gap: 8px;
    padding: 10px 8px 12px;
  }

  /* 2つ目（以降の偶数）: カラムを反転して画像を右に配置 */
  .hanko-sample .product:nth-of-type(2n){
    grid-template-columns: 1fr 44%;
    grid-template-areas:
      "desc  desc"
      "name  thumb"
      "links thumb";
    /* .mainBox の左右 15px パディングを打ち消し、背景を画面端まで広げる。
       内側コンテンツ位置は維持するため左右パディングを 15px 分足す。 */
    margin-left: -15px;
    margin-right: -15px;
    padding-left: 23px;
    padding-right: 23px;
  }

  .hanko-sample .desc{ font-size: 13px; margin-top: 6px; margin-bottom: 0; }
  .hanko-sample .name{ font-size: 20px; margin-bottom: 8px; color: #444;}

  .hanko-sample .links{
    flex-direction: column;
    gap: 6px;
  }
  .hanko-sample .links .link-item:last-child{ margin-left: 0; }
  .hanko-sample .link-item{ padding: 2px 0; }
  .hanko-sample .link-icon{ flex: 0 0 30px; width: 30px; height: 30px; font-size: 8px; }
  .hanko-sample .link-title{ font-size: 16px; }

  .hanko-sample .badge{ font-size: 8px; padding: 2px 5px; }
}

/* おすすめ商品４列 */
.cate-design-box {
  font-size: 0.875rem;
}
@media screen and (max-width: 576px) {
  .cate-design-box li {
    width: 32%;
  }
}
