/* *,
*:before,
*:after {
  box-sizing: border-box;
}
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd,
ul,
li,
button {
  margin: 0;
}
ul,
ol {
  padding: 0;
  list-style: none;
}
body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
}
a:not([class]) {
  -webkit-text-decoration-skip: ink;
  text-decoration-skip-ink: auto;
}
img {
  width: 100%;
  display: block;
  -o-object-fit: cover;
  object-fit: cover;
}
input,
button,
textarea,
select {
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  line-height: 1;
}
button {
  padding: 0;
  margin: 0;
  border: none;
  background-color: transparent;
  cursor: pointer;
}
a,
label > input[type="checkbox"] {
  cursor: pointer;
}
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }
  *,
  *:before,
  *:after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
:root {
  --max-container: 760px;
  --gutter: 12px;
  --header-h: 50px;
  --ff-prim: "Commons", sans-serif;
  --ff-sec: "Courier", "Commons", sans-serif;
  --fz-small: 16px;
  --fz-base: 20px;
  --fs-italic: italic;
  --fw-t: 100;
  --fw-xl: 200;
  --fw-l: 300;
  --fw-r: 400;
  --fw-m: 500;
  --fw-sb: 600;
  --fw-b: 700;
  --fw-xb: 800;
  --fw-bl: 900;
  --clr-dark: #000;
  --clr-gray: #999;
  --clr-light: #fff;
  --borr-lg: 30px;
  --borr-mid: 20px;
  --borr-sm: 12px;
  --tr: 0.3s ease-in-out;
}
@font-face {
  font-family: Commons;
  src: url(/fonts/TTCommons-Thin.woff2) format("woff2");
  font-weight: 100;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: Commons;
  src: url(/fonts/TTCommons-ExtraLight.woff2) format("woff2");
  font-weight: 200;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: Commons;
  src: url(/fonts/TTCommons-Light.woff2) format("woff2");
  font-weight: 300;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: Commons;
  src: url(/fonts/TTCommons-Regular.woff2) format("woff2");
  font-weight: 400;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: Commons;
  src: url(/fonts/TTCommons-Medium.woff2) format("woff2");
  font-weight: 500;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: Commons;
  src: url(/fonts/TTCommons-DemiBold.woff2) format("woff2");
  font-weight: 600;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: Commons;
  src: url(/fonts/TTCommons-Bold.woff2) format("woff2");
  font-weight: 700;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: Commons;
  src: url(/fonts/TTCommons-ExtraBold.woff2) format("woff2");
  font-weight: 800;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: Commons;
  src: url(/fonts/TTCommons-Black.woff2) format("woff2");
  font-weight: 900;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: Courier;
  src: url(/fonts/CourierPrime-Regular.woff2) format("woff2");
  font-weight: 400;
  font-display: swap;
  font-style: normal;
}
html {
  scroll-behavior: smooth;
}
body {
  padding-top: 24px;
  color: var(--clr-light);
  background-color: var(--clr-dark);
  font-family: var(--ff-prim);
  font-size: var(--fz-base);
  font-weight: var(--fw-l);
  line-height: 1.25;
}
header,
main,
footer {
  position: relative;
  z-index: 1;
}
main {
  width: min(var(--max-container), 100% - var(--gutter) * 2);
  margin-inline: auto;
}
h1,
.h1,
h2,
.h2 {
  font-weight: var(--fw-m);
  line-height: 1.1;
}
h1,
.h1 {
  font-size: 48px;
}
h2,
.h2 {
  font-size: 32px;
}
h3,
.h3 {
  margin-bottom: 10px;
  font-size: 32px;
  font-weight: var(--fw-r);
  line-height: 1;
}
ul {
  list-style-type: disc;
  padding-left: 20px;
} */
#app {
  width: min(var(--max-container), 100% - var(--gutter) * 2);
  margin-inline: auto;
}
.products {
  display: grid;
  gap: 40px 0;
  padding-bottom: 40px;
}
.to-top {
  width: 24px;
  height: 24px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 7-7 7 7'/%3E%3Cpath d='M12 19V5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
}
dialog::backdrop {
  background-color: #000000bf;
}
.btns-count {
  place-self: end;
  grid-area: 2/1/-1/-1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 2px;
  background-color: #4a58d9;
  border-radius: var(--borr-sm) 0;
}
.btns-count > :first-child,
.btns-count > :nth-child(2) {
  display: none;
}
.btns-count.expanded > :first-child,
.btns-count.expanded > :nth-child(2) {
  display: block;
}
.btn-count {
  translate: 0 2px;
  font-size: 60px;
  line-height: 0;
  height: 40px;
  width: 40px;
  display: block;
  outline: none;
}
.counter {
  translate: 0 2px;
  font-family: var(--ff-sec);
  font-size: 40px;
  line-height: 0;
}
.app__hero {
  display: grid;
  gap: 20px;
  margin-bottom: 30px;
  text-align: center;
}
.menu-cat-wrap {
  position: sticky;
  top: 60px;
  z-index: 100;
  overflow-x: auto;
  width: 100%;
  margin-bottom: 30px;
  padding-block: 10px;
  background-color: var(--clr-dark);
}
.menu-cat-wrap::-webkit-scrollbar {
  height: 6px;
}
.menu-cat-wrap::-webkit-scrollbar-track {
  background-color: transparent;
  border-radius: 100vw;
}
.menu-cat-wrap::-webkit-scrollbar-thumb {
  background-color: var(--clr-gray);
  border-radius: 100vw;
}
.menu-cat {
  width: -moz-max-content;
  width: max-content;
}
.menu-cat > * {
  display: inline-block;
  color: var(--clr-light);
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-decoration-line: underline;
  text-underline-offset: 5px;
  transition: text-decoration-color 0.3s ease-in-out;
}
.menu-cat > *:hover {
  text-decoration-color: var(--clr-light);
}
.menu-cat > *:not(:last-child) {
  margin-right: 20px;
}
.category {
  display: grid;
  gap: 20px 0;
  margin-top: -50px;
  padding-top: 50px;
}
.category hgroup {
  position: relative;
  display: grid;
}
.category hgroup .to-top {
  position: absolute;
  top: 0;
  right: 0;
}
.cards {
  --min: 200px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(var(--min), 100%), 1fr));
  gap: 20px;
  margin-bottom: 30px;
}
.card {
  --promo-pad: 3px;
  --img-h: 184px;
  display: grid;
  grid-template-rows: var(--img-h) auto auto;
  align-content: start;
  gap: 10px;
  cursor: pointer;
}
.card__figure {
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100%;
  border-radius: var(--borr-mid);
}
.card__figure img {
  grid-area: 1/1/-1/-1;
  height: var(--img-h);
}
.card__label {
  grid-area: 1/1/2/-1;
  z-index: 1;
  width: -moz-max-content;
  width: max-content;
  padding: 10px 15px 5px;
  background-color: #d96b4a;
  border-radius: 0 0 var(--borr-sm);
}
.card__price > :nth-child(1) {
  font-size: 28px;
}
.card__price > :nth-child(2) {
  opacity: 0.5;
  font-weight: var(--fw-m);
}
.card__name {
  margin-top: -10px;
  font-size: 21px;
}
.card__desc {
  font-size: 16px;
}
.card.promo {
  translate: 0 calc(-1 * var(--promo-pad));
  padding: var(--promo-pad);
  padding-bottom: calc(var(--promo-pad) * 2);
  background-color: var(--clr-light);
  background-color: var(--clr-promo);
  border-radius: var(--borr-mid);
}
.card.promo .card__price,
.card.promo .card__name {
  padding-inline: 8px;
}
.card:has(.line) {
  --img-h: unset;
  grid-column: 1/-1;
}
.lines {
  display: grid;
  gap: 20px;
}
.line {
  display: flex;
  align-items: center;
  gap: 10px;
}
.line em {
  font-style: normal;
}
.line > :nth-child(1) span {
  opacity: 0.6;
  font-weight: var(--fw-m);
}
@media (max-width: 640px) {
  .line > :nth-child(1) > * {
    display: block;
  }
  .line > :nth-child(1) > * .line__divider {
    display: none;
  }
}
.line > :nth-child(2) {
  display: flex;
  gap: 0 10px;
  margin-left: auto;
  font-size: 24px;
}
.line > :nth-child(2) em {
  font-weight: var(--fw-m);
}
.line .btns-count {
  align-self: center;
  translate: 0 -4px;
}
.basket {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 20px;
  translate: -50% 0;
  width: -moz-max-content;
  width: max-content;
  padding: 10px 20px 8px;
  color: var(--clr-dark);
  background-color: var(--clr-light);
  border-radius: 100vw;
  cursor: pointer;
}
.basket-expanded {
  --hgroup-h: 70px;
  --form-btm-h: clamp(100px, 3.75rem + 12.5vw, 140px);
  --s30-15: clamp(15px, 0.6114rem + 1.6304vw, 30px);
  --s20-10: clamp(10px, 0.4076rem + 1.087vw, 20px);
  max-width: unset;
  width: 100%;
  max-height: unset;
  height: 100dvh;
  padding: unset;
  background-color: transparent;
  border: none;
}
.basket-expanded__inner {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: var(--s30-15);
  background-color: var(--clr-light);
}
.basket-expanded__inner hgroup {
  height: var(--hgroup-h);
}
.basket-expanded__inner .close {
  --shift: var(--s20-10);
  position: absolute;
  top: var(--shift);
  right: var(--shift);
}
.basket-expanded__form {
  display: grid;
  grid-template-rows: auto 1fr;
}
.basket-expanded__items {
  align-content: start;
  overflow-y: auto;
  display: grid;
  height: calc(100vh - var(--hgroup-h) - var(--form-btm-h) - var(--s30-15) * 2);
  padding-right: 10px;
}
.basket-expanded__items::-webkit-scrollbar {
  width: 4px;
}
.basket-expanded__items::-webkit-scrollbar-track {
  background-color: #d3d3d3;
  border-radius: 100vw;
}
.basket-expanded__items::-webkit-scrollbar-thumb {
  background-color: var(--clr-dark);
  border-radius: 100vw;
}
.basket-expanded__item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0 10px;
  margin-bottom: 10px;
  padding-block: 10px;
}
.basket-expanded__item:not(:last-child) {
  border-bottom: 1px solid lightgray;
}
.basket-expanded__item picture {
  grid-column: 1/2;
  grid-row: 1/3;
  overflow: hidden;
  aspect-ratio: 224/184;
  width: clamp(50px, 1.5625rem + 7.8125vw, 75px);
  border-radius: 10px;
}
.basket-expanded__item picture img{
  height: 100%;
}
.basket-expanded__item-title-block {
  grid-column: 2/4;
  grid-row: 1/2;
  font-size: 21px;
  line-height: 1.2;
}
.basket-expanded__item-price {
  align-self: end;
  grid-column: 2/3;
  grid-row: 2/3;
  translate: 0 3px;
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
}
.basket-expanded__item .btns-count {
  grid-column: 3/4;
  grid-row: 2/3;
  color: var(--clr-light);
}
.basket-expanded__btm {
  align-self: end;
  display: grid;
  height: var(--form-btm-h);
  padding-top: 15px;
  border-top: 1px solid lightgray;
}
.basket-expanded__btm button[type="submit"] {
  justify-self: center;
  padding: 12px 30px 10px;
  color: var(--clr-light);
  background-color: var(--clr-dark);
  font-size: 24px;
  line-height: 1;
  border-radius: 100vw;
}
.basket-expanded__btm button[type="submit"]:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.basket-expanded__total {
  justify-self: end;
  margin-bottom: clamp(5px, -0.625rem + 4.6875vw, 20px);
  font-size: 28px;
}
