/*
 * 山武弓具店 商品一覧表示 組み替え スマホ用
 * 2列表示の体裁と、各表示形式の王冠付きランキングを整えます。
 */

/* 2列表示の商品一覧 */
body.sambu-catalog-ready section.cataloglist > ul > li {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 12px;
  padding: 16px 12px 24px !important;
  margin: 0 !important;
  list-style: none;
  text-align: left;
}

body.sambu-catalog-ready section.cataloglist .box {
  float: none !important;
  display: block !important;
  position: relative;
  width: auto !important;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box;
  text-align: left;
}

body.sambu-catalog-ready section.cataloglist .box > a:not(.sambu-product-name) {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e6e1d6;
  box-sizing: border-box;
}

body.sambu-catalog-ready section.cataloglist .box > a > img.catalogimg {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  object-fit: contain;
  box-sizing: border-box;
}

body.sambu-catalog-ready section.cataloglist .sambu-product-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  min-height: 41.6px;
  margin-top: 8px;
  color: #1d1b18;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
}

body.sambu-catalog-ready section.cataloglist .box .price {
  height: auto !important;
  margin: 4px 0 0 !important;
  padding: 0 !important;
  color: #b3241c;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  text-shadow: none;
  background: none;
}

/* ランキングと商品タグ */
.sambu-rank-badge {
  display: inline-block;
  box-sizing: border-box;
  padding: 3px 8px;
  border-radius: 4px;
  background: #555;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  text-shadow: none;
}

.sambu-rank-badge[data-rank="1"] {
  background: #8a5a00;
}

.sambu-rank-badge[data-rank="2"] {
  background: #57616b;
}

.sambu-rank-badge[data-rank="3"] {
  background: #865133;
}

ul.itemlist > li.sambu-rank-decorated {
  background: none !important;
}

ul.itemlist > li.sambu-rank-decorated > img {
  display: none !important;
}

body.sambu-catalog-ready section.cataloglist .box > .sambu-rank-badge {
  position: absolute;
  z-index: 2;
  left: 5px;
  top: 5px;
  pointer-events: none;
}

ul.itemlist .sambu-rank-original-text[hidden] {
  display: none !important;
}

body.sambu-catalog-ready section.cataloglist .sambu-product-tags {
  min-height: 18px;
  margin-top: 6px;
  line-height: 18px;
}

body.sambu-catalog-ready section.cataloglist .sambu-product-tags span {
  display: inline-block;
  padding: 0 6px;
  margin-right: 4px;
  color: #fff;
  background: #a52d0c;
  font-size: 10px;
  line-height: 18px;
}

body.sambu-catalog-ready section.cataloglist .sambu-product-name {
  margin-top: 4px;
}

.sambu-rank-badge,
.sambu-rank-badge[data-rank="1"],
.sambu-rank-badge[data-rank="2"],
.sambu-rank-badge[data-rank="3"] {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  background: transparent;
  color: #333;
  font-size: 12px;
  font-weight: 400;
  line-height: 20px;
}

.sambu-rank-badge::before {
  content: "";
  display: inline-block;
  flex: none;
  width: 20px;
  height: 20px;
  background: url("https://www.sambu.jp/hpgen/smp/img/crown.png") center / contain no-repeat;
}

body.sambu-catalog-ready section.cataloglist .box {
  padding-top: 24px !important;
}

body.sambu-catalog-ready section.cataloglist .box > .sambu-rank-badge {
  top: 0;
  left: 0;
}

.sambu-rank-badge {
  white-space: nowrap;
}
