/* MILLER STORE ─ 黒×シルバーのセレクトショップ。色はここでまとめて変えられる */
:root {
  --bg: #0d0d0e;        /* 背景（黒） */
  --sub: #19191c;       /* 写真の下地・フッター */
  --line: #2e2e33;      /* 線 */
  --text: #ececee;      /* 文字 */
  --muted: #8f9098;     /* うすい文字 */
  --silver: #c8cad0;    /* シルバー（ボタン・強調） */
  --on-silver: #0d0d0e; /* シルバーの上の文字 */
  --sale: #e0707a;      /* セール */
  --en: "Jost", "Noto Sans JP", sans-serif;
  --sans: "Noto Sans JP", "Hiragino Sans", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 14px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
.muted { color: var(--muted); }

/* お知らせバー */
.notice { background: var(--sub); color: var(--silver); border-bottom: 1px solid var(--line); text-align: center; font-size: 12px; letter-spacing: .05em; padding: 8px 16px; min-height: 35px; transition: opacity .4s; }
.notice.fade { opacity: 0; }

/* ヘッダー */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 60px; padding: 0 8px; background: var(--bg); border-bottom: 1px solid var(--line); }
.site-header > .logo:only-child { grid-column: 2; }
.header-left { display: flex; }
.header-right { display: flex; justify-content: flex-end; }
.logo { font-family: var(--en); font-weight: 500; font-size: 21px; letter-spacing: .18em; color: var(--silver); white-space: nowrap; }
.icon-btn { position: relative; width: 44px; height: 44px; display: grid; place-items: center; background: none; border: none; cursor: pointer; font-size: 24px; line-height: 1; }
.icon-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cart-count { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--silver); color: var(--on-silver); font-size: 11px; line-height: 18px; text-align: center; }
.search-bar { padding: 10px 16px; border-bottom: 1px solid var(--line); }
.search-bar input { width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line); background: var(--sub); color: var(--text); font: inherit; font-size: 16px; }

/* カテゴリのタブ */
.tabs { display: flex; justify-content: center; gap: 4px 22px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line); font-family: var(--en); letter-spacing: .08em; }
.tabs button { background: none; border: none; padding: 4px 0; cursor: pointer; border-bottom: 1px solid transparent; }
.tabs button[aria-pressed="true"] { border-bottom-color: var(--silver); color: var(--silver); }

/* メインビジュアル */
.hero { position: relative; max-width: 1200px; margin: 24px auto 0; overflow: hidden; }
.hero-track { display: flex; transition: transform .6s ease; }
.slide { flex: 0 0 100%; aspect-ratio: 16 / 9; position: relative; background: radial-gradient(ellipse at 50% 30%, #2a2b30, var(--sub) 70%); }
@media (max-width: 759px) { .slide { aspect-ratio: 4 / 5; } }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide-text { position: absolute; left: 0; right: 0; bottom: 0; padding: 32px 20px; text-align: center; }
.slide-text .kicker { font-family: var(--en); letter-spacing: .3em; font-size: 12px; margin: 0; }
.slide-text .title { color: var(--silver); font-family: var(--en); font-size: clamp(28px, 6vw, 48px); letter-spacing: .1em; margin: 4px 0; font-weight: 500; }
.slide-text .sub { margin: 0; color: var(--muted); }
.hero-dots { display: flex; justify-content: center; gap: 8px; padding: 14px 0; }
.hero-dots button { width: 24px; height: 2px; padding: 0; border: none; background: var(--line); cursor: pointer; }
.hero-dots button[aria-current="true"] { background: var(--silver); }

/* ブロック */
.block { max-width: 1200px; margin: 0 auto; padding: 40px 16px 8px; scroll-margin-top: 60px; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.block-title { font-size: 18px; font-weight: 500; margin: 0 0 16px; display: flex; align-items: center; gap: 16px; }
.block-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.block-title.en { font-family: var(--en); font-size: 24px; letter-spacing: .16em; color: var(--silver); font-weight: 400; flex-direction: column; gap: 0; align-items: center; width: 100%; text-align: center; }
.block-title.en::after { display: none; }
.block-title.en span { font-family: var(--sans); font-size: 12px; letter-spacing: .1em; color: var(--muted); }
.result { color: var(--muted); font-size: 12px; margin: 0; white-space: nowrap; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { background: var(--bg); border: 1px solid var(--line); padding: 6px 12px; cursor: pointer; font-size: 13px; }
.chips button[aria-pressed="true"] { border-color: var(--silver); background: var(--silver); color: var(--on-silver); }

.arrivals { margin: 0; max-height: 220px; overflow-y: auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8px 0; }
.arrivals div { display: grid; grid-template-columns: 96px 1fr; gap: 8px; padding: 4px 0; }
.arrivals dt { color: var(--muted); font-family: var(--en); font-size: 13px; }
.arrivals dd { margin: 0; }
.arrivals button { background: none; border: none; padding: 0; cursor: pointer; text-align: left; }
.arrivals button:hover { text-decoration: underline; }

/* 商品一覧 */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px 12px; margin-top: 8px; }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 40px 20px; } }
@media (min-width: 1040px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.card { display: block; align-self: start; width: 100%; background: none; border: none; padding: 0; cursor: pointer; text-align: center; }
.thumb { position: relative; aspect-ratio: 1 / 1; background: var(--sub); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: contain; transition: transform .4s; }
.card:hover .thumb img { transform: scale(1.04); }
.placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: #4a4a50; font-family: var(--en); letter-spacing: .2em; font-size: 12px; }
.tag { position: absolute; top: 8px; left: 8px; font-family: var(--en); font-size: 11px; letter-spacing: .1em; padding: 1px 8px; background: var(--bg); }
.tag.sale { background: var(--sale); color: var(--on-silver); }
.tag.sold { background: var(--silver); color: var(--on-silver); }
.card.sold .thumb { opacity: .5; }
.card-label { font-family: var(--en); font-size: 11px; letter-spacing: .1em; margin: 10px 0 0; min-height: 16px; }
.card-brand { font-family: var(--en); font-weight: 600; color: var(--silver); font-size: 13px; margin: 2px 0 0; letter-spacing: .03em; }
.card-name { font-size: 12px; margin: 2px 0 0; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-price { margin: 6px 0 0; font-family: var(--en); font-size: 14px; }
.was { color: var(--muted); text-decoration: line-through; font-size: 12px; margin-right: 6px; }
.now-sale { color: var(--sale); }
.off { color: var(--sale); font-size: 12px; margin-left: 4px; }

/* ご利用ガイド */
.guide { display: grid; gap: 1px; background: var(--line); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 56px; }
@media (min-width: 760px) { .guide { grid-template-columns: repeat(3, 1fr); } }
.guide div { background: var(--bg); padding: 28px 20px; text-align: center; }
.guide h3 { font-family: var(--en); letter-spacing: .2em; font-weight: 500; margin: 0 0 6px; font-size: 15px; }
.guide p { margin: 0; color: var(--muted); font-size: 13px; }

.site-footer { padding: 40px 16px 32px; text-align: center; background: var(--sub); }
.site-footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 20px; margin: 16px 0; font-size: 13px; }
.copy { font-family: var(--en); letter-spacing: .1em; color: var(--muted); font-size: 12px; margin: 0; }

/* 横から出るパネル（メニュー・カート） */
.backdrop { position: fixed; inset: 0; z-index: 20; background: rgb(0 0 0 / .6); }
.panel { position: fixed; top: 0; bottom: 0; z-index: 21; width: min(380px, 88%); background: var(--bg); border-left: 1px solid var(--line); border-right: 1px solid var(--line); display: flex; flex-direction: column; transition: transform .3s; }
.panel.left { left: 0; transform: translateX(-100%); }
.panel.right { right: 0; transform: translateX(100%); }
.panel.open { transform: none; }
.panel-head { display: flex; justify-content: space-between; align-items: center; height: 60px; padding: 0 8px 0 16px; border-bottom: 1px solid var(--line); }
.panel-title { font-family: var(--en); letter-spacing: .2em; font-weight: 500; }
.panel-body { flex: 1; overflow-y: auto; padding: 8px 16px 24px; }
.panel-foot { padding: 16px; border-top: 1px solid var(--line); }
.menu-label { font-family: var(--en); letter-spacing: .15em; color: var(--muted); font-size: 12px; margin: 20px 0 4px; }
.menu-list { list-style: none; margin: 0; padding: 0; }
.menu-list li { border-bottom: 1px solid var(--line); }
.menu-list a, .menu-list button { display: block; width: 100%; padding: 12px 0; background: none; border: none; text-align: left; cursor: pointer; }

.empty { color: var(--muted); text-align: center; padding: 48px 0; }
.line { display: grid; grid-template-columns: 72px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.line .placeholder { font-size: 9px; letter-spacing: .1em; }
.line-brand { font-family: var(--en); font-weight: 600; font-size: 12px; margin: 0; }
.line-name { margin: 0; font-size: 13px; }
.line-price { margin: 0; font-family: var(--en); }
.qty { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.qty button { width: 28px; height: 28px; background: none; border: 1px solid var(--line); cursor: pointer; }
.qty button:disabled { opacity: .35; cursor: not-allowed; }
.qty .remove { margin-left: auto; width: auto; height: auto; border: none; color: var(--muted); font-size: 12px; text-decoration: underline; white-space: nowrap; }
.totals { margin: 0 0 6px; }
.totals div { display: flex; justify-content: space-between; }
.totals dd { margin: 0; font-family: var(--en); }
.totals .total { font-size: 16px; font-weight: 500; margin-top: 6px; }
.note { font-size: 12px; color: var(--muted); margin: 0 0 10px; }
.note.center { text-align: center; margin: 10px 0 0; }
.error { color: var(--sale); font-size: 13px; margin: 8px 0 0; }

.button { display: inline-block; background: var(--silver); color: var(--on-silver); border: none; padding: 15px 28px; font-size: 14px; letter-spacing: .1em; cursor: pointer; text-align: center; }
.button:disabled { opacity: .35; cursor: not-allowed; }
.button.block { width: 100%; }

/* 商品の詳細 */
.detail { width: min(1000px, calc(100% - 16px)); max-height: calc(100% - 16px); padding: 0; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.detail::backdrop { background: rgb(0 0 0 / .7); }
.detail .close { position: absolute; top: 4px; right: 4px; z-index: 2; background: var(--bg); }
.detail-body { display: grid; }
@media (min-width: 760px) { .detail-body { grid-template-columns: 1.1fr 1fr; } }
.gallery-main { aspect-ratio: 1 / 1; background: var(--sub); }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs { display: flex; gap: 6px; padding: 8px; overflow-x: auto; }
.gallery-thumbs button { flex: 0 0 60px; height: 60px; padding: 0; border: 1px solid transparent; background: var(--sub); cursor: pointer; }
.gallery-thumbs button[aria-current="true"] { border-color: var(--silver); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.detail-info { padding: 28px 20px; }
.detail-info .brand { font-family: var(--en); font-weight: 600; letter-spacing: .05em; margin: 0; }
.detail-info h2 { margin: 2px 0 10px; font-size: 18px; font-weight: 500; }
.detail-info .price { font-family: var(--en); font-size: 22px; margin: 0 0 18px; }
.detail-info .price small { font-family: var(--sans); font-size: 12px; color: var(--muted); }
.specs { margin: 0 0 18px; border-top: 1px solid var(--line); }
.specs div { display: flex; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.specs dt { width: 64px; color: var(--muted); flex: none; }
.specs dd { margin: 0; }
.desc { color: var(--muted); white-space: pre-wrap; }
.stock-note { font-size: 12px; color: var(--muted); margin: 8px 0 0; text-align: center; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--silver); color: var(--on-silver); padding: 10px 18px; font-size: 13px; z-index: 30; }

/* 法律・お知らせのページ */
.page { max-width: 760px; margin: 0 auto; padding: 48px 16px; }
.page h1 { font-family: var(--en); letter-spacing: .1em; font-weight: 500; font-size: 22px; }
.page table { width: 100%; border-collapse: collapse; }
.page th, .page td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.page th { width: 32%; color: var(--muted); font-weight: 400; }
.todo { color: var(--sale); }
