/* =====================================================================
   Hosecraft – Product CSS  (Gold Grid + Mobile Row 2025-05-23)
   - PC: ゴールド価格バッジのみ（テキスト非表示）
   - Mobile (<576 px): 画像 + テキスト価格／バッジ非表示
===================================================================== */

/* ---------- ルートカラー ---------- */
:root{
  --gold1:#fceabb;
  --gold2:#f8d76e;
  --gold3:#d4af37;

  --border:#d9d9d9;
  --shadow:0 4px 10px rgba(0,0,0,.15);

  --body-h:60px;                /* 商品名行の高さ (PC) */
}

/* ---------- リセット ---------- */
*{box-sizing:border-box;margin:0;padding:0;}
body{font-family:"Helvetica Neue",Arial,sans-serif;line-height:1.6;color:#333;background:#f8f9fa;}
a{
  text-decoration:none;color:#0056b3;
  transition:color .18s var(--hc-motion-ease, ease), background-color .18s var(--hc-motion-ease, ease), border-color .18s var(--hc-motion-ease, ease);
}
a:hover{color:#004494;}
img{display:block;max-width:100%;height:auto;}

/* =================================================================
   カテゴリチップ（横スクロールバー表示）
================================================================== */
.cat-chips{
  display:flex;gap:.5rem;overflow-x:auto;scroll-snap-type:x mandatory;
  padding-bottom:.25rem;
  scrollbar-width:thin;scrollbar-color:var(--border) transparent;-ms-overflow-style:auto;
}
.cat-chips::-webkit-scrollbar{height:6px;}
.cat-chips::-webkit-scrollbar-thumb{background:var(--border);border-radius:3px;}

/* ---------- チップ本体 ---------- */
.cat-chip{
  /* ★ inline-flex + 中央揃えでテキストを上下中央に */
  display:inline-flex;
  align-items:center;
  justify-content:center;

  padding:.45rem 1.2rem;border:1px solid var(--border);
  border-radius:28px;background:#fff;color:#333;font-weight:600;
  white-space:nowrap;line-height:1;                    /* ★ 行高リセット */
  height:2.25rem;                                      /* ★ 高さを固定 */
  scroll-snap-align:start;
  transition:background-color .18s var(--hc-motion-ease, ease), color .18s var(--hc-motion-ease, ease), border-color .18s var(--hc-motion-ease, ease), box-shadow .18s var(--hc-motion-ease, ease), transform .18s var(--hc-motion-ease, ease);
}
.cat-chip:hover{
  background:#0066cc;color:#fff;border-color:#0066cc;
  box-shadow:0 2px 6px rgba(0,0,0,.1);
  transform:translateY(-1px);
}
.cat-chip.active{
  background:#0056b3;color:#fff;border-color:#0056b3;
  box-shadow:0 3px 8px rgba(0,0,0,.15);
}

/* ---------- 子カテゴリ (サイズ微調整) ---------- */
.cat-chip--child{
  font-size:.85rem;padding:.35rem 1rem;
  height:2.1rem;                                       
}
/* =================================================================
   商品カード（PC / Tablet）
================================================================== */
.card{
  position:relative;overflow:hidden;border:1px solid var(--border);
  border-radius:.6rem;background:#fff;display:flex;flex-direction:column;
  transition:transform .2s var(--hc-motion-ease, ease), box-shadow .2s var(--hc-motion-ease, ease), border-color .2s var(--hc-motion-ease, ease);
}
.card:hover{transform:translateY(-2px);box-shadow:0 10px 24px rgba(15,23,42,.11);}
.product-card-img{aspect-ratio:1/1;width:100%;object-fit:cover;}
.card-body{
  padding:.8rem 1rem;height:var(--body-h);
  display:flex;align-items:center;
}
.card-body h6{
  font-size:1.1rem;font-weight:600;line-height:1.35;margin:0;
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;
  line-clamp:2;
  overflow:hidden;white-space:normal;width:100%;
}

/* ---------- 価格テキスト ---------- */
.rv-price{display:none;}      /* PC では非表示 */

/* ---------- ゴールド価格バッジ（画像左下） ---------- */
.price-badge{
  position:absolute;left:.6rem;bottom:calc(var(--body-h) + .6rem);
  background:linear-gradient(135deg,var(--gold1),var(--gold2) 50%,var(--gold3));
  color:#000;font-size:.9rem;font-weight:700;
  padding:.18rem .8rem;border-radius:.35rem;
  box-shadow:0 2px 4px rgba(0,0,0,.25);
  pointer-events:none;z-index:2;
}

/* ---------- ハートボタン（右上） ---------- */
.rv-fav-btn{
  position:absolute;top:.5rem;right:.5rem;z-index:3;
  width:32px;height:32px;border:none;border-radius:50%;
  background:rgba(255,255,255,.85);
  display:flex;align-items:center;justify-content:center;
  transition:background-color .18s var(--hc-motion-ease, ease), transform .18s var(--hc-motion-ease, ease), box-shadow .18s var(--hc-motion-ease, ease);
}
.rv-fav-btn:hover{background:#fff;transform:translateY(-1px);box-shadow:0 0 0 2px var(--gold3);}
.rv-fav-btn i{font-size:1.05rem;color:#6c757d;}
.rv-fav-btn i.text-danger{color:#e0245e!important;}

/* =================================================================
   グリッド余白（PC）
================================================================== */
.row.g-4>.col{padding-left:.75rem;padding-right:.75rem;}

/* =================================================================
   モバイルレイアウト (<576 px)
   - カード横並び
   - 画像幅 35%  (min 120px)
   - テキスト価格表示
   - バッジ非表示
================================================================== */
@media (max-width:575.98px){
  :root{ --body-h:66px; }

  .product-list-page{
    padding-top:1rem!important;
    padding-inline:1rem;
  }
  .product-list-page h2{
    font-size:1.15rem;
    margin-bottom:.75rem!important;
  }
  .cat-chips{
    flex-wrap:nowrap!important;
    gap:.45rem!important;
    margin-inline:-1rem;
    padding:.15rem 1rem .55rem;
    scroll-padding-inline:1rem;
  }
  .cat-chip{
    min-height:40px;
    padding:.55rem 1rem;
    font-size:.9rem;
  }
  .cat-chip--child{
    min-height:38px;
    font-size:.82rem;
  }
  .sort-toolbar .container{
    justify-content:stretch!important;
    padding-inline:1rem;
  }
  .sort-toolbar form{
    width:100%;
  }
  .sort-label{
    font-size:.9rem;
  }
  .sort-select{
    min-height:42px;
    font-size:16px;
  }
  #filter-toggle .btn{
    min-height:44px;
    font-weight:700;
  }
  #product-listing{
    padding-inline:1rem;
  }
  #product-listing h2{
    font-size:1.2rem;
  }
  .row.g-4{
    --bs-gutter-y:.75rem;
  }
  .row.g-4>.col{padding-left:0;padding-right:0;}

  .card{
    flex-direction:row;
    min-height:124px;
    height:auto;
    border-radius:.55rem;
    box-shadow:0 2px 8px rgba(0,0,0,.06);
  }
  .card:hover{
    transform:none;
    box-shadow:0 2px 8px rgba(0,0,0,.06);
  }

  .card > a{display:flex;flex-direction:row;flex:1;min-width:0;}

  .product-card-img{
    width:34%;
    min-width:112px;
    height:auto;
    aspect-ratio:1/1;
    object-fit:contain;
    background:#fff;
  }

  .card-body{
    padding:.85rem 2.8rem .85rem .95rem;height:auto;align-items:flex-start;
    flex:1;min-width:0;flex-direction:column;justify-content:center;gap:.35rem;
  }
  .card-body h6{
    font-size:.98rem;
    line-height:1.35;
    -webkit-line-clamp:3;
    line-clamp:3;
  }

  /* 価格テキストを表示 */
  .rv-price{
    display:block;font-size:.95rem;font-weight:700;color:#000;
  }
  .rv-fav-btn{
    top:.55rem;
    right:.55rem;
    width:38px;
    height:38px;
    background:#fff;
    box-shadow:0 1px 4px rgba(0,0,0,.14);
  }
  .rv-fav-btn i{
    font-size:1.1rem;
  }

  /* バッジは非表示 */
  .price-badge{display:none;}
  .pagination{
    flex-wrap:wrap;
    gap:.25rem;
  }
  .pagination .page-link{
    min-width:40px;
    min-height:40px;
    display:flex;
    align-items:center;
    justify-content:center;
  }
}
