:root {
  --bg: #f7f7f8;
  --card: #ffffff;
  --text: #1a1a1a;
  --muted: #6b7280;
  --accent: #111827;
  --border: #e5e7eb;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
header a.brand { font-weight: 700; font-size: 18px; text-decoration: none; color: var(--text); }
nav a { color: var(--muted); text-decoration: none; margin-left: 16px; }
.cart-link { position: relative; }
#cart-count {
  position: absolute; top: -8px; right: -12px;
  background: #ef4444; color: #fff; font-size: 11px;
  border-radius: 999px; padding: 1px 6px; display: none;
}
.container { max-width: 1080px; margin: 0 auto; padding: 24px; }
.grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden; text-decoration: none; color: inherit;
  transition: box-shadow .15s ease;
}
.card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.card .body { padding: 12px 14px; }
.card .name { font-weight: 600; }
.card .price { color: var(--accent); font-weight: 700; margin-top: 4px; }
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.product-detail img { width: 100%; border-radius: 12px; }
button, .btn {
  background: var(--accent); color: #fff; border: 0; border-radius: 8px;
  padding: 10px 16px; font-size: 14px; cursor: pointer;
}
button:disabled { opacity: .5; cursor: not-allowed; }
.qty { width: 64px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; }
.line-item { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); }
.total { font-weight: 700; font-size: 18px; text-align: right; margin-top: 12px; }
.muted { color: var(--muted); }
#paypal-button { margin-top: 16px; min-height: 50px; }
.notice { padding: 24px; text-align: center; color: var(--muted); }
.back { display: inline-block; margin-bottom: 16px; color: var(--muted); text-decoration: none; }
.gallery img#main-img { width: 100%; border-radius: 12px; }
.gallery .thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.gallery .thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); cursor: pointer; }
.gallery .thumb:hover { border-color: var(--accent); }
