/* SANGO の記事本文の後に読み込んでください。 */
.wws-wine {
  container-type: inline-size;
  box-sizing: border-box;
  width: 100%;
  margin: 28px 0;
  padding: 20px 16px 16px;
  border: 1px solid #ddd6d3;
  border-top: 3px solid #752b39;
  border-radius: 4px;
  background: #fff;
  color: #302d2c;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.6;
}

.wws-wine *,
.wws-wine *::before,
.wws-wine *::after {
  box-sizing: border-box;
}

/* ワイン名はボックス共通、商品画像は楽天の区切り内に配置。 */
.wws-wine .wws-wine__head {
  margin: 0 0 16px;
  padding: 0;
}

.wws-wine .wws-wine__rakuten {
  --wws-shop-color: #8b4651;
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid #e4ddda;
  border-radius: 3px;
  background: #faf8f7;
}

.wws-wine .wws-wine__rakuten-body {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  min-width: 0;
}

.wws-wine .wws-wine__rakuten-body--noimage {
  grid-template-columns: minmax(0, 1fr);
}

.wws-wine .wws-wine__image {
  width: 160px;
  max-width: 100%;
  margin: 0;
}

.wws-wine .wws-wine__image a {
  display: block;
}

.wws-wine .wws-wine__image a:hover img {
  opacity: .85;
}

.wws-wine .wws-wine__image img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 160px;
  margin: 0;
  border: 0;
  border-radius: 0;
  object-fit: contain;
}

.wws-wine .wws-wine__others {
  min-width: 0;
  margin: 24px 0 0;
  padding: 0;
}

.wws-wine .wws-wine__name {
  min-width: 0;
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.wws-wine .wws-wine__group {
  --wws-shop-color: #77716b;
}

.wws-wine .wws-wine__group + .wws-wine__group {
  margin-top: 20px;
}

.wws-wine .wws-wine__group-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px 12px;
  margin: 0 0 7px;
  padding: 0;
  border: 0;
  background: none;
  color: #726b67;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: .04em;
}

.wws-wine .wws-wine__group-name {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.wws-wine .wws-wine__sale {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  color: #c62a2f;
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.wws-wine .wws-wine__sale::before {
  content: "＼ ";
}

.wws-wine .wws-wine__sale::after {
  content: " ／";
}

.wws-wine .wws-wine__shops {
  display: grid;
  min-width: 0;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  list-style: none;
}

.wws-wine .wws-wine__shop {
  min-width: 0;
  margin: 0;
  padding: 0;
  background: none;
  list-style: none;
}

/* テーマが付加するリスト装飾を、このボックス内だけ解除。 */
.wws-wine .wws-wine__shop::before,
.wws-wine .wws-wine__shop::after {
  content: none;
}

.wws-wine .wws-wine__group--rakuten {
  --wws-shop-color: #8b4651;
}

.wws-wine .wws-wine__group--amazon {
  --wws-shop-color: #a18a60;
}

.wws-wine .wws-wine__group--yahoo {
  --wws-shop-color: #9a6b5a;
}

.wws-wine .wws-wine__group--url {
  --wws-shop-color: #6c8076;
}

.wws-wine .wws-wine__shop > a {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  width: 100%;
  min-height: 54px;
  margin: 0;
  padding: 12px 16px;
  border: 1px solid #e4ddda;
  border-left: 3px solid var(--wws-shop-color);
  border-radius: 3px;
  background: #fff;
  color: #302d2c;
  font-size: inherit;
  line-height: 1.5;
  text-decoration: none;
  box-shadow: none;
  transition: background-color .15s, border-color .15s;
}

.wws-wine .wws-wine__shop > a:has(.wws-wine__stock.is-in) {
  background: #fcf7f8;
}

.wws-wine .wws-wine__shop > a::after {
  content: "›";
  flex: 0 0 auto;
  margin-left: auto;
  color: #958387;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
}

.wws-wine .wws-wine__label {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.wws-wine .wws-wine__price {
  flex: 0 1 auto;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: #752b39;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: normal;
}

.wws-wine .wws-wine__stock {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid #ddd5d2;
  border-radius: 3px;
  background: #f5f1ef;
  color: #65333d;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}

.wws-wine .wws-wine__stock.is-unknown {
  background: #f7f6f3;
  border-color: #e1ddd3;
  color: #625c50;
}

.wws-wine .wws-wine__shop.is-soldout > a {
  border-color: #e7e4e2;
  border-left-color: var(--wws-shop-color);
  background: #f7f6f5;
  color: #76716d;
}

.wws-wine .is-soldout .wws-wine__price {
  color: #76716d;
}

.wws-wine .wws-wine__stock.is-out {
  border-color: #dedad7;
  background: #eeebe8;
  color: #69635e;
}

@media (hover: hover) {
  .wws-wine .wws-wine__shop:not(.is-soldout) > a:hover {
    border-color: #b79a9e;
    border-left-color: var(--wws-shop-color);
    background: #faf6f6;
    text-decoration: none;
  }
}

.wws-wine .wws-wine__shop > a:focus-visible,
.wws-wine .wws-wine__credit a:focus-visible {
  outline: 2px solid #752b39;
  outline-offset: 3px;
}

.wws-wine .wws-wine__note,
.wws-wine .wws-wine__credit {
  padding: 0;
  color: #726b67;
  font-size: 11px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.wws-wine .wws-wine__note {
  margin: 14px 0 0;
}

.wws-wine .wws-wine__credit {
  margin: 5px 0 0;
  text-align: right;
}

.wws-wine .wws-wine__credit a {
  color: #726b67;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* まとめ買いの印(0.20.0。0.21.1 から「まとめ買いで送料無料に」)。記事のワインを2種類以上扱う店のボタンの右上に重ねる。リンクの外に置く(計測の文字を変えない)。 */
.wws-wine .wws-wine__shop {
  position: relative;
}

.wws-wine .wws-wine__badge {
  position: absolute;
  top: -7px;
  right: 10px;
  padding: 0 8px;
  border-radius: 999px;
  background: #752b39;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.7;
  pointer-events: none;
}

/* 取り扱いが多いおすすめの店(0.20.0。0.21.0 で記事の最後の箱の下へ、太いメイン色の枠・ロゴつきに)。下線はリンク(店名)だけ。 */
.wws-shops {
  margin: 28px 0 24px;
  padding: 18px 18px 12px;
  border: 3px solid #752b39;
  border-radius: 10px;
  background: #fbf8f4;
  color: #4a3b2a;
}

.wws-shops .wws-shops__title {
  margin: 0 0 8px;
  color: #752b39;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
}

.wws-shops .wws-shops__lead,
.wws-shops .wws-shops__note {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.8;
}

.wws-shops .wws-shops__kinds {
  color: #752b39;
  font-weight: 700;
}

/* 数字だけ大きく(「種類」は普通の大きさ)。 */
.wws-shops .wws-shops__num {
  margin: 0 1px;
  font-size: 18px;
}

.wws-shops .wws-shops__em {
  padding: 1px 4px;
  border-radius: 3px;
  background: #f6e3e6;
  color: #752b39;
  font-weight: 700;
}

.wws-shops .wws-shops__note {
  margin: 8px 0 0;
  color: #726b67;
  font-size: 11px;
}

.wws-shops .wws-shops__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.wws-shops .wws-shops__item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 0 0 8px;
  padding: 10px 12px;
  border-radius: 6px;
  background: #fff;
  list-style: none;
}

.wws-shops .wws-shops__item::before {
  content: none;
}

.wws-shops .wws-shops__logo {
  flex: 0 0 64px;
  display: block;
  line-height: 0;
}

.wws-shops .wws-shops__logo img {
  width: 64px;
  height: 64px;
  margin: 0;
  border: 1px solid #eee5dc;
  border-radius: 6px;
  object-fit: contain;
  background: #fff;
}

.wws-shops .wws-shops__body {
  min-width: 0;
}

.wws-shops .wws-shops__name {
  color: #c1004d;
  font-size: 15px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 押せることがわかるように添える。リンクの文字(計測の文言)には入らない。 */
.wws-shops .wws-shops__name::after {
  content: "　楽天のお店へ ›";
  font-size: 12px;
  font-weight: 400;
}

.wws-shops .wws-shops__feature,
.wws-shops .wws-shops__count,
.wws-shops .wws-shops__terms {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.6;
}

.wws-shops .wws-shops__count {
  color: #752b39;
  font-size: 12px;
}

.wws-shops .wws-shops__terms {
  color: #6b5a48;
  font-size: 12px;
}

@media (max-width: 480px) {
  .wws-shops { padding: 14px 12px 10px; }
  .wws-shops .wws-shops__item { gap: 10px; padding: 10px; }
  .wws-shops .wws-shops__logo { flex-basis: 44px; }
  .wws-shops .wws-shops__logo img { width: 44px; height: 44px; }
}

/* 画面幅ではなく、記事内で実際に使える幅に合わせる。 */
@container (max-width: 540px) {
  .wws-wine .wws-wine__rakuten { padding: 12px; }
  .wws-wine .wws-wine__rakuten-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .wws-wine .wws-wine__image {
    width: 200px;
    justify-self: center;
  }
  .wws-wine .wws-wine__image img { height: 200px; }
}

@container (max-width: 420px) {
  .wws-wine .wws-wine__head { margin-bottom: 16px; }
  .wws-wine .wws-wine__name { font-size: 16px; }
  .wws-wine .wws-wine__shop > a {
    flex-wrap: nowrap;
    gap: 7px;
    min-height: 54px;
    padding: 12px 8px;
    font-size: 13px;
  }
  .wws-wine .wws-wine__label {
    display: -webkit-box;
    flex: 1 1 0%;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  .wws-wine .wws-wine__price {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .wws-wine .wws-wine__stock { padding: 3px 5px; }
}

@media (prefers-reduced-motion: reduce) {
  .wws-wine .wws-wine__shop > a { transition: none; }
}

/* ELEVIN(高級ワイン専門店)の区切り(0.25.0) */
.wws-wine .wws-wine__group--elevin {
  --wws-shop-color: #6c8076;
}

.wws-wine .wws-wine__lead {
  margin: 0 0 8px;
  padding: 0;
  color: #5a5350;
  font-size: 13px;
  line-height: 1.7;
}

/* リンクサス酒販(中古=買い取った未使用・未開封品)の枠。新品の店と分けて、いちばん下に点線の枠で出す(0.26.0) */
.wws-wine .wws-wine__group--linxas {
  --wws-shop-color: #8a8580;
  margin-top: 18px;
  padding: 12px 14px 14px;
  border: 1px dashed #cfc6c2;
  border-radius: 4px;
  background: #faf8f6;
}

.wws-wine .wws-wine__used {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: #5f5a57;
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  line-height: 1.7;
}

/* A8 の 1x1 の計測画像は、場所を取らないようにする */
.wws-wine .wws-wine__px {
  position: absolute;
  width: 1px;
  height: 1px;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

/* ELEVIN・中古の枠のボタンは「ワイン名 年」なので、名前の途中で折り返さず、空白(名前と年の間)で折り返す。入りきらない長い名前だけ途中で折る(0.26.1) */
.wws-wine .wws-wine__group--elevin .wws-wine__label,
.wws-wine .wws-wine__group--linxas .wws-wine__label {
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* 狭い幅(スマホ)では、ELEVIN・中古の枠のボタンの「ワイン名 年」を1行目に全部出し、値段と在庫を2行目に回す(2行で切らない。0.26.1) */
@container (max-width: 420px) {
  .wws-wine .wws-wine__group--elevin .wws-wine__shop > a,
  .wws-wine .wws-wine__group--linxas .wws-wine__shop > a {
    flex-wrap: wrap;
  }
  .wws-wine .wws-wine__group--elevin .wws-wine__label,
  .wws-wine .wws-wine__group--linxas .wws-wine__label {
    display: block;
    flex: 1 1 100%;
    overflow: visible;
    -webkit-line-clamp: unset;
  }
  /* 値段も在庫もないボタン(「〜のほかの年を見る」)は、矢印を同じ行に置く */
  .wws-wine .wws-wine__group--elevin .wws-wine__shop > a:not(:has(.wws-wine__price, .wws-wine__stock)) .wws-wine__label,
  .wws-wine .wws-wine__group--linxas .wws-wine__shop > a:not(:has(.wws-wine__price, .wws-wine__stock)) .wws-wine__label {
    flex: 1 1 0%;
  }
}
