:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #201d1c;
  background: #fff;
  --red: #c41122;
  --muted: #605a59;
  --border: #e8e4e3;
  --selected: #fff6f6;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
img { display: block; max-width: 100%; }
button { font: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }

.container {
  width: min(100% - 3rem, 70rem);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid var(--border);
  background: #fff;
}
.catalogue { scroll-margin-top: 6rem; }
.header-content {
  min-height: 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.language-switch summary,
.language-options button {
  font-size: .875rem;
  font-weight: 650;
}

.language-switch { position: relative; z-index: 1; }
.language-switch summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
  min-width: 6.7rem;
  min-height: 2.75rem;
  padding: .45rem .7rem;
  border: 1px solid var(--border);
  border-radius: .5rem;
  list-style: none;
  cursor: pointer;
}
.language-switch summary::-webkit-details-marker { display: none; }
.language-switch summary:hover, .language-switch[open] summary { border-color: var(--red); }
.language-switch summary::after {
  content: "";
  width: .44rem;
  height: .44rem;
  margin: -.17rem .1rem 0 0;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}
.language-switch[open] summary::after { margin-top: .2rem; transform: rotate(225deg); }

.language-options {
  position: absolute;
  top: calc(100% + .4rem);
  right: 0;
  min-width: 9.5rem;
  margin: 0;
  padding: .3rem;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: .6rem;
  background: #fff;
  box-shadow: 0 .65rem 1.45rem #201d1c13;
}
.language-options button {
  width: 100%;
  min-height: 2.75rem;
  padding: .45rem .55rem;
  color: var(--muted);
  text-align: start;
  background: transparent;
  border: 0;
  border-radius: .35rem;
  cursor: pointer;
}
.language-options button:hover, .language-options button[aria-pressed="true"] { color: var(--red); background: var(--selected); }
.language-options button:focus-visible { outline-offset: -2px; }

@media (prefers-reduced-motion: no-preference) {
  .language-switch[open] .language-options { animation: reveal-menu .16s ease-out both; }
}
@keyframes reveal-menu {
  from { opacity: 0; transform: translateY(-.3rem); }
  to { opacity: 1; transform: translateY(0); }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

h1, h2, h3, p { margin: 0; }
main { padding-top: 1.75rem; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.product-card {
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: .8rem;
  overflow: hidden;
  background: #fff;
}

.product-card > img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  background: #faf8f8;
}

.product-card > .product-brand-image,
.product-dialog-layout > .product-brand-image {
  padding: 32%;
  background: #faf8f8;
}

.product-info {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  padding: .95rem 1.2rem 1.15rem;
  border-top: 1px solid var(--border);
}

.product-info h2 {
  overflow-wrap: anywhere;
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: -.03em;
}

.product-detail {
  margin-top: .3rem;
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.4;
}

.variant-picker {
  margin-top: auto;
  padding-top: .85rem;
}

.variant-select { position: relative; }
.variant-select select {
  width: 100%;
  min-height: 2.75rem;
  padding: .55rem 2.25rem .55rem .7rem;
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid var(--border);
  border-radius: .45rem;
  background: #fff;
  color: inherit;
  font: inherit;
  font-size: .875rem;
  cursor: pointer;
}
.variant-select select:hover { border-color: var(--red); }

.variant-select::after {
  position: absolute;
  top: 50%;
  right: .85rem;
  width: .45rem;
  height: .45rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  content: "";
  pointer-events: none;
  transform: translateY(-70%) rotate(45deg);
}

.upcoming { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .15rem .5rem; }
.product-price {
  margin-top: .65rem;
  color: var(--red);
  font-weight: 700;
}

.landing { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
.landing .container { max-width: 62rem; }
.landing-logo { width: 4rem; height: auto; }
.landing-main {
  flex: 1;
  padding-block: 0 clamp(2.5rem, 6vw, 4rem);
}
.landing-intro {
  max-width: 42rem;
  margin-inline: auto;
  padding-block: clamp(2.4rem, 6vw, 4.5rem);
  text-align: center;
}
.landing-intro h1 {
  font-size: clamp(2.3rem, 5.3vw, 4.65rem);
  font-weight: 725;
  line-height: 1.03;
  letter-spacing: -.065em;
  text-wrap: balance;
}
.landing-intro p { margin-top: 1.25rem; color: var(--muted); font-size: 1.05rem; line-height: 1.5; text-wrap: balance; }
.telegram-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  margin-top: 1.3rem;
  padding-inline: 1.05rem;
  border-radius: .45rem;
  background: var(--red);
  color: #fff;
  font-weight: 650;
  text-decoration: none;
}
.telegram-contact:hover { background: #a90f1d; }
.landing-footer { border-top: 1px solid var(--border); background: #faf9f9; }
.payment-section { padding-block: 1.55rem 2rem; }
.payment-section h2 { font-size: 1.3rem; letter-spacing: -.025em; }
.payment-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .65rem;
  padding: 0;
  margin: .85rem 0 0;
  list-style: none;
}
.payment-method {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  min-height: 4.5rem;
  padding: .8rem;
  border: 1px solid var(--border);
  border-radius: .6rem;
  background: #fff;
  font-size: .9rem;
  font-weight: 650;
}
.crypto-mark {
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: #fff0d9;
  color: #805100;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
}
.apple-pay-mark { width: auto; height: 1.8rem; }
.payment-upcoming { flex-direction: column; align-items: flex-start; justify-content: center; gap: .16rem; }
.payment-upcoming span { color: var(--muted); font-size: .875rem; font-weight: 400; }

@media (max-width: 42rem) {
  .catalogue { scroll-margin-top: 7rem; }
  .payment-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 56rem) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 47rem) {
  .container { width: min(100% - 2rem, 36rem); }
  main { padding-top: 1rem; }
  .product-grid { gap: .7rem; }
  .product-info { padding-inline: .75rem; }
  .variant-select select { padding-inline: .55rem 1.6rem; }
  .variant-select::after { right: .6rem; }
}

@media (max-width: 21rem) {
  .product-grid { grid-template-columns: 1fr; }
}

[hidden] { display: none !important; }
input, select { font: inherit; }
button:disabled, input:disabled, select:disabled { cursor: default; opacity: .58; }

.header-tools { display: flex; align-items: center; gap: .45rem; }
.header-button,
.product-open,
.dialog-close,
.secondary-action {
  border: 1px solid var(--border);
  border-radius: .45rem;
  background: #fff;
  color: inherit;
  cursor: pointer;
}
.header-button {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 2.75rem;
  padding: .4rem .7rem;
  font-size: .875rem;
  font-weight: 650;
}
.header-button:hover, .product-open:hover, .dialog-close:hover, .secondary-action:not(:disabled):hover {
  border-color: var(--red);
  color: var(--red);
}
.header-indicator { width: .43rem; height: .43rem; border-radius: 50%; background: var(--red); }
.cart-count {
  min-width: 1.05rem;
  padding: .08rem .23rem;
  border-radius: 1rem;
  background: var(--selected);
  color: var(--red);
  font-size: .78rem;
  text-align: center;
}
.product-open {
  width: 100%;
  min-height: 2.55rem;
  margin-top: .65rem;
  padding: .4rem .6rem;
  font-size: .875rem;
  font-weight: 650;
}
.product-info > .product-open:first-of-type { margin-block-start: auto; }
.product-info { gap: .1rem; }
.product-actions { display: grid; gap: .4rem; margin-top: auto; padding-top: .65rem; }
.product-actions .product-open { margin: 0; }
.product-info .product-cart-status:not(:empty) { margin-block: .35rem 0; }
.product-card, .catalogue-notice { overflow-wrap: anywhere; }
.product-card[data-group] { cursor: pointer; }
.catalogue-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .4rem 1rem;
  margin-top: 1.1rem;
  padding: .8rem 1rem;
  border: 1px solid var(--border);
  border-radius: .55rem;
}
.catalogue-notice p { font-size: .9rem; color: var(--muted); }

.app-dialog {
  width: min(100% - 2rem, 45rem);
  max-height: min(88dvh, 52rem);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: .9rem;
  color: inherit;
  box-shadow: 0 1.15rem 3.5rem #201d1c26;
  overscroll-behavior: contain;
}
.app-dialog::backdrop { background: #201d1c66; }
html:has(.app-dialog[open]) { overflow: hidden; }
.dialog-panel { padding: clamp(1rem, 3vw, 1.65rem); }
.cart-dialog { width: min(100% - 2rem, 59rem); }
.dialog-header, .account-summary, .section-heading, .checkout-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
}
.dialog-header { margin-bottom: 1.15rem; }
.dialog-header h2 { font-size: clamp(1.35rem, 3vw, 1.85rem); line-height: 1.16; letter-spacing: -.04em; }
.dialog-close {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 2.65rem;
  height: 2.65rem;
  font-size: 1.4rem;
  line-height: 1;
}
.eyebrow { margin-bottom: .25rem; color: var(--muted); font-size: .875rem; }
.product-dialog-layout, .auth-grid, .cart-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.cart-layout { grid-template-columns: minmax(11rem, .8fr) minmax(0, 1.2fr); gap: 1.3rem; }
.product-dialog-layout > img { width: 100%; height: auto; min-width: 0; border: 1px solid var(--border); border-radius: .55rem; }
.product-dialog-content { overflow-wrap: anywhere; }
.product-dialog-description, .checkout-account-note, .checkout-legal { color: var(--muted); line-height: 1.45; }
.product-dialog-description { white-space: pre-line; }
.status-message, .empty-state, .cart-estimate { color: var(--muted); font-size: .875rem; line-height: 1.45; }
.status-message:not(:empty), .checkout-account-note:not(:empty) { margin-block: .6rem; }
.status-message[data-state="error"] { color: #a90f1d; }
.status-message[data-state="warning"], .availability-warning { color: #855115; }
.status-message[data-state="success"] { color: #216242; }
.form-card { padding: .85rem; border: 1px solid var(--border); border-radius: .55rem; }
.form-card h3, .checkout-section h3 { margin-bottom: .65rem; font-size: 1rem; }
.form-card, #product-add-form { display: grid; align-content: start; gap: .7rem; }
.form-field { display: grid; gap: .25rem; min-width: 0; font-size: .875rem; font-weight: 620; }
.form-field input, .form-field select, .cart-item input {
  width: 100%;
  min-width: 0;
  min-height: 2.7rem;
  padding: .45rem .6rem;
  border: 1px solid var(--border);
  border-radius: .4rem;
  background: #fff;
  color: inherit;
  font-weight: 400;
}
.form-field .variant-select select { padding-right: 1.65rem; }
.quantity-field { max-width: 7rem; }

.primary-action, .secondary-action, .link-button {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  padding: .45rem .75rem;
  font-size: .875rem;
  font-weight: 650;
  text-decoration: none;
}
.primary-action { border: 1px solid var(--red); border-radius: .45rem; background: var(--red); color: #fff; cursor: pointer; }
.primary-action:not(:disabled):hover { background: #a90f1d; }
.link-button { padding-inline: .2rem; border: 0; background: transparent; color: var(--red); cursor: pointer; }
.link-button:hover { text-decoration: underline; text-underline-offset: .18em; }
.checkout-actions { margin-top: .85rem; }
.checkout-section fieldset { display: grid; min-width: 0; margin: 0; padding: 0; border: 0; }
.checkout-section legend { margin-bottom: .45rem; padding: 0; color: var(--muted); font-size: .875rem; }
.checkout-section .checkout-payment-choice { margin-top: .85rem; }
.checkout-payment-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.checkout-payment-option {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: .55rem;
  padding: .7rem;
  border: 1px solid var(--border);
  border-radius: .5rem;
  background: #fff;
  cursor: pointer;
}
.checkout-payment-option:has(input:checked) { border-color: var(--red); background: #fff7f7; }
.checkout-payment-option input { flex: 0 0 auto; margin: .2rem 0 0; accent-color: var(--red); }
.checkout-payment-option > span { display: grid; min-width: 0; gap: .18rem; }
.checkout-payment-option strong { font-size: .875rem; }
.checkout-payment-option small { color: var(--muted); font-size: .75rem; line-height: 1.4; }
.checkout-payment-option:has(input:disabled) { cursor: default; opacity: .62; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem .65rem; }
.form-field-wide { grid-column: 1 / -1; }
.cart-items, .order-list { display: grid; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.cart-item, .order-list > * { padding: .75rem; border: 1px solid var(--border); border-radius: .5rem; overflow-wrap: anywhere; }
.cart-item-details { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem .6rem; }
.cart-item-price { font-weight: 650; }
.quantity-controls { display: flex; align-items: center; gap: .5rem; margin-top: .5rem; }
.quantity-controls button {
  width: 2rem;
  min-height: 2rem;
  padding: .2rem;
  border: 1px solid var(--border);
  border-radius: .35rem;
  background: #fff;
  cursor: pointer;
}
.quantity-controls .remove-button { width: auto; margin-inline-start: auto; padding-inline: .4rem; border: 0; color: var(--red); }
.quantity-value { min-width: 1ch; text-align: center; }
.cart-item input { width: 4.3rem; }
.cart-item p, .order-list p { margin-block: .18rem; font-size: .875rem; }
.cart-estimate, .section-heading { margin-top: .85rem; }
.section-heading h3 { font-size: 1rem; }
.quote-summary {
  display: grid;
  gap: .3rem;
  margin: .85rem 0 0;
  padding: .75rem;
  border: 1px solid var(--border);
  border-radius: .5rem;
  font-size: .9rem;
}
.quote-summary > div { display: flex; justify-content: space-between; gap: .5rem; }
.quote-summary dd { margin: 0; font-variant-numeric: tabular-nums; }
.quote-total { padding-top: .3rem; border-top: 1px solid var(--border); color: var(--red); font-weight: 700; }
.checkout-legal { display: flex; flex-wrap: wrap; gap: .4rem .65rem; margin-top: .7rem; font-size: .875rem; }
.order-confirmation { margin-top: 1rem; padding: .85rem; border: 1px solid var(--border); border-radius: .55rem; }
.order-confirmation .primary-action { margin-top: .6rem; }
.payment-qr { width: min(100%, 12rem); height: auto; margin-block: .65rem .15rem; }
.order-payment-qr { width: min(100%, 8rem); }

@media (max-width: 42rem) {
  .header-content { flex-wrap: wrap; column-gap: .35rem; padding-block: .4rem; }
  .header-tools { flex-wrap: wrap; justify-content: flex-end; gap: .25rem; margin-inline-start: auto; max-width: 100%; }
  .header-button, .language-switch summary { min-width: 0; padding-inline: .4rem; }
  .header-button { font-size: .8rem; }
  .language-switch summary { gap: .35rem; }
  .landing-logo { width: 3.25rem; }
  .product-dialog-layout, .cart-layout { grid-template-columns: 1fr; }
  .product-dialog-layout > img { width: min(100%, 12rem); margin-inline: auto; }
}

@media (max-width: 30rem) {
  .auth-grid, .checkout-payment-options { grid-template-columns: 1fr; }
}
