@charset "UTF-8";

/* ==================================================
   購入制限について
================================================== */
.goods-limit {
  padding: 20px 0 0;
}

/* リード文（14px）より小さく */
.goods-limit__body {
  font-size: 13px;
  text-align: left;

  & .note-list {
    font-size: 12px;
  }
}

.goods-limit__list {
  margin: 10px 0 12px;
}

.goods-limit__row {
  display: grid;
  grid-template-columns: 7.5em 1fr;
  gap: 4px 12px;
  padding: 8px 4px;

  & + & {
    border-top: 1px solid #ccc;
  }

  & dt {
    font-weight: 700;
    color: var(--color-navy);
  }

  @media (max-width: 400px) {
    grid-template-columns: 1fr;
  }
}

.goods-limit__small {
  font-size: 11px;
}

.goods-limit__btn {
  margin-top: 28px;
}

/* ==================================================
   グッズ一覧
================================================== */
.goods-list {
  padding: 70px 0 0;
}

.goods-list__items {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 20px;

  /* 1カラム：カードは最大350pxで左右中央 */
  @media (max-width: 500px) {
    grid-template-columns: minmax(0, 350px);
    justify-content: center;
    gap: 24px;
  }
}

.goods-list__note {
  margin-top: 24px;
}

/* ----- 商品カード ----- */
.goods-item {
  display: flex;
  flex-direction: column;
  border: 2px solid var(--color-cyan);
  border-radius: 10px;
  background-color: #fff;
  box-shadow: 3px 3px 0 var(--color-teal);
  overflow: hidden;
}

.goods-item.wip {
  display:none;
}
.goods-item__img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: #fff;
  overflow: hidden;
  cursor: zoom-in;

  & img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: scale .4s;
  }

  &:hover img {
    scale: 1.05;
  }
}

.goods-item__body {
  padding: 12px 10px 16px;
}

.goods-item__name {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

.goods-item__price {
  margin-top: 4px;
  color: var(--color-navy);
  font-size: 16px;
  font-weight: 700;
}

.goods-item__tax {
  margin-left: 2px;
  font-size: 12px;
  font-weight: 400;
}

.goods-item__spec {
  margin-top: 4px;
  font-size: 13px;
  display: none;
}

/* 種類の選択 */
.goods-item__select {
  margin-top: 8px;

  & select {
    width: 100%;
    padding: 6px 30px 6px 10px;
    border: 1px solid #87c7ea;
    border-radius: 0;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' fill='none' stroke='%23086bb5' stroke-width='1.5'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E") right 10px center / 10px 6px no-repeat;
    color: var(--color-text);
    font: inherit;
    font-size: 13px;
    line-height: 1.5;
    cursor: pointer;
    appearance: none;
  }
}
.goods-item__select.hidden {
  display: none;
}
.goods-item__tag {
  display: inline-block;
  margin-top: 8px;
  padding: 0 10px 2px;
  border-radius: 5px;
  background-color: var(--color-pink);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.8;
}

.goods-item__note {
  margin-top: 8px;
  font-size: 12px;
}

/* ==================================================
   グッズ購入についての注意事項
================================================== */
.goods-notice {
  padding: 70px 0 0;
}

.goods-notice__box {
  padding: 20px 18px;
  border: 2px solid var(--color-cyan);
  border-radius: 10px;
  font-size: 12px; /* リード文（14px）より小さく */
  line-height: 1.7;
}

.goods-notice__sub {
  margin-top: 6px;
  font-size: 11px;
}

/* 注意事項内のリンク（公式Xなど） */
.goods-notice__link {
  color: var(--color-blue);
  text-underline-offset: 3px;

  &:hover {
    text-decoration: none;
  }
}

/* ==================================================
   グッズ詳細モーダル（dialog 要素）
================================================== */
/* モーダル表示中は背面をスクロールさせない */
body.is-modal-open {
  overflow: hidden;
}

.goods-modal {
  width: min(480px, calc(100% - 40px));
  max-width: none;
  max-height: calc(100dvh - 40px);
  padding: 0;
  border: none;
  background: none;
  overflow: visible;

  &::backdrop {
    background-color: rgba(8, 40, 80, .6);
  }

  /* 開くときにふわっと表示 */
  &[open] {
    animation: goods-modal-in .4s cubic-bezier(.22, 1, .36, 1);

    @media (prefers-reduced-motion: reduce) {
      animation: none;
    }
  }
}

@keyframes goods-modal-in {
  from {
    opacity: 0;
    translate: 0 16px;
  }
}

.goods-modal__inner {
  position: relative;
  max-height: calc(100dvh - 40px);
  padding: 24px 24px 28px;
  border: 3px solid #87c7ea;
  background-color: #fff;
  box-shadow: 4px 4px 0 #2aa6e0;
  overflow-y: auto;

  @media (max-width: 400px) {
    padding: 20px 16px 22px;
  }
}

/* 閉じるボタン（×） */
.goods-modal__close {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  width: 44px;
  height: 44px;
  background-color: #086bb5;
  transition: background-color .3s;

  &::before,
  &::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 2px;
    margin: -1px 0 0 -10px;
    background-color: #fff;
    rotate: 45deg;
  }

  &::after {
    rotate: -45deg;
  }

  &:hover {
    background-color: var(--color-blue);
  }
}

.goods-modal__img {
  position: relative;
  aspect-ratio: 1 / 1;
  background-color: #fff;

  & img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity .15s;

    &.is-fade {
      opacity: 0;
    }
  }
}

/* 種類切り替えの矢印 */
.goods-modal__arrow {
  position: absolute;
  top: 50%;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  background-color: rgba(8, 107, 181, .85);
  transition: background-color .3s;

  &::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10px;
    height: 10px;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
  }

  &:hover {
    background-color: var(--color-blue);
  }
}

.goods-modal__arrow--prev {
  left: 0;

  &::before {
    translate: -30% -50%;
    rotate: -135deg;
  }
}

.goods-modal__arrow--next {
  right: 0;

  &::before {
    translate: -70% -50%;
    rotate: 45deg;
  }
}

.goods-modal__variation {
  margin-top: 10px;
  color: #086bb5;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  transition: opacity .15s;

  &.is-fade {
    opacity: 0;
  }
}

.goods-modal__body {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dotted #87c7ea;
}

.goods-modal__name {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
}

.goods-modal__price {
  margin-top: 4px;
  color: var(--color-navy);
  font-size: 18px;
  font-weight: 700;

  & .goods-item__tax {
    font-size: 13px;
  }
}

.goods-modal__spec {
  margin-top: 4px;
  font-size: 14px;
}

.goods-modal__tag {
  display: inline-block;
  margin-top: 8px;
  padding: 0 10px 2px;
  background-color: var(--color-pink);
  border-radius: 5px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.8;

  &[hidden] {
    display: none;
  }
}

.goods-modal__note {
  margin-top: 10px;
  font-size: 12px;
}
