:root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #25312d;
  background: #f5f7f5;
  font-synthesis: none;
  line-height: 1.6;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button, input, select { font: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid #186aff; outline-offset: 4px; }
.skip-link { position: absolute; left: 16px; top: -80px; padding: 10px; background: white; z-index: 1; }
.skip-link:focus { top: 12px; }
.layout { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { background: #fff; border-right: 1px solid #e2e8e3; padding: 34px 22px; display: flex; flex-direction: column; }
nav { display: grid; gap: 7px; }
.nav-item { display: flex; width: 100%; justify-content: space-between; align-items: center; padding: 11px 14px; border: 0; border-radius: 8px; background: transparent; text-decoration: none; text-align: left; font-size: 14px; cursor: pointer; }
.nav-item.active { background: #eaf1ff; color: #1455c7; font-weight: 650; }
.nav-item:disabled { color: #718078; cursor: not-allowed; }
.nav-item span { font-size: 10px; border: 1px solid #e2e8e3; padding: 0 5px; border-radius: 4px; }
main { padding: 0 clamp(24px, 5vw, 80px); max-width: 1440px; width: 100%; margin-inline: auto; }
.topbar { min-height: 90px; border-bottom: 1px solid #e2e8e3; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 12px; color: #69776f; }
.intro { margin: 24px 0 34px; max-width: 620px; }
h1 { font-size: clamp(30px, 4vw, 44px); line-height: 1.2; letter-spacing: -.04em; margin: 0 0 17px; font-weight: 650; }
.intro-text { color: #69776f; font-size: 16px; }
h2 { font-size: 19px; font-weight: 600; line-height: 1.4; margin: 0 0 8px; }
.check-button { border: 1px solid #b9ccef; border-radius: 6px; background: white; color: #1455c7; padding: 7px 14px; font-size: 12px; cursor: pointer; }
.check-button:hover { background: #edf4ff; }
.check-button:disabled { opacity: .6; cursor: wait; }
#search-form { margin-top: 28px; }
#search-form label { display: block; font-size: 13px; margin-bottom: 8px; }
#product-search { width: 100%; max-width: 480px; padding: 12px 14px; background: #fff; border: 1px solid #cbd9cf; border-radius: 8px; color: inherit; }
#catalog-status { font-size: 13px; color: #69776f; margin: 18px 0 24px; overflow-wrap: anywhere; }
.category-title { margin: 0; overflow-wrap: anywhere; }
.category-header, .toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.category { margin-top: 32px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar { margin-top: 24px; }
.check-button[aria-pressed="true"] { color: white; background: #186aff; border-color: #186aff; }
.muted { color: #69776f; font-size: 13px; }
.product-actions { margin-top: 16px; }
.category-toggle { display: inline-grid; place-items: center; vertical-align: middle; margin-left: 6px; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 6px; color: #186aff; background: transparent; cursor: pointer; }
.category-toggle:hover { background: #eaf1ff; }
.chevron { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); }
.category-toggle[aria-expanded="false"] .chevron { transform: rotate(-45deg); }
dialog { width: min(620px, calc(100% - 32px)); max-height: calc(100dvh - 48px); padding: 28px; border: 1px solid #cbd9cf; border-radius: 12px; color: inherit; }
dialog::backdrop { background: rgb(20 35 25 / 45%); }
dialog label { display: block; font-size: 13px; margin: 12px 0 6px; }
dialog input, dialog select { width: 100%; min-width: 0; padding: 9px; border: 1px solid #cbd9cf; border-radius: 6px; background: white; color: inherit; }
fieldset { margin: 20px 0; border: 1px solid #e0e7e1; border-radius: 8px; min-width: 0; }
.variant-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-bottom: 16px; }
.variant-inputs > button { grid-column: 1 / -1; justify-self: start; }
.size-select { min-width: 0; align-self: start; }
.size-select-control { position: relative; }
.size-select-custom label { font-size: 12px; }
.size-select-trigger { width: 100%; min-height: 46px; display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 9px 12px; border: 1px solid #cbd9cf; border-radius: 6px; background: white; color: inherit; text-align: left; cursor: pointer; }
.size-select-trigger > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.size-select-trigger .chevron { flex: 0 0 auto; margin-right: 3px; }
.size-select-trigger[aria-expanded="true"] { border-color: #186aff; }
.size-select-trigger[aria-expanded="true"] .chevron { transform: rotate(225deg) translate(-2px, -2px); }
.size-select-trigger:disabled { background: #f5f7f5; cursor: wait; opacity: .6; }
.size-select-options { position: absolute; top: 100%; left: 0; right: 0; z-index: 2; max-height: 210px; overflow-y: auto; overscroll-behavior: contain; margin: 5px 0 0; padding: 5px; list-style: none; border: 1px solid #b9ccef; border-radius: 8px; background: white; box-shadow: 0 8px 24px rgb(24 106 255 / 12%); }
.size-select-options [role="option"] { padding: 8px 10px; border-radius: 5px; cursor: pointer; overflow-wrap: anywhere; }
.size-select-options [role="option"][aria-selected="true"] { color: #1455c7; font-weight: 650; }
.size-select-options [role="option"].is-highlighted, .size-select-options [role="option"]:hover { background: #eaf1ff; }
.form-error { color: #a03b30; font-size: 13px; }
.auth-page { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.account-card { width: 100%; max-width: 480px; padding: 28px; border: 1px solid #e0e7e1; border-radius: 12px; background: white; }
.account-card h1 { font-size: 32px; }
.account-card label { display: block; font-size: 14px; margin: 16px 0 6px; }
.account-card input { width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid #cbd9cf; border-radius: 6px; }
.primary-button { background: #186aff; border-color: #186aff; color: white; }
.primary-button:hover { background: #1455c7; }
.account-exit { border-top: 1px solid #e2e8e3; margin-top: 24px; padding-top: 24px; }
#account-name { overflow-wrap: anywhere; }
.loyalty-card { max-width: 680px; background: white; padding: 26px; border: 1px solid #e0e7e1; border-radius: 12px; }
#cashback-form label { display: block; font-size: 14px; margin-bottom: 8px; }
.percent-input { display: flex; align-items: center; gap: 10px; max-width: 240px; }
#cashback-percent, #cashback-amount { width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid #cbd9cf; border-radius: 6px; font-variant-numeric: tabular-nums; }
#cashback-amount { max-width: 280px; }
.cashback-example { padding: 12px 14px; border-radius: 6px; background: #edf4ff; color: #1455c7; font-size: 14px; }
.product-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.product-card { background: #fff; padding: 22px; border: 1px solid #e0e7e1; border-radius: 12px; }
.product-heading { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.product-heading h3 { font-size: 17px; margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.product-id { font-size: 11px; color: #69776f; white-space: nowrap; }
.variants { margin: 16px 0 0; }
.variant { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; border-top: 1px solid #edf1ee; padding: 8px 0; font-size: 14px; }
.variant dt { color: #69776f; }
.variant dd { margin: 0; font-variant-numeric: tabular-nums; }
footer { display: flex; justify-content: space-between; gap: 16px; margin: 40px 0; color: #718078; font-size: 11px; }
@media (max-width: 900px) {
  .layout { grid-template-columns: 200px minmax(0, 1fr); }
  .sidebar { padding: 26px 14px; }
  .product-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .layout { display: block; }
  .sidebar { padding: 20px; border-right: 0; border-bottom: 1px solid #e2e8e3; }
  nav { display: flex; flex-wrap: wrap; gap: 6px; }
  .nav-item { width: auto; padding: 8px 10px; gap: 8px; }
  .topbar { min-height: 74px; flex-wrap: wrap; padding-block: 16px; }
  .intro { margin-top: 32px; }
  dialog { padding: 18px; }
  .loyalty-card { padding: 20px; }
  .variant-inputs { grid-template-columns: minmax(0, 1fr); }
  footer { flex-direction: column; gap: 4px; }
}
