/* 店舗ごとのページ（/stores/<店舗id>）。
   ※ このファイルは site.css より前に読み込む。 */

.sd-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --------------------------- 写真ギャラリー --------------------------- */

.sd-gallery {
  position: relative;
}

/* 大きい写真。指でなぞって送れるよう、横スクロールの入れ物にしている */
.sd-main {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-radius: 12px;
  /* scroll-behavior はここで指定しない（「視差効果を減らす」設定の端末で
     プログラムからのスクロールが効かなくなるため）。JS 側で分岐する。 */
}

.sd-main::-webkit-scrollbar {
  display: none;
}

.sd-cell {
  flex: 0 0 100%;
  scroll-snap-align: start;
  /* 管理画面で拡大して見せる設定にしたとき、はみ出した分をここで切る */
  overflow: hidden;
}

.sd-gallery img,
.sd-fallback img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.sd-fallback img {
  border-radius: 12px;
}

.sd-main .sd-cell img {
  cursor: zoom-in;
}

/* 左右の矢印（指でなぞれない機器のため） */
.sd-arrow {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .sd-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(10, 14, 26, 0.55);
    color: #fff;
    font-family: inherit;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
  }

  .sd-gallery:hover .sd-arrow,
  .sd-arrow:focus-visible {
    opacity: 1;
  }

  .sd-arrow[data-dir="-1"] {
    left: 10px;
  }

  .sd-arrow[data-dir="1"] {
    right: 10px;
  }
}

/* 何枚目かの表示 */
.sd-count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: rgba(10, 14, 26, 0.7);
  color: #fff;
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 20px;
  pointer-events: none;
}

/* サムネイル列（2枚以上のときだけ出る） */
.sd-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.sd-thumbs::-webkit-scrollbar {
  display: none;
}

.sd-thumb {
  flex: 0 0 auto;
  width: 108px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  background: none;
  cursor: pointer;
  overflow: hidden;
  line-height: 0;
  -webkit-appearance: none;
  appearance: none;
}

.sd-thumb img {
  border-radius: 6px;
  opacity: 0.55;
  transition: opacity 0.2s ease;
}

.sd-thumb.is-active {
  border-color: #F5A623;
}

.sd-thumb.is-active img,
.sd-thumb:hover img {
  opacity: 1;
}

/* --------------------------- 全画面表示 --------------------------- */

.sd-lightbox {
  position: fixed;
  inset: 0;
  z-index: 7000;
  background: rgba(0, 0, 0, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 16px;
}

.sd-lightbox img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  border-radius: 6px;
}

.sd-lb-close,
.sd-lb-nav {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}

.sd-lb-close {
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.2rem;
}

.sd-lb-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
}

.sd-lb-nav[data-dir="-1"] {
  left: 14px;
}

.sd-lb-nav[data-dir="1"] {
  right: 14px;
}

.sd-lb-count {
  position: absolute;
  bottom: 18px;
  left: 0;
  right: 0;
  text-align: center;
  color: #ccc;
  font-size: 0.85rem;
}

body.sd-lightbox-open {
  overflow: hidden;
}

/* --------------------------- 紹介文・店舗情報 --------------------------- */

.sd-description {
  font-size: 1rem;
  line-height: 2.1;
  color: #ccc;
  margin: 34px 0 0;
  text-align: justify;
}

.sd-info {
  margin-top: 34px;
}

.sd-info .info-row {
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.sd-info .info-label {
  width: 130px;
}

/* --------------------------- 地図 --------------------------- */

.sd-map {
  margin-top: 34px;
}

.sd-map-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid rgba(245, 166, 35, 0.25);
  border-radius: 12px;
  background: none;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  line-height: 0;
  -webkit-appearance: none;
  appearance: none;
}

.sd-map-btn img {
  display: block;
  width: 100%;
  height: auto;
}

.sd-map-btn .sd-map-hint {
  position: absolute;
  right: 10px;
  top: 10px;
  background: rgba(10, 14, 26, 0.78);
  color: #fff;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.8rem;
  line-height: 1.6;
  padding: 5px 12px;
  border-radius: 20px;
}

.sd-map-credit {
  font-size: 0.72rem;
  color: #777;
  margin: 6px 0 0;
  text-align: right;
}

/* 地図の拡大表示。押されるまで地図は読み込まない */
.sd-map-modal {
  position: fixed;
  inset: 0;
  z-index: 7000;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.sd-map-box {
  width: 100%;
  max-width: 900px;
  background: #0a0e1a;
  border: 1px solid rgba(245, 166, 35, 0.3);
  border-radius: 12px;
  overflow: hidden;
}

.sd-map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
}

.sd-map-head .sd-map-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #F5A623;
}

.sd-map-head button {
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-family: inherit;
  flex: 0 0 auto;
  -webkit-appearance: none;
  appearance: none;
}

.sd-map-modal iframe {
  display: block;
  width: 100%;
  height: min(64vh, 520px);
  border: 0;
}

.sd-map-foot {
  padding: 12px 14px;
  text-align: center;
}

.sd-map-foot a {
  color: #F5A623;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

/* --------------------------- お問い合わせと戻り導線 --------------------------- */

.sd-actions {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

.sd-contact {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 34px;
  border-radius: 8px;
  background: #F5A623;
  color: #0a0e1a;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
}

.sd-contact small {
  font-size: 0.78rem;
  font-weight: 400;
  opacity: 0.75;
}

.sd-back {
  color: #999;
  font-size: 0.88rem;
  text-decoration: none;
}

/* --------------------------- スマートフォン --------------------------- */

@media (max-width: 900px) {
  .sd-wrap {
    padding: 0 15px;
  }

  .sd-description {
    font-size: 0.95rem;
    line-height: 2;
    text-align: left;
  }

  .sd-info .info-label {
    width: 96px;
  }

  .sd-thumb {
    width: 88px;
  }

  .sd-lightbox {
    padding: 56px 8px;
  }
}
