/* ============================================================
   style-order.css
   ============================================================ */

.order-wrap { max-width: 860px; margin: 0 auto; }
.order-narrow { max-width: 680px; margin: 0 auto; }

/* ---------- 価格・期間の目安（表） ---------- */
.order-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.order-table th, .order-table td { padding: .9rem .6rem; text-align: left; border-bottom: 1px solid var(--border); }
.order-table thead th { font-size: 11px; letter-spacing: .15em; color: var(--muted); font-weight: 500; }
.order-table tbody th { font-weight: 500; color: var(--ink); }
.order-table td { color: var(--ink-mid); white-space: nowrap; }
.order-note { margin-top: 1.1rem; font-size: 12px; line-height: 1.9; color: var(--muted); }
.table-scroll { overflow-x: auto; }

/* ---------- よくある質問 ---------- */
.order-faq details { border-bottom: 1px solid var(--border); }
.order-faq details:first-child { border-top: 1px solid var(--border); }
.order-faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem .2rem; font-size: 13.5px; color: var(--ink); letter-spacing: .04em;
}
.order-faq summary::-webkit-details-marker { display: none; }
.order-faq summary::after {
  content: '+'; flex-shrink: 0; width: 22px; height: 22px; line-height: 20px; text-align: center;
  border: 1px solid var(--border); border-radius: 50%; color: var(--muted); font-size: 14px;
  transition: transform .2s ease;
}
.order-faq details[open] summary::after { content: '\2212'; }
.order-faq details p { padding: 0 .2rem 1.2rem; font-size: 12.5px; line-height: 2; color: var(--ink-mid); }

/* ---------- 選択肢 ---------- */
.choice-group { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.choice-title { display: block; margin-bottom: .6rem; font-size: 11px; letter-spacing: .12em; color: var(--ink-mid); }
.choice-title .req { color: var(--rust); }
.choice { position: relative; display: inline-block; }
.choice input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.choice span {
  display: inline-block; padding: .5rem 1.05rem;
  font-size: 12.5px; letter-spacing: .04em;
  color: var(--ink-mid); background: transparent;
  border: 1px solid var(--border); border-radius: 999px;
  transition: background .2s, color .2s, border-color .2s;
}
.choice:hover span { border-color: var(--ink-mid); }
.choice input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.choice input:focus-visible + span { outline: 2px solid var(--rust); outline-offset: 2px; }

.choice .dot {  
  display: inline-block; width: 12px; height: 12px; margin-right: .5rem;
  border-radius: 50%; vertical-align: -1px;
  background: var(--dot, transparent);
  border: 1px solid rgba(0,0,0,.25);
}
.order-form { max-width: 680px; }
.order-form .form-field select {
  font-family: inherit; font-size: 13px;
  color: var(--ink); background: var(--cream-dark);
  border: 1px solid var(--border); border-radius: 6px;
  padding: .65rem .8rem;
}
.order-form .form-field select:focus { outline: none; border-color: var(--rust); }
.order-form .form-field textarea { min-height: 9rem; }
.field-hint { font-size: 11px; line-height: 1.8; color: var(--muted); }

.consent { display: flex; align-items: flex-start; gap: .6rem; font-size: 12px; line-height: 1.8; color: var(--ink-mid); cursor: pointer; }
.consent input { margin-top: .35rem; flex-shrink: 0; accent-color: var(--rust); }

.order-cta { text-align: center; margin-top: 2.5rem; }
.field-invalid { border-color: var(--rust) !important; }

@media (max-width: 768px) {
  .order-table th, .order-table td { padding: .75rem .4rem; font-size: 12px; }
}

/* ---------- 写真つきの選択カード ---------- */
.card-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem; }
.choice-card { position: relative; display: block; cursor: pointer; }
.choice-card input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.choice-card .thumb {
  position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden;
  background: var(--cream-dark); border: 1px solid var(--border); border-radius: 8px;
  transition: border-color .2s, transform .2s;
}
.choice-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.choice-card:hover .thumb { border-color: var(--ink-mid); transform: translateY(-2px); }
.choice-card input:checked ~ .thumb { outline: 3px solid var(--ink); outline-offset: 2px; border-color: transparent; }
.choice-card input:focus-visible ~ .thumb { outline: 3px solid var(--rust); outline-offset: 2px; }
.choice-card input:checked ~ .thumb::before {  
  content: '\2713'; position: absolute; left: 8px; bottom: 8px; z-index: 2;
  width: 24px; height: 24px; line-height: 24px; text-align: center; font-size: 14px;
  border-radius: 50%; background: var(--ink); color: var(--cream);
}
.choice-card .card-name { display: block; margin-top: .5rem; text-align: center; font-size: 12.5px; letter-spacing: .04em; color: var(--ink-mid); }
.choice-card input:checked ~ .card-name { color: var(--ink); font-weight: 600; }

.zoom-btn {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  width: 30px; height: 30px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; background: rgba(0,0,0,.5);
  border: 1px solid rgba(255,255,255,.7); border-radius: 50%; cursor: zoom-in;
}
.zoom-btn:hover { background: rgba(0,0,0,.75); }

/* 写真がまだないときの代わりの表示 */
.choice-card.no-photo .thumb img, .choice-card.no-photo .zoom-btn { display: none; }
.choice-card.no-photo .thumb {
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: repeating-linear-gradient(45deg, transparent 0 9px, rgba(128,128,128,.10) 9px 18px), var(--cream-dark);
}
.choice-card.no-photo .thumb::after { content: '見本写真\A準備中'; white-space: pre; font-size: 11px; line-height: 1.7; letter-spacing: .08em; color: var(--muted); }

/* ---------- 見本写真の拡大 ---------- */
.sample-dialog {
  max-width: min(92vw, 720px); padding: 1rem 1rem .8rem;
  background: var(--cream); color: var(--ink);
  border: 1px solid var(--border); border-radius: 10px;
  text-align: center;
}
.sample-dialog::backdrop { background: rgba(10,8,6,.72); }
.sample-dialog img { display: block; max-width: 100%; max-height: 74vh; margin: 0 auto; border-radius: 4px; }
.sample-dialog p { margin-top: .7rem; font-size: 13px; letter-spacing: .08em; }
.sample-close {
  position: absolute; top: 6px; right: 8px; z-index: 2;
  width: 32px; height: 32px; font-size: 22px; line-height: 1;
  color: var(--ink); background: transparent; border: none; cursor: pointer;
}

@media (max-width: 768px) {
  .card-choices { grid-template-columns: repeat(2, 1fr); gap: .8rem; }
}

/* ---------- 文字だけのカード ---------- */
.choice-card.text-only .thumb {
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: var(--cream-dark);
}
.choice-card.text-only .thumb::after { content: attr(data-label); white-space: pre; font-size: 12px; line-height: 1.7; letter-spacing: .08em; color: var(--muted); }

/* ---------- ページ上部 ---------- */
.order-hero { min-height: 440px; }
@media (max-width: 768px) { .order-hero { min-height: 0; } }

/* ---------- 写真カードの価格表示 ---------- */
.choice-card .card-price { display: block; text-align: center; margin-top: .15rem; font-size: 12px; letter-spacing: .06em; color: var(--muted); }
.choice-card input:checked ~ .card-price { color: var(--ink); font-weight: 600; }

/* ---------- 納期・お支払い方法 ---------- */
.order-info { margin-top: 1.8rem; border-top: 1px solid var(--border); }
.order-info > div { display: grid; grid-template-columns: 9em 1fr; gap: 1rem; padding: 1rem .2rem; border-bottom: 1px solid var(--border); font-size: 13px; line-height: 1.9; }
.order-info dt { color: var(--muted); letter-spacing: .1em; font-size: 12px; }
.order-info dd { color: var(--ink-mid); }
.order-table td:last-child { color: var(--ink); font-weight: 600; }

.choice.is-disabled { opacity: .4; }
.choice.is-disabled input { cursor: not-allowed; }
@media (max-width: 768px) { .order-info > div { grid-template-columns: 1fr; gap: .1rem; } }

/* ---------- 拡大表示 ---------- */
.sample-stage {
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.sample-nav {
  position: absolute; top: 0;
  z-index: 2;
  width: 25%; height: 100%;         
  padding: 0; border: 0; border-radius: 0;
  background: transparent;         
  color: #fff;
  font-size: 4rem; line-height: 1;  
  cursor: pointer;
  display: flex; align-items: center;
  text-shadow: 0 1px 6px rgba(0,0,0,.6);
  opacity: .85;
  transition: opacity .2s;
}
.sample-nav:hover { opacity: 1; }
.sample-nav[hidden] { display: none; }
.sample-prev { left: 0;  justify-content: flex-start; padding-left: .4rem; }
.sample-next { right: 0; justify-content: flex-end;   padding-right: .4rem; }

.sample-num { text-align: center; font-size: .85rem; margin-top: .3rem; }
.sample-num[hidden] { display: none; }

@media (max-width: 768px) {
  .sample-nav { font-size: 3rem; }
}

/* 見本写真の拡大表示 */
#sampleImg {
  display: block;
  width: min(86vw, 70vh, 560px);
  height: min(86vw, 70vh, 560px);  
  max-width: none;
  max-height: none;
  margin: 0 auto;
  object-fit: contain;              
  background: rgba(0, 0, 0, .05);
}