/* =========================================================
   RESTLUXE Store — 追加スタイル(T-104 モック注文フロー)
   メインサイトの Design System v2.0(Porcelain & Champagne)
   のトークン(style.css の :root 変数)をそのまま使用
   ========================================================= */

/* ---- デモ注意バー ---- */
.store-mock-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 220;
  background: var(--ink); color: var(--ivory);
  font-size: .78rem; letter-spacing: .06em; line-height: 1.6;
  text-align: center; padding: 8px 14px; opacity: .94;
}
body.store-lock { overflow: hidden; }

/* ---- カード内アクション ---- */
.store-card-actions { display: flex; flex-direction: column; gap: .4rem; margin-top: .6rem; }
.store-add {
  font-family: var(--sans); font-size: .88rem; letter-spacing: .08em;
  padding: .62rem 1rem; border-radius: var(--pill); cursor: pointer;
  border: 1px solid var(--gold); color: var(--gold-deep); background: var(--paper);
  transition: background .25s, color .25s;
}
.store-add:hover { background: var(--gold-pale); }
.store-add.added { background: var(--gold); color: #fff; border-color: var(--gold); }
.store-add[disabled] {
  background: var(--shell); border: 1px dashed var(--muted); color: var(--muted);
  cursor: not-allowed;
}

/* ---- OMC: B群(診察必須)カードの診療申込ボタン ---- */
.store-consult {
  display: block; text-align: center; text-decoration: none;
  font-family: var(--sans); font-size: .88rem; letter-spacing: .08em;
  padding: .62rem 1rem; border-radius: var(--pill);
  border: 1px solid var(--gold-deep); background: var(--gold); color: #fff;
  transition: background .25s;
}
.store-consult:hover { background: var(--gold-deep); opacity: 1; }

/* ---- カートFAB ---- */
.store-cart-fab {
  position: fixed; right: 18px; bottom: 86px; z-index: 210;
  font-family: var(--sans); font-size: .82rem; letter-spacing: .1em;
  padding: .7rem 1.2rem; border-radius: var(--pill); cursor: pointer;
  border: 1px solid var(--gold-deep); background: var(--gold); color: #fff;
  box-shadow: var(--shadow); display: inline-flex; align-items: center; gap: .5rem;
}
.store-cart-fab .store-cart-count {
  background: #fff; color: var(--gold-deep); border-radius: var(--pill);
  min-width: 1.5em; padding: 0 .4em; text-align: center; font-weight: 700;
}
.store-cart-fab.has-items { background: var(--gold-deep); }

/* ---- モーダル ---- */
.store-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(70, 63, 54, .45); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.store-overlay[hidden] { display: none; }
.store-panel {
  background: var(--ivory); border-radius: var(--radius); box-shadow: var(--shadow);
  width: min(640px, 100%); max-height: 86vh; overflow-y: auto; padding: 34px 30px;
}
.store-step h3 { margin-bottom: 1rem; }
.store-mock-note {
  font-size: .8rem; color: var(--ink-soft); background: var(--gold-pale);
  border: 1px solid var(--line); border-radius: 8px; padding: .55rem .8rem;
}
.store-empty { color: var(--muted); }

/* ---- 明細 ---- */
.store-lines { list-style: none; margin: 0 0 1rem; border-top: 1px solid var(--line); }
.store-lines li {
  display: flex; justify-content: space-between; align-items: center; gap: .8rem;
  flex-wrap: wrap; padding: .7rem 0; border-bottom: 1px solid var(--line);
}
.store-line-main { display: flex; align-items: center; gap: .55rem; }
.store-line-name { font-size: .92rem; color: var(--ink); }
.store-line-ctrl { display: flex; align-items: center; gap: .45rem; }
.store-qty {
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink-soft);
}
.store-qty-num { min-width: 1.4em; text-align: center; font-size: .92rem; }
.store-line-sub { min-width: 5.5em; text-align: right; font-size: .92rem; color: var(--ink); }
.store-remove {
  border: none; background: none; cursor: pointer;
  font-size: .76rem; color: var(--muted); text-decoration: underline;
}
.store-subtotal { font-size: .95rem; }

/* ---- フォーム ---- */
.store-field { margin: 1rem 0; }
.store-field-label { display: block; font-size: .84rem; color: var(--ink); margin-bottom: .35rem; font-weight: 600; }
.store-field label { display: block; font-size: .9rem; color: var(--ink-soft); margin: .2rem 0; }
.store-field input[type="text"] {
  width: 100%; padding: .6rem .8rem; font-size: .95rem; font-family: var(--sans);
  border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink);
}
.store-totals dl { margin: 1.1rem 0; border-top: 1px solid var(--line); }
.store-totals dl > div {
  display: flex; justify-content: space-between; padding: .5rem 0;
  border-bottom: 1px solid var(--line); font-size: .92rem;
}
.store-totals .grand dd { font-family: var(--serif); font-size: 1.08rem; color: var(--gold-deep); }

/* ---- ボタン ---- */
.store-actions { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1.3rem; }
.store-btn {
  font-family: var(--sans); font-size: .9rem; letter-spacing: .08em; cursor: pointer;
  padding: .7rem 1.4rem; border-radius: var(--pill); border: 1px solid var(--line);
  background: var(--paper); color: var(--ink-soft); text-decoration: none; display: inline-block;
}
.store-btn.primary { background: var(--gold); border-color: var(--gold-deep); color: #fff; }
.store-btn.primary:hover { background: var(--gold-deep); opacity: 1; }
.store-btn.ghost:hover { background: var(--shell); }
.store-btn.pay { background: var(--green); border-color: var(--green); color: #fff; width: 100%; text-align: center; }
.store-btn.pay.placeholder-btn {
  background: var(--shell); border: 1px dashed var(--muted); color: var(--muted);
  cursor: not-allowed; font-size: .84rem;
}

/* ---- 完了画面 ---- */
.store-mock-box {
  background: var(--alert-bg); border: 1px solid var(--alert-line); border-radius: 8px;
  padding: .9rem 1rem; font-size: .86rem; color: var(--ink-soft); margin-bottom: 1rem;
}
.store-mock-box strong { color: var(--ink); }
.store-order-no { font-size: .95rem; margin-bottom: .4rem; }
.store-pay { margin-top: 1.2rem; }

@media (max-width: 800px) {
  /* モバイルでは sticky-cta(下部固定ナビ)の上に重ならないよう退避 */
  .store-mock-bar { bottom: 62px; }
  .store-cart-fab { bottom: 132px; }
}
@media (max-width: 560px) {
  .store-panel { padding: 26px 18px; }
}

/* 準備中: 無効化したストア注文リンク(院長指示 2026-07-31) */
a.is-disabled {
  pointer-events: none;
  opacity: .5;
  filter: grayscale(1);
  cursor: not-allowed;
}
