﻿/* =====================================================
   オンラインショップモーダル
   ===================================================== */

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

.modal {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  color: #333;
  line-height: 1.6;
}

.modal img {
  max-width: 100%;
  height: auto;
  vertical-align: bottom;
}

.modal a {
  color: inherit;
  text-decoration: none;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.is-open {
  display: flex;
}

.modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  cursor: pointer;
}

.modal__content {
  position: relative;
  background: #fff;
  padding: 40px;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  z-index: 1;
}

.modal__close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 30px;
  height: 30px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
  transition: color 0.3s;
}

.modal__close:hover {
  color: #333;
}

.modal__title {
  text-align: center;
  font-size: 20px;
  font-weight: 500;
  margin: 0 0 30px;
}

.modal__shop-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.modal__shop-list li a {
  display: block;
  padding: 12px 20px;
  background: #f5f5f5;
  border-radius: 4px;
  text-align: center;
  font-size: 14px;
  transition: background 0.3s;
}

.modal__shop-list li a:hover {
  background: #eaeaea;
}

.modal__shop-list li a img {
  display: block;
  width: 100%;
  height: auto;
}

.modal__shop-list .sp_only {
  display: none;
}

.modal__note {
  text-align: center;
  font-size: 12px;
  color: #666;
  margin: 0;
}

/* モーダル表示中はページをスクロールさせない */
body.is-modal-open {
  overflow: hidden;
}

/* SP */
@media (max-width: 768px) {

  .modal__shop-list {
    grid-template-columns: 1fr;
  }

  .modal__shop-list .pc_only {
    display: none;
  }

  .modal__shop-list .sp_only {
    display: block;
  }

}