/* ---------------------------------------------------------------------------
   MONO BAKEMONO — core styles
   Dark, minimal, editorial. Black ground, off-white text, one red accent.
   --------------------------------------------------------------------------- */

:root {
  --bg: #0a0a0a;
  --bg-raised: #141414;
  --ink: #ece8e1;        /* off-white */
  --ink-dim: #8d8880;
  --accent: #8b0000;     /* dark red */
  --accent-bright: #b51d1d;
  --line: #262320;
  --serif: "Noto Serif JP", "Cinzel", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --maxw: 1280px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

img { display: block; max-width: 100%; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: 0.02em; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin: 0 0 14px;
}

/* ---- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 14px 28px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn--accent { border-color: var(--accent); background: var(--accent); color: var(--ink); }
.btn--accent:hover { background: var(--accent-bright); border-color: var(--accent-bright); }
.btn--block { display: block; width: 100%; text-align: center; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---- Header ------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(10, 10, 10, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.brand {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
.brand span { color: var(--accent-bright); }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-dim); transition: color 0.2s; }
.nav a:hover, .nav a.is-active { color: var(--ink); }

.cart-btn {
  position: relative;
  background: none;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cart-btn__badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--ink);
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  font-family: var(--sans);
  letter-spacing: 0;
}
.cart-btn__badge[hidden] { display: none; }

/* ---- Hero -------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 82vh;
  display: flex;
  align-items: flex-end;
  background-color: #000;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.55) 45%, rgba(10,10,10,0.96) 100%);
}
.hero__inner { position: relative; z-index: 2; padding: 0 24px 72px; max-width: var(--maxw); margin: 0 auto; width: 100%; }
.hero h1 {
  font-size: clamp(38px, 7vw, 92px);
  line-height: 1.02;
  margin: 0 0 22px;
  max-width: 14ch;
  text-shadow: 0 2px 30px rgba(0,0,0,0.6);
}
.hero p { max-width: 52ch; color: var(--ink); font-size: 17px; margin: 0 0 30px; opacity: 0.92; }

/* ---- Section headings -------------------------------------------------- */
.section { padding: 84px 0; }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 38px; }
.section__head h2 { font-size: clamp(26px, 4vw, 40px); margin: 0; }
.section__head a { font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-dim); border-bottom: 1px solid transparent; }
.section__head a:hover { color: var(--ink); border-color: var(--accent); }

/* ---- Product grid ------------------------------------------------------ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 4px;
}
.card { position: relative; display: block; background: var(--bg-raised); }
.card__media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #0d0d0d;
}
.card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.5s ease, transform 0.6s ease;
}
.card:hover .card__media img { transform: scale(1.04); }

/* styled fallback panel when a product has no image */
.img-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  background:
    repeating-linear-gradient(45deg, #111 0 12px, #0c0c0c 12px 24px);
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
}

.card__body { padding: 16px 16px 22px; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.card__title { font-family: var(--serif); font-size: 16px; letter-spacing: 0.02em; }
.card__price { color: var(--ink-dim); font-size: 14px; white-space: nowrap; }
.card__view {
  position: absolute;
  left: 16px;
  bottom: 64px;
  z-index: 3;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 8px 16px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s, transform 0.25s;
}
.card:hover .card__view { opacity: 1; transform: translateY(0); }

/* ---- Brand story ------------------------------------------------------- */
.story { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.story__inner { max-width: 760px; margin: 0 auto; text-align: center; padding: 92px 24px; }
.story h2 { font-size: clamp(24px, 4vw, 36px); margin: 0 0 22px; }
.story p { color: var(--ink-dim); font-size: 18px; line-height: 1.8; }
.story .jp { font-family: var(--serif); color: var(--accent-bright); font-size: 15px; letter-spacing: 0.3em; }

/* ---- Signup ------------------------------------------------------------ */
.signup { text-align: center; padding: 80px 24px; }
.signup h2 { font-size: clamp(22px, 3.5vw, 32px); margin: 0 0 10px; }
.signup p { color: var(--ink-dim); margin: 0 0 26px; }
.signup form { display: flex; gap: 0; max-width: 460px; margin: 0 auto; }
.signup input {
  flex: 1;
  background: transparent;
  border: 1px solid var(--line);
  border-right: 0;
  color: var(--ink);
  padding: 0 18px;
  font-size: 15px;
  font-family: var(--sans);
}
.signup input:focus { outline: none; border-color: var(--ink-dim); }
.signup .msg { margin-top: 14px; font-size: 14px; color: var(--accent-bright); min-height: 18px; }

/* ---- Filter bar -------------------------------------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.filter-chip {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-dim);
  padding: 9px 20px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: var(--sans);
  transition: all 0.2s;
}
.filter-chip:hover { color: var(--ink); border-color: var(--ink-dim); }
.filter-chip.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---- Page title -------------------------------------------------------- */
.page-head { padding: 64px 0 8px; }
.page-head h1 { font-size: clamp(34px, 6vw, 64px); margin: 0; }
.page-head p { color: var(--ink-dim); margin: 12px 0 0; }

/* ---- Footer ------------------------------------------------------------ */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0; margin-top: 40px; }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 26px; }
.site-footer a { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-dim); }
.site-footer a:hover { color: var(--ink); }
.site-footer__mark { font-family: var(--serif); letter-spacing: 0.28em; text-transform: uppercase; font-size: 15px; }
.site-footer small { display: block; width: 100%; color: var(--ink-dim); font-size: 12px; margin-top: 18px; }

/* ---- Loading / empty states ------------------------------------------- */
.state { padding: 80px 24px; text-align: center; color: var(--ink-dim); grid-column: 1 / -1; }

/* ---------------------------------------------------------------------------
   Product detail page
   --------------------------------------------------------------------------- */
.pdp { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; padding: 48px 0 90px; }
.gallery__main {
  position: relative;
  aspect-ratio: 4 / 5;
  background: #0d0d0d;
  overflow: hidden;
}
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.gallery__thumb {
  width: 72px;
  height: 90px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.5;
  border: 1px solid transparent;
  transition: opacity 0.2s, border-color 0.2s;
}
.gallery__thumb:hover { opacity: 0.85; }
.gallery__thumb.is-active { opacity: 1; border-color: var(--accent); }

.pdp__info h1 { font-size: clamp(28px, 4vw, 44px); margin: 0 0 12px; }
.pdp__price { font-size: 22px; color: var(--ink); margin: 0 0 28px; }

.option-group { margin-bottom: 22px; }
.option-group__label { font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-dim); margin-bottom: 10px; }
.option-values { display: flex; flex-wrap: wrap; gap: 8px; }
.option-value {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 10px 18px;
  font-size: 13px;
  letter-spacing: 0.08em;
  cursor: pointer;
  font-family: var(--sans);
  transition: all 0.18s;
}
.option-value:hover { border-color: var(--ink-dim); }
.option-value.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.option-value:disabled { opacity: 0.3; cursor: not-allowed; text-decoration: line-through; }
.option-value.is-soldout:not(.is-active) { opacity: 0.45; text-decoration: line-through; }

.pdp__stock { font-size: 13px; letter-spacing: 0.08em; margin: 0 0 22px; min-height: 18px; }
.pdp__stock.in { color: #4caf7d; }
.pdp__stock.out { color: var(--accent-bright); }

.pdp__desc { margin-top: 40px; border-top: 1px solid var(--line); padding-top: 28px; }
.pdp__poem {
  font-family: var(--serif);
  white-space: pre-line;
  color: var(--accent-bright);
  letter-spacing: 0.06em;
  line-height: 2;
  margin: 0 0 24px;
  font-size: 16px;
}
.pdp__desc-body { color: var(--ink-dim); line-height: 1.8; }
.pdp__desc-body p { margin: 0 0 14px; }

/* collapsible size guide */
.collapse { border-top: 1px solid var(--line); margin-top: 18px; }
.collapse summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 0;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
}
.collapse summary::-webkit-details-marker { display: none; }
.collapse summary::after { content: "+"; color: var(--accent-bright); }
.collapse[open] summary::after { content: "–"; }
.collapse__body { color: var(--ink-dim); padding-bottom: 20px; font-size: 14px; line-height: 1.8; }
.collapse__body table { width: 100%; border-collapse: collapse; }
.collapse__body th, .collapse__body td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; font-weight: 400; }
.collapse__body th { color: var(--ink); }

/* ---- Responsive -------------------------------------------------------- */
@media (max-width: 880px) {
  .pdp { grid-template-columns: 1fr; gap: 32px; }
  .nav { gap: 18px; }
  .nav a:not(.nav__shop) { display: none; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .card__body { flex-direction: column; gap: 4px; }
  .signup form { flex-direction: column; gap: 10px; }
  .signup input { border-right: 1px solid var(--line); padding: 14px 18px; }
}
