@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap");

:root {
  --bg: #f7f6f3;
  --surface: #ffffff;
  --surface-muted: #f1f2f0;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #1f2937;
  --accent-soft: #e2e8f0;
  --danger: #b91c1c;
  --ok: #047857;
  --shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #fbfaf8, #f2f3f1);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-mark {
  font-family: "IBM Plex Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  color: var(--muted);
}

.brand-sub {
  font-size: 20px;
  font-weight: 600;
}

.nav {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 10px;
  font-weight: 500;
}

.nav a.active {
  color: var(--ink);
  background: var(--accent-soft);
}

.app {
  flex: 1;
  padding: 24px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.section-title {
  font-size: 22px;
  font-weight: 600;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow);
}

.card.muted {
  background: var(--surface-muted);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.card-title {
  font-weight: 600;
}

.card-price {
  font-size: 20px;
  font-weight: 600;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  color: var(--muted);
  font-size: 13px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.thumb {
  width: 72px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  cursor: pointer;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  background: var(--accent-soft);
  border-radius: 999px;
  font-size: 12px;
  color: var(--ink);
}

.tag input {
  margin-right: 6px;
}

.button {
  border: none;
  background: var(--accent);
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}

.button.secondary {
  background: var(--accent-soft);
  color: var(--ink);
}

.button.danger {
  background: var(--danger);
}

.button.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}

.button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form {
  display: grid;
  gap: 12px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

label {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  font-family: inherit;
  font-size: 14px;
  background: #ffffff;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

.helper {
  font-size: 12px;
  color: var(--muted);
}

.notice {
  padding: 12px 14px;
  background: var(--surface-muted);
  border-radius: 12px;
  font-size: 14px;
}

.notice.ok {
  background: rgba(4, 120, 87, 0.12);
  color: var(--ok);
}

.notice.error {
  background: rgba(185, 28, 28, 0.12);
  color: var(--danger);
}

.carousel {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.carousel img {
  width: 100%;
  display: block;
  height: 180px;
  object-fit: cover;
}

.carousel-controls {
  position: absolute;
  inset: auto 10px 10px auto;
  display: flex;
  gap: 6px;
}

.carousel-controls button {
  border: none;
  background: rgba(17, 24, 39, 0.8);
  color: #ffffff;
  border-radius: 999px;
  width: 32px;
  height: 32px;
  cursor: pointer;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 20px;
}

.detail-image {
  border-radius: 16px;
  border: 1px solid var(--line);
  overflow: hidden;
}

.detail-image img {
  width: 100%;
  height: 340px;
  object-fit: cover;
}

.detail-panel {
  background: var(--surface);
  border-radius: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tab-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tab {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

.tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
}

.modal.active {
  display: flex;
}

.modal-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 18px;
  max-width: 520px;
  width: 100%;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.turnstile {
  min-height: 64px;
}

.site-footer {
  padding: 18px 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--line);
}

.footer-muted {
  opacity: 0.8;
}

.empty {
  padding: 20px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  text-align: center;
  color: var(--muted);
}

.noscript {
  padding: 18px;
  text-align: center;
  background: var(--surface-muted);
}

@media (max-width: 900px) {
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .nav {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 16px;
  }

  .app {
    padding: 16px;
  }

  .card-price {
    font-size: 18px;
  }
}
