/* =====================================================================
   fandam-ecforce.css
   ワイヤーの components.css（= fandam.css）を ecforce テンプレートに
   載せるための差分だけを置く。components.css 側は一切書き換えない。
   PC/SP の切替は .lb-flat--pc / .lb-flat--sp に任せ、@media は使わない。
   ===================================================================== */

/* ---------- A. リセット ---------- */
html { -webkit-text-size-adjust: 100%; height: 100%; }
body.lb-flat {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; vertical-align: middle; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
input, select, textarea { font: inherit; box-sizing: border-box; }
table { border-collapse: collapse; }
*, *::before, *::after { box-sizing: border-box; }

.l-main { flex: 1; min-width: 0; }

/* ---------- B. 実 <img> を background-image 前提の枠に載せる ---------- */
.lb-flat-product__img,
.lb-flat-newscard__img,
.lb-flat-slide__img,
.lb-flat-cart-item__img,
.lb-flat-co-item__img,
.lb-flat-feature-card__img,
.lb-flat-event-list-card__img,
.lb-flat-article__hero {
  position: relative;
  overflow: hidden;
}
.lb-flat-product__img img,
.lb-flat-newscard__img img,
.lb-flat-slide__img img,
.lb-flat-cart-item__img img,
.lb-flat-co-item__img img,
.lb-flat-feature-card__img img,
.lb-flat-event-list-card__img img,
.lb-flat-article__hero img,
.lb-flat-pd__main img,
.lb-flat-pd__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  inset: 0;
}
.lb-flat-pd__main img { object-fit: contain; }
.lb-flat-slide__img { position: absolute; inset: 0; }
.lb-flat-article__hero { position: relative; aspect-ratio: 16 / 9; background: var(--soft); }
.lb-flat-article__hero.is-empty { min-height: 120px; }

/* ロゴ画像をテキスト枠に載せる */
.lb-flat-brand img,
.lb-flat-footer__brand img {
  height: 22px;
  width: auto;
  display: block;
}
.lb-flat--pc .lb-flat-brand img { height: 26px; }

/* カートバッジ: #header-order-quantity を <i> 相当にする */
.lb-flat-cart #header-order-quantity,
.lb-flat-cart i {
  font-style: normal;
}

/* アイコンボタン内の a を敷き詰める */
.lb-flat-icon > a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: inherit;
}
.lb-flat-icon svg { width: 18px; height: 18px; display: block; }

/* SP クイックナビはモックが button 前提なので a にも同じ体裁を当てる */
.lb-flat-quick a {
  position: relative;
  flex: 1 1 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 12px 0 11px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  text-align: center;
}
.lb-flat-quick a.is-active { color: var(--ink); }
.lb-flat-quick a.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--accent);
}

.lb-flat-chips a {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--sub);
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
}
.lb-flat-chips a.is-on,
.lb-flat-chips--filter a.is-on {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
a.lb-flat-product,
a.lb-flat-newscard {
  display: flex;
  color: inherit;
  text-decoration: none;
}
.lb-flat-head a {
  font-size: 12px;
  font-weight: 600;
  color: var(--sub);
}

/* ---------- P. ページ内フォーム（認証・マイページ・お問い合わせ） ---------- */
.lb-flat-page label,
.lb-flat-authcard label,
.lb-flat-fallback label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--sub);
  margin: 12px 0 6px;
}
.lb-flat-page input[type="text"],
.lb-flat-page input[type="email"],
.lb-flat-page input[type="tel"],
.lb-flat-page input[type="password"],
.lb-flat-page input[type="number"],
.lb-flat-page select,
.lb-flat-page textarea,
.lb-flat-authcard input[type="text"],
.lb-flat-authcard input[type="email"],
.lb-flat-authcard input[type="tel"],
.lb-flat-authcard input[type="password"],
.lb-flat-authcard select,
.lb-flat-authcard textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  padding: 11px 12px;
  margin: 0 0 4px;
}
.lb-flat-page input[type="submit"],
.lb-flat-page button[type="submit"],
.lb-flat-authcard input[type="submit"],
.lb-flat-authcard button[type="submit"],
.lb-flat-fallback input[type="submit"],
.lb-flat-fallback button[type="submit"] {
  display: block;
  width: 100%;
  margin-top: 16px;
  border: 0;
  border-radius: 5px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 13px 16px;
  cursor: pointer;
}
a.lb-flat-mrow,
a.lb-flat-order,
a.lb-flat-product,
a.lb-flat-account__edit {
  color: inherit;
  text-decoration: none;
}
.lb-flat-account__edit {
  display: inline-flex;
  align-items: center;
}
.lb-flat-legal-art h2 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 8px;
}
.lb-flat-article__cta .lb-flat-btn + .lb-flat-btn { margin-top: 8px; }
.lb-flat-page--narrow .lb-flat-btn--block { margin-top: 10px; }

#customers-card-index-view #card-number,
#customers-card-edit-view #card-number,
#customers-card-index-view #card-expiry,
#customers-card-edit-view #card-expiry,
#customers-card-index-view #card-cvv,
#customers-card-edit-view #card-cvv {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  padding: 8px 12px;
}

/* ---------- C. チェックアウトではストアナビを出さない ---------- */
.is-checkout .lb-flat-quick,
.is-checkout .lb-flat-nav { display: none; }

/* ---------- D. ページネーション ---------- */
.lb-flat-pager {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 20px 16px 32px;
}
.lb-flat-pager a,
.lb-flat-pager span {
  min-width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 12px;
  color: var(--sub);
  padding: 0 8px;
}
.lb-flat-pager span[aria-current="page"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  font-weight: 700;
}

/* ---------- E. フラッシュ / アラート ---------- */
.alert,
.alert-danger,
.alert-success {
  margin: 12px 16px;
  padding: 10px 12px;
  border-radius: 5px;
  font-size: 13px;
  line-height: 1.55;
}
.alert-danger {
  background: rgba(223, 63, 84, .08);
  border: 1px solid rgba(223, 63, 84, .28);
  color: var(--danger);
}
.alert-success {
  background: rgba(18, 165, 148, .08);
  border: 1px solid rgba(18, 165, 148, .28);
  color: var(--pickup);
}

/* ---------- F. ドロワー（.smenu はモックの index.html 由来） ---------- */
.side-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
  pointer-events: auto;
  --sm-ink: #1a2740;
  --sm-sub: #5f6f82;
  --sm-muted: #6d7a8d;
  --sm-line: #e2e8ef;
  --sm-soft: #eef2f7;
  --sm-accent: #4e40df;
  --sm-danger: #c2323d;
}
.side-menu-overlay.is-open { display: flex; }
.smenu__backdrop {
  flex: 1;
  background: rgba(26, 39, 64, .42);
  cursor: pointer;
}
.smenu {
  width: 82%;
  max-width: 300px;
  background: #fff;
  height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 0;
  box-shadow: -6px 0 28px rgba(26, 39, 64, .16);
  animation: smenu-in .22s ease;
}
@keyframes smenu-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
.smenu__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 15px;
  border-bottom: 1px solid var(--sm-line);
}
.smenu__logo {
  font-size: 15px;
  font-weight: 800;
  color: var(--sm-ink);
  letter-spacing: .02em;
}
.smenu__close {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: var(--sm-muted);
  padding: 4px;
  line-height: 1;
}
.smenu__item {
  display: block;
  padding: 13px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--sm-ink);
  border-bottom: 1px solid var(--sm-line);
}
.smenu__item:hover { background: var(--sm-soft); }
.smenu__item--sub { font-size: 12px; font-weight: 500; color: var(--sm-sub); }
.smenu__item--danger { color: var(--sm-danger); font-size: 12px; font-weight: 500; }
.smenu__section {
  padding: 11px 18px 9px;
  font-size: 10px;
  font-weight: 700;
  color: var(--sm-muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--sm-line);
}
.smenu__footer {
  margin-top: auto;
  padding: 18px;
  font-size: 11px;
  color: var(--sm-muted);
  border-top: 1px solid var(--sm-line);
}
.smenu__auth {
  padding: 14px 18px;
  border-bottom: 1px solid var(--sm-line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.smenu__auth-row { display: flex; align-items: center; gap: 12px; }
.smenu__avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--sm-soft); border: 1px solid var(--sm-line);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; flex-shrink: 0;
}
.smenu__uname { font-size: 13px; font-weight: 700; line-height: 1.3; color: var(--sm-ink); }
.smenu__urole { font-size: 11px; color: var(--sm-muted); margin-top: 2px; }
.smenu__auth-cta { display: flex; flex-direction: column; gap: 7px; }
.smenu__auth-btn {
  width: 100%; padding: 11px; border-radius: 4px;
  font-size: 13px; font-weight: 700; cursor: pointer;
  border: 1px solid var(--sm-line); background: #fff; color: var(--sm-ink);
  font-family: inherit; text-align: center;
}
.smenu__auth-btn--primary { background: var(--sm-accent); color: #fff; border-color: var(--sm-accent); }

/* ---------- G. ecforce 実フォーム → lb-flat ブリッジ ---------- */
.lb-flat-field input[type="text"],
.lb-flat-field input[type="email"],
.lb-flat-field input[type="tel"],
.lb-flat-field input[type="password"],
.lb-flat-field input[type="number"],
.lb-flat-field select,
.lb-flat-field textarea,
.lb-flat-formbox input[type="text"],
.lb-flat-formbox input[type="email"],
.lb-flat-formbox input[type="tel"],
.lb-flat-formbox input[type="password"],
.lb-flat-formbox input[type="number"],
.lb-flat-formbox select,
.lb-flat-formbox textarea,
.lb-flat-co-field input[type="text"],
.lb-flat-co-field input[type="email"],
.lb-flat-co-field input[type="tel"],
.lb-flat-co-field input[type="password"],
.lb-flat-co-field input[type="number"],
.lb-flat-co-field select,
.lb-flat-co-field textarea,
.lb-flat-authcard input[type="text"],
.lb-flat-authcard input[type="email"],
.lb-flat-authcard input[type="tel"],
.lb-flat-authcard input[type="password"],
.lb-flat-authcard select,
.lb-flat-authcard textarea,
.p-checkout input[type="text"],
.p-checkout input[type="email"],
.p-checkout input[type="tel"],
.p-checkout input[type="password"],
.p-checkout input[type="number"],
.p-checkout select,
.p-checkout textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  padding: 11px 12px;
}
.lb-flat-field > label,
.lb-flat-formbox label,
.lb-flat-authcard label,
.p-checkout label,
.lb-flat-co-card label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--sub);
  margin: 12px 0 6px;
}
.lb-flat input[type="submit"],
.lb-flat button[type="submit"] {
  font: inherit;
}
.lb-flat-btn--block[type="submit"],
.lb-flat-authcard input[type="submit"],
.p-checkout input[type="submit"],
.p-checkout button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: none;
  cursor: pointer;
  padding: 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  margin-top: 12px;
}
.p-checkout fieldset { border: none; margin: 0; padding: 0; }

/* 商品詳細: JS が差し込む規格セレクト */
#option_types {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 14px 0;
}
#option_types label {
  font-size: 11px;
  font-weight: 700;
  color: var(--sub);
}
#option_types select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
}
#sub-images-view {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 16px 0;
  scrollbar-width: none;
}
#sub-images-view::-webkit-scrollbar { display: none; }
#sub-images-view img {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  object-fit: cover;
  border: 1px solid var(--line);
  position: static;
}

/* カート追加メッセージ */
#cart-addition-success,
#cart-addition-failure {
  margin: 8px 16px;
  padding: 10px 12px;
  border-radius: 5px;
  font-size: 13px;
}
#cart-addition-success { background: rgba(18, 165, 148, .08); color: var(--pickup); }
#cart-addition-failure { background: rgba(223, 63, 84, .08); color: var(--danger); }

/* ---------- H. 完了画面 QR プレースホルダ ---------- */
.qr-placeholder {
  width: 140px;
  height: 140px;
  margin: 16px auto 0;
  border-radius: 6px;
  background: repeating-linear-gradient(-45deg, var(--soft) 0, var(--soft) 6px, #fff 6px, #fff 12px);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
  padding: 8px;
}

/* ---------- I. フッターリンクを a にする ---------- */
.lb-flat-footer__links a {
  color: inherit;
}

/* ---------- J. 法務ページの本文（管理画面コンテンツ） ---------- */
.lb-flat-legal-art__body p,
.lb-flat-legal-art__body ul,
.lb-flat-article__body p {
  margin: 0 0 12px;
}
.lb-flat-legal-art__body ul,
.lb-flat-article__list {
  padding-left: 1.2em;
  list-style: disc;
}

/* ---------- K. フォールバック画面（未デザインの素 HTML） ---------- */
.lb-flat-fallback {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 40px;
  font-size: 14px;
  line-height: 1.65;
}
.lb-flat-fallback h1,
.lb-flat-fallback h2 { font-size: 18px; font-weight: 800; margin: 16px 0 8px; }
.lb-flat-fallback a { color: var(--accent); text-decoration: underline; }
.lb-flat-fallback table { width: 100%; font-size: 13px; }
.lb-flat-fallback th,
.lb-flat-fallback td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.lb-flat-fallback input[type="text"],
.lb-flat-fallback input[type="email"],
.lb-flat-fallback input[type="tel"],
.lb-flat-fallback input[type="password"],
.lb-flat-fallback input[type="number"],
.lb-flat-fallback select,
.lb-flat-fallback textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  padding: 11px 12px;
  margin: 4px 0 10px;
}

/* ---------- L. マイページ サインアウト ---------- */
.lb-flat-signout {
  margin: 24px 16px 8px;
  text-align: center;
}
.lb-flat-signout a {
  font-size: 13px;
  color: var(--sub);
}

/* ---------- M. ソートセレクトを listbar に載せる ---------- */
.lb-flat-listbar__sort select {
  border: 0;
  background: transparent;
  color: var(--sub);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 0;
}

/* ---------- N. 商品詳細 CTA の二重出力（SP sticky / PC インライン） ---------- */
.lb-flat--sp .lb-flat-pd__actions { display: none; }
.lb-flat--pc .lb-flat-actionbar { display: none; }

/* ---------- O. 注文入力 PC 2カラム ---------- */
.lb-flat--pc .lb-flat-co--split {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 40px 40px;
}
.lb-flat--pc .lb-flat-co__side { position: sticky; top: 88px; }
.lb-flat--sp .lb-flat-co-bar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  padding: 12px 16px 20px;
  background: linear-gradient(transparent, var(--bg) 40%);
}
.lb-flat--pc .lb-flat-co-bar { padding: 0; background: none; }
