:root {
  color-scheme: dark;
  --page: #090a09;
  --paper: #11120f;
  --paper-soft: #171814;
  --paper-raised: #1c1d18;
  --ink: #f3f0e8;
  --ink-soft: #a7a59d;
  --ink-muted: #74746d;
  --bronze: #c79152;
  --bronze-light: #e9bd7a;
  --line: rgba(243, 240, 232, 0.12);
  --line-strong: rgba(243, 240, 232, 0.22);
  --ready: #81c995;
  --preorder: #e6b96b;
  --danger: #ff7373;
  --nav-height: 88px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body {
  background:
    radial-gradient(circle at 50% -10%, rgba(199, 145, 82, 0.1), transparent 28rem),
    var(--page);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
}

body.welcome-active {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.app-shell {
  background: var(--paper);
  margin: 0 auto;
  max-width: 960px;
  min-height: 100dvh;
  overflow: hidden;
  position: relative;
}

.cover {
  align-items: center;
  background:
    linear-gradient(180deg, rgba(9, 10, 9, 0.08), rgba(9, 10, 9, 0.7)),
    linear-gradient(135deg, #20211d 0%, #12130f 48%, #090a09 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100dvh;
  overflow: hidden;
  padding: 28px 24px 34px;
  position: fixed;
}

.welcome-screen {
  inset: 0;
  opacity: 1;
  transition:
    opacity 450ms ease,
    visibility 450ms ease;
  visibility: visible;
  width: 100%;
  z-index: 100;
}

.welcome-screen.is-leaving {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.cover::after {
  background: linear-gradient(90deg, transparent, rgba(233, 189, 122, 0.35), transparent);
  bottom: 0;
  content: "";
  height: 1px;
  left: 12%;
  position: absolute;
  width: 76%;
}

.cover-orbit {
  border: 1px solid rgba(243, 240, 232, 0.08);
  border-radius: 50%;
  pointer-events: none;
  position: absolute;
}

.cover-orbit-one {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), transparent 55%);
  height: 430px;
  left: -220px;
  top: -120px;
  transform: rotate(-22deg);
  width: 620px;
}

.cover-orbit-two {
  background: linear-gradient(320deg, rgba(199, 145, 82, 0.08), transparent 62%);
  bottom: -300px;
  height: 600px;
  right: -330px;
  transform: rotate(25deg);
  width: 760px;
}

.cover-topline {
  color: rgba(243, 240, 232, 0.62);
  display: flex;
  font-size: 0.66rem;
  font-weight: 600;
  justify-content: space-between;
  left: 24px;
  letter-spacing: 0.18em;
  position: absolute;
  right: 24px;
  text-transform: uppercase;
  top: 24px;
  z-index: 1;
}

.cover-content {
  max-width: 650px;
  position: relative;
  text-align: center;
  z-index: 1;
}

.cover-kicker,
.section-kicker,
.search-summary,
.result-summary,
.status-chip,
.product-category,
.product-availability,
.bottom-nav-label,
.bottom-nav-count {
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cover-kicker {
  color: var(--bronze-light);
  font-size: 0.7rem;
  font-weight: 600;
  margin: 0 0 16px;
}

.cover-title-wrap {
  display: grid;
  gap: 14px;
}

.cover-title-wrap h1 {
  color: var(--ink);
  font-family: "Italiana", "Times New Roman", serif;
  font-size: clamp(3.2rem, 14vw, 7.8rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.86;
  margin: 0;
}

.cover-rule {
  background: linear-gradient(90deg, transparent, rgba(243, 240, 232, 0.62), transparent);
  height: 1px;
  width: 100%;
}

.cover-copy {
  color: var(--ink-soft);
  font-family: "Italiana", "Times New Roman", serif;
  font-size: clamp(1.2rem, 4.5vw, 1.8rem);
  line-height: 1.35;
  margin: 34px auto 0;
  max-width: 420px;
}

.cover-copy strong {
  color: var(--ink);
  display: block;
  font-weight: 400;
  margin-top: 8px;
  text-transform: uppercase;
}

.cover-link {
  align-items: center;
  bottom: 16%;
  color: var(--ink-soft);
  display: flex;
  font-size: clamp(0.82rem, 3vw, 1rem);
  font-weight: 600;
  gap: 11px;
  letter-spacing: 0.15em;
  left: 50%;
  position: absolute;
  text-decoration: none;
  text-transform: uppercase;
  transform: translateX(-50%);
  white-space: nowrap;
  z-index: 1;
}

.cover-link svg {
  height: 18px;
  width: 18px;
}

.welcome-loader {
  animation: welcome-pulse 900ms ease-in-out infinite;
  background: var(--bronze-light);
  border-radius: 50%;
  height: 7px;
  width: 7px;
}

@keyframes welcome-pulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.8);
  }

  50% {
    opacity: 1;
    transform: scale(1.25);
  }
}

.main-layout {
  padding: 32px 18px calc(var(--nav-height) + 54px);
}

.search-hub {
  background:
    radial-gradient(circle at 100% 0%, rgba(199, 145, 82, 0.13), transparent 36%),
    var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 20px;
}

.search-intro {
  align-items: flex-end;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-kicker {
  color: var(--bronze-light);
  font-size: 0.64rem;
  font-weight: 700;
  margin: 0 0 7px;
}

.search-intro h2,
.section-heading h2,
.empty-state h3 {
  font-family: "Italiana", "Times New Roman", serif;
  font-weight: 400;
}

.search-intro h2 {
  font-size: clamp(1.55rem, 5vw, 2.25rem);
  line-height: 1.08;
  margin: 0;
}

.result-summary {
  color: var(--ink-muted);
  flex: 0 0 auto;
  font-size: 0.62rem;
  font-weight: 700;
  padding-bottom: 4px;
}

.search-field {
  align-items: center;
  background: #0e0f0d;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  display: flex;
  gap: 12px;
  min-height: 58px;
  padding: 0 10px 0 18px;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.search-field:focus-within {
  border-color: rgba(233, 189, 122, 0.64);
  box-shadow: 0 0 0 4px rgba(199, 145, 82, 0.1);
}

.search-field > svg {
  color: var(--bronze-light);
  flex: 0 0 auto;
  height: 21px;
  width: 21px;
}

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

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

.search-clear {
  align-items: center;
  background: rgba(243, 240, 232, 0.08);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.search-clear svg {
  height: 18px;
  width: 18px;
}

.search-summary {
  color: var(--ink-muted);
  font-size: 0.6rem;
  line-height: 1.5;
  margin: 12px 4px 0;
}

.catalog-section {
  margin-top: 48px;
  scroll-margin-top: 18px;
}

.section-heading {
  align-items: flex-end;
  border-bottom: 1px solid var(--line-strong);
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 22px;
  padding-bottom: 18px;
}

.section-heading h2 {
  font-size: clamp(2rem, 7vw, 3.7rem);
  line-height: 0.95;
  margin: 0;
  max-width: 620px;
}

.catalog-count {
  align-items: baseline;
  display: flex;
  flex: 0 0 auto;
  gap: 5px;
}

.catalog-count strong {
  color: var(--bronze-light);
  font-family: "Italiana", "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 400;
  line-height: 1;
}

.catalog-count span {
  color: var(--ink-muted);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.feedback-banner,
.empty-state {
  border: 1px solid var(--line);
  border-radius: 20px;
}

.feedback-banner {
  background: var(--paper-raised);
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.55;
  margin-bottom: 18px;
  padding: 16px;
}

.feedback-banner.is-error {
  background: rgba(122, 31, 39, 0.2);
  border-color: rgba(255, 115, 115, 0.24);
  color: #ffc5c5;
}

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

.product-card {
  min-width: 0;
  position: relative;
}

.product-card-header {
  left: 8px;
  position: absolute;
  top: 8px;
  z-index: 3;
}

.behaviour-chip {
  align-items: center;
  backdrop-filter: blur(10px);
  border: 1px solid currentColor;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.57rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
  padding: 7px 9px;
}

.behaviour-chip.is-new {
  background: rgba(93, 9, 14, 0.88);
  color: #ff7474;
}

.behaviour-chip.is-best-seller {
  background: rgba(72, 48, 12, 0.9);
  color: #f4c66e;
}

.behaviour-chip.is-hot {
  background: rgba(86, 37, 5, 0.9);
  color: #ff9b42;
}

.behaviour-chip:not(.is-new):not(.is-best-seller):not(.is-hot) {
  background: rgba(17, 18, 15, 0.9);
  color: var(--ink-soft);
}

.product-media {
  align-items: center;
  aspect-ratio: 1 / 1.05;
  background:
    radial-gradient(circle at 50% 36%, rgba(255, 255, 255, 0.1), transparent 34%),
    linear-gradient(145deg, #282a25 0%, #171814 60%, #10110e 100%);
  border: 1px solid var(--line);
  border-radius: 22px 22px 8px 8px;
  display: flex;
  justify-content: center;
  overflow: hidden;
  padding: 22%;
  position: relative;
}

.product-media::after {
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.5), transparent 70%);
  bottom: 15%;
  content: "";
  height: 12%;
  left: 22%;
  position: absolute;
  width: 56%;
}

.product-media-content {
  align-items: center;
  display: flex;
  height: 100%;
  justify-content: center;
  position: relative;
  width: 100%;
  z-index: 1;
}

.product-media img {
  display: block;
  filter: drop-shadow(0 14px 13px rgba(0, 0, 0, 0.5));
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.product-media.is-fallback {
  color: var(--bronze-light);
  font-family: "Italiana", "Times New Roman", serif;
  font-size: 3.2rem;
  padding: 0;
}

.status-chip {
  backdrop-filter: blur(10px);
  border: 1px solid currentColor;
  border-radius: 999px;
  bottom: 9px;
  font-size: 0.52rem;
  font-weight: 700;
  left: 9px;
  line-height: 1;
  padding: 7px 9px;
  position: absolute;
  z-index: 2;
}

.status-ready {
  background: rgba(14, 64, 38, 0.88);
  color: var(--ready);
}

.status-preorder {
  background: rgba(77, 50, 12, 0.9);
  color: var(--preorder);
}

.status-default {
  background: rgba(17, 18, 15, 0.9);
  color: var(--ink-soft);
}

.product-content {
  padding: 14px 3px 0;
}

.product-category {
  color: var(--bronze);
  font-size: 0.57rem;
  font-weight: 700;
  margin: 0 0 6px;
}

.product-title {
  color: var(--ink);
  font-size: clamp(0.9rem, 3.5vw, 1.08rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  overflow-wrap: anywhere;
}

.product-package {
  align-items: center;
  color: var(--ink-soft);
  display: flex;
  font-size: 0.73rem;
  gap: 7px;
  line-height: 1.35;
  margin: 8px 0 0;
}

.product-package::before {
  border: 1px solid var(--ink-muted);
  border-radius: 999px;
  content: "";
  flex: 0 0 auto;
  height: 7px;
  width: 13px;
}

.product-footer {
  align-items: flex-end;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 11px;
}

.product-price-wrap {
  min-width: 0;
}

.product-from {
  color: var(--ink-muted);
  display: block;
  font-size: 0.55rem;
  line-height: 1;
  margin-bottom: 4px;
  text-transform: lowercase;
}

.product-price {
  color: var(--ink);
  font-family: "Italiana", "Times New Roman", serif;
  font-size: clamp(1.15rem, 4.4vw, 1.55rem);
  line-height: 1;
  margin: 0;
}

.product-availability {
  color: var(--ink-muted);
  font-size: 0.5rem;
  font-weight: 600;
  line-height: 1.35;
  max-width: 58px;
  text-align: right;
}

.empty-state {
  background: var(--paper-raised);
  grid-column: 1 / -1;
  padding: 44px 24px;
  text-align: center;
}

.empty-state h3 {
  font-size: 2rem;
  margin: 0 0 10px;
}

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

.bottom-nav {
  background: rgba(19, 20, 17, 0.92);
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  bottom: max(12px, env(safe-area-inset-bottom));
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  display: flex;
  gap: 4px;
  left: 50%;
  max-width: min(720px, calc(100vw - 24px));
  overflow-x: auto;
  padding: 7px;
  position: fixed;
  scrollbar-width: none;
  transform: translateX(-50%);
  width: max-content;
  z-index: 50;
}

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

.bottom-nav-item {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 18px;
  color: var(--ink-muted);
  cursor: pointer;
  display: grid;
  flex: 0 0 auto;
  gap: 3px;
  grid-template-columns: 30px auto;
  min-height: 58px;
  min-width: 62px;
  padding: 7px 10px;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.bottom-nav-item:active {
  transform: scale(0.97);
}

.bottom-nav-item.is-active {
  background: var(--ink);
  color: #171814;
}

.bottom-nav-icon {
  align-items: center;
  display: inline-flex;
  grid-row: 1 / 3;
  height: 30px;
  justify-content: center;
  width: 30px;
}

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

.bottom-nav-label {
  font-size: 0.58rem;
  font-weight: 700;
  max-width: 74px;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bottom-nav-count {
  font-size: 0.52rem;
  opacity: 0.66;
  text-align: left;
}

.is-hidden {
  display: none !important;
}

.skeleton-block,
.skeleton-line {
  animation: pulse 1.4s ease-in-out infinite;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.11),
    rgba(255, 255, 255, 0.04)
  );
  background-size: 220% 100%;
}

.skeleton-card .product-media {
  padding: 0;
}

.skeleton-line {
  border-radius: 999px;
  height: 10px;
  margin-top: 11px;
}

.skeleton-line.is-short {
  width: 48%;
}

.skeleton-line.is-medium {
  width: 76%;
}

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

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

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

  .app-shell {
    border: 1px solid var(--line);
    border-radius: 30px;
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.48);
  }

  .cover {
    padding-left: 44px;
    padding-right: 44px;
  }

  .cover-topline {
    left: 44px;
    right: 44px;
    top: 34px;
  }

  .main-layout {
    padding: 46px 42px calc(var(--nav-height) + 58px);
  }

  .search-hub {
    padding: 26px;
  }

  .product-list {
    gap: 36px 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .product-title {
    font-size: 1rem;
  }

  .bottom-nav-item:hover {
    color: var(--ink);
  }
}

@media (max-width: 380px) {
  .cover {
    min-height: 100dvh;
  }

  .cover-title-wrap h1 {
    font-size: 3rem;
  }

  .main-layout {
    padding-left: 14px;
    padding-right: 14px;
  }

  .search-hub {
    padding: 17px;
  }

  .search-intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .product-list {
    column-gap: 10px;
  }

  .product-media {
    border-radius: 18px 18px 7px 7px;
  }

  .product-availability {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
