:root {
  color-scheme: dark;
  --bg-start: #06070f;
  --bg-end: #121528;
  --surface: rgba(14, 17, 31, 0.88);
  --surface-strong: rgba(21, 26, 45, 0.96);
  --surface-soft: rgba(31, 36, 59, 0.82);
  --surface-muted: rgba(255, 255, 255, 0.06);
  --line: rgba(181, 166, 241, 0.16);
  --line-strong: rgba(255, 255, 255, 0.12);
  --ink: #f6f5ff;
  --ink-soft: #a5acc9;
  --ink-muted: #838aa7;
  --primary: #cbbaff;
  --primary-strong: #f1c76f;
  --ready-bg: rgba(44, 214, 124, 0.12);
  --ready-ink: #77f0af;
  --preorder-bg: rgba(255, 180, 76, 0.14);
  --preorder-ink: #ffc66d;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --radius-lg: 28px;
  --radius-md: 22px;
  --radius-sm: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at top, rgba(153, 109, 255, 0.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(255, 181, 79, 0.12), transparent 22%),
    linear-gradient(180deg, var(--bg-start) 0%, var(--bg-end) 100%);
  color: var(--ink);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  padding: 20px 16px 20px;
}

button,
input {
  font: inherit;
}

.app-shell {
  background: linear-gradient(180deg, rgba(10, 13, 24, 0.92), rgba(12, 14, 25, 0.88));
  backdrop-filter: blur(22px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 32px;
  box-shadow: var(--shadow);
  margin: 0 auto;
  max-width: 820px;
  min-height: calc(100vh - 136px);
  overflow: hidden;
}

.topbar {
  align-items: center;
  background: rgba(10, 13, 24, 0.84);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 16px;
  grid-template-columns: 48px 1fr 48px;
  padding: 20px 20px 18px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-title {
  min-width: 0;
  text-align: center;
}

.topbar-title h1,
.topbar-title .eyebrow {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-title h1,
.search-hub-title,
.section-heading h3,
.empty-state h4,
.product-title {
  font-family:
    "Iowan Old Style",
    "Palatino Linotype",
    "Book Antiqua",
    "Times New Roman",
    serif;
}

.topbar-title h1 {
  font-size: clamp(1.6rem, 2vw, 1.9rem);
  margin: 2px 0 0;
}

.eyebrow,
.hero-kicker,
.result-summary,
.product-code,
.category-tag,
.search-summary,
.status-chip,
.bottom-nav-label,
.bottom-nav-count,
.search-stat-label {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow,
.hero-kicker,
.result-summary,
.search-summary,
.product-code {
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 800;
}

.icon-button,
.text-button,
.bottom-nav-item {
  border: 0;
  cursor: pointer;
}

.icon-button {
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  color: var(--ink);
  display: inline-flex;
  height: 48px;
  justify-content: center;
  transition:
    transform 120ms ease,
    background 120ms ease,
    border-color 120ms ease;
  width: 48px;
}

.icon-button:hover,
.text-button:hover,
.bottom-nav-item:hover {
  transform: translateY(-1px);
}

.icon-button:active,
.text-button:active,
.bottom-nav-item:active {
  transform: scale(0.98);
}

.icon-button svg,
.search-field svg {
  height: 22px;
  width: 22px;
}

.main-layout {
  padding: 20px 20px 28px;
}

.search-hub,
.info-panel,
.feedback-banner,
.product-card,
.empty-state {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.search-hub {
  background:
    radial-gradient(circle at top right, rgba(255, 190, 92, 0.18), transparent 30%),
    linear-gradient(135deg, #121625 0%, #1a2040 52%, #221d39 100%);
  color: #fffdf8;
  display: grid;
  gap: 18px;
  padding: 22px;
}

.search-heading {
  display: grid;
  gap: 8px;
}

.search-hub-title {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  line-height: 1.1;
  margin: 0;
}

.hero-copy {
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.6;
  margin: 0;
  max-width: 34rem;
}

.search-shell {
  background: rgba(8, 12, 24, 0.54);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 14px;
}

.search-field-main {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  gap: 12px;
  min-height: 68px;
  padding: 8px 8px 8px 18px;
}

.search-field-main input {
  font-size: 1rem;
  min-height: 50px;
}

.search-clear-button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: var(--ink);
  flex: 0 0 auto;
  font-weight: 700;
  min-height: 44px;
  padding: 0 16px;
}

.info-panel,
.feedback-banner,
.section-heading,
.product-list {
  margin-top: 18px;
}

.info-panel,
.feedback-banner,
.empty-state,
.product-card {
  background: var(--surface-soft);
  backdrop-filter: blur(12px);
}

.info-panel {
  padding: 16px;
}

.info-row {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.info-row + .info-row {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 12px;
}

.info-row strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.info-row span {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: right;
}

.search-field {
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 999px;
  display: flex;
  gap: 10px;
  padding: 0 16px;
}

.search-field input {
  background: transparent;
  border: 0;
  color: var(--ink);
  min-height: 52px;
  outline: 0;
  width: 100%;
}

.search-field input::placeholder {
  color: var(--ink-muted);
}

.search-actions {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-top: 14px;
}

.search-actions-main {
  align-items: flex-start;
  margin-top: 14px;
}

.search-stats {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
}

.search-stat {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 14px;
}

.search-stat-number {
  color: var(--ink);
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1;
}

.search-stat-label {
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 800;
}

.text-button {
  background: transparent;
  color: var(--primary);
  font-weight: 700;
  padding: 0;
}

.section-heading {
  align-items: end;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.section-heading h3 {
  color: var(--ink);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 4px 0 0;
}

.feedback-banner {
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.5;
  padding: 14px 16px;
}

.feedback-banner.is-error {
  background: rgba(125, 35, 52, 0.25);
  border-color: rgba(255, 129, 149, 0.18);
  color: #ffd5dd;
}

.product-list {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, 1fr);
}

.product-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
}

.product-media {
  align-items: center;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.1), transparent 60%),
    linear-gradient(180deg, #181b2b 0%, #0f1220 100%);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  overflow: hidden;
  padding: 4px;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.product-media img {
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
  transform: scale(1.2);
}

.product-media.is-fallback {
  color: var(--ink);
  font-size: 1.6rem;
  font-weight: 800;
}

.product-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-topline {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 2px;
}

.status-chip,
.category-tag {
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 4px 8px;
}

.status-ready {
  background: var(--ready-bg);
  color: var(--ready-ink);
}

.status-preorder {
  background: var(--preorder-bg);
  color: var(--preorder-ink);
}

.status-default {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink-soft);
}

.category-tag {
  background: rgba(255, 255, 255, 0.07);
  color: var(--primary);
}

.product-title {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.2;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-price {
  color: var(--primary-strong);
  font-size: 1rem;
  font-weight: 800;
  margin: 2px 0 0;
}

.product-meta {
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.3;
  margin: 0;
}

.empty-state {
  padding: 24px 18px;
  text-align: center;
}

.empty-state h4 {
  color: var(--ink);
  font-size: 1.4rem;
  margin: 0 0 8px;
}

.empty-state p {
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0;
}

.bottom-nav {
  background: rgba(7, 9, 18, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  display: flex;
  gap: 10px;
  margin-top: 18px;
  overflow-x: auto;
  padding: 10px;
  scrollbar-width: none;
  width: 100%;
}

.bottom-nav::-webkit-scrollbar {
  display: none;
}

.bottom-nav-item {
  align-items: center;
  background: transparent;
  border-radius: 18px;
  color: var(--ink-soft);
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 6px;
  min-width: 78px;
  padding: 10px 12px;
  transition:
    background 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease,
    transform 180ms ease;
}

.bottom-nav-item.is-active {
  background: linear-gradient(180deg, rgba(120, 88, 231, 0.26), rgba(246, 184, 102, 0.16));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  color: var(--ink);
}

.bottom-nav-icon {
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.bottom-nav-icon svg {
  height: 18px;
  width: 18px;
}

.bottom-nav-item.is-active .bottom-nav-icon {
  background: rgba(255, 255, 255, 0.12);
}

.bottom-nav-label {
  font-size: 0.68rem;
  font-weight: 800;
}

.bottom-nav-count {
  color: inherit;
  font-size: 0.7rem;
  opacity: 0.78;
}



.is-hidden {
  display: none;
}

.skeleton-card {
  overflow: hidden;
}

.skeleton-block {
  animation: pulse 1.2s ease-in-out infinite;
  background:
    linear-gradient(90deg, rgba(60, 66, 97, 0.55), rgba(102, 109, 153, 0.85), rgba(60, 66, 97, 0.55));
  background-size: 200% 100%;
}

.skeleton-row {
  border-radius: 999px;
  height: 12px;
}

.skeleton-row + .skeleton-row {
  margin-top: 12px;
}

.skeleton-row.short {
  width: 36%;
}

.skeleton-row.medium {
  width: 56%;
}

@keyframes pulse {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

@media (min-width: 640px) {
  body {
    padding: 28px;
  }

  .main-layout {
    padding: 24px 24px 30px;
  }

  .product-list {
    grid-template-columns: 1fr;
  }

  .product-card {
    gap: 12px;
    padding: 16px;
  }
}

@media (max-width: 520px) {
  .topbar {
    grid-template-columns: 44px 1fr 44px;
    padding: 16px 16px 14px;
  }

  .main-layout {
    padding: 16px 16px 24px;
  }

  .search-field-main {
    border-radius: 24px;
    padding: 10px 10px 10px 16px;
  }

  .search-field-main input {
    min-height: 40px;
    min-width: 0;
  }

  .info-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .info-row span {
    text-align: left;
  }

  .search-actions,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-title {
    white-space: normal;
  }

  .bottom-nav {
    gap: 8px;
    padding: 8px;
    margin-top: 12px;
  }

  .bottom-nav-item {
    min-width: 72px;
    padding: 10px;
  }
}
