:root{
  --bg:#ffffff;
  --text:#111;
  --muted:#6b7280;
  --line:#e5e7eb;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family: "Noto Sans JP", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color:var(--text);
  background:var(--bg);
}

/* topbar */
.topbar{
  position:sticky; top:0; z-index:20;
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 18px;
  background:#fff;
  border-bottom:1px solid var(--line);
}
.nav{display:flex; align-items:center; gap:14px}
.navItem{
  color:#111;
  text-decoration:none;
  padding:8px 10px;
  border-radius:10px;
}
.navItem:hover{background:#f3f4f6}
.navItem.isActive{border-bottom:2px solid #111; border-radius:0; padding-bottom:6px}

/* hero */
.hero{
  position:relative;
  min-height:70vh;
  display:grid;
  place-items:center;
  background:
    linear-gradient(180deg, rgba(0,0,0,.30), rgba(0,0,0,.30)),
    var(--hero-img),
    linear-gradient(135deg, #111827, #374151);
  background-size: cover;
  background-position:  center 80%;
}
.heroInner{
  position:relative;
  text-align:center;
  color:#fff;
  padding:32px 18px;
  max-width:900px;
}
.heroInner h1{
  font-size:56px;
  margin:0 0 12px;
  letter-spacing:.06em;
}
.heroInner p{margin:0 0 18px; opacity:.92; line-height:1.8}
.cta{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#fff;
  color:#111;
  padding:12px 18px;
  border-radius:12px;
  text-decoration:none;
  font-weight:700;
  border:1px solid rgba(255,255,255,.65);
}
.cta:hover{filter:brightness(.95)}

/* content */
.section{max-width:1100px; margin:0 auto; padding:26px 18px}
.pageTitle{margin:0 0 10px; font-size:26px}
.muted{color:var(--muted)}
.small{font-size:12px}
.bigTop{margin-top:14px}

.grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap:20px;
  margin-top:20px;
}
.card{
  border:1px solid var(--line);
  border-radius:12px;
  padding:12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  background:#fff;
  transition: box-shadow .15s;
}
.card:hover{box-shadow: 0 6px 20px rgba(0,0,0,.12);}
.cardTitle{margin:0 0 10px; font-size:16px}
.pName{margin:0 0 6px; font-weight:700; font-size:14px; line-height:1.5}
.pPrice{font-weight:700; font-size:16px; margin:0 0 10px; color:var(--text);}
/* ご購入の流れ */
/* flowBlock を横並びにするラッパー */
.flowBtns{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:flex-start;
  margin-top:10px;
}
.flowBtns .flowBlock{
  margin-top:0;
}
/* 展開コンテンツは通常フロー・幅を固定して隣ボタンをずらさない */
.flowBtns .flowBlock .flowList,
.flowBtns .flowBlock .infoList{
  width:300px;
  max-width:85vw;
}

.flowBlock{
  display:inline-block;
  margin-top:10px;
}
.flowBlock summary{
  display:inline-flex;
  align-items:center;
  gap:6px;
  cursor:pointer;
  list-style:none;
  background:#111;
  color:#fff;
  padding:9px 16px;
  border-radius:10px;
  font-size:13px;
  font-weight:600;
  user-select:none;
}
.flowBlock summary::-webkit-details-marker{display:none}
.flowBlock summary::after{
  content:"▾";
  font-size:11px;
  transition:transform .2s;
}
.flowBlock[open] summary::after{
  transform:rotate(-180deg);
}
.flowBlock summary:hover{background:#333}
/* お支払い・配送テーブル */
.infoList{
  margin:10px 0 0;
  padding:10px 16px;
  background:#f9fafb;
  border-radius:12px;
  border:1px solid var(--line);
  font-size:13px;
  line-height:1.7;
}
.infoList div{
  display:flex;
  gap:1em;
  padding:5px 0;
  border-bottom:1px solid var(--line);
}
.infoList div:last-child{border-bottom:none;}
.infoList dt{
  color:var(--muted);
  white-space:nowrap;
  min-width:8em;
  flex-shrink:0;
}
.infoList dd{margin:0;}

.flowList{
  margin:10px 0 0;
  padding:16px 20px;
  background:#f9fafb;
  border-radius:12px;
  border:1px solid var(--line);
  font-size:13px;
  line-height:1.9;
  color:var(--text);
  list-style:none;
  counter-reset:flow;
}
.flowList li{
  counter-increment:flow;
  padding-left:2em;
  position:relative;
  margin-bottom:4px;
}
.flowList li::before{
  content:counter(flow);
  position:absolute;
  left:0;
  width:1.5em;
  height:1.5em;
  background:#111;
  color:#fff;
  border-radius:50%;
  font-size:11px;
  font-weight:700;
  display:flex;
  align-items:center;
  justify-content:center;
  top:.15em;
}

.detailBtn{
  display:block;
  width:100%;
  margin-top:8px;
  background:transparent;
  border:1px solid var(--line);
  padding:7px 0;
  border-radius:10px;
  font:inherit;
  font-size:12px;
  color:var(--muted);
  cursor:pointer;
}
.detailBtn:hover{background:#f3f4f6}

/* 商品詳細モーダル */
.detailModalInner{
  background:#fff;
  border-radius:16px;
  padding:24px 20px;
  max-width:480px;
  width:90%;
  max-height:80vh;
  overflow-y:auto;
  position:relative;
}
.detailModalInner .modalClose{
  position:absolute;
  top:12px;
  right:16px;
  color:#111;
  font-size:20px;
}
.detailModalName{font-weight:700; font-size:17px; margin:0 0 8px; line-height:1.5}
.detailModalPrice{font-weight:700; font-size:16px; margin:0 0 16px;}
.detailModalDesc{font-size:14px; line-height:1.8; color:var(--muted);}
.row{display:flex; justify-content:space-between; align-items:center; gap:10px}
.full{width:100%}

button{font:inherit}
.ghost{
  background:transparent;
  border:1px solid var(--line);
  padding:10px 12px;
  border-radius:12px;
  cursor:pointer;
}
.ghost:hover{background:#f3f4f6}

.cartBtn{
  background:#111;
  color:#fff;
  border:none;
  padding:7px 10px;
  border-radius:10px;
  font-size:12px;
  cursor:pointer;
  transition: filter .15s;
}
.cartBtn:hover{filter:brightness(.75)}
.badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:22px;
  height:22px;
  margin-left:6px;
  border-radius:999px;
  background:rgba(255,255,255,.2);
  border:1px solid rgba(255,255,255,.35);
  font-size:12px;
}

.backdrop{
  position:fixed; inset:0;
  background:rgba(0,0,0,.45);
  z-index:40;
}

/* drawer */
.drawer{
  position:fixed;
  right:0; top:0; height:100%;
  width:min(420px, 92vw);
  background:#fff;
  border-left:1px solid var(--line);
  z-index:50;
  transform:translateX(110%);
  transition:.18s ease;
  display:flex;
  flex-direction:column;
}
.drawer.open{transform:translateX(0)}
.drawerHead{padding:14px; border-bottom:1px solid var(--line); display:flex; align-items:center; justify-content:space-between;}
.drawerFoot{padding:14px; border-top:1px solid var(--line)}
.drawerBody{padding:14px; overflow:auto; display:flex; flex-direction:column; gap:10px}
.item{
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px;
}
.counter{
  display:flex; gap:8px; align-items:center;
}
.counter button{
  width:30px; height:30px;
  border-radius:10px;
  border:1px solid var(--line);
  background:#fff;
  cursor:pointer;
}
.req{color:#ef4444; margin-left:6px}
.two{display:grid; grid-template-columns:1fr 1fr; gap:12px}
input, textarea{
  width:100%;
  padding:12px 12px;
  border:1px solid var(--line);
  border-radius:12px;
  margin-top:6px;
}
@media (max-width:640px){
  /* フォーム */
  .two{grid-template-columns:1fr}

  /* ヒーロー */
  .heroInner h1{font-size:32px}

  /* ヘッダー */
  .topbar{padding:8px 12px}

  /* ナビ：横スクロールで縦書き・折り返しを防ぐ */
  .nav{
    gap:2px;
    overflow-x:auto;
    flex-wrap:nowrap;
    width:100%;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
  }
  .nav::-webkit-scrollbar{display:none}
  .navItem{
    padding:6px 8px;
    font-size:13px;
    white-space:nowrap;
    flex-shrink:0;
  }
  .navItem.isActive{padding-bottom:4px}

  /* 商品グリッド：2列 */
  .grid{grid-template-columns:repeat(2,1fr); gap:10px;}

  /* カード：コンパクト化 */
  .card{padding:8px}
  .pName{font-size:13px; margin-bottom:4px;}
  .pPrice{font-size:14px; margin-bottom:8px;}

  /* ボタン行：「カートに入れる」を上段全幅・±を下段に */
  .card .row{flex-wrap:wrap; gap:6px;}
  .card .row .cartBtn{order:-1; flex:1 1 100%; font-size:12px; padding:7px 6px;}
  .card .row .ghost{flex:1; padding:8px 0; text-align:center;}

  /* 詳細ボタン */
  .detailBtn{font-size:11px; padding:6px 0;}

  /* カルーセルボタン */
  .carouselBtn{width:26px; height:26px;}
  .carouselBtn svg{width:13px; height:13px;}

}

/* ジャンプしたときに上に隠れないようにする */
#company, #contact {
  scroll-margin-top: 100px;
}
.legalBlock{
  margin-top:14px;
  border-top:1px solid #e5e7eb;
  padding-top:12px;
}

.legalBlock summary{
  cursor:pointer;
  font-weight:600;
  padding:8px 0;
}

.legalContent{
  margin-top:10px;
  padding:10px 12px;
  background:#f9fafb;
  border-radius:12px;
  font-size:14px;
  line-height:1.7;
}
.pImgWrap{
  position:relative;
  margin-bottom:10px;
}
.pImg{
  width:100%;
  aspect-ratio: 1/1;
  border-radius:10px;
  overflow:hidden;
  border:1px solid var(--line);
  background:#f3f4f6;
}
.pImg img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  cursor:pointer;
}
.carouselBtn{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  background:rgba(0,0,0,.5);
  border:none;
  width:32px;
  height:32px;
  border-radius:50%;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:2;
  padding:0;
  backdrop-filter:blur(2px);
}
.carouselBtn:hover{background:rgba(0,0,0,.75)}
.carouselBtn svg{
  width:16px;
  height:16px;
  stroke:#fff;
  stroke-width:2.5;
  stroke-linecap:round;
  stroke-linejoin:round;
  fill:none;
}
.carouselPrev{left:6px}
.carouselNext{right:6px}
.pImgPh{
  width:100%;
  height:100%;
  background:linear-gradient(135deg,#e5e7eb,#f3f4f6);
}

/* ===== モーダル ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal.open {
  display: flex;
}

.modalInner {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.modalInner img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 16px;
}

.modalClose {
  position: absolute;
  top: -40px;
  right: 0;
  font-size: 28px;
  color: #fff;
  cursor: pointer;
}

.modalNav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 32px;
  color: white;
  cursor: pointer;
  user-select: none;
}

.modalPrev { left: -50px; }
.modalNext { right: -50px; }


.errMsg {
  color: #ef4444;
  font-size: 13px;
  margin: 8px 0 0;
  min-height: 1em;
}

/* ===== カート FAB（右下固定の丸いボタン） ===== */
.fabCart{
  position:fixed;
  bottom:24px;
  right:20px;
  z-index:100;
  background:#111;
  border:none;
  border-radius:50%;
  width:56px;
  height:56px;
  padding:0;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow:0 4px 16px rgba(0,0,0,.35);
  transition:opacity .15s;
}
.fabCart:hover{filter:brightness(.8)}
/* カートドロワーが開いているときはFABを非表示 */
.drawer.open ~ .fabCart{opacity:0; pointer-events:none;}
.fabCart svg{fill:#fff; width:26px; height:26px;}
.fabCart .badge{
  position:absolute;
  top:-4px;
  right:-4px;
  margin-left:0;
  background:#ef4444;
  border:2px solid #fff;
  color:#fff;
  min-width:20px;
  height:20px;
  font-size:11px;
}

/* PC版：カートをメニューバー右上に配置（四角ボタン） */
@media (min-width:641px){
  .fabCart{
    top:10px;
    bottom:auto;
    right:18px;
    background:#111;
    border-radius:10px;
    width:auto;
    height:auto;
    padding:10px 18px;
    gap:10px;
    box-shadow:none;
    border:none;
  }
  .fabCart:hover{ background:#333; filter:none; }
  .fabCart svg{ fill:#fff; width:24px; height:24px; }
  .fabCart .badge{ background:#ef4444; border:2px solid #111; color:#fff; }
}
.fabCartLabel{ font-size:14px; font-weight:600; color:#fff; }

/* PC/スマホ表示切り替え用 */
.pcOnly{ display:inline; }
.spOnly{ display:none; }
@media (max-width:640px){
  .pcOnly{ display:none; }
  .spOnly{ display:inline; }
}
