@charset "UTF-8";
/* ==========================================================================
   認定商品の詳細（single-item.php・template-parts/item/）
   - PC：左に写真と本文、右に商品の情報。右はスクロールについてきて、本文の終わりで止まる（position: sticky）
   - タブレット・スマホ：1列。ボタンは画面の下に固定し、本文の下にもう一度出す商品の情報（.itemRepeat）の下で止まる
   - 本文（見出し・写真・文章）の基本の見た目は entry.css。ここでは商品ページ用に変えるところだけ
   ========================================================================== */

.itemSingle {
  --itemSide: 15px; /* スマホの左右の余白 */
  padding: 101.3px 0 126px;
}
@media (max-width: 1024px) {
  .itemSingle {
    padding: 64.5px 0 93.5px;
  }
}

/* 写真＋本文（左）と商品の情報（右）
   -------------------------------------------------------------------------- */
.itemDetail {
  display: grid;
  grid-template-columns: 480px 1fr;
  column-gap: 48.88px;
  align-items: start;
  width: min(var(--innerWidth), 100% - var(--sidePadding) * 2);
  margin-inline: auto;
}
.itemDetail > .itemPhoto {
  grid-area: 1 / 1;
}
.itemSide {
  grid-area: 1 / 2 / 3 / 3;
  position: sticky;
  /* 画面より高いときは assets/js/item.js が --itemSideTop をマイナスにして、下の端まで見えるようにします */
  top: var(--itemSideTop, calc(var(--headerHeight) + var(--wp-admin--admin-bar--height, 0px) + 40px));
}
.itemBody {
  grid-area: 2 / 1;
  margin-top: 74.3px;
}
.itemRepeat,
.itemDetail > .itemBar {
  display: none;
}
@media (max-width: 1024px) {
  .itemDetail {
    display: block;
    width: min(600px, 100% - var(--sidePadding) * 2);
  }
  .itemSide {
    position: static;
  }
  .itemSide .itemBtns {
    display: none;
  }
  .itemBody {
    margin-top: 55px;
  }
  .itemRepeat {
    display: block;
    margin-top: 59.1px;
  }
  .itemDetail > .itemBar {
    display: flex;
  }
}
@media (max-width: 560px) {
  .itemDetail {
    width: calc(100% - var(--itemSide) * 2);
  }
}

/* 商品の写真（正方形） */
.itemPhoto {
  position: relative;
  aspect-ratio: 1;
  background: var(--bgColor);
}
.itemPhoto:empty {
  display: none;
}
.itemPhoto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* 写真のキャプション：写真の右下の外に小さく（下の余白に重ねるので、本文の位置は変わらない） */
.itemPhotoCaption {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  font-size: 14px;
  line-height: 21px;
}

/* 事業者名・商品名・価格・説明・印
   -------------------------------------------------------------------------- */
.itemMaker {
  margin-top: -3.8px;
  font-size: 15px;
  line-height: 22.5px;
  letter-spacing: .03em;
}
.itemName {
  margin-top: 11.4px;
  font-size: 22px;
  font-weight: 400;
  line-height: 33px;
  letter-spacing: .11em;
  word-break: auto-phrase;
}
.itemName:first-child {
  margin-top: 0;
}
/* ふりがながあるときは、その分だけ上をあける */
.itemName:has(ruby) {
  margin-top: 20.7px;
}
/* ふりがな（文字の上に、左右いっぱいに広げて） */
.itemName ruby {
  ruby-align: space-between;
}
.itemName rt {
  font-size: 10px;
  line-height: 1;
  letter-spacing: .05em;
  position: relative;
  top: -2.6px;
}
.itemSub {
  margin-top: -.5px;
  font-size: 18px;
  line-height: 27px;
  letter-spacing: .1em;
}
/* 価格が何行かあるときの行の間はデザインどおり24px（1行のときの上下の位置は、行の高さ32pxのときと同じ） */
.itemPrices {
  margin-top: 11.5px;
  font-size: 18px;
  line-height: 24px;
  letter-spacing: .12em;
}
.itemSub + .itemPrices {
  margin-top: 16px;
}
.itemPrices + .itemDesc {
  margin-top: 27.6px;
}
.itemDesc {
  margin-top: 23.6px;
  font-size: 14px;
  line-height: 25px;
}
.itemTags {
  display: flex;
  flex-wrap: wrap;
  gap: 7.85px;
  margin-top: 9.8px;
}
.itemTags li {
  min-width: 71.86px;
  padding: 0 5px;
  border: 1px solid var(--fontColor);
  border-radius: 2px;
  box-sizing: border-box;
  font-size: 10px;
  font-weight: 500;
  line-height: 17.35px;
  text-align: center;
}
.itemPrices + .itemTags {
  margin-top: 21.4px;
}
/* ギフトの注意書き（印の下の小さい文字） */
.itemGiftNote {
  margin-top: 8px;
  font-size: 12px;
  line-height: 18px;
}
@media (max-width: 1024px) {
  .itemSide,
  .itemRepeat .itemSummary {
    margin-top: 23.4px;
  }
  .itemMaker {
    margin-top: 0;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: .02em;
  }
  .itemName {
    margin-top: 10.2px;
    font-weight: 500;
  }
  .itemName:has(ruby) {
    margin-top: 19.5px;
  }
}

/* ボタン（公式ECで購入・公式サイト）
   -------------------------------------------------------------------------- */
.itemBtns {
  display: flex;
  gap: 8.94px;
  margin-top: 42.45px;
}
.itemBtn {
  width: 181.09px;
  letter-spacing: .05em;
}
/* タブレット・スマホ：画面の下に固定（本文の下の .itemRepeat の下で止まる） */
.itemBar {
  position: sticky;
  bottom: 0;
  z-index: 10;
  justify-content: center;
  gap: 8.05px;
  margin: 22.6px calc(var(--sidePadding) * -1) 0;
  padding: 27.5px var(--sidePadding) calc(27.5px + env(safe-area-inset-bottom));
  /* 上は透明 → 下は白（デザインの書き出しの濃さに合わせています） */
  background: linear-gradient(rgb(255 255 255 / 0), rgb(255 255 255 / .16) 16%, rgb(255 255 255 / .38) 32%, rgb(255 255 255 / .62) 48%, rgb(255 255 255 / .84) 64%, rgb(255 255 255 / .99) 80%, #fff 88%);
  pointer-events: none;
}
.itemBar .itemBtn {
  width: 162.98px;
  height: 45px;
  pointer-events: auto;
}
.itemBar .itemBtn:only-child {
  width: 220px;
}
@media (max-width: 560px) {
  .itemBar {
    margin-inline: calc(var(--itemSide) * -1);
    padding-inline: var(--itemSide);
  }
}

/* SNS
   -------------------------------------------------------------------------- */
.itemSns {
  display: flex;
  flex-wrap: wrap;
  gap: 16.29px;
  margin-top: 48.5px;
}
.itemSns a {
  display: block;
  color: var(--fontColor);
  transition: opacity .3s;
}
.itemSns svg {
  display: block;
  width: 30px;
  height: 30px;
}
@media (hover: hover) {
  .itemSns a:hover {
    opacity: .6;
  }
}
@media (max-width: 1024px) {
  .itemSns {
    margin-top: 23.1px;
  }
}

/* 本文（見出し・写真・文章。ブロックエディターで書いたもの）
   -------------------------------------------------------------------------- */
.itemBody h2 {
  padding-bottom: 0;
  border-bottom: 0;
  font-size: 20px;
  font-weight: 400;
  line-height: 32px;
  letter-spacing: .02em;
}
.itemBody > h2:not(:first-child) {
  margin-top: 71px;
}
/* 行の頭の「（などは半分詰める（デザインどおり） */
.itemBody p {
  text-spacing-trim: trim-start;
}
.itemBody > h2 + * {
  margin-top: 20.4px;
}
/* 写真はデザインの形（480×340）に切り取る（縦長の写真でも並びが崩れないように） */
.itemBody > .wp-block-image:not(.alignleft, .alignright) img {
  width: 100%;
  aspect-ratio: 480 / 340;
  object-fit: cover;
}
.itemBody > :is(figure, .wp-block-image) {
  margin-block: 26.25px 16.4px;
}
.itemBody > h2 + :is(figure, .wp-block-image) {
  margin-top: 20.4px;
}
@media (max-width: 1024px) {
  .itemBody h2 {
    font-weight: 500;
  }
  .itemBody > h2:not(:first-child) {
    margin-top: 46.4px;
  }
  .itemBody > h2 + *,
  .itemBody > h2 + :is(figure, .wp-block-image) {
    margin-top: 14.2px;
  }
  .itemBody > :is(figure, .wp-block-image) {
    margin-bottom: 10.6px;
  }
}

/* 事業者の情報
   -------------------------------------------------------------------------- */
.itemCompany {
  display: grid;
  grid-template-columns: 480px 1fr;
  column-gap: 48.88px;
  align-items: start;
  width: min(var(--innerWidth), 100% - var(--sidePadding) * 2);
  margin: 106.7px auto 0;
}
.itemCompanyImg {
  aspect-ratio: 480 / 340;
  overflow: hidden;
  background: var(--bgColor);
}
.itemCompanyImg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.itemCompanyInfo:only-child {
  grid-column: 1 / -1;
}
.itemCompanyName {
  margin-top: -5.6px;
  font-size: 20px;
  font-weight: 400;
  line-height: 30px;
  letter-spacing: .1em;
}
.itemCompanyBasic {
  margin-top: 17.4px;
  font-size: 16px;
  line-height: 28px;
}
/* デザインでは住所の横の「MAP」が右の端から少しはみ出しているので、その分だけ広げる */
@media (min-width: 1025px) {
  .itemCompanyBasic {
    margin-right: -40px;
  }
}
.itemMap {
  display: inline-flex;
  align-items: center;
  gap: 2.9px;
  margin-left: 2px;
  color: var(--primaryColor);
  font-size: 12px;
  line-height: 1;
  letter-spacing: .1em;
  white-space: nowrap;
}
.itemMap svg {
  width: 9.72px;
  height: 12.96px;
}
@media (hover: hover) {
  .itemMap {
    transition: opacity .3s;
  }
  .itemMap:hover {
    opacity: .6;
  }
}
.itemCompanyNote {
  margin-top: -2px;
  font-size: 12px;
  line-height: 20.5px;
}
.itemCompanyNote + .itemCompanyMore {
  margin-top: 30.3px;
}
.itemCompanyMore {
  display: grid;
  row-gap: 6px;
  margin-top: 29px;
  font-size: 14px;
  line-height: 20px;
}
.itemCompanyMore div {
  display: grid;
  grid-template-columns: 92.88px 1fr;
  column-gap: 11.04px;
  align-items: start;
}
.itemCompanyMore dt {
  margin-top: 1px;
  border-radius: 9.67px;
  background: var(--fontColor);
  color: var(--white);
  padding-bottom: 1.42px;
  font-size: 12px;
  font-weight: 400;
  line-height: 17.91px;
  text-align: center;
}
@media (max-width: 1024px) {
  .itemCompany {
    display: block;
    width: min(600px, 100% - var(--sidePadding) * 2);
    margin-top: 74.9px;
  }
  /* 事業者名はすぐ上の商品の情報にあるので出さない（スマホのデザインどおり） */
  .itemCompanyName {
    display: none;
  }
  .itemCompanyBasic {
    margin-top: 50.4px;
  }
}
@media (max-width: 560px) {
  .itemCompany {
    width: calc(100% - var(--itemSide) * 2);
  }
}

/* おすすめ商品（カードの見た目は common.css の .itemCard）
   -------------------------------------------------------------------------- */
.itemRecommend .inner {
  margin-top: 108.5px;
  padding-top: 96.2px;
  border-top: 1px solid var(--lineColor);
}
.itemRecommendTitle {
  font-family: var(--fontSerif);
  font-size: 26px;
  font-weight: 500;
  line-height: 39px;
  letter-spacing: .1em;
}
.itemRecommend .itemList {
  margin-top: 19px;
}
@media (max-width: 1024px) {
  .itemRecommend .inner {
    width: min(600px, 100% - var(--sidePadding) * 2);
    margin-top: 50.9px;
    padding-top: 39.5px;
  }
  .itemRecommend .itemList {
    margin-top: 14.7px;
  }
}
@media (max-width: 560px) {
  /* スマホは2件（2列×1段） */
  .itemRecommend .itemCard:nth-child(n+3) {
    display: none;
  }
}
