:root {
  --bg-1: #f8fafc;
  --bg-2: #fff2de;
  --ink: #172434;
  --muted: #4f6073;
  --brand: #ff6a2b;
  --brand-2: #1f9f9d;
  --card: rgba(255, 255, 255, 0.86);
  --line: rgba(23, 36, 52, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 15%, rgba(255, 106, 43, 0.18), transparent 45%),
    radial-gradient(circle at 85% 10%, rgba(31, 159, 157, 0.22), transparent 40%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2));
  min-height: 100vh;
}

.page {
  width: min(1120px, calc(100% - 2rem));
  margin: 2rem auto 3rem;
  display: grid;
  gap: 1rem;
  animation: page-in 340ms ease-out both;
}

.hero,
.summary article,
.panel {
  backdrop-filter: blur(8px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 12px 24px rgba(23, 36, 52, 0.08);
}

.hero {
  padding: 1.1rem 1.2rem;
}

.eyebrow {
  margin: 0;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  color: var(--brand-2);
  font-weight: 700;
}

h1 {
  margin: 0.45rem 0 0.25rem;
  font-family: "Fraunces", serif;
  font-size: clamp(1.5rem, 1.8vw + 1rem, 2.4rem);
  line-height: 1.1;
}

.status {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.summary article {
  padding: 0.9rem 1rem;
}

.summary p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.summary h2 {
  margin: 0.24rem 0 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.update-time {
  margin: 0.16rem 0 0;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--ink);
}

.next-update {
  margin: 0.1rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.internal-link-btn {
  display: inline-block;
  margin-top: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.28rem 0.72rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.78);
}

.internal-link-btn:hover {
  border-color: var(--brand-2);
  color: var(--brand-2);
}

.panel {
  overflow: hidden;
}

.panel-head {
  display: flex;
  gap: 0.65rem;
  padding: 0.9rem;
  border-bottom: 1px solid var(--line);
}

.panel-head input {
  flex: 1 1 auto;
  min-width: 220px;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.7rem 0.9rem 0;
}

.category-tab {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.32rem 0.78rem;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}

.category-tab.active {
  background: linear-gradient(130deg, var(--brand), #ff9257);
  color: #fff;
  border-color: transparent;
}

input,
button,
select {
  font: inherit;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 11px;
  padding: 0.7rem 0.8rem;
}

select {
  min-width: 180px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 11px;
  padding: 0.7rem 0.8rem;
  color: var(--ink);
}

button {
  border: 0;
  border-radius: 11px;
  padding: 0.7rem 0.95rem;
  background: linear-gradient(130deg, var(--brand), #ff9257);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.list-wrap {
  padding: 0.85rem 0.9rem 0.9rem;
}

.product-list {
  display: grid;
  gap: 0.75rem;
}

.product-card {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  border-radius: 14px;
  padding: 0.75rem 0.85rem;
}

.product-head {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.52rem;
}

.product-thumb {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #fff;
  flex-shrink: 0;
}

.product-thumb.placeholder {
  display: grid;
  place-items: center;
  font-size: 0.65rem;
  color: var(--muted);
  font-weight: 700;
}

.product-card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.product-head-text {
  min-width: 0;
}

.product-meta {
  margin: 0.16rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}

.product-head-text .stock-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  margin-top: 0.34rem;
  padding: 0.12rem 0.5rem !important;
  border-radius: 999px !important;
  border: 1px solid var(--line) !important;
  background: rgba(255, 255, 255, 0.9) !important;
  color: var(--ink) !important;
  font-size: 0.68rem !important;
  line-height: 1.1 !important;
  font-weight: 700;
  box-shadow: none !important;
}

.product-head-text .stock-toggle-btn:hover {
  border-color: var(--brand-2);
  color: var(--brand-2);
}

.stock-lines {
  display: grid;
  gap: 0.32rem;
}

.stock-lines.is-collapsed {
  display: none;
}

.stock-line {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink);
  line-height: 1.45;
  word-break: break-word;
}

.stock-value {
  font-weight: 700;
}

.product-link {
  color: #006cc9;
  text-decoration: none;
  font-weight: 600;
}

.product-link:hover {
  text-decoration: underline;
}

.product-link.disabled {
  color: var(--muted);
  pointer-events: none;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 1rem;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-head {
    flex-wrap: wrap;
  }

  .panel-head input {
    flex-basis: 100%;
  }

  .panel-head select,
  .panel-head button {
    flex: 1 1 160px;
  }

  .page {
    width: min(1120px, calc(100% - 1rem));
    margin-top: 1rem;
  }
}
