/* ============================================================
   FIDO v3 — Premium Gadget Commerce design system
   palette: ink/paper/smoke + cobalt(accent) + sale(orange)
   type: Space Grotesk (display/nums) + Noto Sans JP (body)
   signature: SPEC BAR — 製品情報を計器のように並べる
   ============================================================ */
:root {
  --ink: #0e0f11;
  --ink-soft: #1a1c1f;
  --paper: #ffffff;
  --smoke: #f2f3f5;
  --smoke-deep: #e9ebee;
  --line: #e3e5e8;
  --graphite: #565b62;
  --muted: #8a9097;
  --cobalt: #1f4fd8;
  --cobalt-ink: #173db0;
  --sale: #e04416;
  --ok: #17804a;
  --radius: 14px;
  --maxw: 1200px;
  --font-disp: "Space Grotesk", "Noto Sans JP", sans-serif;
  --font-body: "Noto Sans JP", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: 15px; line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 2px; border-radius: 4px; }
.num { font-family: var(--font-disp); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

/* ---- announce ---- */
.v3-announce {
  background: var(--ink); color: #fff; text-align: center;
  font-size: 11.5px; letter-spacing: 0.06em; padding: 8px 12px;
  position: relative; overflow: hidden; height: 34px;
}
.v3-announce span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; animation: v3-ann 12s infinite; padding: 0 12px; }
.v3-announce span:nth-child(2) { animation-delay: 4s; }
.v3-announce span:nth-child(3) { animation-delay: 8s; }
@keyframes v3-ann { 0%,4% {opacity:0} 8%,30% {opacity:1} 34%,100% {opacity:0} }
@media (prefers-reduced-motion: reduce) {
  .v3-announce span { animation: none; }
  .v3-announce span:first-child { opacity: 1; }
}

/* ---- header ---- */
.v3-header {
  position: sticky; top: 0; z-index: 60; background: rgba(255,255,255,.94);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.v3-header-in {
  max-width: var(--maxw); margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px;
}
.v3-logo img { height: 22px; width: auto; }
.v3-nav { display: flex; gap: 26px; font-size: 13px; font-weight: 500; }
.v3-nav a { color: var(--graphite); transition: color .15s; }
.v3-nav a:hover { color: var(--ink); }
.v3-nav a.is-sale { color: var(--sale); font-weight: 700; }
@media (max-width: 720px) { .v3-nav { gap: 16px; font-size: 12px; } .v3-nav .hide-sp { display: none; } }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 26px; border-radius: 10px; border: 0; cursor: pointer;
  font-size: 14px; font-weight: 700; letter-spacing: .02em; text-align: center;
  transition: background-color .15s, transform .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--cobalt); }
.btn-buy { background: var(--cobalt); color: #fff; width: 100%; font-size: 15px; min-height: 54px; border-radius: 12px; }
.btn-buy:hover { background: var(--cobalt-ink); }
.btn-buy[disabled] { background: var(--smoke-deep); color: var(--muted); cursor: not-allowed; }
.btn-ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 12.5px; border-radius: 9px; }

/* ---- SPEC BAR (signature) ---- */
.specbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0;
  font-family: var(--font-disp); font-size: 11px; font-weight: 500;
  letter-spacing: .08em; color: var(--graphite); text-transform: uppercase;
}
.specbar span { display: inline-flex; align-items: center; }
.specbar span + span::before {
  content: ""; width: 1px; height: 10px; background: var(--line); margin: 0 10px; display: inline-block;
}

/* ---- price block ---- */
.price-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.price-sale { font-family: var(--font-disp); font-weight: 700; font-size: 22px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.price-was { color: var(--muted); text-decoration: line-through; font-size: 13px; font-variant-numeric: tabular-nums; }
.off-pill {
  background: var(--sale); color: #fff; font-family: var(--font-disp); font-weight: 700;
  font-size: 11px; padding: 3px 8px; border-radius: 999px; letter-spacing: .02em;
}
.tax-note { font-size: 11px; color: var(--muted); }

/* ---- stock ---- */
.stock { font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.stock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.stock.is-low { color: var(--sale); } .stock.is-low::before { background: var(--sale); }
.stock.is-out { color: var(--muted); } .stock.is-out::before { background: var(--muted); }

/* ---- category chips ---- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1.5px solid var(--line); background: #fff; border-radius: 999px;
  padding: 8px 16px; font-size: 12.5px; font-weight: 600; cursor: pointer; color: var(--graphite);
  transition: all .15s; min-height: 40px;
}
.chip .n { font-family: var(--font-disp); color: var(--muted); margin-left: 5px; font-size: 11px; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.is-active .n { color: rgba(255,255,255,.6); }

/* ---- product card ---- */
.pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 980px) { .pgrid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .pgrid { grid-template-columns: 1fr 1fr; gap: 10px; } }
.pcard {
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  display: flex; flex-direction: column; overflow: hidden; position: relative;
  transition: border-color .15s, box-shadow .2s, transform .2s;
}
.pcard:hover { border-color: #c9ccd1; box-shadow: 0 10px 30px rgba(14,15,17,.08); transform: translateY(-2px); }
.pcard-media { background: var(--smoke); aspect-ratio: 1/1; position: relative; display: grid; place-items: center; }
.pcard-media img { width: 78%; height: 78%; object-fit: contain; mix-blend-mode: multiply; }
.pcard-media .off-pill { position: absolute; top: 12px; left: 12px; }
.pcard-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.pcard-cat { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; font-family: var(--font-disp); }
.pcard-name { font-family: var(--font-disp); font-weight: 700; font-size: 15.5px; letter-spacing: -0.01em; line-height: 1.3; margin: 0; }
.pcard-benefit { font-size: 12px; color: var(--graphite); line-height: 1.6; margin: 0; }
.pcard .specbar { font-size: 10px; }
.pcard .price-sale { font-size: 18px; }
.pcard-foot { margin-top: auto; display: flex; flex-direction: column; gap: 9px; padding-top: 4px; }
.pcard-ctas { display: flex; gap: 8px; }
.pcard-ctas .btn { flex: 1; }
.pcard.is-soldout .pcard-media::after {
  content: "SOLD OUT"; position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(255,255,255,.72); font-family: var(--font-disp); font-weight: 700; letter-spacing: .2em; color: var(--graphite);
}
@media (max-width: 560px) {
  .pcard-body { padding: 11px 12px 13px; }
  .pcard-name { font-size: 13.5px; }
  .pcard-benefit { display: none; }
  .pcard .specbar { display: none; }
  .pcard-ctas { flex-direction: column; }
}

/* ---- sections ---- */
.sec { max-width: var(--maxw); margin: 0 auto; padding: clamp(44px, 7vw, 84px) 20px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 26px; flex-wrap: wrap; }
.sec-eyebrow { font-family: var(--font-disp); font-size: 11px; font-weight: 700; letter-spacing: .18em; color: var(--cobalt); text-transform: uppercase; margin: 0 0 10px; }
.sec-title { font-size: clamp(22px, 3.4vw, 32px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.3; margin: 0; }
.sec-sub { color: var(--graphite); font-size: 13.5px; margin: 8px 0 0; max-width: 560px; }

/* ---- trust tiles ---- */
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (max-width: 860px) { .trust-grid { grid-template-columns: repeat(2, 1fr); } }
.trust-cell { background: #fff; padding: 22px 20px; }
.trust-cell h3 { margin: 0 0 6px; font-size: 14px; font-weight: 700; }
.trust-cell p { margin: 0; font-size: 12.5px; color: var(--graphite); line-height: 1.7; }
.trust-cell a { color: var(--cobalt); text-decoration: underline; text-underline-offset: 3px; }

/* ---- FAQ ---- */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 16px 4px; font-weight: 700; font-size: 14px; list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 48px; }
.faq summary::after { content: "+"; font-family: var(--font-disp); color: var(--muted); font-size: 18px; }
.faq details[open] summary::after { content: "−"; }
.faq .faq-a { padding: 0 4px 18px; font-size: 13.5px; color: var(--graphite); }
.faq .faq-a a { color: var(--cobalt); text-decoration: underline; text-underline-offset: 3px; }

/* ---- footer ---- */
.v3-footer { background: var(--ink); color: #fff; margin-top: 30px; }
.v3-footer-in { max-width: var(--maxw); margin: 0 auto; padding: 46px 20px 34px; }
.v3-footer .flogo img { height: 20px; }
.v3-footer p { color: rgba(255,255,255,.55); font-size: 12.5px; margin: 14px 0 22px; }
.v3-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 12.5px; }
.v3-footer nav a { color: rgba(255,255,255,.78); }
.v3-footer nav a:hover { color: #fff; }
.v3-footer small { display: block; margin-top: 26px; font-size: 10.5px; color: rgba(255,255,255,.55); letter-spacing: .04em; }

/* ---- misc ---- */
.skeleton { color: transparent !important; background: var(--smoke); border-radius: 6px; }
