.top {
  border-bottom: 1px solid var(--line);
  background: #fffefa;
}
.top-in {
  max-width: 1460px;
  margin: auto;
  padding: 0 clamp(18px, 4vw, 66px);
  height: 69px;
  display: flex;
  align-items: center;
  gap: clamp(18px, 4vw, 70px);
}
.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  text-decoration: none;
  font-size: 32px;
  font-weight: 820;
  letter-spacing: -0.075em;
  line-height: 1;
}
.wordmark-sub {
  font-weight: 480;
  color: #725f4b;
  font-size: 21px;
  letter-spacing: -0.075em;
}
.shopmark {
  position: relative;
  align-self: center;
  width: 32px;
  height: 27px;
  margin-right: 6px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.shopmark i {
  width: 7px;
  height: 13px;
  border-radius: 1px 1px 4px 4px;
  background: #e74e2d;
  transform: skewX(-7deg);
}
.shopmark i:nth-child(2n) {
  background: #f08756;
}
.shopmark:after {
  content: "";
  position: absolute;
  inset: 12px 3px 1px;
  border: 3px solid #e74e2d;
  border-top: none;
  border-radius: 0 0 4px 4px;
}
.top nav {
  display: flex;
  align-self: stretch;
  align-items: stretch;
  gap: 25px;
}
.top nav a {
  display: flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  text-decoration: none;
  color: var(--muted);
  font-weight: 560;
  font-size: 14px;
  padding-top: 2px;
}
.top nav a[aria-current="page"] {
  border-color: var(--green);
  color: var(--ink);
}
.header-cart {
  margin-left: auto;
  background: #252820;
  color: white;
  border-radius: 22px;
  padding: 9px 15px;
  font-weight: 620;
}
#cart-count {
  border-radius: 12px;
  padding: 1px 6px;
  background: #474a40;
  font-size: 12px;
}
.bag {
  position: relative;
  width: 15px;
  height: 14px;
  border: 1.7px solid currentColor;
  border-radius: 2px;
  display: inline-block;
  margin-top: 3px;
}
.bag:before {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  top: -6px;
  height: 7px;
  border: 1.7px solid currentColor;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
}
.market-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 4px 0 22px;
}
.market-title h1 {
  font-weight: 760;
  letter-spacing: -0.075em;
}
.search {
  width: min(330px, 50%);
  position: relative;
}
.search input[type="search"] {
  height: 42px;
  border-color: #d8d8cc;
  border-radius: 24px;
  background: #fffefa;
  padding: 0 16px 0 42px;
  font-weight: 420;
  font-size: 14px;
}
.search > span {
  position: absolute;
  left: 16px;
  top: 13px;
  width: 13px;
  height: 13px;
  border: 1.7px solid #707267;
  border-radius: 50%;
}
.search > span:after {
  content: "";
  position: absolute;
  bottom: -3px;
  right: -4px;
  width: 6px;
  height: 2px;
  background: #707267;
  transform: rotate(46deg);
}
.market-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(255px, 23vw, 318px);
  gap: clamp(16px, 2vw, 30px);
  align-items: start;
}
.storefronts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}
.storefront {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 0;
  border-radius: 13px;
  display: block;
  text-align: left;
  padding: 16px 19px;
  height: 126px;
}
.storefront > div {
  position: relative;
  z-index: 2;
  width: 60%;
}
.storefront div > span {
  display: block;
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 680;
}
.storefront strong {
  display: block;
  line-height: 1.04;
  font-family: "Georgia", "STIX Two Text", serif;
  font-weight: 480;
  font-size: clamp(30px, 3.5vw, 53px);
  letter-spacing: -0.07em;
  margin: 3px 0 7px;
}
.storefront small {
  font-size: 12px;
  font-weight: 570;
}
.storefront.chosen {
  box-shadow: inset 0 0 0 3px var(--green);
}
.sf-0 {
  color: #fcf3d1;
  background: #284a36;
}
.sf-1 {
  color: #5c281b;
  background: #f3c995;
}
.store-photo {
  position: absolute;
  inset: 0 0 0 auto;
  width: 45%;
  height: 100%;
  object-fit: cover;
  clip-path: ellipse(95% 115% at 96% 50%);
  z-index: 0;
}
.menu-head,
.desk-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 23px 0 13px;
}
.menu-head > div,
.menu-tools {
  display: flex;
  align-items: center;
  gap: 9px;
}
.menu-head h2 {
  font-size: clamp(23px, 2.3vw, 32px);
  font-weight: 690;
}
#item-count {
  align-self: center;
  background: #e9e9df;
  padding: 3px 8px;
  border-radius: 15px;
  font-size: 12px;
}
.menu-tools select,
.desk-tools select {
  width: auto;
  border: none;
  font-size: 13px;
  background: transparent;
  padding: 6px;
  color: var(--muted);
}
#all-stores {
  font-size: 12px;
  padding: 5px;
}
.products {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 14px;
}
.product {
  background: white;
  border: 1px solid #e0dfd5;
  border-radius: 13px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.product-image {
  display: block;
  aspect-ratio: 1.52;
  width: 100%;
  border: 0;
  border-radius: 0;
  padding: 0;
  overflow: hidden;
  background: #ece8d8;
}
.product-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.22s;
}
@media (prefers-reduced-motion: no-preference) {
  .product-image:hover img {
    transform: scale(1.035);
  }
}
.product-copy {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.product-meta,
.kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}
.seller-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #62926b;
}
.product[data-shop="kroshka"] .seller-dot {
  background: #d58a45;
}
.product-title {
  font-family: var(--display);
  display: block;
  padding: 0;
  margin: 6px 0 15px;
  background: none;
  text-align: left;
  font-size: clamp(16px, 1.4vw, 21px);
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 1.18;
}
.product-bottom,
.cart-head,
.cart-mini {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.product-bottom {
  margin-top: auto;
}
.product-bottom > b,
.order-row > b {
  font-size: 20px;
  letter-spacing: -0.045em;
}
.add,
.stepper {
  border-radius: 20px;
  background: #fce9df;
  color: #a7351b;
}
.add {
  border: 0;
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 25px;
  font-weight: 450;
}
.stepper {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}
.stepper button {
  background: transparent;
  color: inherit;
  border: 0;
  border-radius: 50%;
  width: 29px;
  height: 31px;
  padding: 0;
  font-size: 19px;
}
.stepper b {
  font-size: 13px;
  min-width: 9px;
  text-align: center;
}
.cart-aside {
  position: sticky;
  top: 15px;
}
.cart-pane {
  background: #fffefa;
  border: 1px solid #dbdacd;
  border-radius: 15px;
  overflow: hidden;
}
.cart-head {
  padding: 20px 19px 15px;
  border-bottom: 1px solid var(--line);
}
.cart-head h2 {
  font-size: 23px;
}
.cart-head .bag {
  color: #7f7e70;
}
.cart-empty {
  padding: 29px 12px 26px;
  text-align: center;
}
.cart-empty > strong {
  display: block;
  margin: 17px 0 6px;
  font-size: 16px;
  letter-spacing: -0.025em;
}
.cart-empty > p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}
.empty-bag {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  margin: auto;
  background: #f0eee3;
}
.empty-bag i {
  display: block;
  position: absolute;
  top: 22px;
  left: 16px;
  width: 26px;
  height: 23px;
  border: 2px solid #8f886c;
  border-radius: 3px 3px 5px 5px;
  transform: rotate(-9deg);
}
.empty-bag i:before {
  content: "";
  position: absolute;
  left: 5px;
  top: -11px;
  width: 11px;
  height: 12px;
  border: 2px solid #8f886c;
  border-radius: 10px 10px 0 0;
  border-bottom: 0;
}
.group-link {
  width: 100%;
  border: 0;
  border-radius: 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
  justify-content: space-between;
  background: #f2f2e9;
  padding: 14px 18px;
}
.payment-note {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  margin: 12px;
}
.provider-dot {
  height: 7px;
  width: 7px;
  background: #638461;
  border-radius: 50%;
}
.cart-group {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}
.cart-group h3 {
  margin-bottom: 10px;
  font-size: 18px;
}
.cart-line {
  display: flex;
  gap: 9px;
  padding: 8px 0;
}
.cart-line > div {
  min-width: 0;
  flex: 1;
}
.cart-thumb {
  flex: none;
  width: 42px;
  height: 46px;
  border-radius: 7px;
  object-fit: cover;
}
.cart-line strong {
  font-size: 13px;
  line-height: 1.2;
  display: block;
}
.cart-mini {
  margin-top: 4px;
  font-size: 12px;
}
.cart-mini .stepper button {
  width: 32px;
  height: 32px;
  font-size: 14px;
}
.sumline {
  font-size: 14px;
  padding: 6px 0;
}
.cart-group > .sumline {
  margin: 6px 0 9px;
  border-top: 1px dashed var(--line);
}
.nothing,
.empty-list {
  grid-column: 1/-1;
  text-align: center;
  padding: 35px 15px;
  color: var(--muted);
}
.nothing h3,
.empty-list h2 {
  color: var(--ink);
}
.nothing p,
.empty-list p {
  margin: 8px 0 18px;
}
.no-photo {
  display: grid;
  place-items: center;
  color: var(--muted);
  background: var(--paper);
  font-size: 12px;
}
.no-photo::after {
  content: "—";
}
.product-image .no-photo {
  height: 100%;
}
.product-image .no-photo::after,
.no-photo.detail-photo::after {
  content: "Нет фото";
}
.no-photo.detail-photo {
  display: grid;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0;
  color: var(--ink);
  background: var(--white);
  width: min(450px, 94vw);
  max-height: 90dvh;
  box-shadow: 0 18px 100px #1d211a36;
}
dialog::backdrop {
  background: #22261b66;
}
.dialog-x {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fffefa;
  color: #38352d;
  font-size: 23px;
  padding: 0;
  z-index: 1;
}
.dialog-content {
  padding: 25px;
}
.dialog-content h2 {
  margin: 0 25px 15px 0;
  font-size: 29px;
}
.dialog-content p {
  line-height: 1.5;
  margin-bottom: 16px;
}
.dialog-content .kicker {
  margin: 0 0 6px;
}
.detail-photo {
  width: 100%;
  aspect-ratio: 1.75;
  object-fit: cover;
  display: block;
}
.checkout-lines {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 10px 0 15px;
  padding: 7px 0;
}
.methods {
  margin: 0;
  border: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.methods legend {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 5px;
}
.methods label {
  display: block;
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
}
.methods label:has(:checked) {
  border-color: #d36b40;
  background: #fff4e9;
}
.methods small {
  display: block;
  padding-left: 22px;
  color: var(--muted);
}
.methods input {
  accent-color: var(--green);
  margin-right: 5px;
}
.checkout-total {
  font-size: 20px;
}
.checkout-total strong {
  letter-spacing: -0.05em;
}
.order-card h2 {
  margin: 5px 0;
  font-size: 23px;
}
.order-card p {
  margin: 12px 0;
  line-height: 1.5;
}
.pill {
  font-size: 12px;
  white-space: nowrap;
  padding: 6px 10px;
  background: #f5e9d5;
  color: #714e20;
  border-radius: 20px;
}
.pill.paid {
  color: #2e643c;
  background: #e4efdf;
}
.desk-bars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.desk-metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
.desk-metric strong {
  display: block;
  font-size: 28px;
  margin-top: 8px;
  letter-spacing: -0.05em;
}
.tabs {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.tabs button {
  background: transparent;
  font-size: 13px;
  padding: 6px 9px;
}
.tabs button[aria-pressed="true"] {
  background: var(--ink);
  color: white;
}
.login {
  max-width: 420px;
}
.nothing button,
.text-link {
  margin-top: 7px;
}
@media (min-width: 1600px) {
  .products {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 1120px) {
  .products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .storefront {
    height: 109px;
    padding: 12px;
  }
  .top-in {
    gap: 28px;
  }
}
@media (max-width: 850px) {
  .market-layout {
    grid-template-columns: 1fr;
  }
  .cart-aside {
    display: none;
  }
  .products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .top nav {
    gap: 14px;
  }
  .storefront {
    height: 105px;
  }
  .wordmark-sub {
    font-size: 18px;
  }
}
@media (max-width: 680px) {
  .top-in {
    height: auto;
    min-height: 76px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 7px;
    padding-top: 9px;
  }
  .top nav {
    grid-row: 2;
    grid-column: 1/-1;
    gap: 20px;
  }
  .top nav a {
    padding: 5px 0 8px;
    font-size: 13px;
  }
  .header-cart {
    grid-row: 1;
    grid-column: 2;
  }
  .market-title {
    align-items: flex-start;
    gap: 12px;
    flex-direction: column;
  }
  .search {
    width: 100%;
  }
  .products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .wordmark {
    font-size: 28px;
  }
  main {
    padding-top: 21px;
  }
  .storefronts {
    gap: 8px;
  }
  .storefront {
    height: 98px;
  }
  .storefront > div {
    width: 73%;
  }
  .storefront strong {
    font-size: 29px;
  }
  .storefront div > span {
    font-size: 9px;
  }
  .storefront small {
    font-size: 10px;
  }
  .product-copy {
    padding: 10px;
  }
  .menu-head {
    margin: 17px 0 10px;
  }
  .menu-tools {
    flex-wrap: wrap;
    justify-content: end;
  }
  .product-meta {
    font-size: 10px;
  }
  .product-title {
    font-size: 16px;
  }
  .product-bottom > b {
    font-size: 18px;
  }
  .desk-tools,
  .order-row {
    flex-wrap: wrap;
  }
  .desk-bars {
    gap: 6px;
  }
  .desk-metric {
    padding: 12px 8px;
  }
  .desk-metric strong {
    font-size: 21px;
  }
  .desk-metric span {
    font-size: 11px;
  }
  .section-head {
    gap: 9px;
  }
  .order-card {
    padding: 16px;
  }
}
.search-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex: 1;
}
.search-tools .search {
  width: min(330px, 48%);
}
.ai-open {
  background: #e7eddf;
  color: #314b38;
  font-size: 13px;
  border-radius: 22px;
  white-space: nowrap;
}
.ai-open b {
  font-size: 16px;
}
#ai-answer {
  margin-top: 15px;
  font-size: 14px;
}
.search-tools form {
  min-width: 0;
}
@media (max-width: 680px) {
  .search-tools {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 7px;
  }
  .search-tools .search {
    width: 100%;
    flex: 1;
    min-width: 145px;
  }
  .ai-open {
    font-size: 11px;
    padding: 10px;
  }
  .search input[type="search"] {
    font-size: 12px;
  }
}
.modal-status {
  color: var(--red);
  font-size: 13px;
  margin-top: 12px;
}
@media (max-width: 540px) {
  .store-photo {
    width: 31%;
  }
  .storefront strong {
    font-size: clamp(20px, 6vw, 29px);
  }
}
