@font-face {
  font-family: "Be Vietnam Pro";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("/assets/be-vietnam-400.ttf") format("truetype");
}

@font-face {
  font-family: "Be Vietnam Pro";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("/assets/be-vietnam-500.ttf") format("truetype");
}

@font-face {
  font-family: "Be Vietnam Pro";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("/assets/be-vietnam-600.ttf") format("truetype");
}

@font-face {
  font-family: "Be Vietnam Pro";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("/assets/be-vietnam-700.ttf") format("truetype");
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/inter-cyrillic-400.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+04FF, U+2116;
}

:root {
  --ink: #1a202c;
  --muted: #676a73;
  --blue: #3786fb;
  --deep: #145bc3;
  --surface: #fff;
  --font: "Be Vietnam Pro", Inter, system-ui, sans-serif;
  --shadow: 0 1.713px 3.426px rgba(0, 0, 0, 0.12);
}
* {
  box-sizing: border-box;
}
[hidden]:not([hidden="until-found" i]) {
  display: none !important;
}
dialog:not([open]) {
  display: none;
}
body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #d1efff, #f6fcff);
  color: var(--ink);
  font: 14px/1.5 var(--font);
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input {
  font: inherit;
}
button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  background: #f4f4f4;
  color: var(--ink);
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
:focus-visible {
  outline: 3px solid var(--deep);
  outline-offset: 3px;
}
header,
main,
footer {
  max-width: 1280px;
  margin: auto;
  padding: 24px 48px;
}
header {
  display: flex;
  align-items: center;
  gap: 16px;
}
header h1 {
  font-size: 24px;
  line-height: 36px;
  margin: 0;
  font-weight: 700;
}
header a {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
}
header > a:last-child {
  margin-left: auto;
}
h2,
h3,
p {
  margin: 0;
}
h2 {
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
}
p {
  margin: 12px 0;
  color: var(--muted);
}
small {
  color: var(--muted);
  font-size: 12px;
}
main {
  padding-top: 16px;
}
#workspace {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  gap: 32px;
}
.panel {
  background: white;
  border-radius: 12px;
  padding: 20px 24px;
  align-self: start;
}
#order h2 {
  margin-top: 12px;
}
#vouchers {
  display: grid;
  gap: 8px;
  margin: 16px 0;
}
.voucher {
  width: 100%;
  text-align: left;
  background: white;
  border: 1.5px solid #cccdd0;
}
.voucher b,
.voucher span {
  display: block;
}
.voucher span {
  font-size: 12px;
  color: var(--muted);
}
.voucher[aria-pressed="true"] {
  border-color: var(--blue);
  background: #f0f7ff;
}
.instructions {
  padding-top: 16px;
  border-top: 1px solid #f4f4f4;
}
.instructions ol {
  padding-left: 20px;
  color: var(--muted);
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
}
.search-row {
  display: flex;
  gap: 12px;
}
.search {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: white;
  border-radius: 8px;
  height: 52px;
  flex: 1;
  min-width: 0;
}
input {
  width: 100%;
  min-width: 0;
  height: 48px;
  border: 1.5px solid #cccdd0;
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: white;
}
.search input {
  border: 0;
  border-radius: 0;
  padding: 0;
  height: auto;
  background: transparent;
}
#filter-toggle {
  display: grid;
  place-items: center;
  flex: none;
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 14px;
  background: var(--blue);
}
#filters {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding: 12px 0;
}
.chip {
  white-space: nowrap;
  background: white;
}
.chip[aria-pressed="true"] {
  background: var(--blue);
  color: white;
}
.results-title {
  margin: 20px 0 16px;
}
.results-title h2 {
  font-size: 16px;
  line-height: 24px;
}
#count {
  font-size: 12px;
  color: var(--muted);
}
#products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.product {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 14px;
  border-radius: 17.13px;
  background: white;
  box-shadow: var(--shadow);
}
.media {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 15.4px;
  background: #fcf7de;
}
.product:nth-child(4n + 2) .media {
  background: #defde0;
}
.product:nth-child(4n + 3) .media {
  background: #ffdba4;
}
.product:nth-child(4n) .media {
  background: #eee8fa;
}
.media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.missing {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  padding: 12px;
}
.product h3 {
  margin: 12px 0 4px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.kind {
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
  margin-bottom: 8px;
}
.card-bottom {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.card-bottom span {
  font-size: 12px;
}
.add {
  width: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
}
.primary {
  min-height: 48px;
  background: var(--blue);
  color: white;
  font-weight: 600;
}
#more {
  display: block;
  margin: 24px auto;
}
#notice:not(:empty),
#catalog-message:not(:empty),
#voucher-status:not(:empty) {
  background: white;
  padding: 20px 24px;
  border-radius: 12px;
  margin-bottom: 16px;
  overflow-wrap: anywhere;
}
.gift-link {
  display: block;
  padding: 12px;
  margin: 12px 0;
  overflow-wrap: anywhere;
}
#welcome {
  max-width: 429px;
  margin: 24px auto;
}
#welcome label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin: 20px 0 8px;
}
#welcome > .primary {
  display: block;
  width: 100%;
  margin-top: 20px;
}
#link-error {
  color: #a72929;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 12px;
}
nav {
  display: none;
}
dialog {
  border: 0;
  border-radius: 20px;
  background: white;
  color: var(--ink);
  padding: 20px;
  width: calc(100% - 32px);
  max-width: 480px;
  max-height: 90dvh;
  overflow: auto;
}
dialog::backdrop {
  background: rgba(26, 32, 44, 0.4);
}
#detail-image {
  display: grid;
  place-items: center;
  background: #f4f4f4;
  border-radius: 8px;
  margin: 16px 0 20px;
}
#detail-image img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: contain;
}
#detail-kind {
  font-size: 14px;
}
.detail-actions {
  position: sticky;
  bottom: -20px;
  background: white;
  border-radius: 8px;
  padding: 16px 0 0;
  display: grid;
  gap: 8px;
}
.detail-actions .primary {
  border-radius: 10px;
  background: linear-gradient(90deg, #3786fb, #37b4fb);
  color: #102a48;
}
@media (hover: hover) {
  button:hover {
    filter: brightness(0.96);
  }
}
@media (max-width: 767px) {
  header {
    padding: 16px;
    gap: 4px;
  }
  header h1 {
    margin-left: 0;
  }
  main {
    padding: 0 16px 24px;
  }
  #workspace {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  #order {
    padding: 0;
    background: transparent;
    width: 100%;
  }
  #order > small,
  #order > h2,
  #order > p,
  .instructions {
    display: none;
  }
  #vouchers {
    display: flex;
    overflow: auto;
    gap: 8px;
    margin: 0;
  }
  .voucher {
    min-width: 136px;
    width: auto;
    flex: none;
    padding: 8px 12px;
  }
  #products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .product {
    min-height: 258px;
  }
  #welcome {
    margin: 16px auto;
  }
  footer {
    padding: 24px 16px 112px;
    display: grid;
  }
  nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    background: white;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 -2px 8px #1a202c10;
    padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
  }
  nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 52px;
    font-size: 12px;
  }
  dialog {
    margin: auto 0 0;
    width: 100%;
    max-width: none;
    border-radius: 20px 20px 0 0;
    max-height: 92dvh;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
