:root {
  --paper: #f6f5f1;
  --ink: #131311;
  --line: #e0ded6;
  --card: #ffffff;
  --volt: #b8f04a;
  --red: #e8442e;
  --display: "Instrument Sans", sans-serif;
  --body: "Instrument Sans", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- announcement bar ---------- */
.announce {
  background: var(--ink);
  color: var(--paper);
  text-align: center;
  padding: 8px 1rem;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.95rem clamp(1rem, 4vw, 3rem);
  background: rgba(246, 245, 241, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--ink);
}

.logo {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.logo span { color: transparent; -webkit-text-stroke: 1.2px var(--ink); margin-left: 3px; }

.menu-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  background: transparent;
  border: 2px solid var(--ink);
  padding: 0 9px;
  height: 38px;
  cursor: pointer;
  transition: background 0.15s;
}

.menu-btn span { width: 18px; height: 2px; background: var(--ink); transition: background 0.15s; }
.menu-btn:hover { background: var(--ink); }
.menu-btn:hover span { background: var(--paper); }

.cart-btn { margin-left: auto; }

.cart-btn {
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--ink);
  padding: 0.5rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: background 0.15s, color 0.15s;
}

.cart-btn:hover { background: var(--ink); color: var(--paper); }

.cart-count::before { content: "("; }
.cart-count::after { content: ")"; }
.cart-count { font-size: 0.85rem; font-weight: 700; }

/* ---------- hero ---------- */
.hero {
  padding: clamp(2.8rem, 7vw, 5rem) clamp(1rem, 4vw, 3rem) clamp(2.2rem, 5vw, 3.5rem);
}

.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.6rem, 7.5vw, 5.2rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.hero h1 em {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 1.6px var(--ink);
}

.hero-cta { display: flex; gap: 1rem; margin-top: 2.2rem; flex-wrap: wrap; }

.btn-fill, .btn-line {
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  padding: 0.95rem 1.9rem;
  cursor: pointer;
  display: inline-block;
  transition: transform 0.15s, background 0.15s, color 0.15s;
}

.btn-fill { background: var(--ink); color: var(--paper); border: 2px solid var(--ink); }
.btn-fill:hover { background: #333; border-color: #333; transform: translateY(-2px); }
.btn-line { background: transparent; color: var(--ink); border: 2px solid var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); transform: translateY(-2px); }
.btn-fill.wide { width: 100%; text-align: center; border: 0; }

/* ---------- product rails + grid ---------- */
.rail { padding: clamp(2.5rem, 6vw, 4rem) clamp(1rem, 4vw, 3rem) 0; }

.rail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.4rem;
}

.rail-head h2, .shop-head h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.rail-head a {
  color: var(--ink);
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  border-bottom: 2px solid var(--ink);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.2rem;
}

.card { background: var(--card); border: 2px solid var(--ink); }

.card-art {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(-45deg, #fafaf7 0 14px, #f2f1ec 14px 28px);
  border-bottom: 2px solid var(--ink);
  overflow: hidden;
}

.card-art svg { width: 72%; height: auto; }

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 3px 8px;
}

.badge.new { background: var(--ink); color: var(--paper); }
.badge.used { background: var(--card); color: var(--ink); border: 2px solid var(--ink); }

.card-add {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -46px;
  background: var(--ink);
  color: var(--paper);
  border: 0;
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  padding: 0.8rem;
  cursor: pointer;
  transition: bottom 0.2s;
}

.card:hover .card-add { bottom: 0; }
.card-add:hover { background: #333; }

.card-info {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.8rem;
  padding: 0.8rem 0.9rem;
}

.card-name { font-size: 0.86rem; font-weight: 600; line-height: 1.3; }
.card-price { font-weight: 700; white-space: nowrap; }

/* ---------- shop page ---------- */
.shop { padding: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 4vw, 3rem); }

.shop-head { display: flex; align-items: baseline; gap: 1.2rem; margin-bottom: 1.4rem; }

.label { font-size: 0.8rem; font-weight: 600; color: #77756c; letter-spacing: 0.08em; }

.chips { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1.8rem; }

.chip {
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  background: transparent;
  border: 2px solid var(--ink);
  color: var(--ink);
  padding: 0.5rem 1.1rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.chip:hover { background: var(--line); }
.chip.on { background: var(--ink); color: var(--paper); }

/* ---------- about ---------- */
.about { padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 4vw, 3rem); max-width: 60rem; }

.about h1 {
  font-family: var(--display);
  font-size: clamp(3rem, 9vw, 6.5rem);
  line-height: 0.95;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.about h1 em { font-style: normal; color: transparent; -webkit-text-stroke: 2.5px var(--ink); }

.about-body { max-width: 40rem; margin-bottom: 2.5rem; }
.about-body p { margin-bottom: 1.1rem; font-size: 1.05rem; }

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  margin-bottom: 2.5rem;
}

.about-cell { background: var(--card); border: 2px solid var(--ink); padding: 1.5rem; }
.about-cell h3 { font-family: var(--display); font-size: 1.1rem; margin-bottom: 0.5rem; }
.about-cell p { font-size: 0.92rem; }

/* ---------- footer ---------- */
.foot {
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  background: var(--ink);
  color: var(--paper);
  padding: 1.6rem clamp(1rem, 4vw, 3rem);
}

.foot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.foot-note { font-size: 0.8rem; color: #8a887e; }

.foot-social { display: flex; align-items: center; gap: 1.1rem; }

.foot-social a { color: var(--paper); display: inline-flex; transition: opacity 0.15s; }
.foot-social a:hover { opacity: 0.65; }
.foot-social svg { width: 19px; height: 19px; }

/* ---------- cart drawer ---------- */
.cart-drawer[hidden] { display: none; }

.cart-drawer {
  position: fixed;
  inset: 0;
  background: rgba(19, 19, 17, 0.5);
  z-index: 60;
  display: flex;
  justify-content: flex-end;
}

.cart-panel {
  width: 400px;
  max-width: 92vw;
  height: 100%;
  background: var(--paper);
  border-left: 2px solid var(--ink);
  display: flex;
  flex-direction: column;
  animation: drawer-in 0.22s ease;
}

@keyframes drawer-in { from { transform: translateX(40px); opacity: 0; } }

.cart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.3rem;
  border-bottom: 2px solid var(--ink);
}

.cart-head h3 { font-family: var(--display); font-weight: 700; font-size: 1rem; letter-spacing: 0.06em; }

.cart-head button {
  background: none;
  border: 0;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--ink);
  line-height: 1;
}

.cart-items { flex: 1; overflow-y: auto; padding: 1rem 1.3rem; }
.cart-empty { color: #77756c; font-size: 0.95rem; padding-top: 1rem; }

.cart-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
}

.cart-thumb {
  width: 56px;
  height: 56px;
  border: 2px solid var(--ink);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cart-thumb svg { width: 82%; height: auto; }

.cart-mid { flex: 1; min-width: 0; }
.cart-name { display: block; font-size: 0.85rem; font-weight: 600; line-height: 1.3; }
.cart-price { font-size: 0.85rem; font-weight: 700; }

.cart-qty { display: flex; align-items: center; gap: 0.55rem; }

.cart-qty button {
  width: 24px;
  height: 24px;
  border: 2px solid var(--ink);
  background: none;
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
}

.cart-qty button:hover { background: var(--line); }
.cart-qty span { font-weight: 700; min-width: 16px; text-align: center; }

.cart-foot { padding: 1.1rem 1.3rem; border-top: 2px solid var(--ink); }

.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  margin-bottom: 0.9rem;
}

/* ---------- toasts ---------- */
.toast-hold {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 70;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.toast {
  background: var(--ink);
  color: var(--paper);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.65rem 1.1rem;
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 rgba(19, 19, 17, 0.25);
  animation: toast-in 0.2s ease;
}

@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- sidebar ---------- */
.side[hidden] { display: none; }

.side {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(19, 19, 17, 0.5);
}

.side-panel {
  width: 300px;
  max-width: 84vw;
  height: 100%;
  background: var(--paper);
  border-right: 2px solid var(--ink);
  display: flex;
  flex-direction: column;
  animation: side-in 0.2s ease;
}

@keyframes side-in { from { transform: translateX(-30px); opacity: 0; } }

.side-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.4rem;
  border-bottom: 2px solid var(--ink);
}

.side-title { font-family: var(--display); font-weight: 700; font-size: 0.95rem; letter-spacing: 0.08em; }

.side-head button {
  background: none;
  border: 0;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
}

.side-links a {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
  padding: 0.7rem 1.4rem;
  border-bottom: 1px solid var(--line);
  transition: background 0.12s, color 0.12s;
}

.side-links a:hover { background: var(--ink); color: var(--paper); }

.side-foot {
  margin-top: auto;
  padding: 1.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #77756c;
  line-height: 2;
}

@media (max-width: 720px) {
  .nav { padding: 0.75rem 1rem; }
  .logo { font-size: 1.25rem; }
  .cart-btn { font-size: 0.78rem; padding: 0.45rem 0.8rem; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.8rem; }
  .hero-cta .btn-fill, .hero-cta .btn-line { padding: 0.8rem 1.3rem; font-size: 0.82rem; }
  .side-links a { font-size: 1.05rem; }
}
