:root {
  color-scheme: light;
  --bg: #fff;
  --text: #111;
  --muted: #666;
  --line: #e6e6e6;
  --soft: #f6f6f6;
  --danger: #b42318;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Courier New", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.45;
}

body.cart-open,
body.legal-modal-open {
  overflow: hidden;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px clamp(16px, 4vw, 40px);
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 238px;
  justify-content: flex-end;
}

.lang-switch {
  --active-index: 0;
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 34px);
  padding: 2px;
  border: 1px solid var(--line);
  background: #fff;
}

.lang-slider {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 2px;
  width: 34px;
  background: var(--text);
  transform: translateX(calc(var(--active-index) * 34px));
  transition: transform .45s var(--ease);
}

.lang-switch button {
  position: relative;
  z-index: 1;
  min-width: 34px;
  border: 0;
  padding: 6px 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color .34s var(--ease);
}

.lang-switch button.is-active {
  color: #fff;
}

.cart-button,
.button,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--text);
  padding: 9px 14px;
  background: var(--text);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition:
    background .42s var(--ease),
    color .42s var(--ease),
    border-color .42s var(--ease),
    transform .42s var(--ease);
}

.cart-button {
  gap: 8px;
  min-width: 118px;
  white-space: nowrap;
}

.cart-button #cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
}

.button:hover,
.cart-button:hover {
  background: #fff;
  color: var(--text);
}

.button.full {
  width: 100%;
}

.button.secondary {
  background: #fff;
  color: var(--text);
}

.button.secondary:hover {
  background: var(--text);
  color: #fff;
}

.hero {
  min-height: 44vh;
  display: grid;
  align-content: center;
  gap: 22px;
  padding: clamp(56px, 10vw, 120px) clamp(16px, 5vw, 72px) 48px;
  border-bottom: 1px solid var(--line);
}

.hero h1 {
  max-width: 940px;
  margin: 0;
  font-size: clamp(34px, 7vw, 88px);
  line-height: .98;
  letter-spacing: 0;
}

.hero p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
}

.catalog,
.page,
.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.catalog {
  width: min(1600px, calc(100% - 16px));
  padding: 52px 0 64px;
}

.telegram-cta {
  width: min(1180px, calc(100% - 32px));
  margin: -8px auto 44px;
  display: flex;
  justify-content: center;
}

.telegram-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text);
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 700;
  text-decoration: none;
  transition: opacity .22s var(--ease), transform .22s var(--ease);
}

.telegram-link:hover {
  opacity: .72;
  transform: translateY(-1px);
}

.telegram-link svg {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  fill: currentColor;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 24px;
}

.muted,
.section-head p {
  color: var(--muted);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 340px));
  gap: 16px;
  justify-content: center;
}

.product-card {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.product-visual {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--soft);
}

.product-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, transparent 48%, var(--line) 49%, var(--line) 51%, transparent 52%),
    linear-gradient(45deg, transparent 48%, var(--line) 49%, var(--line) 51%, transparent 52%),
    var(--soft);
  transition: transform .7s var(--ease);
}

.product-card:hover .product-visual::before,
.product-card:focus-within .product-visual::before {
  transform: scale(1.065);
}

.product-visual img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .7s var(--ease);
}

.product-card:hover .product-visual img,
.product-card:focus-within .product-visual img {
  transform: scale(1.065);
}

.product-visual span {
  position: relative;
  z-index: 1;
  padding: 8px;
  color: var(--muted);
  background: var(--soft);
  font-size: 12px;
  text-align: center;
  text-transform: uppercase;
}

.product-meta {
  display: grid;
  gap: 12px;
}

.product-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.product-title h3,
.product-title p {
  margin: 0;
  font-size: 16px;
}

.product-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.choice {
  position: relative;
}

.choice-trigger {
  position: relative;
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  padding: 11px 38px 11px 12px;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition:
    border-color .36s var(--ease),
    background .36s var(--ease),
    box-shadow .36s var(--ease);
}

.choice-trigger::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 14px;
  width: 8px;
  height: 8px;
  border-right: 1px solid var(--text);
  border-bottom: 1px solid var(--text);
  transform: translateY(-65%) rotate(45deg);
  transition: transform .36s var(--ease);
}

.choice-trigger:hover,
.choice.is-open .choice-trigger {
  border-color: var(--text);
}

.choice-trigger:focus-visible {
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(17, 17, 17, .08);
  outline: 0;
}

.choice.is-open .choice-trigger::after {
  transform: translateY(-25%) rotate(225deg);
}

.choice-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  display: grid;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--text);
  background: #fff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .08);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  visibility: hidden;
  transition:
    opacity .28s var(--ease),
    transform .28s var(--ease),
    visibility .28s var(--ease);
}

.choice.is-open .choice-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
}

.choice-menu button {
  border: 0;
  padding: 10px 11px;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition:
    background .32s var(--ease),
    color .32s var(--ease);
}

.choice-menu button:hover,
.choice-menu button.is-selected {
  background: var(--text);
  color: #fff;
}

label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}

select,
input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 11px 12px;
  background: #fff;
  color: var(--text);
  transition: border-color .22s var(--ease), background-color .22s var(--ease), box-shadow .22s var(--ease);
}

select {
  appearance: none;
  padding-right: 38px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text) 50%),
    linear-gradient(135deg, var(--text) 50%, transparent 50%);
  background-position:
    calc(100% - 17px) 50%,
    calc(100% - 12px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}

select:hover,
input:hover,
textarea:hover {
  border-color: #bdbdbd;
}

select:focus,
input:focus,
textarea:focus {
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(17, 17, 17, .08);
  outline: 0;
}

textarea {
  resize: vertical;
}

.site-footer {
  display: grid;
  gap: 26px;
  padding: 34px 0 44px;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.3fr;
  gap: clamp(22px, 5vw, 64px);
}

.footer-brand {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}

.site-footer p {
  max-width: 360px;
  margin-bottom: 0;
  color: var(--muted);
}

.site-footer h2 {
  margin-bottom: 12px;
  font-size: 14px;
  text-transform: uppercase;
}

.footer-list {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 14px;
  margin: 0;
  font-size: 13px;
}

.footer-list dt {
  color: var(--muted);
}

.footer-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.footer-list a {
  text-decoration: none;
}

.footer-list a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.footer-legal button,
.legal-notice button {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-legal button {
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

.footer-legal button:hover,
.legal-notice button:hover {
  color: var(--text);
}

.legal-notice {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.legal-notice button {
  color: var(--text);
  font-size: inherit;
}

.legal-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
}

.legal-modal[hidden] {
  display: none;
}

.legal-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .42);
}

.legal-dialog {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  max-height: min(760px, calc(100vh - 32px));
  overflow: auto;
  border: 1px solid var(--text);
  padding: 24px;
  background: #fff;
  box-shadow: 0 18px 54px rgba(0, 0, 0, .16);
  outline: 0;
}

.legal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.legal-dialog h2 {
  margin: 0 42px 18px 0;
  font-size: 22px;
}

.legal-modal-content {
  display: grid;
  gap: 12px;
}

.legal-modal-content p {
  margin: 0;
  color: var(--muted);
}

.cart-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  background: rgba(0, 0, 0, .38);
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  width: min(420px, 100%);
  height: 100%;
  background: #fff;
  border-left: 1px solid var(--line);
  transform: translateX(100%);
  transition: transform .44s var(--ease);
}

body.cart-open .cart-backdrop {
  display: block;
}

body.cart-open .cart-drawer {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.drawer-head h2 {
  font-size: 18px;
}

.icon-button {
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.cart-list {
  display: grid;
  gap: 12px;
}

.cart-drawer .cart-list {
  flex: 1;
  align-content: start;
  overflow: auto;
  padding: 18px;
}

.drawer-footer {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-top: 1px solid var(--line);
}

.cart-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.cart-item strong {
  display: block;
  margin-bottom: 4px;
}

.item-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.item-actions button {
  min-width: 34px;
  min-height: 34px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  transition: border-color .34s var(--ease), background .34s var(--ease), color .34s var(--ease);
}

.item-actions button:hover {
  border-color: var(--text);
}

.remove {
  color: var(--danger);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  font-size: 18px;
}

.checkout-totals {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.checkout-totals .cart-total {
  margin-top: 0;
  font-size: 16px;
}

.checkout-totals .grand-total {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 18px;
}

.checkout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: 32px;
  align-items: start;
  padding: 42px 0 64px;
}

.checkout-panel,
.summary {
  border: 1px solid var(--line);
  padding: 22px;
  background: #fff;
}

.checkout-panel h1,
.checkout-panel h2 {
  margin-bottom: 22px;
}

.form {
  display: grid;
  gap: 16px;
}

.spam-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.parcel-section {
  display: grid;
  gap: 10px;
}

.parcel-section h3 {
  margin: 0;
  font-size: 15px;
}

.parcel-status {
  margin: 0;
  color: var(--muted);
}

.parcel-status.selected {
  color: var(--text);
  font-weight: 700;
}

.selected-locker-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--text);
  background: #fff;
  animation: selectedLockerIn .36s var(--ease) both;
}

.selected-locker-card span {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 12px;
}

.selected-locker-card strong {
  font-size: 16px;
}

.selected-locker-card .button {
  min-height: 36px;
  padding: 7px 11px;
  white-space: nowrap;
}

.geowidget-container {
  height: clamp(540px, 72vh, 680px);
  min-height: 540px;
  border: 1px solid var(--line);
  overflow: hidden;
}

.geowidget-container inpost-geowidget {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 540px;
}

@keyframes selectedLockerIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.is-hidden {
  display: none;
}

.message {
  min-height: 24px;
  margin: 0;
  color: var(--danger);
}

.message.ok {
  color: var(--text);
}

.narrow {
  width: min(720px, calc(100% - 32px));
  padding: 42px 0 64px;
}

.summary {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.summary dl {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 8px 12px;
  margin: 0;
}

.summary dt {
  color: var(--muted);
}

.summary dd {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0 0;
}

@media (hover: hover) and (min-width: 900px) {
  .product-meta {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .38s var(--ease), transform .38s var(--ease);
  }

  .product-card:hover .product-meta,
  .product-card:focus-within .product-meta {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 820px) {
  .section-head,
  .checkout,
  .form-row,
  .cart-item,
  .summary dl {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: grid;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .checkout {
    gap: 18px;
  }
}

@media (max-width: 520px) {
  .site-header {
    align-items: flex-start;
  }

  .header-actions {
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    min-width: 0;
  }

  .hero {
    min-height: 38vh;
  }

  .product-options {
    grid-template-columns: 1fr;
  }

  .selected-locker-card {
    align-items: stretch;
    flex-direction: column;
  }

  .footer-list {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .footer-list dt {
    margin-top: 6px;
  }

  .footer-legal {
    gap: 8px 14px;
  }

  .legal-dialog {
    max-height: calc(100vh - 24px);
    padding: 20px 16px;
  }
}
