:root {
  color-scheme: dark;
  --bg: #0b0d12;
  --panel: rgba(17, 23, 35, 0.86);
  --panel-strong: #141b28;
  --border: rgba(135, 160, 210, 0.2);
  --text: #edf2ff;
  --muted: #9aa7c7;
  --accent: #69e2ff;
  --accent-2: #5ff2b4;
  --danger: #ff6874;
  --warning: #ffc76b;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(105, 226, 255, 0.16), transparent 30%),
    radial-gradient(circle at top right, rgba(95, 242, 180, 0.14), transparent 26%),
    linear-gradient(180deg, #06070b 0%, #0d1119 52%, #090b11 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent);
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 64px;
}

.topbar,
.status-strip,
.product-card {
  backdrop-filter: blur(18px);
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}

.eyebrow,
.meta-label,
.detail-label {
  margin: 0;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
}

h1 {
  margin: 8px 0 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 0.98;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
}

.refresh-meta {
  min-width: 190px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

#refresh-button {
  border: 0;
  border-radius: 999px;
  padding: 14px 20px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  color: #061118;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 30px rgba(95, 242, 180, 0.22);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

#refresh-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 38px rgba(95, 242, 180, 0.28);
}

.status-strip {
  margin-bottom: 24px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.status-chip.warning {
  border-color: rgba(255, 199, 107, 0.35);
  color: #ffe4b7;
}

.status-chip.error {
  border-color: rgba(255, 104, 116, 0.35);
  color: #ffd3d7;
}

.status-chip.success {
  border-color: rgba(95, 242, 180, 0.35);
  color: #cbffe9;
}

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

.product-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(21, 28, 42, 0.92), rgba(11, 15, 24, 0.96));
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.product-card::after {
  content: "";
  position: absolute;
  inset: auto -10% 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(105, 226, 255, 0.5), transparent);
}

.card-media {
  aspect-ratio: 16 / 9;
  width: 100%;
  object-fit: cover;
  display: block;
  background: #111827;
}

.card-body {
  padding: 18px;
}

.card-topline,
.detail-row,
.card-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.card-topline {
  align-items: start;
  margin-bottom: 14px;
}

.card-title {
  margin: 0 0 4px;
  font-size: 1.1rem;
}

.card-subtitle,
.detail-value {
  color: var(--muted);
}

.stock-badge {
  flex-shrink: 0;
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.stock-badge.in-stock {
  color: #0a1a13;
  background: linear-gradient(135deg, #81f5c6, #5ff2b4);
}

.stock-badge.out-of-stock {
  color: #29070b;
  background: linear-gradient(135deg, #ff9ea6, #ff6874);
}

.stock-badge.pending {
  color: #2b1c00;
  background: linear-gradient(135deg, #ffe0a3, #ffc76b);
}

.detail-stack {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.detail-row {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.detail-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.buy-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.buy-link:hover {
  background: rgba(255, 255, 255, 0.1);
}

.empty-state {
  padding: 28px;
  border-radius: 24px;
  border: 1px dashed var(--border);
  color: var(--muted);
  text-align: center;
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 24px;
  }

  .topbar,
  .toolbar,
  .card-topline,
  .detail-row,
  .card-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .refresh-meta {
    min-width: 0;
  }
}
