/* 商品詳細ページ */
.breadcrumb { font-size: 14px; color: var(--muted); padding: 16px 0 0; }
.breadcrumb a { color: var(--muted); }

.pd { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; padding: 24px 0 64px; align-items: start; }
@media (max-width: 900px) { .pd { grid-template-columns: 1fr; gap: 24px; padding-bottom: 120px; } }

.gallery { position: sticky; top: 88px; }
@media (max-width: 900px) { .gallery { position: static; } }
.gallery-main { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; aspect-ratio: 1; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-note { font-size: 13px; color: var(--muted); margin-top: 8px; text-align: center; }

.pd-title { font-size: clamp(24px, 3vw, 30px); margin-bottom: 12px; }
.pd-price { font-size: 32px; font-weight: 700; }
.pd-price small { font-size: 15px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.pd-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 8px 0 24px; font-size: 16px; }
.pd-meta .ok { color: var(--ok); font-weight: 700; }

.opt { border: none; padding: 0; margin: 0 0 28px; }
.opt legend, .opt-title { font-weight: 700; font-size: 18px; margin-bottom: 10px; padding: 0; }
.opt-title .step { display: inline-grid; padding: 0; border: 0; flex: none; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 15px; margin-right: 8px; }

.swatches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.swatch label { word-break: keep-all; overflow-wrap: normal; letter-spacing: 0; }
@media (max-width: 420px) { .swatches .swatch label { font-size: 14px; padding: 12px 2px; } }
.swatch { position: relative; }
.swatch input { position: absolute; opacity: 0; inset: 0; }
.swatch label {
  display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer;
  border: 2px solid var(--line); border-radius: 12px; padding: 12px 6px; background: var(--surface);
  font-size: 15px; text-align: center; line-height: 1.4;
}
.swatch .dot { width: 30px; height: 30px; }
.swatch input:checked + label { border-color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.swatch input:focus-visible + label { outline: 3px solid var(--accent); outline-offset: 2px; }

.upload {
  display: grid; grid-template-columns: 200px 1fr; gap: 20px; align-items: center;
  background: var(--surface); border: 2px dashed var(--line); border-radius: var(--radius); padding: 20px;
}
@media (max-width: 520px) { .upload { grid-template-columns: 1fr; justify-items: center; text-align: center; } }
.lens {
  position: relative; width: 180px; height: 180px; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 40% 35%, #555a63, #16171b); border: 6px solid #E2C08A;
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.25), 0 4px 14px rgba(0,0,0,.15);
  touch-action: none; cursor: grab;
}
.lens.silver { border-color: #C9CBCD; }
.lens.rose { border-color: #DDA084; }
.lens img { position: absolute; left: 50%; top: 50%; max-width: none; transform-origin: center; user-select: none; -webkit-user-drag: none; }
.lens .ph { position: absolute; inset: 0; display: grid; place-items: center; color: #D8D3CD; font-size: 14px; text-align: center; padding: 20px; line-height: 1.5; }
.upload-side { display: grid; gap: 12px; width: 100%; }
.upload-side .btn { width: 100%; }
.zoom { display: none; gap: 8px; align-items: center; font-size: 15px; }
.zoom.show { display: flex; }
.zoom input { flex: 1; accent-color: var(--accent); height: 32px; }
.upload-help { font-size: 14px; color: var(--muted); margin: 0; }

.tips { background: var(--soft); border-radius: 12px; padding: 16px 20px; margin-top: 12px; font-size: 16px; }
.tips strong { display: block; margin-bottom: 4px; }
.tips ul { margin: 0; padding-left: 1.3em; }

.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; margin: 8px 0 20px; cursor: pointer; }
.consent input { width: 24px; height: 24px; margin-top: 4px; flex: none; accent-color: var(--accent); }

.buy-note { font-size: 14px; color: var(--muted); text-align: center; margin-top: 10px; }
.check-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 6px; font-size: 16px; }
.check-list li { position: relative; padding-left: 1.6em; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }

.pd-info { border-top: 1px solid var(--line); padding: 48px 0 72px; }
.pd-info .wrap { max-width: 820px; margin: 0 auto; }
.pd-info h2 { font-size: 24px; margin: 40px 0 16px; }
.pd-info h2:first-child { margin-top: 0; }
.spec { width: 100%; border-collapse: collapse; background: var(--surface); }
.spec th, .spec td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; }
.spec th { width: 34%; background: var(--soft); }
@media (max-width: 520px) { .spec th { width: 7.2em; padding: 12px 10px; font-size: 15px; } .spec td { padding: 12px 12px; } }
.howto { margin: 0 0 1em; padding-left: 1.6em; }
.howto li { margin-bottom: 6px; }

/* スマホ：画面下に固定の購入ボタン */
.sticky-buy {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: rgba(255,255,255,.97); border-top: 1px solid var(--line);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  align-items: center; gap: 12px;
}
.sticky-buy .p { font-weight: 700; font-size: 20px; white-space: nowrap; }
.sticky-buy .p small { display: block; font-size: 12px; font-weight: 400; color: var(--ok); }
.sticky-buy .btn { flex: 1; min-height: 52px; padding: 12px 16px; font-size: 17px; }
@media (max-width: 900px) { .sticky-buy { display: flex; } }


/* 値段まわり（シンプルに） */
.gallery-main { position: relative; }
.pd-price { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
.pd-price .price-now { font-size: 44px; }
.pd-price .price-was { font-size: 22px; }
.pd-sub { font-size: 15px; margin: 4px 0 10px; }
.sticky-buy .p .price-now { font-size: 24px; }
.sticky-buy .p .price-was { font-size: 14px; margin-left: 6px; }
.sticky-buy .p small { color: var(--navy); font-weight: 600; letter-spacing: .06em; }  /* 税込・送料無料はアクセント色（オリーブ） */

/* 商品画像のスライド */
.gallery-main { position: relative; background: #F6F0EA; }
.g-track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.g-track::-webkit-scrollbar { display: none; }
.g-track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: center; }
.g-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.85); color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer; display: grid; place-items: center; box-shadow: 0 1px 6px rgba(0,0,0,.08); }
.g-nav.prev { left: 10px; } .g-nav.next { right: 10px; }
@media (hover: none) { .g-nav { display: none; } }  /* スマホは指でスワイプ */
.g-dots { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.g-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); transition: background .2s, transform .2s; }
.g-dots i.on { background: var(--accent); transform: scale(1.15); }
.gallery-main .off { transition: opacity .3s; }
.gallery-main .off.hide { opacity: 0; pointer-events: none; }
.gallery-note { margin-top: 4px; }

/* 支払い画面へ移るまでの待ち画面 */
.sending { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: rgba(241, 232, 218, .88); backdrop-filter: blur(4px); padding: 24px; }
.sending[hidden] { display: none; }
.sending-box { text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; max-width: 320px; box-shadow: var(--shadow); }
.sending-box p { margin: 14px 0 6px; font-size: 17px; }
.sending-box small { color: var(--muted); font-size: 13px; }
.sending-spin { display: inline-block; width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
