/*********************** Custom css for Boost AI Search & Discovery  ************************/
/* Boostの商品ラベルを「画像の左上隅」へ & 少し小さく */
.boost-sd__product-image-wrapper{
  position: relative !important; /* 念のため */
}

/* ラベルの行（上段）を画像に対して絶対配置 */
.boost-sd__product-image-wrapper .boost-sd__product-image-row--top{
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
  z-index: 5 !important;
}

/* 左カラムの余白を潰して左上に寄せる */
.boost-sd__product-image-wrapper .boost-sd__product-image-column--in-top.boost-sd__product-image-column--left{
  padding: 0 !important;
  margin: 0 !important;
}

/* ラベル本体を少し小さく */
.boost-sd__product-label--sale{
  font-size: 12px !important;     /* ←好みで調整 */
  line-height: 1 !important;
  padding: 6px 10px !important;   /* ←好みで調整 */
  border-radius: 0 !important;    /* 角丸不要なら。必要なら 4px など */
}

/* ラベル内のテキストが別指定されている場合の保険 */
.boost-sd__product-label--sale .boost-sd__product-label-text,
.boost-sd__product-label--sale .boost-sd__product-label-text span{
  font-size: inherit !important;
  line-height: inherit !important;
}

/* ===== ラベル（SALEなど）をスマホでさらに小さく ===== */
@media (max-width: 749px){
  .boost-sd__product-label--sale{
    font-size: 10px !important;     /* 9〜10pxあたりが多いです */
    padding: 4px 7px !important;    /* 余白も一緒に縮める */
    line-height: 1 !important;
  }

  /* 文字が太く見えすぎる場合だけ */
  .boost-sd__product-label--sale .boost-sd__product-label-text,
  .boost-sd__product-label--sale .boost-sd__product-label-text span{
    letter-spacing: 0 !important;
  }
}

/* さらに小さい端末（任意） */
@media (max-width: 374px){
  .boost-sd__product-label--sale{
    font-size: 9px !important;
    padding: 3px 6px !important;
  }
}

/* Boostだけ Desktop 幅を広げる（テーマの余白整合は維持） */
@media (min-width: 990px){
  .boost-sd-container{
    --boostsd-general-page-width-desktop: 1600px; /* 例: 1560〜1680あたりが無難 */
  }
}

/* ソート・フィルターエリア */
@media (max-width: 679px){

  /* 並び順（ボタン全体："並び順:" も含む） */
  .boost-sd__toolbar-top-mobile .boost-sd__sorting-button{
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap; /* ← 追加：改行させない */
  }

  /* 並び順の現在値（新着順など） */
  .boost-sd__toolbar-top-mobile .boost-sd__sorting-value{
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap; /* ← 追加：値も改行させない */
  }

  /* 絞り込み（テキスト） */
  .boost-sd__toolbar-top-mobile .boost-sd__filter-tree-toggle-button-text{
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap; /* ← 追加：絞り込みも改行させない */
  }
}

