/* 매장 페이지 /restaurant/<slug>/ 전용 (2026-10-15 '매장 + 유튜브 영상' 개편, 시안 automation/matzip_map_mockup/store_page).
   색·모서리 = 지도 메인(map.css, Airbnb UI Kit)과 같은 계열. 공통 css/styles.css 는 고치지 않고 이 파일에서 덮어쓴다
   (공통 파일을 바꾸면 ?v= 해시로 전 페이지가 바뀐다). 이 파일을 고치면 매장 페이지 전체가 바뀌므로 유지보수 배포로 다룬다. */
.sp {
  --sp-pink: #FF385C;
  --sp-grad: linear-gradient(110deg, #D33753, #C72D65);
  --sp-ink: #222222;
  --sp-muted: #717171;
  --sp-line: #E8E8E8;
  --sp-soft: #F7F7F7;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 16px 32px;
  color: var(--sp-ink);
  font-family: 'Pretendard Variable', Pretendard, 'Noto Sans KR', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.sp h1, .sp h2, .sp p { margin: 0; }
.sp a { color: inherit; }
.sp a:hover { text-decoration: none; }
.sp button { font: inherit; color: inherit; }
.sp a:focus-visible, .sp button:focus-visible { outline: 3px solid #99234A; outline-offset: 3px; }

/* 상단 버튼 */
.sp-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.sp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 10px 16px;
  border: 1px solid #DDDDDD; border-radius: 9px; background: #FFFFFF;
  font-size: 13px; font-weight: 650; line-height: 1.3; text-align: center; color: var(--sp-ink);
  cursor: pointer; text-decoration: none;
}
.sp-btn:hover { filter: brightness(0.97); }
.sp-btn--primary, .sp a.sp-btn--primary { background: var(--sp-grad); border-color: transparent; color: #FFFFFF; }
.sp-btn[hidden] { display: none; }
.sp-share { margin: -4px 0 16px; padding: 12px 14px; border: 1px solid #DDDDDD; border-radius: 10px; background: #FFFFFF; font-size: 13px; }
.sp-share input { display: block; width: 100%; margin-top: 8px; padding: 10px; border: 1px solid #DDDDDD; border-radius: 6px; font: inherit; font-size: 12px; }
.sp-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1000;
  max-width: calc(100vw - 32px); padding: 12px 20px; border-radius: 12px;
  background: #222222; color: #FFFFFF; font-size: 13px; box-shadow: 0 3px 20px rgba(0, 0, 0, 0.2);
}
.sp-toast:empty { display: none; }

/* 위치 줄 */
.sp-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 14px; font-size: 12px; color: var(--sp-muted); }
.sp-crumb a { color: var(--sp-muted); text-decoration: underline; text-underline-offset: 2px; }
.sp-tag { display: inline-block; padding: 2px 8px; border-radius: 5px; background: #FFF0F3; color: #A6294F; font-size: 11px; font-weight: 700; }

/* 배치: 모바일 = 영상 → 매장 정보 → 나머지, 데스크톱 = 왼쪽 본문 + 오른쪽 350px 고정 */
.sp-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.sp-media, .sp-below, .sp-aside { min-width: 0; }
@media (min-width: 1024px) {
  .sp { padding: 28px 40px 40px; }
  .sp-layout {
    grid-template-columns: minmax(0, 1fr) 350px;
    grid-template-areas: "media aside" "below aside";
    column-gap: 32px; row-gap: 32px; align-items: start;
  }
  .sp-media { grid-area: media; }
  .sp-below { grid-area: below; }
  .sp-aside { grid-area: aside; position: sticky; top: 16px; }
}

/* 플레이어: 썸네일 + 재생 버튼 → 누르면 iframe. 일반 16:9, 우리 쇼츠는 세로 비율 유지 */
.sp-player {
  position: relative; width: 100%; aspect-ratio: 16 / 9; min-height: 200px;
  border-radius: 16px; overflow: hidden; background: #111111;
}
.sp-player.is-short { aspect-ratio: auto; height: min(72vh, 620px); min-height: 380px; }
.sp-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.sp-poster { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: #111111; cursor: pointer; display: block; }
.sp-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 쇼츠: 가운데 9:16 칸 (썸네일 hqdefault 는 세로 화면 양옆을 검게 채운 4:3 이라 cover 로 가운데만 보인다) */
.sp-player.is-short .sp-poster, .sp-player.is-short iframe { left: 50%; right: auto; width: auto; height: 100%; aspect-ratio: 9 / 16; max-width: 100%; transform: translateX(-50%); }
.sp-poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.35)); pointer-events: none; }
.sp-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1; filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3)); line-height: 0; }
.sp-poster:hover .sp-play { transform: translate(-50%, -50%) scale(1.06); }

.sp .sp-vtitle { margin: 18px 0 10px; font-size: 22px; line-height: 1.4; letter-spacing: -0.5px; font-weight: 750; }
.sp-vmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: #666666; font-size: 13px; }
.sp-vmeta b { color: var(--sp-ink); }
.sp-avatar { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #EEEEEE; color: #555555; font-weight: 700; font-size: 12px; }
.sp-adtag { padding: 1px 7px; border-radius: 6px; background: #FFF0F3; color: #A6294F; font-size: 12px; font-weight: 700; }
.sp-adtag[hidden], .sp-vstats[hidden] { display: none; }
.sp-vstats { margin-top: 8px; color: var(--sp-muted); font-size: 12px; }
.sp-context { margin-top: 18px; padding: 16px; border: 1px solid var(--sp-line); border-radius: 12px; background: #FFFFFF; font-size: 14px; }
.sp .sp-context p { margin-top: 5px; color: #666666; }
.sp-features { margin: 6px 0 0; padding-left: 18px; color: #555555; }

/* 대표 사진(영상 없는 매장) — app.js 캐러셀 마크업 그대로, 크기만 이 페이지에 맞춤 */
.sp .detail-hero { height: auto; aspect-ratio: 16 / 9; min-height: 220px; border-radius: 16px; }
.sp .photo-credit { padding: 6px 2px 0; font-size: 11px; }
.sp-nophoto {
  display: grid; place-content: center; gap: 4px; text-align: center;
  aspect-ratio: 16 / 9; min-height: 200px; border-radius: 16px; background: #EBEBEB; color: #777777; padding: 24px;
}
.sp-nophoto b { font-size: 16px; font-weight: 600; color: #666666; }
.sp-nophoto small { font-size: 12px; }

/* 영상 목록 */
.sp-section { margin-top: 28px; }
.sp-media > .sp-section:first-child, .sp-below > .sp-section:first-child { margin-top: 0; }
.sp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.sp-head h2 { font-size: 20px; line-height: 1.4; letter-spacing: -0.4px; font-weight: 750; }
.sp-muted { color: var(--sp-muted); font-size: 12px; text-align: right; }
.sp-more { flex: none; font-size: 13px; font-weight: 650; color: #A6294F !important; text-decoration: underline; text-underline-offset: 2px; }
.sp-videos { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sp-vopt {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 10px;
  border: 1px solid var(--sp-line); border-radius: 12px; background: #FFFFFF; text-align: left; cursor: pointer;
}
.sp-vopt[aria-pressed="true"] { border-color: #D13660; background: #FFF5F7; }
.sp-vthumb { flex: none; width: 96px; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: #E1E1E1; }
.sp-vthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sp-vtext { min-width: 0; }
.sp-vtext b { display: block; font-size: 14px; line-height: 1.4; }
.sp-vtext small { display: block; margin-top: 2px; color: #777777; font-size: 12px; }

/* 매장 정보 카드 */
.sp-info { padding: 22px; border: 1px solid #EEEEEE; border-radius: 18px; background: #FFFFFF; box-shadow: 0 6px 22px rgba(0, 0, 0, 0.04); }
.sp-info__label { font-size: 14px; font-weight: 700; margin-bottom: 10px !important; }
.sp-info__label::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--sp-pink); vertical-align: 2px; }
.sp-name { font-size: 24px; line-height: 1.35; letter-spacing: -0.6px; font-weight: 750; }
.sp-name-alt { margin-top: 4px !important; color: var(--sp-muted); font-size: 12px; }
.sp-cat { margin-top: 4px !important; color: #777777; font-size: 13px; }
.sp-featured { margin-top: 12px; padding: 12px 0 14px; border-top: 1px solid var(--sp-line); border-bottom: 1px solid var(--sp-line); }
.sp-featured small { display: block; color: var(--sp-muted); font-size: 12px; }
.sp-featured strong { font-size: 15px; }
.sp-facts { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px 10px; margin: 16px 0 18px; font-size: 13px; }
.sp-facts dt { color: #777777; }
.sp-facts dd { margin: 0; }
.sp-facts dd small { display: block; margin-top: 2px; color: #777777; font-size: 12px; }
.sp-facts dd a { text-decoration: underline; text-underline-offset: 2px; }
.sp-unknown { color: #999999; }
.sp-info__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sp-info__btns.is-odd > :last-child { grid-column: 1 / -1; }
.sp-info__btns .sp-btn { padding: 10px 6px; font-size: 13px; }
.sp .store-map { margin: 14px 0 0; padding: 0; border-radius: 10px; overflow: hidden; }
.sp .store-map__canvas, .sp .store-map__fallback { height: 170px; }
.sp .store-map__naver { min-height: 44px; display: inline-flex; align-items: center; }
.sp-note { margin-top: 10px !important; color: #888888; font-size: 11px; }
.sp-ad { margin-top: 20px; }

/* 메뉴·사진·다른 매장·Q&A·같은 조건 (공통 마크업에 이 페이지 간격만) */
.sp .menu-table { border: 1px solid var(--sp-line); border-radius: 12px; background: #FFFFFF; }
.sp .menu-row { padding: 12px 16px; border-bottom: 1px solid var(--sp-line); font-size: 14px; line-height: 1.5; }
.sp .menu-row:last-child { border-bottom: 0; }
.sp .menu-note a, .sp-note a { color: #A6294F; text-decoration: underline; }
.sp-others { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 8px; }
.sp-others a {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--sp-line); border-radius: 10px; background: #FFFFFF; font-size: 14px; font-weight: 600; text-decoration: none;
}
.sp-others a:hover { border-color: #D13660; }
.sp-rank { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #F3F3F3; font-size: 11px; font-weight: 700; }
.sp .qa-card { margin: 28px 0 0; }
.sp .related-list { margin-top: 4px; }
.sp .related-item { color: var(--sp-ink); }
@media (min-width: 640px) {
  .sp-others { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 479px) {
  .sp-actions .sp-btn { padding: 9px 11px; font-size: 12px; }
  .sp .sp-vtitle { font-size: 20px; }
  .sp-vthumb { width: 76px; }
  .sp-player.is-short { min-height: 380px; height: 70vh; }
  .sp-head h2 { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { .sp * { transition: none !important; } }
